I am working with integrating the AADL Properties view into my plugin and I encountered a few issues.
When creating a new property association using the AADL Properties view with an editor that has unsaved changes, the editor prompts the user to reload the editor and discard changes.
I need a mechnaism to allow graphical editors to provide information to the AADL Properties view. In particular the Xtext document and the AADL element that is selected.
When not using an XtextDocument the property viewer will throw a null pointer exception if it is unable to retrieve an editing domain.
I have created a patch for your consideration that resolves these issues. Detailed changes are below.
Changes:
Added IAadlPropertySource to org.osate.xtext.aadl2.ui.propertyview to provide a mechanism for
external plugins to provide the AADL Property Value view with the selected AADL element and other related objects.
Export the org.osate.xtext.aadl2.ui.propertyview package to allow plugin developers to access IAadlPropertySource.
Updated AadlPropertyView to check if the current selection is adaptable to IAadlPropertySource.
Updates to ProeprtyAssociationWizard:
Code path that uses command stack will now check if it is null and create a temporary editing domain if necessary instead of triggering a null pointer exception.
XtextDocument code path now retrieves the property holder from the resource provided by the Xtext modify() method and no longer saves the resource. This allows the property editor to work with an Xtext editor that has changes without prompting the user for a refresh when changes are made.
AadlUti::isImportedPropertySet returns true if two property sets have the same qualified name instead of being the same instance. This allows the comparison between property sets to pass when they are different instances. For example when one property set is from an Xtext controlled dirty resource set and one is from the persistent resource set.
I am working with integrating the AADL Properties view into my plugin and I encountered a few issues.
I have created a patch for your consideration that resolves these issues. Detailed changes are below.
Patch: https://gist.github.com/philip-alldredge/42bb37619f8399452a05
Changes: Added IAadlPropertySource to org.osate.xtext.aadl2.ui.propertyview to provide a mechanism for external plugins to provide the AADL Property Value view with the selected AADL element and other related objects.
Export the org.osate.xtext.aadl2.ui.propertyview package to allow plugin developers to access IAadlPropertySource.
Updated AadlPropertyView to check if the current selection is adaptable to IAadlPropertySource.
Updates to ProeprtyAssociationWizard: Code path that uses command stack will now check if it is null and create a temporary editing domain if necessary instead of triggering a null pointer exception.
XtextDocument code path now retrieves the property holder from the resource provided by the Xtext modify() method and no longer saves the resource. This allows the property editor to work with an Xtext editor that has changes without prompting the user for a refresh when changes are made.
AadlUti::isImportedPropertySet returns true if two property sets have the same qualified name instead of being the same instance. This allows the comparison between property sets to pass when they are different instances. For example when one property set is from an Xtext controlled dirty resource set and one is from the persistent resource set.