Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Custom Diagram Implementation(How to transform a GMF-based diagram into a Papyrus-diagram)
Custom Diagram Implementation [message #1767317] Tue, 04 July 2017 15:46 Go to next message
Jan Galler is currently offline Jan GallerFriend
Messages: 7
Registered: July 2017
Junior Member
Hello guys,

I'm new to the whole Eclipse and Papyrus world. My goal is to implement a custom diagram into Papyrus as a "3rd party plugin".
I started by learning the GMF-process and successfully generated a custom diagram-editor. The custom diagram is just a simple implementation, there is much room for improvement. But my current point is just to add this custom diagram now into Papyrus regardless of the actual use/functionality yet.

I'm currently following this guide about Papyrus-Diagram-Generation.

1. Problem
Where it says " Add the following developer plugins to your workspace", I can not really follow. What does "add plugins to workspace" mean in the Eclipse world?
I prepared my workspace according to this guide.
So, I have the listed projects as projects "to build myself" in Eclipse, but not actually "installed" or something like that. Is that correct according to the first guide? I also installed the required plugins mentioned in the same guide.

2. Problem
Within this screenshot there are two root-nodes for the gmfgen-file that I do not have:
- Papyrus Extension Root Node...
- Visual ID Override Package...
Is that a problem? If so, where do I get them from?

3. Problem
Within the first guide it says "[...] right click on your gmfgen file and select the menu Generate Papyrus Diagram.".
I do not have this option in the context-menu, did I something wrong?

I'm running the following Eclipse version:
Eclipse Modeling Tools

Version: Oxygen Release (4.7.0)
Build id: 20170620-1800

I used the master-branch of Papyrus for git-checkout.
Maybe you can also suggest me more documentation etc.


Best regards
Jan
Re: Custom Diagram Implementation [message #1767392 is a reply to message #1767317] Wed, 05 July 2017 15:11 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 885
Registered: February 2011
Senior Member
Hi Jan,

The Papyrus Developer plug-ins should preferably be installed (e.g. from this update site: https://hudson.eclipse.org/papyrus/view/Oxygen/job/Papyrus-Oxygen-Developer/lastSuccessfulBuild/artifact/repository/)

It is possible to use the sources from Git, but then you'd have to start a Runtime Eclipse (Run as ... Eclipse Application) and manipulate your *.gmfgen files from this second Eclipse instance. That's useful when you are tweaking the code generator, because you don't have to reinstall it everytime, but in general, I'd go for the first option (i.e. install the developer plug-ins)

Regards,
Camille


Camille Letavernier
Re: Custom Diagram Implementation [message #1767605 is a reply to message #1767392] Fri, 07 July 2017 14:11 Go to previous messageGo to next message
Jan Galler is currently offline Jan GallerFriend
Messages: 7
Registered: July 2017
Junior Member
Hi Camille,

I tried to install the plug-ins from the repository by pointing the Eclipse install dialog to the given URL.
The installer stops with the following error message:
Cannot complete the install because one or more required items could not be found.
  Software being installed: Papyrus Developer Tools (Incubation) 3.0.0.201707070222 (org.eclipse.papyrus.dev.feature.feature.group 3.0.0.201707070222)
  Missing requirement: Papyrus Code Generator for GmfGen models 1.2.0.201707070222 (org.eclipse.papyrus.codegen 1.2.0.201707070222) requires 'bundle org.eclipse.gmf.codegen.xtend [1.0.0,2.0.0)' but it could not be found
  Cannot satisfy dependency:
    From: Papyrus Developer Tools (Incubation) 3.0.0.201707070222 (org.eclipse.papyrus.dev.feature.feature.group 3.0.0.201707070222)
    To: org.eclipse.papyrus.codegen [1.2.0.201707070222]


I previously installed Xtend version 2.11.0, so I do not understand where I went wrong. Does the error message mean, that I need to downgrade Xtend 2.11.0 to 2.0.0? If so, how do I do that?

The steps I took: see attached screenshots.

Thanks for your quick response.

Jan
Re: Custom Diagram Implementation [message #1767607 is a reply to message #1767605] Fri, 07 July 2017 14:24 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 885
Registered: February 2011
Senior Member
Hi Jan,

The Papyrus Code generator depends on GMF Tooling, which left the Eclipse Release Train this year. So you need to install it separately (Or at least reference their update site):

http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/releases-3.3.1a

This should solve your dependency issue (This is not an Xtend issue, it's simply that the GMF Tooling code generator is implemented with Xtend. But it's really the code generator that is missing)

HTH,
Camille


Camille Letavernier
Re: Custom Diagram Implementation [message #1769285 is a reply to message #1767607] Fri, 28 July 2017 15:06 Go to previous messageGo to next message
Jan Galler is currently offline Jan GallerFriend
Messages: 7
Registered: July 2017
Junior Member
@Camille: Thanks for your answer. I got a lot further. :)

My current problem is: The GMF process for a custom diagram fails during the final transformation that generates the *.gmfgen file in Oxygen. But I can not install the Papyrus-Dev-Plugins in Neon (see attachment "papyrus-dev-plugin-install" and "papyrus-dev-plugin-install-error"). So, I use Neon for the GMF process. For the Papyrus-Diagram-Generator, I use Oxygen.
There seems to be a dependency-problem, but I don't know how to solve it.

Still, it is possible to work around the problem by using two different Eclipse versions.
When I finally try to generate the Papyrus-Diagram in Oxygen, it runs till some percent and stops with the following error: (see attachment "papyrus-generation-error")

I reviewed the generated code and can see a _lot_ of syntax errors. There is source code from - I think - xtend in the generated source files. Not just the part that xtend should put in there, but also actual xtend statements (see attachment generated-syntax-errors.zip).
This seems to be unsolvable without a hint. I went to the Papyrus-Wiki and Francois Le Fevre added a note about file-encoding problems into the dependencies. He recommends to install "xtend editor" (see attachment "papyrus-wiki-revision-note"). But I have no idea where to find and install it? Any hint on that?


The Neon I use:
Eclipse Modeling Tools

Version: Neon.3 Release (4.6.3)
Build id: 20170314-1500


The Oxygen I use:
Eclipse Modeling Tools

Version: Oxygen Release (4.7.0)
Build id: 20170620-1800


Thanks to everyone. :)
Re: Custom Diagram Implementation [message #1769287 is a reply to message #1769285] Fri, 28 July 2017 15:43 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 885
Registered: February 2011
Senior Member
Hi,

I wouldn't recommend using two different versions of Papyrus for the code generation, as gmfgen models and code generation can change quite a lot between versions, so you should use Oxygen exclusively.

if you want to use Neon exclusively, the developer plug-ins are available here [1] (Oxygen ones are here [2]. The missing "oep.uml.m2m.qvto.common" plug-in is only available in Papyrus Oxygen, so you won't be able to install it on Neon

Regarding Xtend, it is part of the Eclipse Release Train, so you can find it in the update site for your current eclipse release, i.e. [3] or [4] depending on whether you're using Neon or Oxygen. Simply look for "Xtend IDE"

[1] https://hudson.eclipse.org/papyrus/view/Neon/job/Papyrus-Neon-Developer/lastSuccessfulBuild/artifact/repository/
[2] https://hudson.eclipse.org/papyrus/view/Oxygen/job/Papyrus-Oxygen-Developer/lastSuccessfulBuild/artifact/repository/
[3] http://download.eclipse.org/releases/neon
[4] http://download.eclipse.org/releases/oxygen

HTH,
Camille


Camille Letavernier
Re: Custom Diagram Implementation [message #1769535 is a reply to message #1769287] Tue, 01 August 2017 11:46 Go to previous messageGo to next message
Jan Galler is currently offline Jan GallerFriend
Messages: 7
Registered: July 2017
Junior Member
Hello everyone,

Thanks Camille, I also want to just use a single version exclusively because of stability and integrity - sure.
But it seems like I can not use Neon, because of the unavailability of the "oep.uml.m2m.qvto.common" plug-in, right?
So I thought I'd start to troubleshoot the Oxygen process again... The thing is more of a GMF problem as a Papyrus problem, I guess:
When I want to transform - within the GMF process - from the *.gmfmap to the *.gmfgen, the transformation fails with the following error:
java.lang.NoSuchMethodError: org.eclipse.m2m.internal.qvt.oml.compiler.QVTOCompiler.compile(Lorg/eclipse/m2m/internal/qvt/oml/compiler/UnitProxy;Lorg/eclipse/m2m/internal/qvt/oml/compiler/QvtCompilerOptions;Lorg/eclipse/emf/common/util/Monitor;)Lorg/eclipse/m2m/internal/qvt/oml/compiler/CompiledUnit;
	at org.eclipse.gmf.internal.xpand.util.ResourceManagerImpl.doLoadQvtResource(ResourceManagerImpl.java:80)
	at org.eclipse.gmf.internal.xpand.util.ResourceManagerImpl.loadQvtResourceThroughCache(ResourceManagerImpl.java:64)
	at org.eclipse.gmf.internal.xpand.util.ResourceManagerImpl.loadQvtResource(ResourceManagerImpl.java:47)
	at org.eclipse.gmf.internal.xpand.model.Scope.findExtension(Scope.java:148)
	at org.eclipse.gmf.internal.xpand.model.ExecutionContextImpl.getImportedModules(ExecutionContextImpl.java:293)
	at org.eclipse.gmf.internal.xpand.model.ExecutionContextImpl.getOCLEnvironment(ExecutionContextImpl.java:254)
	at org.eclipse.gmf.internal.xpand.ocl.TypeHelper.getTypeForName(TypeHelper.java:35)
	at org.eclipse.gmf.internal.xpand.model.ExecutionContextImpl.findDefinition(ExecutionContextImpl.java:231)
	at org.eclipse.gmf.internal.xpand.model.ExecutionContextImpl.findDefinition(ExecutionContextImpl.java:167)
	at org.eclipse.gmf.internal.xpand.XpandFacade.evaluate(XpandFacade.java:54)
	at org.eclipse.gmf.graphdef.codegen.FigureGenerator.fqnSwitch(FigureGenerator.java:85)
	at org.eclipse.gmf.internal.bridge.genmodel.InnerClassViewmapProducer.createViewmap(InnerClassViewmapProducer.java:123)
	at org.eclipse.gmf.internal.bridge.genmodel.InnerClassViewmapProducer.create(InnerClassViewmapProducer.java:76)
	at org.eclipse.gmf.internal.bridge.genmodel.DiagramGenModelTransformer.process(DiagramGenModelTransformer.java:413)
	at org.eclipse.gmf.internal.bridge.genmodel.MappingTransformer.transform(MappingTransformer.java:31)
	at org.eclipse.gmf.internal.bridge.transform.TransformToGenModelOperation$2.process(TransformToGenModelOperation.java:446)
	at org.eclipse.gmf.internal.bridge.transform.TransformToGenModelOperation.executeTransformation(TransformToGenModelOperation.java:272)
	at org.eclipse.gmf.internal.bridge.ui.dashboard.actions.TransformMap2GenModelAction.run(TransformMap2GenModelAction.java:65)
	at org.eclipse.gmf.internal.bridge.ui.dashboard.HyperlinkFigure$1.mousePressed(HyperlinkFigure.java:63)
	at org.eclipse.draw2d.Figure.handleMousePressed(Figure.java:938)
	at org.eclipse.draw2d.SWTEventDispatcher.dispatchMousePressed(SWTEventDispatcher.java:242)
	at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseDown(LightweightSystem.java:523)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:193)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4257)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1502)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1525)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1510)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1314)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4081)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3698)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1044)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)


