Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [acceleo] Source context menu not showing up during Android Tutorial
[acceleo] Source context menu not showing up during Android Tutorial [message #560043] Mon, 20 September 2010 21:45 Go to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
I'm trying to go through the Android Tutorial. So far so good, except that I reached section "Quick hierarchy tree."

When trying follow the step: "In the modules that contains Widgets declarations or calls, select them and then right-click and run: Source > As For/If."

I noticed there is no "Source" context menu after selecting the text. Eclipse is correctly using the acceleo template editor (I get syntax highlighting, etc.)

I did notice the following new error: Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment. I'm guessing I need to go find a new JRE. I'll update this message after I go down that path.

Thanks!

[Updated on: Mon, 20 September 2010 21:56]

Report message to a moderator

Re: [acceleo] Source context menu not showing up during Android Tutorial [message #560074 is a reply to message #560043] Tue, 21 September 2010 07:03 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

The JRE-thing is just a warning. It is best to have a Jre 6 for Java 6 projects and a Jre 5 for Java 5 projects. It is a good practice to prevent problems. It is not linked with Acceleo except that Acceleo needs Java 5 but using it with Java 6 does not create problems that I'm aware of (I do it half the time). For your missing "source menu", are you using the Java or Acceleo perspective ? Did you see any other problems with the Acceleo editor ? Does this happens even on a simple new Acceleo project ?

It should look like this on a new project:
http://img835.imageshack.us/img835/5724/asif.jpg


Stephane Begaudeau, Obeo
Re: [acceleo] Source context menu not showing up during Android Tutorial [message #624061 is a reply to message #560074] Wed, 22 September 2010 03:46 Go to previous messageGo to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
The missing source menu is from the Acceleo perspective in the new Eclipse instance after I ran the Android example as an Eclipse application. The editor seems to be syntax aware and highlights the (OCL?) code, shows the code outline, etc. It just doesn't show the source menu. Any ideas?
Re: [acceleo] Source context menu not showing up during Android Tutorial [message #625159 is a reply to message #560043] Wed, 22 September 2010 07:19 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

I still haven't succeed in reproducing that problem. But I have some questions:
1- If you open a Java file in that environment do you have the source menu there ?
2- The refactoring menu is still there ?
3- What about the other Acceleo actions ? (open declaration, search references and quick outline ?)

The only problem I've encountered while trying to reproduce yours is that with some perspective we have the source menu but our actions are deactivated. We will look into it, for that I've raised a bug in order to follow the issue (https://bugs.eclipse.org/bugs/show_bug.cgi?id=325926).

Stephane Begaudeau, Obeo

[Updated on: Wed, 22 September 2010 07:20]

Report message to a moderator

Re: [acceleo] Source context menu not showing up during Android Tutorial [message #628711 is a reply to message #625159] Thu, 23 September 2010 18:22 Go to previous messageGo to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
Stephane Begaudeau wrote on Wed, 22 September 2010 03:19
Hi,

I still haven't succeed in reproducing that problem. But I have some questions:
1- If you open a Java file in that environment do you have the source menu there ?
2- The refactoring menu is still there ?
3- What about the other Acceleo actions ? (open declaration, search references and quick outline ?)

The only problem I've encountered while trying to reproduce yours is that with some perspective we have the source menu but our actions are deactivated. We will look into it, for that I've raised a bug in order to follow the issue (https://bugs.eclipse.org/bugs/show_bug.cgi?id=325926).

Stephane Begaudeau, Obeo


In the Java editor in the new environment, the source and refactoring menus are there. In the mtl editor in the new environment, only the Android refactoring shows up as an option in the refactoring menu. In the new environment, the quick outline is functional in the mtl editor as is open declaration. I don't see a search references option in the mtl editor like I do for Java files.

Thanks!
Jeff
Re: [acceleo] Source context menu not showing up during Android Tutorial [message #636265 is a reply to message #628711] Sat, 30 October 2010 03:54 Go to previous messageGo to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
Update: I just came back to Acceleo and still have been unable to get the source menu to appear. (I edited this post because I forgot what the original problem was--it ends up that it's exactly as before.) I may try a fresh Eclipse installation. Some other useful notes though for others getting started:

I did notice when trying this for a second time that I was running out of memory, so I assumed that it is likely that I didn't have the spawned Acceleo Eclipse instance configured with enough additional memory.

I'm posting the steps here in case someone else wants to know how to alleviate this. I suspect there's a way to launch the Acceleo Eclipse instance directly rather than from a base Eclipse, but I haven't looked into how to do this yet. It seems that the spawned Eclipses don't pay attention to the Eclipse.ini settings for memory handling.

When running the new Eclipse session at the following step in the tutorial: "2. Right-Click on the Eclipse Application item and select New. Rename the configuration, choose a location, and run it."

Increase the memory using the Arguments tab in the Run Configuration window for the newly created run configuration. I used -Xms40m -Xmx512m -XX:PermSize=512m -XX:MaxPermSize=1024m

Also note that I created project from existing source (the zip file included in the tutorial) in these steps: "The Android Project - In the new Eclipse Runtime environment, you are going to create a new Android Project." (Make sure to unzip the example zip code on my desktop or somewhere besides the workspace because Eclipse copies it to the workspace when you select "from existing code"

[Updated on: Sat, 30 October 2010 04:17]

Report message to a moderator

Re: [acceleo] Source context menu not showing up during Android Tutorial [message #636266 is a reply to message #560043] Sat, 30 October 2010 04:37 Go to previous messageGo to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
Further update: I tried the "hello world" quick start from my primary Eclipse application. The source menu isn't there either in the mtl editor and the refactoring menu only has the extract Android string. I'll go try a fresh Eclipse install and test it with the hello world quick start.
Re: [acceleo] Source context menu not showing up during Android Tutorial [message #636269 is a reply to message #636266] Sat, 30 October 2010 05:28 Go to previous messageGo to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
Update: I just downloaded a fresh Galileo (3.5) SR2 Modeling package on Vista, no other installs/packages, started eclipse and followed the steps in the quick start: http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. acceleo.doc/doc/html/acceleo_tutorial_android_example.html

I opened the mtl file by double clicking, and the mtl editor shows no source menu, no right click source menu.

Please try this.
Re: [acceleo] Source context menu not showing up during Android Tutorial [message #636295 is a reply to message #636269] Sat, 30 October 2010 13:43 Go to previous messageGo to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
Update: I just did a fresh Helios (3.6) install, installed Acceleo from the Install Modeling Components menu item, and the top menu problem persists there as well, but the context menu options are available, so at least its now functional and I can proceed.

My only concern now is that the most recent Android SDK requires no later than Eclipse 3.5. It will be a hassle to switch back and forth between Eclipse platforms.

When I ask Eclipse 3.5 to check for updates, it reports everything is up to date, yet Acceleo is stuck at 0.8.1. I know that Acceleo is now up to 3.1. Is 0.8.1 the latest version that is backwards compatible with Eclipse 3.5?

[Updated on: Sat, 30 October 2010 14:04]

Report message to a moderator

Re: [acceleo] Source context menu not showing up during Android Tutorial [message #636317 is a reply to message #636295] Sat, 30 October 2010 19:42 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------050308070300050106080807
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Jeff,

I seem to have missed some of the mails along the way but ... When you
have "missing" actions, are they _all_ missing (quick outline, source
menu, refactor menu, F3 to open declarations...) or are you just missing
some?

If they are _all_ missing, are you in either the Acceleo or Java
perspective? I know we don't activate our action sets outside of these two.

Laurent Goubet
Obeo

Jeff A wrote:
> Update: I just did a fresh Helios (3.6) install, installed Acceleo from
> the Install Modeling Components menu item, and the problem persists
> there as well.


--------------050308070300050106080807
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------050308070300050106080807--
Re: [acceleo] Source context menu not showing up during Android Tutorial [message #636320 is a reply to message #636317] Sat, 30 October 2010 20:46 Go to previous messageGo to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
Based on what (you?) said in my bug report, I'm just going to use Acceleo 3.x., especially if it's supported in Galileo. I can't think of any good reason to use the old version of Acceleo if these problems are fixed in 3.x.

Thanks!
Re: [acceleo] Source context menu not showing up during Android Tutorial [message #636337 is a reply to message #560043] Sun, 31 October 2010 05:35 Go to previous messageGo to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
I'm now trying to run the example in Eclipse 3.5 that I updated with the Helios site to get the latest acceleo. I just ran into the following error. I tried to use the rename refactoring just for fun a the step in the tutorial that says:

"Extract Template

You can also use the Extract Template tool by selecting a static text, right-click and run: Refactor > Extract Template...."


When I used the rename refactoring on the template, I got a packagenotfound exception

java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:421)
at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDia log2.run(RefactoringWizardDialog2.java:330)
at org.eclipse.ltk.ui.refactoring.RefactoringWizard.internalPer formFinish(RefactoringWizard.java:557)
at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.performFi nish(UserInputWizardPage.java:153)
at org.eclipse.ltk.ui.refactoring.RefactoringWizard.performFini sh(RefactoringWizard.java:621)
at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDia log2.okPressed(RefactoringWizardDialog2.java:453)
at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:4 72)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3910)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3503)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825 )
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperatio n$1.run(RefactoringWizardOpenOperation.java:143)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperatio n.run(RefactoringWizardOpenOperation.java:155)
at org.eclipse.acceleo.internal.ide.ui.editors.template.actions .refactor.rename.AcceleoRenameAction.runWizard(AcceleoRename Action.java:377)
at org.eclipse.acceleo.internal.ide.ui.editors.template.actions .refactor.rename.AcceleoRenameAction.launchRefactoringRename Template(AcceleoRenameAction.java:163)
at org.eclipse.acceleo.internal.ide.ui.editors.template.actions .refactor.rename.AcceleoRenameAction.run(AcceleoRenameAction .java:112)
at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy. execute(ActionDelegateHandlerProxy.java:289)
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:120 8)
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.Control.traverse(Control.java:3658)
at org.eclipse.swt.widgets.Control.translateMnemonic(Control.ja va:3502)
at org.eclipse.swt.widgets.Composite.translateMnemonic(Composit e.java:1065)
at org.eclipse.swt.widgets.Control.translateMnemonic(Control.ja va:3520)
at org.eclipse.swt.widgets.Display.translateMnemonic(Display.ja va:4431)
at org.eclipse.swt.widgets.Display.filterMessage(Display.java:1 222)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3499)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Caused by: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.eclipse.org/acceleo/mtl/0.8.0' not found. (platform:/resource/org.eclipse.acceleo.module.sample.exampl e.android.oops/bin/org/eclipse/acceleo/module/sample/example /android/files/strings.emtl, 3, 30)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe mandLoadException(ResourceSetImpl.java:315)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:274)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:397)
at org.eclipse.acceleo.common.utils.ModelUtils.load(ModelUtils. java:349)
at org.eclipse.acceleo.internal.ide.ui.editors.template.actions .references.ReferencesSearchQuery.findReferencesForFile(Refe rencesSearchQuery.java:212)
at org.eclipse.acceleo.internal.ide.ui.editors.template.actions .references.ReferencesSearchQuery.run(ReferencesSearchQuery. java:157)
at org.eclipse.acceleo.internal.ide.ui.editors.template.utils.O penDeclarationUtils.findOccurrences(OpenDeclarationUtils.jav a:801)
at org.eclipse.acceleo.internal.ide.ui.editors.template.actions .refactor.rename.AcceleoPositionedTemplate.computeOccurrence sOfTemplate(AcceleoPositionedTemplate.java:125)
at org.eclipse.acceleo.internal.ide.ui.editors.template.actions .refactor.rename.AcceleoRenameTemplateRefactoring.checkFinal Conditions(AcceleoRenameTemplateRefactoring.java:112)
at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.ru n(CheckConditionsOperation.java:85)
at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(C reateChangeOperation.java:121)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run( PerformChangeOperation.java:211)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1800)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAda pter.run(WorkbenchRunnableAdapter.java:87)
at org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)
Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.eclipse.org/acceleo/mtl/0.8.0' not found. (platform:/resource/org.eclipse.acceleo.module.sample.exampl e.android.oops/bin/org/eclipse/acceleo/module/sample/example /android/files/strings.emtl, 3, 30)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(X MLHandler.java:2590)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefi x(XMLHandler.java:2421)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1299)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1468)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:87)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:169)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
at org.eclipse.acceleo.model.mtl.resource.EMtlResourceImpl.doLo ad(EMtlResourceImpl.java:70)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1494)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1282)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:255)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:270)
... 13 more

:
Re: [acceleo] Source context menu not showing up during Android Tutorial [message #636353 is a reply to message #636320] Sun, 31 October 2010 10:56 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Jeff A wrote on Sat, 30 October 2010 16:46
Based on what (you?) said in my bug report, I'm just going to use Acceleo 3.x., especially if it's supported in Galileo. I can't think of any good reason to use the old version of Acceleo if these problems are fixed in 3.x.

Thanks!


Yup, that would be me Smile. Didn't realize "Jeff A" and the bugzilla "anonymous" were the same ^^. And yes, we strive to maintain compatibility throughout the different Eclipse versions for Acceleo (see also the Acceleo wiki).

Your stack trace would indicate that some of your "mtl" modules haven't been recompiled with the latest version of Acceleo you installed, as it is still trying to find the 0.8.0 package. Could you try using "Project => Clean", to clean all of your projects and force the recompilation of all Acceleo modules?

Laurent Goubet
Obeo
Re: [acceleo] Source context menu not showing up during Android Tutorial [message #636374 is a reply to message #636353] Sun, 31 October 2010 20:51 Go to previous messageGo to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
I fixed my name on both here and the Bugzilla reports. Thanks for pointing out that I didn't enter it on bugzilla!

Anyhow I want to thank you tremendously for all of your help. I decided to jump ahead and just copy the "answers" from the tutorial to save time. I did happen to notice that at least on Android emulator 2.2 Acceleo 3.01, the country spinner is unpopulated. No big deal since it's just a demo, but I thought you'd like to know.

I'll get to work now on trying to reverse engineer my actual application into Acceleo.

I do have a follow-up question. How do you advocate application development in this environment? More specifically, if I want to extend my Java application, I am used to having a smart syntax editor with autocomplete, etc.

One problem here is that the editor isn't aware of both syntaxes (is it OCL? and Java) simultaneously, and I recognize that this is a difficult problem to solve.

One approach I am thinking of is to generate the existing code from Acceleo, then create a new Java file with the Java editor. When I'm ready to integrate, I'll migrate it to an mtl file. Is this the recommended work flow?

I'm looking forward to receipt of the Model Driven Software Development book I ordered last week--hopefully it will address some of these questions.

Thanks!
Jeff
Re: [acceleo] Source context menu not showing up during Android Tutorial [message #636402 is a reply to message #636374] Mon, 01 November 2010 02:40 Go to previous messageGo to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
Hi Laurent:

I just ran into a new problem when trying to work with my own code. I created the a metamodel and generated an editor, etc. and opened the new Eclipse environment with the metamodel's new editor.

Another problem I noticed is that I can't create a new

I created a new model file with the EMF creation wizard. However, the "new child" submenu is missing. In the tutorial project (in a different Eclipse instance) I can see the new child submenu just fine.

One other bit of info that might help the troubleshooting is that the icons for the ".android" file model editor and the model component icons are different than the model editor from the tutorial for some reason. The icons from my project are more plain and blue/white instead of gold, blue, and white.

Here are some messages from the error log that might indicate the problem:

!ENTRY com.zoomabug.flashcards.model.editor 2 0 2010-10-31 21:10:43.671
!MESSAGE A resource exists with a different case: '/com.zoomabug.flashcards/Model'.
!STACK 0
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: A resource exists with a different case: '/com.zoomabug.flashcards/Model'.
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$PlatformResourceOutputStream.createContainer(PlatformResourceURIHandlerImpl.java:81)
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$PlatformResourceOutputStream.flush(PlatformResourceURIHandlerImpl.java:108)
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$PlatformResourceOutputStream.close(PlatformResourceURIHandlerImpl.java:90)
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$WorkbenchHelper$1.close(PlatformResourceURIHandlerImpl.java:172)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:997)
	at com.zoomabug.flashcards.flashcards.presentation.FlashcardsModelWizard$1.execute(FlashcardsModelWizard.java:263)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:944)
	at com.zoomabug.flashcards.flashcards.presentation.FlashcardsModelWizard.performFinish(FlashcardsModelWizard.java:274)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:752)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:253)
	at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:273)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
	at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
	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(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.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(EclipseStarter.java:368)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.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)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Caused by: org.eclipse.core.internal.resources.ResourceException: A resource exists with a different case: '/com.zoomabug.flashcards/Model'.
	at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:307)
	at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:285)
	at org.eclipse.core.internal.resources.Folder.assertCreateRequirements(Folder.java:29)
	at org.eclipse.core.internal.resources.Folder.create(Folder.java:88)
	at org.eclipse.core.internal.resources.Folder.create(Folder.java:118)
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$PlatformResourceOutputStream.createContainer(PlatformResourceURIHandlerImpl.java:77)
	... 58 more
