New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete EMFIndexRetrieval #1036

Closed
joeseibel opened this Issue Feb 8, 2018 · 13 comments

Comments

Projects
None yet
5 participants
@joeseibel
Contributor

joeseibel commented Feb 8, 2018

EMFIndexRetrieval is now deprecated. All usages of EMFIndexRetrieval in OSATE should be changed.

blocked by #1089
blocked by #1309

@philip-alldredge

This comment has been minimized.

Collaborator

philip-alldredge commented Feb 8, 2018

What is the reasoning for deprecating EMFIndexRetrieval. The graphical editor has moved away from EMFIndexRetrieval but still uses something that has many similarities (ScopedEMFIndexRetrieval). Is the reasoning something that would make us reconsider our usage of the EMF index?

@reteprelief

This comment has been minimized.

Contributor

reteprelief commented Feb 8, 2018

Can you give the user a clue what should be used instead?

@joeseibel

This comment has been minimized.

Contributor

joeseibel commented Feb 8, 2018

EMFIndexRetrieval does not respect project references. IGlobalScopeProvider does.

@lwrage

This comment has been minimized.

Contributor

lwrage commented Feb 12, 2018

We could also provide a replacement utility class that (a) does the right thing and (b) has a better name as there is no such thing as an EMF index.
(EMF index was an EMFT project for a while but it was abandoned in 2012. IIRC, its goal was to generalize the Xtext resource description mechanism.)

@lwrage lwrage changed the title from Don't use EMFIndexRetrieval to Eliminate all usages of EMFIndexRetrieval Jun 2, 2018

@lwrage

This comment has been minimized.

Contributor

lwrage commented Jun 8, 2018

This class is an abomination. It also breaks non-UI testing, because it uses a UI ResourceDescriptionsProvider, which is set via a hack in org.osate.xtext.aadl2.properties.ui.MyPropertiesActivator. We should delete the class and never speak of it again.

@lwrage lwrage added this to the 2.3.4 milestone Jun 11, 2018

@lwrage lwrage removed this from the 2.3.4 milestone Jun 14, 2018

@lwrage lwrage added this to the 2.3.5 milestone Jul 2, 2018

@wafflebot wafflebot bot added in progress and removed next labels Jul 27, 2018

@wafflebot wafflebot bot added review and removed in progress labels Jul 27, 2018

@lwrage lwrage added in progress and removed review labels Jul 30, 2018

@wafflebot wafflebot bot removed the in progress label Jul 31, 2018

@lwrage lwrage reopened this Jul 31, 2018

@lwrage lwrage added the in progress label Jul 31, 2018

@lwrage

This comment has been minimized.

Contributor

lwrage commented Jul 31, 2018

The class is still used in smaccm

@lwrage lwrage added next and removed in progress labels Jul 31, 2018

@brlarson

This comment has been minimized.

brlarson commented Aug 2, 2018

Okay, Joe/Lutz:
How do I getAllPackagesInWorkspace using IGlobalScopeProvider?
Some static utility class would be helpful.

@lwrage

This comment has been minimized.

Contributor

lwrage commented Aug 3, 2018

The global scope provider doesn't work on the workspace as a whole (and it shouldn't)! The global scope is the current project and all projects it depends on (directly or indirectly).
If you look up elements in the workspace you are ignoring project dependencies, which will likely lead to problems. For example, you can have two projects with the same files in a workspace. If they don't depend on each other there are no name conflicts, even though all (global) names exist twice in the workspace.

@brlarson

This comment has been minimized.

brlarson commented Aug 4, 2018

Okay, so IGlobalScopeProvider may not be what I need:

How can I find every component with a BLESS annex subclause to generate verification conditions?

(In a second pass, an assume-guarantee VC is generated for every connection between ports with BLESS::Assertion properties, and drop an info marker on each connection that doesn't have them on both ends.)

@lwrage

This comment has been minimized.

Contributor

lwrage commented Aug 9, 2018

If you really want to work with the workspace as a whole (why?) you need to inject ResourceDescriptionsProvider, get the resource descriptions and get the exported objects. EMFIndexRetrieval does this, but in the wrong way because it combines dependency injection with static methods, which leads to hacks like the one I mentioned in an earlier comment.

@lwrage

This comment has been minimized.

Contributor

lwrage commented Aug 22, 2018

@reteprelief There are still two usages in smaccm:

  • com.rockwellcollins.atc.tcg.util.TcgUtils
  • edu.uah.rsesc.aadlsimulator.ui.launch.SimulationTab

@lwrage lwrage modified the milestones: 2.3.5, 2.3.6 Aug 31, 2018

@reteprelief reteprelief assigned lwrage and unassigned reteprelief Sep 7, 2018

@lwrage

This comment has been minimized.

Contributor

lwrage commented Sep 14, 2018

The class will be removed in OSATE 2.3.6

@brlarson

This comment has been minimized.

brlarson commented Sep 17, 2018

How I got all the AADL packages in the workspace w/o EMFIndexRetrieval:

	HashSet<IFile> files = TraverseWorkspace.getAadlFilesInWorkspace();
	for (IFile file : files)
		{
		ModelUnit ir = (ModelUnit) AadlUtil.getElement(file);
		if (ir instanceof AadlPackage)
			{

...

@wafflebot wafflebot bot added review and removed in progress labels Oct 18, 2018

@lwrage lwrage changed the title from Eliminate all usages of EMFIndexRetrieval to Delete EMFIndexRetrieval Oct 18, 2018

@wafflebot wafflebot bot removed the review label Oct 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment