Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » OCL XText Console not available in Eclipse 2019-09
OCL XText Console not available in Eclipse 2019-09 [message #1816407] Tue, 29 October 2019 07:17 Go to next message
Dominique Marcadet is currently offline Dominique MarcadetFriend
Messages: 18
Registered: January 2013
Junior Member
Hi,

I've tried with a simple model (Library from tutorial). I have generated the Model, Edit and Editor code from .genmodel keeping defaults, started a new Eclipse instance with Run as Java Application, created an instance Library using the Example EMF Model Creation Wizard.

Using Eclipse 2019-06, when I right-click on the resource or one of its element, the OCL submenu with its Show Xtext OCL Console is available. I don't find it anymore with Eclipse 2019-09.

I have double-check that OCL pivot and Text are installed. In the configuration tab of Installation details, I have :
org.eclipse.ocl.examples.xtext.console (4.9.0.v20190910-0937) "OCL Examples Xtext Console and Interpreter" [Starting]

Any hint about what may be missing in my Eclipse 2019-09 installation ?

Dominique
Re: OCL XText Console not available in Eclipse 2019-09 [message #1816414 is a reply to message #1816407] Tue, 29 October 2019 08:20 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6614
Registered: July 2009
Senior Member
Hi

Impossible. The release JUnit tests have tests that demonstrate the usability of the Xtext OCL Console .

Examine the Error Log to see if anything there provides some clues.

To narrow down the 'impossibility' a bit
- open an Ecore file in the Sample Ecore Model Editor and see how much of the OCL submenu is present with that editor.
- post your model and metamodel(s) so that it can be opened on another Eclipse installation
- close all projects then create a trivial EMF project and see if that works.
- create a new installation and gradually add bits till it stops working

My best guess is that some project is now making a bad contribution to some extension point, or that a newer plugin is now encountering a problem with some pre-existing contribution,. or that some plugin that wasn't updated for 2019-09 should have been. Contrarily QVTo 2019-09 has a fix to remove a bad contribution.

Regards

Ed Willink
Re: OCL XText Console not available in Eclipse 2019-09 [message #1816531 is a reply to message #1816414] Wed, 30 October 2019 15:25 Go to previous messageGo to next message
Dominique Marcadet is currently offline Dominique MarcadetFriend
Messages: 18
Registered: January 2013
Junior Member
Hi Ed,

Thanks for the reply.
I have investigate the problem, here are some elements.
I will call EclipseMain the Eclipse used to develop the EMF plugin and EclipseChild the one launched from EclipseMain to run the plugin.

Quote:

To narrow down the 'impossibility' a bit
- open an Ecore file in the Sample Ecore Model Editor and see how much of the OCL submenu is present with that editor.

OCL submenu is available both in EclipseMain and EclipseChild.

Quote:

- post your model and metamodel(s) so that it can be opened on another Eclipse installation
- close all projects then create a trivial EMF project and see if that works.

Simple.zip contains a very simple Ecore model with the generated Model, Edit and Editor plugins.
I import this archive in a newly created workspace with EclipseMain.
SimpleTest.zip contains a minimal Simple model, I import it in a new workspace with EclipseChild.
With Eclipse 2019-06, the OCL submenu is available in EclipseChild when I right-click on the open resource. With Eclipse 2019-09, it is not.

I have found a change in org.eclipse.ui.internal.PopupMenuExtender.createModelFor() :
- in Eclipse 2019-06, to find if an existing menuModel is available,"popup" is looked for in the tag.
- in Eclipse 2019-09, ContributionsAnalyzer.MC_POPUP is looked for, which is "menuContribution:popup".

If I change back the string to "popup", the OCL submenu is then available in Eclipse 2019-09.

I have no conclusion about this, but may be someone can reproduce the problem with the information given.

Regards,
Dominique
  • Attachment: Simple.zip
    (Size: 118.32KB, Downloaded 18 times)
  • Attachment: SimpleTest.zip
    (Size: 0.52KB, Downloaded 19 times)
Re: OCL XText Console not available in Eclipse 2019-09 [message #1816551 is a reply to message #1816531] Thu, 31 October 2019 08:59 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6614
Registered: July 2009
Senior Member
Hi

Well done, you have provided a repro and done a lot of helpful debugging.

A popup/menucontribution:popup change could easily explain it, making it look like a an Eclipse UI regression. Unfortunately the relevant files are in internals that the SDK neglects to provide sources for. Going to GitHub clones, it appears that the change to ContributionsAnalyzer.MC_POPUP was a change from MenuServiceFilter.MC_POPUP in 2010. What were you looking at that suggested that "popup" was looked for directly?

Regards

Ed Willink
Re: OCL XText Console not available in Eclipse 2019-09 [message #1816555 is a reply to message #1816551] Thu, 31 October 2019 10:19 Go to previous messageGo to next message
Dominique Marcadet is currently offline Dominique MarcadetFriend
Messages: 18
Registered: January 2013
Junior Member
Hi,

Ed Willink wrote on Thu, 31 October 2019 04:59
A popup/menucontribution:popup change could easily explain it, making it look like a an Eclipse UI regression. Unfortunately the relevant files are in internals that the SDK neglects to provide sources for. Going to GitHub clones, it appears that the change to ContributionsAnalyzer.MC_POPUP was a change from MenuServiceFilter.MC_POPUP in 2010. What were you looking at that suggested that "popup" was looked for directly?


The code of PopupMenuExtender is in the org.eclipse.ui.workbench plugin, I open it as a source project. Code of ContributionsAnalyzer is in plugin org.eclipse.e4.ui.workbench.

I have looked on GitHub, the last commit to PopupMenuExtender (https://github.com/eclipse/eclipse.platform.ui/commit/7efdf6755aefe96cd46a578e0b0a65b9ea44a2b2) revert the change ("popup" is back).

Regards,
Dominique
Re: OCL XText Console not available in Eclipse 2019-09 [message #1816558 is a reply to message #1816555] Thu, 31 October 2019 10:44 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6614
Registered: July 2009
Senior Member
Hi

Thanks. Are you reverting the whole change or just the "popup" bit?

It looks to me as if use of ContributionsAnalyzer.MC_POPUP on line 171 started in 2010. The chnage of "popup" on line 161 looks to just a bit of tidiness to ensure that on a revisit the ContributionsAnalyzer.MC_POPUP left by the previous visit is matched more precisely.

Maybe your source location tip will help me.

(Beware/workaround, if you open your *.simple with the Sample Ecore Model Editor the OCL menu is present. The choice of editor is sticky. This makes me suspect the bug is related to special registrations for known editors such as Ecore and UML, but I cannot find that code; it seems to have been commented out in favour of a hasRsourceSet property.)

Regards

Ed Willink

Re: OCL XText Console not available in Eclipse 2019-09 [message #1816560 is a reply to message #1816558] Thu, 31 October 2019 10:52 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6614
Registered: July 2009
Senior Member
Hi

Great. I can see source and indeed the single change to "popup" fixes it. Should be easy to debug now.

Regards

Ed Willink
Re: OCL XText Console not available in Eclipse 2019-09 [message #1816563 is a reply to message #1816560] Thu, 31 October 2019 11:59 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6614
Registered: July 2009
Senior Member
Ed Willink wrote on Thu, 31 October 2019 06:52
Should be easy to debug


No it is hard, but it looks remarkably close to

https://bugs.eclipse.org/bugs/show_bug.cgi?id=550986

which I've reopened since this regression is not fixed.

Regards

Ed Willink
Re: OCL XText Console not available in Eclipse 2019-09 [message #1816564 is a reply to message #1816563] Thu, 31 October 2019 12:19 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6614
Registered: July 2009
Senior Member
Hi

And even more like

https://bugs.eclipse.org/bugs/show_bug.cgi?id=552361

which seems to revert the 2019-09 change.

Regards

Ed Willink
Re: OCL XText Console not available in Eclipse 2019-09 [message #1816568 is a reply to message #1816564] Thu, 31 October 2019 12:45 Go to previous message
Dominique Marcadet is currently offline Dominique MarcadetFriend
Messages: 18
Registered: January 2013
Junior Member
Hi

Yes, the commit I mentioned (which does the revert) is linked to this bug.

Regards,
Dominique

Previous Topic:Problem with OCL code while comparing the same class attribute of two instances
Next Topic:Problems with a loop
Goto Forum:
  


Current Time: Sat Mar 28 18:40:55 GMT 2020

Powered by FUDForum. Page generated in 0.02418 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top