Add icon to DerivateView context menu
authorPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 17 Nov 2015 15:33:54 +0000 (16:33 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Tue, 17 Nov 2015 15:33:54 +0000 (16:33 +0100)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/ListenToSelectionChangeContextMenu.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/ImageResources.java

index c68c8e5da2652c1ead735f597b2dcd6c32c17f7b..15fa005f198a9d33a78a4ba52b657ca0a4110706 100644 (file)
@@ -13,6 +13,7 @@ import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.actions.CompoundContributionItem;
 
 import eu.etaxonomy.taxeditor.editor.view.derivate.DerivateView;
+import eu.etaxonomy.taxeditor.model.ImageResources;
 
 /**
  * Context menu for the SingleReads in the derivate hierarchy.
@@ -37,6 +38,7 @@ public class ListenToSelectionChangeContextMenu extends CompoundContributionItem
                             else{
                                 item.setText("Link with taxon selection");
                             }
+                            item.setImage(ImageResources.getImage(ImageResources.SYNCED));
                             item.addSelectionListener(new SelectionAdapterExtension(derivateView));
                         }
                     }
index 66f714a87147fcdd77112130eec42e3f64b3cf35..e44c05689af1ea40601e1b3517d1c70985f8fb3d 100644 (file)
@@ -118,6 +118,8 @@ public class ImageResources {
        /** Constant <code>LOCK_ICON="locked"</code> */
        public static final String LOCK_ICON = "lock";
 
+       public static final String SYNCED = "synced";
+
        /** Constant <code>LOCK_OPEN_ICON="lock_open"</code> */
        public static final String LOCK_OPEN_ICON = "lock_open";
 
@@ -335,6 +337,8 @@ public class ImageResources {
                                "prj_obj.gif");
                registerImage(registry, LOCK_ICON,
                        "lock.png");
+               registerImage(registry, SYNCED,
+                       "synced.gif");
                registerImage(registry, LOCK_OPEN_ICON,
                        "lock_open.png");
                registerImage(registry, SWITCH_VIEW_TYPE,