[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.ua] Re: A handler conflict occurred. This may disable some commands.

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@xxxxxxxxx> wrote in message 
news:1a07b231744e6898d25e707d8f4b8808$1@xxxxxxxxxxxxxxxxxx
> 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
>
>