Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Template GMF migration from 2.1 to 2.2
Template GMF migration from 2.1 to 2.2 [message #235894] Fri, 10 July 2009 08:48 Go to next message
Eclipse UserFriend
Originally posted by: aurelien.pupier.esial.net

Hi,

I'm trying to migrate from GMF 2.1 to GMF 2.2
For the gmfmap and gmfgen it seems to work great but for the templates...

I followed this :
http://wiki.eclipse.org/GMF_Xpand_Migration_howto

But few questions (some just to be sure) :
Do I need to be in Eclipse 3.5 to migrate?


for step : Ensure existing templates present in the workspace and can be compiled
Do I need to change the dependency range for org.eclipse.gmf.xpand? and is it just the template error that we need to avoid?

In the .xpand-root :
"As it was mentioned in org.eclipse.gmf.templates.legacy plug-in description, all legacy templates were relocated to org.eclipse.gmf.templates.legacy plug-in. Nevertheless, original template locations should be used inside .xpand-root file like:
/org.eclipse.gmf.codegen/templates
/org.eclipse.gmf.codegen.lite/templates "
Do I need to set this above in my .xpand-root? if I do that and that I've got the o.e.gmf.codegen project in my workspace there are errors in these templates (ambiguous definition)
or just let :
templates
templates-dynmodel, templates/

After multiple tries, I always have errors in my templates.migrated :
"couldn't find xpt::NativeGenAuditRoot"
"couldn't find NativeMetaModel"
"cannot find operation asValidJavaIdentifier(String) for the type null"
....

So as I didn't modified an lot the templates I tried to restart from the new o.e.gmf.codegen.
But I can't do anything, I have no completion and i have in the error log :
!ENTRY org.eclipse.xpand.ui 4 0 2009-07-10 10:43:02.246
!MESSAGE Unable to load extension file : xpt::diagram::Utils
!STACK 0
java.lang.RuntimeException: Unable to load extension file : xpt::diagram::Utils
at org.eclipse.xtend.expression.ExecutionContextImpl.internalAl lExtensions(ExecutionContextImpl.java:317)
at org.eclipse.xtend.expression.ExecutionContextImpl.getAllExte nsions(ExecutionContextImpl.java:293)
at org.eclipse.internal.xtend.expression.codeassist.ExpressionP roposalComputer.computeProposals(ExpressionProposalComputer. java:157)
at org.eclipse.xpand.ui.editor.codeassist.XpandContentAssistPro cessor.internalComputeCompletionProposals(XpandContentAssist Processor.java:93)
at org.eclipse.xtend.shared.ui.expression.editor.codeassist.Abs tractExtXptContentAssistProcessor.computeCompletionProposals (AbstractExtXptContentAssistProcessor.java:67)
at org.eclipse.jface.text.contentassist.ContentAssistant.comput eCompletionProposals(ContentAssistant.java:1832)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup .computeProposals(CompletionProposalPopup.java:556)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup .access$16(CompletionProposalPopup.java:553)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup $2.run(CompletionProposalPopup.java:488)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup .showProposals(CompletionProposalPopup.java:482)
at org.eclipse.jface.text.contentassist.ContentAssistant.showPo ssibleCompletions(ContentAssistant.java:1660)
at org.eclipse.jface.text.source.SourceViewer.doOperation(Sourc eViewer.java:835)
at org.eclipse.ui.texteditor.TextOperationAction$1.run(TextOper ationAction.java:131)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at org.eclipse.ui.texteditor.TextOperationAction.run(TextOperat ionAction.java:129)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler. java:185)
at org.eclipse.ui.internal.handlers.LegacyHandlerWrapper.execut e(LegacyHandlerWrapper.java:109)
at org.eclipse.core.commands.Command.executeWithChecks(Command. java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithCh ecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeComma nd(HandlerService.java:169)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeComman d(WorkbenchKeyboard.java:470)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(Workben chKeyboard.java:824)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEve nt(WorkbenchKeyboard.java:880)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequ enceBindings(WorkbenchKeyboard.java:569)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(Work benchKeyboard.java:510)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter .handleEvent(WorkbenchKeyboard.java:125)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:119 1)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1002)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1040 )
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1036 )
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1368)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4053)
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:346)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3946 )
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:342)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4589 )
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:24 09)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3471)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 21)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)


It's a Qvto file, need I to set up QVT Operational builder on this project? How can I do that? In new dialog for builder there is only Operational QVT transformation builder proposed...


Thanks for any advice

