Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2011-01-10 17:07:32 -0500
committerRyan D. Brooks2011-01-10 17:07:32 -0500
commit665c903eaa962f59d9149469aa49b3b5622c4f98 (patch)
treebff18e2db56b85e54c3495d4a4998eca8b2ff290 /plugins/org.eclipse.osee.coverage
parentd0a98e59637cd674efd73a98fc01e1e285068f65 (diff)
downloadorg.eclipse.osee-665c903eaa962f59d9149469aa49b3b5622c4f98.tar.gz
org.eclipse.osee-665c903eaa962f59d9149469aa49b3b5622c4f98.tar.xz
org.eclipse.osee-665c903eaa962f59d9149469aa49b3b5622c4f98.zip
refinement: Improve open with command/handler renderer code
Diffstat (limited to 'plugins/org.eclipse.osee.coverage')
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageRenderer.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageRenderer.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageRenderer.java
index 6672da4c8e..2d9d3ab574 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageRenderer.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageRenderer.java
@@ -17,6 +17,8 @@ import static org.eclipse.osee.framework.ui.skynet.render.PresentationType.GENER
import static org.eclipse.osee.framework.ui.skynet.render.PresentationType.PRODUCE_ATTRIBUTE;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.commands.Command;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osee.coverage.store.CoverageArtifactTypes;
import org.eclipse.osee.coverage.util.CoverageImage;
import org.eclipse.osee.framework.access.AccessControlManager;
@@ -25,7 +27,6 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.ui.skynet.render.DefaultArtifactRenderer;
import org.eclipse.osee.framework.ui.skynet.render.PresentationType;
import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.swt.graphics.Image;
/**
* @author Ryan D. Brooks
@@ -34,10 +35,10 @@ public class CoverageRenderer extends DefaultArtifactRenderer {
private static final String COMMAND_ID = "org.eclipse.osee.coverage.editor.command";
@Override
- public List<String> getCommandId(PresentationType presentationType) {
+ public List<String> getCommandIds(CommandGroup commandGroup) {
ArrayList<String> commandIds = new ArrayList<String>(1);
- if (presentationType == PresentationType.SPECIALIZED_EDIT) {
+ if (commandGroup.isEdit()) {
commandIds.add(COMMAND_ID);
}
@@ -45,8 +46,8 @@ public class CoverageRenderer extends DefaultArtifactRenderer {
}
@Override
- public Image getImage(Artifact artifact) {
- return ImageManager.getImage(CoverageImage.COVERAGE_PACKAGE);
+ public ImageDescriptor getCommandImageDescriptor(Command command, Artifact artifact) {
+ return ImageManager.getImageDescriptor(CoverageImage.COVERAGE_PACKAGE);
}
@Override

Back to the top