!SESSION 2010-10-31 21:30:32.976 -----------------------------------------------
eclipse.buildId=M20100211-1343
java.version=1.6.0_21
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.sdk.ide
Command-line arguments:  -product org.eclipse.sdk.ide -data D:\My Documents\Software Development\Eclipse Workspaces\GTD Development/../flashcards-modeling -dev file:D:/My Documents/Software Development/Eclipse Workspaces/GTD Development/.metadata/.plugins/org.eclipse.pde.core/Android (Acceleo)/dev.properties -os win32 -ws win32 -arch x86_64

!ENTRY org.eclipse.update.configurator 4 0 2010-10-31 21:30:41.375
!MESSAGE Can't find bundle for base name feature, locale en_US

!ENTRY org.eclipse.update.configurator 4 0 2010-10-31 21:30:41.604
!MESSAGE Can't find bundle for base name feature, locale en_US

!ENTRY org.eclipse.update.configurator 4 0 2010-10-31 21:30:41.641
!MESSAGE Can't find bundle for base name feature, locale en_US

!ENTRY org.eclipse.update.configurator 4 0 2010-10-31 21:30:41.737
!MESSAGE Can't find bundle for base name feature, locale en_US

!ENTRY org.eclipse.ui.workbench 2 0 2010-10-31 21:30:42.284
!MESSAGE A handler conflict occurred.  This may disable some commands.
!SUBENTRY 1 org.eclipse.ui.workbench 2 0 2010-10-31 21:30:42.284
!MESSAGE Conflict for 'AUTOGEN:::com.soyatec.uml.std.ui.check.diagram/com.soyatec.uml.std.ui.actions.check.diagram':
HandlerActivation(commandId=AUTOGEN:::com.soyatec.uml.std.ui.check.diagram/com.soyatec.uml.std.ui.actions.check.diagram,
	handler=ActionDelegateHandlerProxy(null,com.soyatec.uml.std.external.UMLCheckDiagramAction),
	expression=WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@6a48ffbc),sourcePriority=16384)
