@@ -551,8 +551,8 @@ algorithm
551551 case (BackendDAE . VAR (source= source))
552552 algorithm
553553 paths := ElementSource . getElementSourceTypes(source);
554- _ := list(Absyn . pathString(p) for p in paths);
555- // print("paths_lst "+stringDelimitList(paths_lst, "; ")+"\n");
554+ // _ := list(Absyn.pathString(p) for p in paths);
555+ // print("paths_lst "+stringDelimitList(paths_lst, "; ")+"\n");
556556 (obj,_) := hasVisPath(paths,1 );
557557 then Util . stringNotEqual(obj,"" );
558558 else
@@ -568,30 +568,29 @@ author:Waurich TUD 2015-04"
568568 output tuple< list< BackendDAE . Var > ,list< DAE . ComponentRef >> tplOut;
569569algorithm
570570 tplOut := matchcontinue(var ,tplIn)
571- local
572- Boolean b;
573- Integer idx;
574- BackendDAE . Type varType;
575- DAE . ComponentRef varName, cref;
576- list< DAE . ComponentRef > crefs;
577- DAE . ElementSource source;
578- list< BackendDAE . Var > varLst;
579- String obj;
580- list< Absyn . Path > paths;
581- list< String > paths_lst;
582- case (BackendDAE . VAR (varName= varName, source= source), (varLst,crefs))
571+ local
572+ Integer idx;
573+ DAE . ComponentRef varName, cref;
574+ list< DAE . ComponentRef > crefs;
575+ DAE . ElementSource source;
576+ list< BackendDAE . Var > varLst;
577+ String obj;
578+ list< Absyn . Path > paths;
579+
580+ case (BackendDAE . VAR (varName= varName, source= source), (varLst,crefs))
583581 algorithm
584- paths := ElementSource . getElementSourceTypes(source);
585- _ := list(Absyn . pathString(p) for p in paths);
586- // print("paths_lst "+stringDelimitList(paths_lst, "; ")+"\n");
587- (obj,idx) := hasVisPath(paths,1 );
588- true := Util . stringNotEqual(obj,"" );
589- // print("ComponentRef "+ComponentReference.printComponentRefStr(varName)+" path: "+obj+ " idx: "+intString(idx)+"\n");
590- cref := ComponentReference . firstNCrefs(varName,idx- 1 );
591- crefs := List . unique(cref::crefs);
592- then (var ::varLst,crefs);
593- else
594- then tplIn;
582+ paths := ElementSource . getElementSourceTypes(source);
583+ // print("Component " + ComponentReference.printComponentRefStr(varName) + ":\n");
584+ // print(List.toString(paths, Absyn.pathStringDefault, "", " ", "\n ", "", false) + "\n");
585+ (obj,idx) := hasVisPath(paths,1 );
586+ true := Util . stringNotEqual(obj,"" );
587+ // print("ComponentRef "+ComponentReference.printComponentRefStr(varName)+" path: "+obj+ " idx: "+intString(idx)+"\n");
588+ cref := ComponentReference . firstNCrefs(varName,idx- 1 );
589+ crefs := List . unique(cref::crefs);
590+ then
591+ (var ::varLst, crefs);
592+
593+ else tplIn;
595594 end matchcontinue;
596595end isVisualizationVarFold;
597596
@@ -617,8 +616,8 @@ algorithm
617616 then (name,num);
618617 case (Absyn . QUALIFIED (name= "Modelica" ,path= Absyn . QUALIFIED (name= "Mechanics" ,path= Absyn . QUALIFIED (name= "MultiBody" ,path= Absyn . QUALIFIED (name= "Visualizers" ,path= Absyn . QUALIFIED (name= "Advanced" ,path= Absyn . IDENT (name= name))))))::_,_)
619618 algorithm
620- shapeIdent := stringAppendList( List . firstN(stringListStringChar( name), 6 ) );
621- true := stringEqual(shapeIdent,"Shape$ " );
619+ shapeIdent := substring( name, 1 , 5 );
620+ true := stringEqual(shapeIdent,"Shape" );
622621 then (name,numIn);
623622 case (_::rest,_)
624623 algorithm
0 commit comments