Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » The hell of (model) plugin re-deployment(spiritual abyss of a phenomenal technology)
The hell of (model) plugin re-deployment [message #645507] Fri, 17 December 2010 14:50 Go to next message
Kirsten M. Z. is currently offline Kirsten M. Z.Friend
Messages: 132
Registered: July 2010
Senior Member
Hi @all,

right now, I dispear of my Eclipse (Helios) environment. Maybe, you had similar experiences, maybe you know some other thread, or maybe you can even help me. Somehow, I am doing something completely wrong...

My problems go along with the deployment of own plugins into my own Eclipse workbench (concretely EMF metamodels). First, I want to say two thing: I love this amazing technology which is unique in some sense. And second, if I download a new workbench (right now, I am using Topcased/Eclipse) and deploy my plugins, everything works as expected.

However, whenever I find errors (my own development error) I get into serious trouble, and I already spent DAYS. The re-installation of of plugins never works as expected. I don't even have an idea what I am doing wrong. Please share your experience, or even a small explanation, how a re-deployment has to be done.

Of course, I tried serveral approaches:
- Simply (re-)deploy in the hope that Eclipse manages everything for me
- Uninstall the plugin first (using Eclipse functionality) and then re-deploy
- Delete old Plugin/JAR files from the plugin directory (Eclipse and/or workspace) and/or uninstall
- Restart Eclipse/ Do not restart Eclipse

etc.

For example, two weeks ago, I tried to rename the namespace of my model (together with some other changes). Most changes (code, etc.) worked almost immediately, but I had to fumble the whole day in order to get everything working again (without an error in my "sources"). I could not even reproduce what I did. I tried hard on another system and I failed (I also lost my patience), so I had to re-install my whole Eclipse workbench.

Concrete problems I run into (only an excerpt):

- after deleting the JAR files from the Eclipse plugin directory:

An error occurred during the org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.
session context was:(profile=PlatformProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.CheckTrust, operand=, action=).
Error reading signed content.
The file "C:\Program Files (x86)\Topcased-4.2.0\plugins\mymodel_1.0.0.jar" does not exist


- if I do not delete anything: The existing files are never replaced, so even renewed code is not applied. So files are not replaced neither replaced in plugin directory of Eclipse nor workspace (org.eclipse.pde.core\install\plugins). However, there is a new directory (org.eclipse.pde.core\tempp2metadata), where new JAR files are placed (however, temporary?!?)

- I have to try VERY hard to apply specific changes of my model, e.g. namespace or icons (once, I had problem with case sensitivity... I found MY error quickly, but Eclipse accepted this only with a complete re-install).

- Often (in my opion without real model/code changes), I get the following error if I want to create a new model:

java.lang.UnsupportedOperationException
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.doLoad(ResourceImpl.java:1532)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1494)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1282)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
	at de.unibw.aml.presentation.MyModelEditor.createModel(AmlEditor.java:954)
	at de.unibw.aml.presentation.MyModelEditor.createPages(AmlEditor.java:1011)
	at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2674)
	at de.unibw.aml.presentation.MyModelModelWizard.performFinish(AmlModelWizard.java:294)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:811)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:430)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	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:254)
	at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:274)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	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:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	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:369)
	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:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)


Right now, I have no idea how I can solve the last problem. In the runtime of my application, everything works fine, by the way.

All in all... I have too much trouble. Therefore, I am convinced that I am doing something completely wrong.

