Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AttributeTypeEditPresenterTest.java3
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/support/OseeTypes_Framework.osee2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UrlRenderer.java15
3 files changed, 16 insertions, 4 deletions
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AttributeTypeEditPresenterTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AttributeTypeEditPresenterTest.java
index c60da5fd29c..7f36046a33e 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AttributeTypeEditPresenterTest.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AttributeTypeEditPresenterTest.java
@@ -37,7 +37,7 @@ import org.junit.Test;
/**
* Test Case for {@link AttributeTypeEditPresenter}
- *
+ *
* @author Roberto E. Escobar
*/
public class AttributeTypeEditPresenterTest {
@@ -50,6 +50,7 @@ public class AttributeTypeEditPresenterTest {
private static final IAttributeType[] selectableTypes = new IAttributeType[] {
CoreAttributeTypes.RelationOrder,
+ CoreAttributeTypes.ContentUrl,
CoreAttributeTypes.Annotation,
CoreAttributeTypes.StaticId};
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/support/OseeTypes_Framework.osee b/plugins/org.eclipse.osee.framework.skynet.core/support/OseeTypes_Framework.osee
index 255f9ccdfef..17ee09605df 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/support/OseeTypes_Framework.osee
+++ b/plugins/org.eclipse.osee.framework.skynet.core/support/OseeTypes_Framework.osee
@@ -2,6 +2,7 @@ artifactType "Artifact" {
uuid 0x0000000000000001
attribute "Name"
attribute "Annotation"
+ attribute "Content URL"
attribute "Static Id"
attribute "Relation Order"
}
@@ -407,7 +408,6 @@ artifactType "General Document" extends "Native Artifact" {
artifactType "Url" extends "Artifact" {
uuid 0x000000000000000F
attribute "Description"
- attribute "Content URL"
}
attributeType "Name" extends StringAttribute {
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UrlRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UrlRenderer.java
index 6d92a8a5c53..c7e3e405411 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UrlRenderer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UrlRenderer.java
@@ -14,12 +14,16 @@ package org.eclipse.osee.framework.ui.skynet.render;
import static org.eclipse.osee.framework.core.enums.CoreAttributeTypes.ContentUrl;
import static org.eclipse.osee.framework.ui.skynet.render.PresentationType.GENERALIZED_EDIT;
import static org.eclipse.osee.framework.ui.skynet.render.PresentationType.GENERAL_REQUESTED;
+import static org.eclipse.osee.framework.ui.skynet.render.PresentationType.PREVIEW;
+import java.util.ArrayList;
import java.util.List;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.types.IArtifact;
+import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
+import org.eclipse.osee.framework.ui.skynet.MenuCmdDef;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.swt.program.Program;
@@ -41,14 +45,21 @@ public class UrlRenderer extends DefaultArtifactRenderer {
@Override
public int getApplicabilityRating(PresentationType presentationType, IArtifact artifact, Object... objects) throws OseeCoreException {
Artifact aArtifact = artifact.getFullArtifact();
- if (!presentationType.matches(GENERALIZED_EDIT, GENERAL_REQUESTED) && aArtifact.isAttributeTypeValid(
- ContentUrl)) {
+ if (!presentationType.matches(GENERALIZED_EDIT,
+ GENERAL_REQUESTED) && aArtifact.getAttributeCount(ContentUrl) > 0) {
return ARTIFACT_TYPE_MATCH;
}
return NO_MATCH;
}
@Override
+ public void addMenuCommandDefinitions(ArrayList<MenuCmdDef> commands, Artifact artifact) {
+ if (artifact.getAttributeCount(ContentUrl) > 0) {
+ commands.add(new MenuCmdDef(CommandGroup.PREVIEW, PREVIEW, "Web Browser", PluginUiImage.URL));
+ }
+ }
+
+ @Override
public void open(final List<Artifact> artifacts, PresentationType presentationType) throws OseeCoreException {
Displays.ensureInDisplayThread(new Runnable() {
@Override

Back to the top