A handler conflict occurred. This may disable some commands. [message #475475] |
Wed, 08 April 2009 18:40  |
Eclipse User |
|
|
|
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 #475486 is a reply to message #475477] |
Tue, 14 April 2009 14:54   |
Eclipse User |
|
|
|
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 #475560 is a reply to message #475554] |
Tue, 12 May 2009 00:15  |
Eclipse User |
|
|
|
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
>
>
|
|
|
Re: A handler conflict occurred. This may disable some commands. [message #623324 is a reply to message #475475] |
Wed, 08 April 2009 21:51  |
Eclipse User |
|
|
|
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 #623325 is a reply to message #475476] |
Thu, 09 April 2009 14:22  |
Eclipse User |
|
|
|
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 #623334 is a reply to message #475477] |
Tue, 14 April 2009 14:54  |
Eclipse User |
|
|
|
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 #623347 is a reply to message #475554] |
Tue, 12 May 2009 00:15  |
Eclipse User |
|
|
|
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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.07995 seconds