Description
Summary
Xtext is rebuilding all open AADL resources which reference a contributed property set whenever any file in the workspace is changed. This was observed while debugging an issue with the graphical editor but the issue is not believed to be caused by the graphical editor.
With smaller workspaces, this is not likely to cause many issues. However, with larger workspaces, it can cause performance issues if many editors are open. It is troublesome for the graphical editor because moving a shape and saving results in rebuilding the Xtext resource.
Expected and Current Behavior
It is expected when a non-AADL resource changed in the workspace is changed, then it would not trigger any change to the AADL resources.
The current behavior is that when any change occurs in the workspace, document change notifications are sent for all AADL Xtext editors which have an Xtext document that references a contributed property set.
NOTE: Disabling the addition of contributed resources to "toBeBuilt" in PropertiesToBeBuiltComputerContribution causes the resource not to be built. Should there be a check to only build if the contributed resources have changed? Is such a change possible?
Steps to Reproduce
Even though it does not appear to be caused by the graphical editor, it is easier to notice with the graphical editor. However, is can also be noticed using the Progress view in OSATE.
- (Optional). Add a print statement inside of org.osate.ge.internal.ui.xtext.OpenAadlResources.createModelListener which prints the changed resource. System.err.println("CHANGED: " + openResource.uri);
- Create an AADL Project
- Create a simple AADL package which references a contributed property set.
- Open it in the text editor.
- Open the Progress view in OSATE.
- Make a change and save any file in the workspace. For example changing a file named "README.txt".
- The model listener created by org.osate.ge.internal.ui.xtext.OpenAadlResources.createModelListener is called. The Progress view will briefly show that it is rebuilding the workspace. An AUTO_BUILD is likely expected but rebuilding individual resources is not expected.
Example AADL package.
package test
public
with ARINC653;
system top
end top;
system implementation top.impl
end top.impl;
end test;
Environment
- Platform: Windows 10.