Closed lwrage closed 5 years ago
Okay, general principle of operations:
This should be a command
OSATE
menuMaking a test project for this and I just realized the obvious: the top-level system is always going to be viewed as unused.
Do we want some kind of heuristic to avoid flagging this, or do we just let the user sort it out?
Basic analysis is done. Markers are generated.
Problem: What ever mechanism "opens markers" from the problem view doesn't open the URI embedded in the marker I generate. Soemthing needs to be updated to handle this.
Next step: look into quick fixes.
Double-clicking on the marker causes the XtextEditor
to open on the .aadl
file, and the IGotoMarker
implementation it uses tries to use text positions from the marker. I cannot figure out how to introduce something into the middle that hijacks the process and uses the same mechanism we use in the search results view and AADL Navigator view to jump to URIs.
I'll come back to this after looking at quick fixes.
Quick fixes: use the extension point org.eclipse.ui.ide.markerResolution
Need to implement IMarkerResolutionGenerator
and specific IMarkerResolution
classes. Subclass WorkbenchMarkerResolution
to allow the applying multiple resolutions at once.
Marker resolution is done.
Need to figure out the editor opening problem still.
I got the marker location problem fixed. I dug around in the Xtext stuff for a while, and I found that it uses ILocationProvider
instances to get the text location of EObjects
. I updated my marker creation to use this to add start and end attributes to the marker. This makes things work. I left the URI in the marker as well, because it seems like it should be useful for something.
Moved from org.osate.ui
to org.osate.analysis.architecture
. Moved the menu command to be in a new Model Maintenance
submenu.
Still need to move navigator action over.
Navigator action moved over
Added help file.
Added autogeneration of html
from md
There should be a way to check a single package or all packages in a directory or project for unused elements. This is probably most useful for classifiers.
Currently one has to select each classifier individually and display the references to it.
child of #1371