osate / osate2

Open Source AADL2 Tool Environment
http://osate.org
Eclipse Public License 2.0
36 stars 8 forks source link

Provide single wizard for new AADL package #1029

Closed lwrage closed 6 years ago

lwrage commented 6 years ago

Currently there are 2 wizards to create a new package (textual vs. graphical). It would be better to have a single wizard with two ok buttons or a checkbox to invoke either the textual or graphical editor. I propose to use the wizard for textual AADL packages and extend it to call the graphical editor. This wizard allows selection of a directory for the package, whereas the graphical editor puts all packages in a directory named 'packages.'

lwrage commented 6 years ago

@philip-alldredge What do you think?

philip-alldredge commented 6 years ago

I think having a single wizard is a good idea. It should provide a more consistent user experience. I think a checkbox should be sufficient unless we want the user to specify where to place the diagram. Thoughts? Currently all the diagrams are placed in the diagrams folder but that isn't something that is required.

lwrage commented 6 years ago

I don't think we need to change the diagrams folder.

However, if we wanted to we could consider grouping AADL files and diagram files like we do with instance models. When you instantiate a component from an aadl file in a directory D, then the instance model is put in D/instances. I don't really know if something similar would be a good idea for diagrams, I just wanted to mention the option.

lwrage commented 6 years ago

Two different finish buttons seem not to be possible given the wizard framework.

lwrage commented 6 years ago

Modify NewAadlPackageWizard in org.osate.ui

lwrage commented 6 years ago

Should look like this: 1517515633605166004597

AaronGreenhouse commented 6 years ago

Isn't this problematic because the graphical editor is in a separate plug-in from the regular AADL stuff?

AaronGreenhouse commented 6 years ago

Oops. I was confusing the graphical editor with the workbench. I thought the GE is export controlled, but it's not. It's always present.

AaronGreenhouse commented 6 years ago

Lutz gives this advice for testing for optional plug-ins

BTW, you'd test for the presence of a plugin P by adding an optional dependency on P to your plugin. Then you load one of its classes at runtime and check if that throws an exception. FOr compilation you'll obviously need P (or a mock version of P).

For example, com.rockwellcollins.atc.resolute.analysis.export.Dcase does that to determine if DCase is installed.

AaronGreenhouse commented 6 years ago

plug-in org.osate.ge depends on org.osate.ui. The merged wizard cannot be in org.osate.ui or there would be a cyclic dependency. Putting it in org.osate.ge seems strange. But also seems strange to create a new plug-in just for the wizard (althought that would be cleaner choice). Could put all the OSATE wizards in the one plug-in, would be a bit cleaner.

Thoughts?

joeseibel commented 6 years ago

I will modify CreateDiagramFromNavigatorHandler and OpenDiagramFromNavigatorHandler to remove dependency from org.osate.ge to org.osate.ui.

joeseibel commented 6 years ago

CreateDiagramFromNavigatorHandler and OpenDiagramFromNavigatorHandler no longer depend on org.osate.ui.

See https://github.com/osate/osate-ge/commit/f72414bebc2e18ea541f359d619d19e11d98eb99.

AaronGreenhouse commented 6 years ago

Fixed the wizard in org.osate.ui. Had to update the Abstract wizard superclass a bit.

org.osate.ge NO LONGER depends on org.osate.ui.

org.osate.ui now DEPENDS ON org.osate.ge.