|
|
|
|
Re: A handler conflict occurred. This may disable some commands. [message #335557 is a reply to message #335469] |
Tue, 14 April 2009 18:54 |
Chris Goldthorpe 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 #335969 is a reply to message #335688] |
Tue, 12 May 2009 04: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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02908 seconds