Aurelien Pupier
Re: Template GMF migration from 2.1 to 2.2 [message #235988 is a reply to message #235894] Fri, 10 July 2009 12:13 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Aurelien,

> Do I need to be in Eclipse 3.5 to migrate?
Yes.

> Do I need to change the dependency range for org.eclipse.gmf.xpand?
> and is it just the template error that we need to avoid?
Dependency from org.eclipse.gmf.xpand plugin is not necessary for making
custom templates compilable. This dependency is only important in case you
have some java classes working with xpand and in this case I you probably
have to modify used org.eclipse.gmf.xpand version range to [2.0.0,3.0.0)
but it is not necessary for templates migration.

>
> In the .xpand-root :
>
> "As it was mentioned in org.eclipse.gmf.templates.legacy plug-in
> description, all legacy templates were relocated to
> org.eclipse.gmf.templates.legacy plug-in. Nevertheless, original
> template locations should be used inside .xpand-root file like:
>
> /org.eclipse.gmf.codegen/templates
>
> /org.eclipse.gmf.codegen.lite/templates "
>

> Do I need to set this above in my .xpand-root? if I do that and that
> I've got the o.e.gmf.codegen project in my workspace there are errors
> in these templates (ambiguous definition)
If your templates are referencing/aspecting some other templates from /org.eclipse.gmf.codegen/templates
template root then you should place this root into .xpand-root file in the
project with custom templates to make legacy template be compiled without
any problems.

Usually .xpand-root file should contain something like:

templates, /org.eclipse.gmf.codegen/templates

This meand you have /tempaltes folder in this project and this folder is
used as a root for all the custom templates (specified in .gmfgen model).
in addition templates from this root aspect/orevvide original templates from
/org.eclipse.gmf.codegen/templates. This information is (and always was)
necessary for xpand editor to be able to correctly compile templates/show
corresponding errors.


I suggest you to close o.e.gmf.codegen (and other projects with unnecessary
metamodels/templates located in your workspace) during templates migration
step. Sometimes meta-model files from this plugin (gmfgen.ecore/gmfgen_2008.ecore/gmfgen_2007.ecore)
can be loaded and used by xpand template builder/migration tool in conjunction
with meta-models located in platform:/plugin so there will be a clashes leading
to some compilation problems.

> After multiple tries, I always have errors in my templates.migrated :
So, you was able to migrate legacy templates without migration problems,
but you got some compilation problems in a migrated templates?
This can happen in this case you probably have to review migrated templates
contents and make them compilable again...

> "couldn't find xpt::NativeGenAuditRoot"
Native "escapeXML" query from this file was relocated to gmf::CodeGenerationUtils

> "couldn't find NativeMetaModel"
Native queries from this file were repackaged: "getGetAccessor" query was
moved to gmf::GenModelUtils, "safeName" - to gmf::CodeGenerationUtils

> "cannot find operation asValidJavaIdentifier(String) for the type
This query should be called "validJavaIdentifier" from now and it is in gmf::CodeGenerationUtils

As you can see we've changed some native queries just after templates migration,
but if you can migrate your templates without migration errors then it probably
means the rest should be fixed manually.

> java.lang.RuntimeException: Unable to load extension file :
> xpt::diagram::Utils
> at
> org.eclipse.xtend.expression.ExecutionContextImpl.internalAl lExtension
> s(ExecutionContextImpl.java:317)
> at
> org.eclipse.xtend.expression.ExecutionContextImpl.getAllExte nsions(Exe
> cutionContextImpl.java:293)
> at
> org.eclipse.internal.xtend.expression.codeassist.ExpressionP roposalCom
> puter.computeProposals(ExpressionProposalComputer.java:157)
> at
> org.eclipse.xpand.ui.editor.codeassist.XpandContentAssistPro cessor.int
> ernalComputeCompletionProposals(XpandContentAssistProcessor. java:93)
Looks like XPAND editor you are using came from some older GMF.

> It's a Qvto file, need I to set up QVT Operational builder on this
> project? How can I do that? In new dialog for builder there is only
> Operational QVT transformation builder proposed...
This will be done for you by migration tool.
you need this builder only to see compilation errors in QVTO files. (xpand
files will be compiled even without this builder.

-----------------
Alex Shatalin
Re: Template GMF migration from 2.1 to 2.2 [message #236152 is a reply to message #235988] Wed, 15 July 2009 08:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aurelien.pupier.esial.net

Thanks for all your help. All works fine.


For the XPand editor, I think that I had to restart Eclipse but now it works. And just a question about it, is there an outline? Or do I need to fill an enhancement bug?
Re: Template GMF migration from 2.1 to 2.2 [message #236450 is a reply to message #236152] Mon, 20 July 2009 11:06 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Aurelien,

You can file it.

-----------------
Alex Shatalin
Previous Topic:Problem with class imports
Next Topic:Multiple Labels on One Connection
Goto Forum:
  


Current Time: Thu May 28 06:30:30 GMT 2020

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

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

Back to the top