Thanks for you time and thanks in advance!
Re: The hell of (model) plugin re-deployment [message #645540 is a reply to message #645507] Fri, 17 December 2010 18:26 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi vultur,

You should definitely decouple your target platform (the set of required plugins that you compile against) from your IDE installation (the set of plugins that provide the platform, JDT, CVS, PDE, own tools, etc.), see http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse. pde.doc.user/concepts/target.htm .

We're using Buckminster to automatically provision source projects to the workspace and all their dependencies to the target platform, see http://wiki.eclipse.org/CDO_Source_Installation .

I've given up to mangle my plugins/ folder directly. You better use p2 to install/validate both your IDE installation and your target platform.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Am 17.12.2010 15:51, schrieb vultur:
> Hi @all,
>
> right now, I dispear of my Eclipse (Helios) environment. Maybe, you had similar experiences, maybe you know some other thread, or maybe you can even help me. Somehow, I am doing something completely wrong...
>
> My problems go along with the deployment of own plugins into my own Eclipse workbench (concretely EMF metamodels). First, I want to say two thing: I love this amazing technology which is unique in some sense. And second, if I download a new workbench (right now, I am using Topcased/Eclipse) and deploy my plugins, everything works as expected.
>
> However, whenever I find errors (my own development error) I get into serious trouble, and I already spent DAYS. The re-installation of of plugins never works as expected. I don't even have an idea what I am doing wrong. Please share your experience, or even a small explanation, how a re-deployment has to be done.
>
> Of course, I tried serveral approaches:
> - Simply (re-)deploy in the hope that Eclipse manages everything for me
> - Uninstall the plugin first (using Eclipse functionality) and then re-deploy
> - Delete old Plugin/JAR files from the plugin directory (Eclipse and/or workspace) and/or uninstall
> - Restart Eclipse/ Do not restart Eclipse
>
> etc.
>
> For example, two weeks ago, I tried to rename the namespace of my model (together with some other changes). Most changes (code, etc.) worked almost immediately, but I had to fumble the whole day in order to get everything working again (without an error in my "sources"). I could not even reproduce what I did. I tried hard on another system and I failed (I also lost my patience), so I had to re-install my whole Eclipse workbench.
>
> Concrete problems I run into (only an excerpt):
>
> - after deleting the JAR files from the Eclipse plugin directory:
>
> An error occurred during the org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.
> session context was:(profile=PlatformProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.CheckTru st, operand=, action=).
> Error reading signed content.
> The file "C:\Program Files (x86)\Topcased-4.2.0\plugins\mymodel_1.0.0.jar" does not exist
>
> - if I do not delete anything: The existing files are never replaced, so even renewed code is not applied. So files are not replaced neither replaced in plugin directory of Eclipse nor workspace (org.eclipse.pde.core\install\plugins). However, there is a new directory (org.eclipse.pde.core\tempp2metadata), where new JAR files are placed (however, temporary?!?)
>
> - I have to try VERY hard to apply specific changes of my model, e.g. namespace or icons (once, I had problem with case sensitivity... I found MY error quickly, but Eclipse accepted this only with a complete re-install).
>
> - Often (in my opion without real model/code changes), I get the following error if I want to create a new model:
>
> java.lang.UnsupportedOperationException
> at org.eclipse.emf.ecore.resource.impl.ResourceImpl.doLoad(Reso urceImpl.java:1532)
> 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)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:397)
> at de.unibw.aml.presentation.MyModelEditor.createModel(AmlEdito r.java:954)
> at de.unibw.aml.presentation.MyModelEditor.createPages(AmlEdito r.java:1011)
> at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(Mu ltiPageEditorPart.java:348)
> at org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:670)
> at org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:465)
> at org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:595)
> at org.eclipse.ui.internal.EditorReference.getEditor(EditorRefe rence.java:289)
> at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2863)
> at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2768)
> at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPag e.java:2760)
> at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2711)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
> at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2707)
> at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2691)
> at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2674)
> at de.unibw.aml.presentation.MyModelModelWizard.performFinish(A mlModelWizard.java:294)
> at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDi alog.java:811)
> at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:430)
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:624)
> at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:234)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:4066)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3657)
> 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.executeHa ndler(WizardHandler.java:254)
> at org.eclipse.ui.internal.handlers.WizardHandler.execute(Wizar dHandler.java:274)
> at org.eclipse.ui.internal.handlers.HandlerProxy.execute(Handle rProxy.java:293)
> 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.handlers.SlaveHandlerService.execute Command(SlaveHandlerService.java:241)
> at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(C ommandAction.java:157)
> at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:584)
> at org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:501)
> at org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:411)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:4066)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3657)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
> 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:369)
> 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: 619)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
>
> Right now, I have no idea how I can solve the last problem. In the runtime of my application, everything works fine, by the way.
>
> All in all... I have too much trouble. Therefore, I am convinced that I am doing something completely wrong.
>
> Thanks for you time and thanks in advance!


