Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable(Problems executing commands in the ModelEditor)
org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #982608] Tue, 13 November 2012 09:09 Go to next message
Marco Descher is currently offline Marco Descher
Messages: 84
Registered: October 2010
Location: Austria
Member
Hy there,

I am currently trying to get the ModelEditor in the plug-in org.eclipse.e4.tools.emf.editor up and running. I started the ModelEditor.product (after fixing the dependencies), but all commands are not executable. That means they are greyed out.

I cannot find an apparent reason for this, within Application.e4xmi they are set to enabled and the commands do not feature a @CanExecute

Anybody got a hint there?

thanks,
marco
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #982626 is a reply to message #982608] Tue, 13 November 2012 09:26 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5423
Registered: July 2009
Senior Member
Most likely the e4xmi misses the addons for the command, context and
binding stuff.

Tom

Am 13.11.12 10:09, schrieb Marco Descher:
> Hy there,
>
> I am currently trying to get the ModelEditor in the plug-in
> org.eclipse.e4.tools.emf.editor up and running. I started the
> ModelEditor.product (after fixing the dependencies), but all commands
> are not executable. That means they are greyed out.
>
> I cannot find an apparent reason for this, within Application.e4xmi they
> are set to enabled and the commands do not feature a @CanExecute
>
> Anybody got a hint there?
>
> thanks,
> marco
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #982636 is a reply to message #982626] Tue, 13 November 2012 09:39 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

And the recently added HandlerProcessingAddon https://bugs.eclipse.org/bugs/show_bug.cgi?id=376254
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #982642 is a reply to message #982636] Tue, 13 November 2012 09:47 Go to previous messageGo to next message
Marco Descher is currently offline Marco Descher
Messages: 84
Registered: October 2010
Location: Austria
Member
Thanks for your reply, I got the following addons added:
<addons xmi:id="_XGB3wPZlEd-XstlTZ6nTXg" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
  <addons xmi:id="_XGB3wPZlEd-XstlTZ6nTXh" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
  <addons xmi:id="_XGB3wPZlEd-XstlTZ6nTXi" elementId="org.eclipse.e4.ui.bindings.service" contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
  <addons xmi:id="_LK0NgPZmEd-XstlTZ6nTXj" elementId="org.eclipse.e4.ui.workbench.commands.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon"/>
  <addons xmi:id="_LK0NgPZmEd-XstlTZ6nTXk" elementId="org.eclipse.e4.ui.workbench.contexts.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon"/>
  <addons xmi:id="_LK0NgPZmEd-XstlTZ6nTXl" elementId="org.eclipse.e4.ui.workbench.bindings.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench.swt/org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon"/>
  <addons xmi:id="_rnaFUC12EeKJg_Pk9LqbBQ" elementId="org.eclipse.e4.tools.emf.editor.addon.0" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon"/>


@Tom: Aren't these covering the one you mentioned?
@Sopot: Including the HandlerProcessingAddon you mentioned Sopot but it does not do any change Sad

