Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sapphire-dev] duplicated sapphire-extension.xml

Hey everyone,

I'm trying to add a action to the root context menu for diagrams.  I've specified a new action and action handler in the META-INF/sapphire-extension.xml (attached).  However, I'm seeing some weird behavior where Sapphire is reading my extension file twice.  This is causing my toggle action to be listed 2x in the context menu as a submenu even (see attached screenshot).

I debugged the ExtensionsLocatorFactory and it returns my exact bundle URL to my sapphire-extension.xml from two different bundleHosts.  My own plugin and also org.eclipse.emf.ecore.  Actually the extension locator find() method shows that emf.ecore is returning 4 duplicated URLs, my own sapphire-extension.xml and also 3 other duplicated URLs, sapphire.samples, sapphire.swt.graphiti and sapphire.sdk bundles.  

Any ideas why the ExtensionsLocatorFactory is returning my sapphire-extension.xml from both my own bundle and oddly enough from the org.eclipse.emf.ecore bundle?

--
Greg Amerson (@greg_amerson)
Liferay, Inc. (#liferay)
<?xml version="1.0" encoding="UTF-8"?>

<!-- 
 * Copyright (c) 2010-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
  -->
<extension xmlns="http://www.eclipse.org/sapphire/xmlns/extension";>
    <action-handler>
        <action>Liferay.Diagram.Service.ToggleConnectionLabels</action>
        <impl>com.liferay.ide.eclipse.service.ui.actions.ToggleDiagramConnectionLabelsActionHandler</impl>
        <description>Show/Hide Connection Labels</description>
        <context>Sapphire.Diagram.Editor</context>
    </action-handler>
    <action>
        <id>Liferay.Diagram.Service.ToggleConnectionLabels</id>
        <type>TOGGLE</type>
        <label>Show Connection Labels</label>
        <description>Show or hide the connection labels</description>
        <context>Sapphire.Diagram.Editor</context>
    </action>
</extension>

Attachment: sapphire_extension_1.png
Description: PNG image


Back to the top