Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Re: A handler conflict occurred. This may disable some commands.
Re: A handler conflict occurred. This may disable some commands. [message #335452] Thu, 09 April 2009 01:51 Go to next message
Ben Vitale is currently offline Ben VitaleFriend
Messages: 247
Registered: July 2009
Senior Member
You have two handlers for the paste command and the framework can't
figure out which one has priority. Most likely you need to make one of
them activate under more specific conditions.

You can turn on tracing support in your launch configuration to see more
information in the Console window.

http://www.developer.com/java/ent/article.php/3702056

The org.eclipse.ui plugin has trace flags for handlers.

This question belongs on the eclipse.platform newsgroup, copying the
response there.

-Ben

mowry wrote:
> I am using command framework to enable/disable commands.
>
> I am seeing the follwoing exception in the client log. Can you please
> help me to remove this error?
>
> A handler conflict occurred. This may disable some commands.
> Conflict for 'org.eclipse.ui.edit.paste':
>
> Thanks
Re: A handler conflict occurred. This may disable some commands. [message #335469 is a reply to message #335452] Thu, 09 April 2009 18:22 Go to previous messageGo to next message
mowry is currently offline mowryFriend
Messages: 51
Registered: July 2009
Member
Hi,
Thanks for your response. I am using different conditions for two
different handlers. Functionality works fine, but I see warning in the
logs.
Can you please correct me if I am doing any wrong?

Here is how I am using handlers.

1. Activate com.ui.test1.actions.OpenAction when object is insatnceof
BaseItem and Item1.

<handler class="com.ui.test1.actions.OpenAction"
commandId="com.ui.open">
<activeWhen>
<iterate>
<and>
<instanceof
value="BaseItem">
</instanceof>
<instanceof
value="Item1">
</instanceof>
</and>
</iterate>
</activeWhen>
</handler>

2. Activate com.ui.test2.actions.OpenAction when object is insatnce of
BaseItem and Item2.

<handler class="com.ui.test2.actions.OpenAction" commandId="com.ui.open">
<activeWhen>
<iterate>
<and>
<instanceof
value="BaseItem">
</instanceof>
<instanceof
value="Item2">
</instanceof>
</and>
</iterate>
</activeWhen>
</handler>


This is the message in the logs:
!MESSAGE Conflict for 'com.ui.open':
HandlerActivation(commandId=com.ui.open,
handler=com.ui.test1.actions.OpenAction,
expression=org.eclipse.core.internal.expressions.IterateExpression@d63a0e3c,sourcePriority=1073741824)
HandlerActivation(commandId=com.ui.open,
handler=com.ui.test2.actions.OpenAction,
expression=org.eclipse.core.internal.expressions.IterateExpression@395d27b6,sourcePriority=1073741824)


Thanks
Mowry
Re: A handler conflict occurred. This may disable some commands. [message #335534 is a reply to message #335469] Mon, 13 April 2009 20:46 Go to previous messageGo to next message
mowry is currently offline mowryFriend
Messages: 51
Registered: July 2009
Member
Any help on this please?

Thanks,
Mowry
Any Help please ! A handler conflict occurred. This may disable some commands. [message #335556 is a reply to message #335534] Tue, 14 April 2009 18:08 Go to previous messageGo to next message
mowry is currently offline mowryFriend
Messages: 51
Registered: July 2009
Member
Can somebody help on this issue please?

Thanks
Mowry
Re: A handler conflict occurred. This may disable some commands. [message #335557 is a reply to message #335469] Tue, 14 April 2009 18:54 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
I'm not an expert on handlers but from the trace it looks as though you
have defined two handlers with the same id, if you change the id of one
of them I would expect the conflict to go away.

mowry wrote:
> Hi,
> Thanks for your response. I am using different conditions for two
> different handlers. Functionality works fine, but I see warning in the
> logs.
> Can you please correct me if I am doing any wrong?
>
> Here is how I am using handlers.
>
> 1. Activate com.ui.test1.actions.OpenAction when object is insatnceof
> BaseItem and Item1.
>
> <handler class="com.ui.test1.actions.OpenAction"
> commandId="com.ui.open">
> <activeWhen>
> <iterate>
> <and>
> <instanceof
> value="BaseItem">
> </instanceof>
> <instanceof
> value="Item1">
> </instanceof>
> </and>
> </iterate>
> </activeWhen>
> </handler>
>
> 2. Activate com.ui.test2.actions.OpenAction when object is insatnce of
> BaseItem and Item2.
> <handler class="com.ui.test2.actions.OpenAction" commandId="com.ui.open">
> <activeWhen>
> <iterate>
> <and>
> <instanceof
> value="BaseItem">
> </instanceof>
> <instanceof
> value="Item2">
> </instanceof>
> </and>
> </iterate>
> </activeWhen>
> </handler>
>
>
> This is the message in the logs:
> !MESSAGE Conflict for 'com.ui.open':
> HandlerActivation(commandId=com.ui.open,
> handler=com.ui.test1.actions.OpenAction,
> expression=org.eclipse.core.internal.expressions.IterateExpression@d63a0e3c,sourcePriority=1073741824)
>
> HandlerActivation(commandId=com.ui.open,
> handler=com.ui.test2.actions.OpenAction,
> expression=org.eclipse.core.internal.expressions.IterateExpression@395d27b6,sourcePriority=1073741824)
>
>
>
> Thanks
> Mowry
>
Re: A handler conflict occurred. This may disable some commands. [message #335558 is a reply to message #335557] Tue, 14 April 2009 19:54 Go to previous messageGo to next message
mowry is currently offline mowryFriend
Messages: 51
Registered: July 2009
Member
Thanks for your reply Chris.

We need to use same commandID. This is simiar to using
org.eclipse.ui.edit.copy.

Thanks,
Mowry
Re: A handler conflict occurred. This may disable some commands. [message #335565 is a reply to message #335469] Wed, 15 April 2009 12:56 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You can use
http://wiki.eclipse.org/Platform_Command_Framework#Tracing_O ption to see
what's going on. Set org.eclipse.ui/trace/handlers.verbose.commandId to
your command id.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: A handler conflict occurred. This may disable some commands. [message #335642 is a reply to message #335565] Fri, 17 April 2009 15:57 Go to previous messageGo to next message
mowry is currently offline mowryFriend
Messages: 51
Registered: July 2009
Member
I tested with tracing option, but I didn't find any answers.

Here is the log:

HANDLERS >>> Command('com.ui.open') has changed to
'com.ui.test1.actions.OpenAction' as its handler
HANDLERS >>> resolveConflicts: eval:
HandlerActivation(commandId=com.ui.open,
handler=com.ui.test1.actions.OpenAction,
expression=org.eclipse.core.internal.expressions.IterateExpression@9b3cba68,sourcePriority=1073741824)
HANDLERS >>> resolveConflicts: eval:
HandlerActivation(commandId=com.ui.open,
handler=com.ui.test2.actions.OpenAction,
expression=org.eclipse.core.internal.expressions.IterateExpression@39a07667,sourcePriority=1073741824)
HANDLERS >>> Unresolved conflict detected for 'com.ui.open'
HANDLERS >>> Command('com.ui.open') has changed to no handler

Thanks
Mowry
Re: A handler conflict occurred. This may disable some commands. [message #335670 is a reply to message #335642] Mon, 20 April 2009 16:59 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Maybe it has a transient state that is complaining about the conflict
before settling down and picking one (you said it actually works).

I would try opening a bug with as much info as you have:
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=UI

Also include what version you are running on, and the usecase the
reproduces the problem.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: A handler conflict occurred. This may disable some commands. [message #335688 is a reply to message #335670] Tue, 21 April 2009 20:28 Go to previous messageGo to next message
mowry is currently offline mowryFriend
Messages: 51
Registered: July 2009
Member
Yes it works fine though it logs with those errors/warnings.

I am using eclipse
Version: 3.3.1.1
Build id: M20071023-1652

Are there any know issues with this release?

I will open a defect with details.

Thanks,
Mowry
Re: A handler conflict occurred. This may disable some commands. [message #335969 is a reply to message #335688] Tue, 12 May 2009 04:15 Go to previous message
Eclipse UserFriend
Originally posted by: eclipsenews.cs-guy.com

In case you never resolved this issue, I think I can help.

I encountered the same warning in Eclipse 3.4.1 when I had a very similar
set of handlers defined. After a little experimentation I was able to get
the warning to go away by adding an extra condition to made the conditions
more explicit.

In my case I had a structure like this:

<handler class="Handler1" commandId="command">
<activeWhen>
<iterate operator="and">
<instanceof value="class1">
</instanceof>
</iterate>
</activeWhen>
</handler>
<handler class="Handler2" commandId="command">
<activeWhen>
<iterate operator="and">
<instanceof value="class2">
</instanceof>
</iterate>
</activeWhen>
</handler>

Which gave me the warning about a handler conflict (even though it all
worked fine in my application).

To get rid of the warning I changed my handler definitions to look like
this:

<handler class="Handler1" commandId="command">
<activeWhen>
<with variable="selection">
<iterate operator="and">
<instanceof value="class1">
</instanceof>
</iterate>
<count value="+">
</count>
</with>
</activeWhen>
</handler>
<handler class="Handler2" commandId="command">
<activeWhen>
<with variable="selection">
<iterate operator="and">
<instanceof value="class2">
</instanceof>
</iterate>
<count value="+">
</count>
</with>
</activeWhen>
</handler>

Hope that helps,
Chris

"mowry " <mowry_889@yahoo.com> wrote in message
news:1a07b231744e6898d25e707d8f4b8808$1@www.eclipse.org...
> Yes it works fine though it logs with those errors/warnings.
>
> I am using eclipse Version: 3.3.1.1
> Build id: M20071023-1652
>
> Are there any know issues with this release?
>
> I will open a defect with details.
>
> Thanks,
> Mowry
>
>
Previous Topic:Lost PDE resources
Next Topic:JUnit Test Case class Generator
Goto Forum:
  


Current Time: Wed Jul 17 17:31:21 GMT 2024

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

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

Back to the top