Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid W. Miller2017-02-14 18:44:50 -0500
committerDavid W. Miller2017-02-15 12:22:17 -0500
commit4cf1fd673f96a99348dc858e7a4a8d2808308361 (patch)
tree540891b2c43e2b60e3b1050477f4924c0fb46008
parent29609d3257c6c3eda754fbda1c7422da0da7140b (diff)
downloadorg.eclipse.osee-4cf1fd673f96a99348dc858e7a4a8d2808308361.tar.gz
org.eclipse.osee-4cf1fd673f96a99348dc858e7a4a8d2808308361.tar.xz
org.eclipse.osee-4cf1fd673f96a99348dc858e7a4a8d2808308361.zip
feature[ats_ATS345087]: Move Content URL to Artifact0.24.4.v201702162045-NR0.24.4.v201702152114-NR
-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 c60da5fd29..7f36046a33 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 255f9ccdfe..17ee09605d 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 6d92a8a5c5..c7e3e40541 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