HandlerActivation(commandId=AUTOGEN:::com.soyatec.uml.std.ui.check.diagram/com.soyatec.uml.std.ui.actions.check.diagram,
	handler=ActionDelegateHandlerProxy(null,com.soyatec.uml.std.external.UMLCheckDiagramAction),
	expression=WorkbenchWindowExpression(org.eclipse.ui.internal.WorkbenchWindow@6a48ffbc),sourcePriority=16384)

!ENTRY org.eclipse.core.resources 8 2 2010-10-31 21:30:44.098
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 1
org.eclipse.core.runtime.CoreException: Project target not loaded yet.
	at com.android.ide.eclipse.adt.internal.build.BaseBuilder.stopBuild(Unknown Source)
	at com.android.ide.eclipse.adt.internal.build.BaseBuilder.abortOnBadSetup(Unknown Source)
	at com.android.ide.eclipse.adt.internal.build.ResourceManagerBuilder.build(Unknown Source)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-10-31 21:30:44.099
!MESSAGE Project target not loaded yet.
!SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-10-31 21:30:44.099
!MESSAGE Project target not loaded yet.

!ENTRY org.eclipse.core.resources 8 2 2010-10-31 21:30:44.116
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 1
org.eclipse.core.runtime.CoreException: Project target not loaded yet.
	at com.android.ide.eclipse.adt.internal.build.BaseBuilder.stopBuild(Unknown Source)
	at com.android.ide.eclipse.adt.internal.build.BaseBuilder.abortOnBadSetup(Unknown Source)
	at com.android.ide.eclipse.adt.internal.build.PreCompilerBuilder.build(Unknown Source)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-10-31 21:30:44.116
