Opened 8 years ago

Last modified 8 years ago

#4351 new defect

OMEdit: Keep abbreviated library paths from import when moving components

Reported by: Jan Kokert Owned by: Adeel Asghar
Priority: normal Milestone: Future
Component: OMEdit Version:
Keywords: import not restored Cc:

Description

Bug: Abbreviated library paths defined by import will be reset after moving components in the Diagram View.

Code example:

model importTest
  import EL = Modelica.Electrical;
  
  EL.Analog.Basic.Resistor resistor annotation(
    Placement(visible = true, transformation(origin = {0, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));

end importTest;

1.) Open the provided code example
2.) Go to Diagram View and move the resistor somewhere
3.) Go back to the TextView

Result:
The abbreviated statement EL.Analog.Basic.Resistor
was replaced by the full Modelica.Electrical.Analog.Basic.Resistor

An undo will set the component back to its original position, but the abbreviated library path is not restored.

Change History (2)

comment:1 by Jan Kokert, 8 years ago

Summary: OMEdit: Keep import abbreviations when moving componentsOMEdit: Keep abbreviated library paths from import when moving components

comment:2 by Jan Kokert, 8 years ago

I have the feeling that the import statement is not evaluated in OMEdit at all. Consider the case when a model is extended from another model and its path is given (abbreviated) by an import statement.
Good examples for this issue can be found in Modelica.Electrical.Digital.Basic.*. The red cross symbol is displayed in OMEdit as the imported SISO model is not interpreted/found correctly.
I can't imagine how complicated it is to fix this issue - but I hope it is doable :D

Last edited 8 years ago by Jan Kokert (previous) (diff)
Note: See TracTickets for help on using tickets.