thanks!!
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #982653 is a reply to message #982642] Tue, 13 November 2012 09:55 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5423
Registered: July 2009
Senior Member
Yes those are the needed ones - no idea why this is not working then :-(

Tom

Am 13.11.12 10:47, schrieb Marco Descher:
> Thanks for your reply, I got the following addons added:
>
> <addons xmi:id="_XGB3wPZlEd-XstlTZ6nTXg"
> elementId="org.eclipse.e4.core.commands.service"
> contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
>
> <addons xmi:id="_XGB3wPZlEd-XstlTZ6nTXh"
> elementId="org.eclipse.e4.ui.contexts.service"
> contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
>
> <addons xmi:id="_XGB3wPZlEd-XstlTZ6nTXi"
> elementId="org.eclipse.e4.ui.bindings.service"
> contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
>
> <addons xmi:id="_LK0NgPZmEd-XstlTZ6nTXj"
> elementId="org.eclipse.e4.ui.workbench.commands.model"
> contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon"/>
>
> <addons xmi:id="_LK0NgPZmEd-XstlTZ6nTXk"
> elementId="org.eclipse.e4.ui.workbench.contexts.model"
> contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon"/>
>
> <addons xmi:id="_LK0NgPZmEd-XstlTZ6nTXl"
> elementId="org.eclipse.e4.ui.workbench.bindings.model"
> contributionURI="bundleclass://org.eclipse.e4.ui.workbench.swt/org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon"/>
>
> <addons xmi:id="_rnaFUC12EeKJg_Pk9LqbBQ"
> elementId="org.eclipse.e4.tools.emf.editor.addon.0"
> contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.HandlerProcessingAddon"/>
>
>
>
> @Tom: Aren't these covering the one you mentioned?
> @Sopot: Including the HandlerProcessingAddon you mentioned Sopot but it
> does not do any change :(
>
> thanks!!
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #982738 is a reply to message #982653] Tue, 13 November 2012 11:32 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Is there anything in the log?
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #982747 is a reply to message #982738] Tue, 13 November 2012 11:41 Go to previous messageGo to next message
Marco Descher is currently offline Marco Descher
Messages: 84
Registered: October 2010
Location: Austria
Member
No, sorry all I see is

Warning org.eclipse.e4.tools.emf.editor.theme changed its meaning it is used now to run without theme support
!SESSION 2012-11-13 12:40:43.114 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_06
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE
Framework arguments:  -product org.eclipse.e4.tools.emf.editor.product
Command-line arguments:  -product org.eclipse.e4.tools.emf.editor.product -data /Users/marco/Development/workspace-e4DynamicMenu/../runtime-ModelEditor.product -dev file:/Users/marco/Development/workspace-e4DynamicMenu/.metadata/.plugins/org.eclipse.pde.core/ModelEditor.product/dev.properties -os macosx -ws cocoa -arch x86_64 -consoleLog

!ENTRY org.eclipse.e4.ui.css.core 4 0 2012-11-13 12:40:45.385
!MESSAGE CSS property 'tab-renderer' has been deprecated: renamed as swt-tab-renderer

!ENTRY org.eclipse.e4.ui.css.core 4 0 2012-11-13 12:40:45.393
!MESSAGE CSS property 'unselected-tabs-color' has been deprecated: renamed as swt-unselected-tabs-color

!ENTRY org.eclipse.e4.ui.css.core 4 0 2012-11-13 12:40:45.396
!MESSAGE CSS property 'outer-keyline-color' has been deprecated: renamed as swt-outer-keyline-color

!ENTRY org.eclipse.e4.ui.css.core 4 0 2012-11-13 12:40:45.396
!MESSAGE CSS property 'inner-keyline-color' has been deprecated: renamed as swt-swt-inner-keyline-color

!ENTRY org.eclipse.e4.ui.css.core 4 0 2012-11-13 12:40:45.401
!MESSAGE CSS property 'simple' has been deprecated: renamed as swt-simple
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #982762 is a reply to message #982747] Tue, 13 November 2012 11:54 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5423
Registered: July 2009
Senior Member
Just to make sure - you've set up to clear the saved xmi on restart,
else you'll come back from a restored state.

Tom

Am 13.11.12 12:41, schrieb Marco Descher:
> No, sorry all I see is
>
>
> Warning org.eclipse.e4.tools.emf.editor.theme changed its meaning it is
> used now to run without theme support
> !SESSION 2012-11-13 12:40:43.114
> -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.7.0_06
> java.vendor=Oracle Corporation
> BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE
> Framework arguments: -product org.eclipse.e4.tools.emf.editor.product
> Command-line arguments: -product
> org.eclipse.e4.tools.emf.editor.product -data
> /Users/marco/Development/workspace-e4DynamicMenu/../runtime-ModelEditor.product
> -dev
> file:/Users/marco/Development/workspace-e4DynamicMenu/.metadata/.plugins/org.eclipse.pde.core/ModelEditor.product/dev.properties
> -os macosx -ws cocoa -arch x86_64 -consoleLog
>
> !ENTRY org.eclipse.e4.ui.css.core 4 0 2012-11-13 12:40:45.385
> !MESSAGE CSS property 'tab-renderer' has been deprecated: renamed as
> swt-tab-renderer
>
> !ENTRY org.eclipse.e4.ui.css.core 4 0 2012-11-13 12:40:45.393
> !MESSAGE CSS property 'unselected-tabs-color' has been deprecated:
> renamed as swt-unselected-tabs-color
>
> !ENTRY org.eclipse.e4.ui.css.core 4 0 2012-11-13 12:40:45.396
> !MESSAGE CSS property 'outer-keyline-color' has been deprecated: renamed
> as swt-outer-keyline-color
>
> !ENTRY org.eclipse.e4.ui.css.core 4 0 2012-11-13 12:40:45.396
> !MESSAGE CSS property 'inner-keyline-color' has been deprecated: renamed
> as swt-swt-inner-keyline-color
>
> !ENTRY org.eclipse.e4.ui.css.core 4 0 2012-11-13 12:40:45.401
> !MESSAGE CSS property 'simple' has been deprecated: renamed as swt-simple
>
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #982772 is a reply to message #982762] Tue, 13 November 2012 12:07 Go to previous messageGo to next message
Marco Descher is currently offline Marco Descher
Messages: 84
Registered: October 2010
Location: Austria
Member
Here we go! Clearing did the trick! The problem was in the missing AddonHandler; as soon as I remove it and clean again the commands do not work! Adding it with clear ... Smile

Should I create a bug, add the addon and commit the "fix"?

Thanks again guys!
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #982778 is a reply to message #982772] Tue, 13 November 2012 12:13 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

Yes please open a bug in e4/ui saying that the e4 repo needs to be updated with the changes for bug 376254 I mentioned above and please reference the new bug in bug 376254. I wrote a note to myself in that bug to update but have not found the time yet.
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #982800 is a reply to message #982778] Tue, 13 November 2012 12:33 Go to previous messageGo to next message
Marco Descher is currently offline Marco Descher
Messages: 84
Registered: October 2010
Location: Austria
Member
Done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=394172
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #982801 is a reply to message #982800] Tue, 13 November 2012 12:33 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

thank you
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #1236422 is a reply to message #982762] Mon, 27 January 2014 07:11 Go to previous messageGo to next message
Dmitry Dzuba is currently offline Dmitry Dzuba
Messages: 1
Registered: January 2014
Junior Member
Has the same problem.
What do you mean by "set up to clear the saved xmi on restart"?
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #1237265 is a reply to message #1236422] Wed, 29 January 2014 09:09 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

add -clearPersistedState to your program arguments (or check clear workspace)
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #1276335 is a reply to message #1237265] Mon, 24 March 2014 12:16 Go to previous messageGo to next message
Sheshadri Manu is currently offline Sheshadri Manu
Messages: 1
Registered: March 2014
Junior Member
Hi. I am trying to do a handledToolItem.setEnable(false), but the toolitem is not being disabled. I see that even if the default value set is false, the toolItem is still Enabled once the app opens. I tried adding the addon-HandlerProcessingAddon, no luck with disabling. Also tried adding a -clearPersistedState in program arguments. Still no luck. I am currently using e4 on 4.3.2. Any help is much appreciated.
Re: org.eclipse.e4.tools.emf.editor.ModelEditor commands not executable [message #1277668 is a reply to message #1276335] Wed, 26 March 2014 09:46 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

A HandledToolItem is not supposed to be disabled 'manually'. The CanExecute of its handler should return false for it to get disabled.
Previous Topic:How to add a toolbar separator
Next Topic:Disposed control causes that popup menu stops working
Goto Forum:
  


Current Time: Sat Oct 25 23:47:47 GMT 2014

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

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