Re: The hell of (model) plugin re-deployment [message #645563 is a reply to message #645507] Sat, 18 December 2010 01:28 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Are you incrementing the bundle version numbers so that p2 chooses them
as newer?


vultur wrote:
> Hi @all,
>
> right now, I dispear of my Eclipse (Helios) environment. Maybe, you
> had similar experiences, maybe you know some other thread, or maybe
> you can even help me. Somehow, I am doing something completely wrong...
>
> My problems go along with the deployment of own plugins into my own
> Eclipse workbench (concretely EMF metamodels). First, I want to say
> two thing: I love this amazing technology which is unique in some
> sense. And second, if I download a new workbench (right now, I am
> using Topcased/Eclipse) and deploy my plugins, everything works as
> expected.
>
> However, whenever I find errors (my own development error) I get into
> serious trouble, and I already spent DAYS. The re-installation of of
> plugins never works as expected. I don't even have an idea what I am
> doing wrong. Please share your experience, or even a small
> explanation, how a re-deployment has to be done.
>
> Of course, I tried serveral approaches:
> - Simply (re-)deploy in the hope that Eclipse manages everything for me
> - Uninstall the plugin first (using Eclipse functionality) and then
> re-deploy
> - Delete old Plugin/JAR files from the plugin directory (Eclipse
> and/or workspace) and/or uninstall
> - Restart Eclipse/ Do not restart Eclipse
>
> etc.
>
> For example, two weeks ago, I tried to rename the namespace of my
> model (together with some other changes). Most changes (code, etc.)
> worked almost immediately, but I had to fumble the whole day in order
> to get everything working again (without an error in my "sources"). I
> could not even reproduce what I did. I tried hard on another system
> and I failed (I also lost my patience), so I had to re-install my
> whole Eclipse workbench.
>
> Concrete problems I run into (only an excerpt):
>
> - after deleting the JAR files from the Eclipse plugin directory:
>
> An error occurred during the
> org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.
> session context was:(profile=PlatformProfile,
> phase=org.eclipse.equinox.internal.p2.engine.phases.CheckTru st,
> operand=, action=).
> Error reading signed content.
> The file "C:\Program Files
> (x86)\Topcased-4.2.0\plugins\mymodel_1.0.0.jar" does not exist
>
> - if I do not delete anything: The existing files are never replaced,
> so even renewed code is not applied. So files are not replaced neither
> replaced in plugin directory of Eclipse nor workspace
> (org.eclipse.pde.core\install\plugins). However, there is a new
> directory (org.eclipse.pde.core\tempp2metadata), where new JAR files
> are placed (however, temporary?!?)
>
> - I have to try VERY hard to apply specific changes of my model, e.g.
> namespace or icons (once, I had problem with case sensitivity... I
> found MY error quickly, but Eclipse accepted this only with a complete
> re-install).
>
> - Often (in my opion without real model/code changes), I get the
> following error if I want to create a new model:
>
> java.lang.UnsupportedOperationException
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.doLoad(Reso urceImpl.java:1532)
>
> 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)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:397)
>
> at
> de.unibw.aml.presentation.MyModelEditor.createModel(AmlEdito r.java:954)
> at
> de.unibw.aml.presentation.MyModelEditor.createPages(AmlEdito r.java:1011)
> at
> org.eclipse.ui.part.MultiPageEditorPart.createPartControl(Mu ltiPageEditorPart.java:348)
>
> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:670)
>
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:465)
>
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:595)
>
> at
> org.eclipse.ui.internal.EditorReference.getEditor(EditorRefe rence.java:289)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2863)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2768)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPag e.java:2760)
> at
> org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2711)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2707)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2691)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2674)
> at
> de.unibw.aml.presentation.MyModelModelWizard.performFinish(A mlModelWizard.java:294)
>
> at
> org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDi alog.java:811)
>
> at
> org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:430)
>
> at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.jav a:624)
> at
> org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:234)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:4066)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3657)
> 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.executeHa ndler(WizardHandler.java:254)
>
> at
> org.eclipse.ui.internal.handlers.WizardHandler.execute(Wizar dHandler.java:274)
>
> at
> org.eclipse.ui.internal.handlers.HandlerProxy.execute(Handle rProxy.java:293)
>
> 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.handlers.SlaveHandlerService.execute Command(SlaveHandlerService.java:241)
>
> at
> org.eclipse.ui.internal.actions.CommandAction.runWithEvent(C ommandAction.java:157)
>
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:584)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:501)
>
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:411)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:4066)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3657)
> at
> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
>
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
>
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>
> 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:369)
>
> 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: 619)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
>
> Right now, I have no idea how I can solve the last problem. In the
> runtime of my application, everything works fine, by the way.
>
> All in all... I have too much trouble. Therefore, I am convinced that
> I am doing something completely wrong.
>
> Thanks for you time and thanks in advance!


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: The hell of (model) plugin re-deployment [message #645612 is a reply to message #645563] Sat, 18 December 2010 19:32 Go to previous messageGo to next message
Kirsten M. Z. is currently offline Kirsten M. Z.Friend
Messages: 132
Registered: July 2010
Senior Member
Ed Merks wrote on Fri, 17 December 2010 20:28
Are you incrementing the bundle version numbers so that p2 chooses them
as newer?


I thought, that this might work. However, I never tried, because this is not the approach I want to follow.

I checked your advice now, and you are right. If I change the version number, my model changes are applied perfectly.

However, this is not a good solution. I don't want to change the version number, if I just want to check a minor tweak. Do you know a possibility to enforce a proper installation with the same version number?

[Updated on: Sat, 18 December 2010 19:33]

Report message to a moderator

Re: The hell of (model) plugin re-deployment [message #645613 is a reply to message #645612] Sat, 18 December 2010 19:35 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 18.12.2010 20:32, schrieb vultur:
> Ed Merks wrote on Fri, 17 December 2010 20:28
>> Are you incrementing the bundle version numbers so that p2 chooses them as newer?
>
>
> I thought, that this might work. However, I never tried, because this is not the approach I want to follow.
>
> I checked your advice now, and you are right. If I change the version number, my changes are applied perfectly.
>
> However, this is not a good solution. I don't want to change the version number, if I just want to check a minor tweak. Do you know a possibility to enforce a proper installation with the same version number.
A version has the format major.minor.service.qualifier

Use the qualifer segment with a build id or a build time.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: The hell of (model) plugin re-deployment [message #645614 is a reply to message #645613] Sat, 18 December 2010 19:38 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Please vote for https://bugs.eclipse.org/bugs/show_bug.cgi?id=329211 :P

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 18.12.2010 20:35, schrieb Eike Stepper:
> Am 18.12.2010 20:32, schrieb vultur:
>> Ed Merks wrote on Fri, 17 December 2010 20:28
>>> Are you incrementing the bundle version numbers so that p2 chooses them as newer?
>>
>>
>> I thought, that this might work. However, I never tried, because this is not the approach I want to follow.
>>
>> I checked your advice now, and you are right. If I change the version number, my changes are applied perfectly.
>>
>> However, this is not a good solution. I don't want to change the version number, if I just want to check a minor tweak. Do you know a possibility to enforce a proper installation with the same version number.
> A version has the format major.minor.service.qualifier
>
> Use the qualifer segment with a build id or a build time.
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>


Re: The hell of (model) plugin re-deployment [message #645624 is a reply to message #645612] Sat, 18 December 2010 23:36 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Vultur,

You have to do something to make the version number bigger. As Eike
suggestion, we should include .qualifier which is generally replaced by
a timestamp to make it a higher version.


vultur wrote:
> Ed Merks wrote on Fri, 17 December 2010 20:28
>> Are you incrementing the bundle version numbers so that p2 chooses
>> them as newer?
>
>
> I thought, that this might work. However, I never tried, because this
> is not the approach I want to follow.
>
> I checked your advice now, and you are right. If I change the version
> number, my changes are applied perfectly.
>
> However, this is not a good solution. I don't want to change the
> version number, if I just want to check a minor tweak. Do you know a
> possibility to enforce a proper installation with the same version
> number.


Ed Merks
Professional Support: https://www.macromodeling.com/
eAttribute with type int serializes as 0 when set to 2 [message #645631 is a reply to message #645624] Sun, 19 December 2010 03:23 Go to previous messageGo to next message
Ole Ersoy is currently offline Ole ErsoyFriend
Messages: 205
Registered: July 2009
Senior Member
Hi,

I have a really strange issue. If I set an eAttribute to 2 and serialize the model, the value serializes to 0. For example I'll do the following:

ItemOrder itemOrder =
orderGenerationContext.
serviceDataFactory.
createItemOrder();

itemOrder.setQuantity(2);

System.out.println("THE ORDER QUANTITY: " + itemOrder.getQuantity());


The last println statement will print two, but the serialized xml will look like this:

<?xml version="1.0" encoding="ASCII"?>
<spareparts.model.service.v100:ServiceDataContainer xmlns:spareparts.model.service.v100="http://com.example.service.v100">
<itemOrders/>
</spareparts.model.service.v100:ServiceDataContainer>

However if I set the quantity to any other number, for example 3, the result looks like this:

<?xml version="1.0" encoding="ASCII"?>
<spareparts.model.service.v100:ServiceDataContainer xmlns:spareparts.model.service.v100="http://com.example.service.v100">
<itemOrders quantity="3"/>
</spareparts.model.service.v100:ServiceDataContainer>

Thoughts?

TIA,
- Ole
Re: eAttribute with type int serializes as 0 when set to 2 [message #645634 is a reply to message #645631] Sun, 19 December 2010 07:54 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Ole,

How does your question relate to the thread vultur started? Or is it just my news client that shows your question as a reply?

Comments below...


Am 19.12.2010 04:23, schrieb Ole Ersoy:
> Hi,
>
> I have a really strange issue. If I set an eAttribute to 2 and serialize the model, the value serializes to 0. For example I'll do the following:
>
> ItemOrder itemOrder =
> orderGenerationContext.
> serviceDataFactory.
> createItemOrder();
>
> itemOrder.setQuantity(2);
>
> System.out.println("THE ORDER QUANTITY: " + itemOrder.getQuantity());
>
>
> The last println statement will print two, but the serialized xml will look like this:
>
> <?xml version="1.0" encoding="ASCII"?>
> <spareparts.model.service.v100:ServiceDataContainer xmlns:spareparts.model.service.v100="http://com.example.service.v100">
> <itemOrders/>
Looks as if 2 is the default value of the quantity attribute. Please show how that's defined in Ecore.

> </spareparts.model.service.v100:ServiceDataContainer>
>
> However if I set the quantity to any other number, for example 3, the result looks like this:
>
> <?xml version="1.0" encoding="ASCII"?>
> <spareparts.model.service.v100:ServiceDataContainer xmlns:spareparts.model.service.v100="http://com.example.service.v100">
> <itemOrders quantity="3"/>
Looks correct for the example 3 you give above.

Am I right that in memory your model behaves according to modeled contract but the serialized form does not look as you may expect it? Then you may like org.eclipse.emf.ecore.xmi.XMLResource.OPTION_KEEP_DEFAULT_CO NTENT and possibly some more XML options.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


> </spareparts.model.service.v100:ServiceDataContainer>
>
> Thoughts?
>
> TIA,
> - Ole
>
>


Re: eAttribute with type int serializes as 0 when set to 2 [message #645670 is a reply to message #645631] Sun, 19 December 2010 17:17 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Ole,

Comments below.


Ole Ersoy wrote:
> Hi,
>
> I have a really strange issue. If I set an eAttribute to 2 and
> serialize the model, the value serializes to 0. For example I'll do
> the following:
>
> ItemOrder itemOrder =
> orderGenerationContext.
> serviceDataFactory.
> createItemOrder();
>
> itemOrder.setQuantity(2);
>
> System.out.println("THE ORDER QUANTITY: " +
> itemOrder.getQuantity());
>
>
> The last println statement will print two, but the serialized xml will
> look like this:
>
> <?xml version="1.0" encoding="ASCII"?>
> <spareparts.model.service.v100:ServiceDataContainer
> xmlns:spareparts.model.service.v100="http://com.example.service.v100">
> <itemOrders/>
> </spareparts.model.service.v100:ServiceDataContainer>
I don't see a zero.
>
> However if I set the quantity to any other number, for example 3, the
> result looks like this:
>
> <?xml version="1.0" encoding="ASCII"?>
> <spareparts.model.service.v100:ServiceDataContainer
> xmlns:spareparts.model.service.v100="http://com.example.service.v100">
> <itemOrders quantity="3"/>
> </spareparts.model.service.v100:ServiceDataContainer>
>
> Thoughts?
My bet would be that 2 is the default value of the attribute.
>
> TIA,
> - Ole
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: eAttribute with type int serializes as 0 when set to 2 [message #645688 is a reply to message #645634] Sun, 19 December 2010 22:05 Go to previous messageGo to next message
Ole Ersoy is currently offline Ole ErsoyFriend
Messages: 205
Registered: July 2009
Senior Member
Eike,

No it does not. I replied to that thread and changed the subject, thinking that would change the thread. Sorry for the noise.

Ole
Re: eAttribute with type int serializes as 0 when set to 2 [message #645692 is a reply to message #645670] Sun, 19 December 2010 22:10 Go to previous message
Ole Ersoy is currently offline Ole ErsoyFriend
Messages: 205
Registered: July 2009
Senior Member
Ed,

You are right as always. I must have copied an eAttribute definition and forgot all about the default. Thanks and happy holidays!

Ole
Previous Topic:EMF Interim Update Site Broken
Next Topic:[Teneo] Teneo 1.2.0 Interim Update Site Broken
Goto Forum:
  


Current Time: Sat Apr 27 04:32:20 GMT 2024

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

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

Back to the top