Searching the web didn't do the thing. As I can see, the method compile() can't be found (with the given signature). So, it seems like a compatibility problem, right? The calling code of the QVT uses another signature for compile() or so?
Maybe there is a version-conflict or something like that?
I don't know, where or for what to look and search. I didn't install anything of QVT manually, I guess it's a dependency of the GMF stuff and was (hopefully) installed automatically? Or do I need to install something manually?
Maybe someone has a hint, as I'm not getting anywhere with the problem...

Thanks a million.


Update:
These plug-ins related to the term "QVT" are currently installed:
See attachment "qvt-plugins".
(I just installed the QVT operational stuff)

[Updated on: Tue, 01 August 2017 12:43]

Report message to a moderator

Re: Custom Diagram Implementation [message #1769971 is a reply to message #1769535] Mon, 07 August 2017 08:03 Go to previous messageGo to next message
Camille Letavernier is currently offline Camille LetavernierFriend
Messages: 885
Registered: February 2011
Senior Member
Hi,

You should probably try to manually install QVTo for your current Eclipse version, just to make sure the right version is used.

Papyrus diagrams use GMFGen models directly (Skipping the GMFMap and transformations), so I can't tell much about it

Camille


Camille Letavernier
Re: Custom Diagram Implementation [message #1770226 is a reply to message #1769971] Wed, 09 August 2017 08:45 Go to previous message
Jan Galler is currently offline Jan GallerFriend
Messages: 7
Registered: July 2017
Junior Member
Hi,

I tried several QVTo versions, no change.
But how do you generate GMFGen models directly? The Papyrus-Simple-Diagram-Tutorial advises to use the GMF process to get the final *.gmfgen file.

Is there any chance to get the Papyrus-Dev-Plugin into Neon, so I can stick to Neon and use the "right click -> generate diagram" option that the Dev-Plugin provides?
Or is there a good chance to do what the Dev-Plugin does manually?

Thanks for your help.
Jan
Previous Topic:Problem in displaying lifeline's name in Papyrus
Next Topic:[Solved] Problem to retrieve Papyrus Java profile's stereotypes
Goto Forum:
  


Current Time: Sat Sep 22 01:12:45 GMT 2018

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

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

Back to the top