!MESSAGE Project target not loaded yet.
!SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-10-31 21:30:44.116
!MESSAGE Project target not loaded yet.

[Updated on: Mon, 01 November 2010 02:56]

Report message to a moderator

Re: [acceleo] Source context menu not showing up during Android Tutorial [message #636530 is a reply to message #560043] Mon, 01 November 2010 17:41 Go to previous messageGo to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
The problem persists even when I follow the tutorial manually (as opposed to running from the "solution" projects contained in the zip file) once I get to the following section in the tutorial "1. Click File > New > Other.... In the list, select Example EMF Creation Wizard > Android Model. Click Next >."

In the generated editor, there is no "add child" option.

In the metamodel, I only created the following structure. I assume this is sufficient to support adding children activities to projects.

Android
Android
Project
- name
- activities
Activity
Re: [acceleo] Source context menu not showing up during Android Tutorial [message #636544 is a reply to message #560043] Mon, 01 November 2010 19:55 Go to previous messageGo to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
The problem was that when I tried to follow the tutorial, I didn't modify the containers (activities, widgets, etc.) didn't have the containment attribute set to "true."

Maybe at some point you can update the images to highlight in red the values that need to be changed? That's very helpful in the other images where this was done in the tutorial.

Thanks!
Jeff

[Updated on: Mon, 01 November 2010 20:25]

Report message to a moderator

Re: [acceleo] Source context menu not showing up during Android Tutorial [message #636631 is a reply to message #636544] Tue, 02 November 2010 09:48 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi Jeff,

Sorry that I didn't see this sooner (November the 1st is holidays in France Smile), I could have helped you out of this "missing new child" sooner.

It is true however that the tutorial should highlight the need for "container" references ... this sound obvious to us, but we tend to forget that we shouldn't rely on "obvious" things in tutorials ... opened Bug 329243 to track this.

Laurent Goubet
Obeo
Re: [acceleo] Source context menu not showing up during Android Tutorial [message #636832 is a reply to message #636631] Wed, 03 November 2010 02:48 Go to previous messageGo to next message
Glenview Jeff is currently offline Glenview JeffFriend
Messages: 79
Registered: September 2010
Member
I have a couple of new questions. In my experimenting, I've ended up with lots of metamodels leftover in the child Eclipse. These are the ones that show up in the "Example EMF Model Creation Wizards" when you want to create a new model. I had deleted these metamodels in the parent Eclipse view, but they are somehow stored in the child Eclipse. Also, when I try to create new Acceleo generation files, I noticed that the obsolete metamodels are there as well. Is there a way to delete them?

When I try to create new Acceleo generation files, I noticed that several of them are only showing for "runtime version" and not "development version." I didn't see documentation about what these versions even mean. Are they important, and how do I control which versions get generated?

Thanks so much again for all of your help.

Jeff
Re: [acceleo] Source context menu not showing up during Android Tutorial [message #637642 is a reply to message #560043] Mon, 08 November 2010 08:24 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi jeff,

The wizards and metamodel URI themselves are provided by the metamodel plugins. "leftover" metamodels mean that you still have the plugins :
- in the "parent" Eclipse workspace
- installed in your Eclipse

When you say you deleted them, did you indeed remove them from your workspace? And if you had deployed them, did you also uninstall them from your Eclipse ?

Laurent Goubet
Obeo
Re: [acceleo] Source context menu not showing up during Android Tutorial [message #654916 is a reply to message #636544] Thu, 17 February 2011 15:34 Go to previous message
LEMRABET  is currently offline LEMRABET Friend
Messages: 1
Registered: February 2011
Junior Member
Hello

Thank's for your answer I lost more than 1 h with this problem

bye Rolling Eyes
Previous Topic:[Acceleo] eliminate warnings
Next Topic:[Acceleo] Problems about queries
Goto Forum:
  


Current Time: Fri Mar 29 13:21:45 GMT 2024

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

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

Back to the top