Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2020-12-17 20:31:02 +0000
committerRyan D. Brooks2021-01-06 19:35:06 +0000
commitd967dcc063acd72e50af5085965a647818717ca1 (patch)
treed77650e361782ba239e9cef490a1d52ed2662e3e
parentaa177d75f2c2c9f5a6ad9b6b5700854fbb0d0197 (diff)
downloadorg.eclipse.osee-d967dcc063acd72e50af5085965a647818717ca1.tar.gz
org.eclipse.osee-d967dcc063acd72e50af5085965a647818717ca1.tar.xz
org.eclipse.osee-d967dcc063acd72e50af5085965a647818717ca1.zip
feature[TW18536]: Add display hints to attribute types
Change Doors attributes to string with single-line display hint Change-Id: Ib5258fffc7bcab13cf9a4f522f4f517c478146f3
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeGeneric.java21
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeString.java4
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeToken.java11
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/DisplayHint.java29
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/OrcsTypeTokens.java15
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreArtifactTypes.java46
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreAttributeTypes.java20
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/AttributeTypeToXWidgetName.java26
8 files changed, 115 insertions, 57 deletions
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeGeneric.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeGeneric.java
index 4366a4213f5..45f884c2927 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeGeneric.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeGeneric.java
@@ -13,6 +13,8 @@
package org.eclipse.osee.framework.core.data;
+import java.util.Collections;
+import java.util.Set;
import org.eclipse.osee.framework.jdk.core.type.Id;
import org.eclipse.osee.framework.jdk.core.type.Named;
import org.eclipse.osee.framework.jdk.core.type.NamedIdDescription;
@@ -29,14 +31,26 @@ public abstract class AttributeTypeGeneric<T> extends NamedIdDescription impleme
private final NamespaceToken namespace;
private final String fileExtension;
private final T defaultValue;
+ protected final Set<DisplayHint> displayHints;
- public AttributeTypeGeneric(Long id, NamespaceToken namespace, String name, String mediaType, String description, TaggerTypeToken taggerType, String fileExtension, T defaultValue) {
+ public AttributeTypeGeneric(Long id, NamespaceToken namespace, String name, String mediaType, String description, TaggerTypeToken taggerType, String fileExtension, T defaultValue, Set<DisplayHint> displayHints) {
super(id, name, description);
this.namespace = namespace;
this.mediaType = mediaType;
this.taggerType = taggerType;
this.fileExtension = fileExtension;
this.defaultValue = defaultValue;
+ this.displayHints = displayHints;
+ }
+
+ public AttributeTypeGeneric(Long id, NamespaceToken namespace, String name, String mediaType, String description, TaggerTypeToken taggerType, String fileExtension, T defaultValue) {
+ this(id, namespace, name, mediaType, description, taggerType, fileExtension, defaultValue,
+ Collections.emptySet());
+ }
+
+ public AttributeTypeGeneric(Long id, NamespaceToken namespace, String name, String mediaType, String description, TaggerTypeToken taggerType, String fileExtension, T defaultValue, DisplayHint... displayHints) {
+ this(id, namespace, name, mediaType, description, taggerType, fileExtension, defaultValue,
+ org.eclipse.osee.framework.jdk.core.util.Collections.asHashSet(displayHints));
}
public T getBaseAttributeTypeDefaultValue() {
@@ -85,4 +99,9 @@ public abstract class AttributeTypeGeneric<T> extends NamedIdDescription impleme
public boolean isTaggable() {
return taggerType.isValid();
}
+
+ @Override
+ public Set<DisplayHint> getDisplayHints() {
+ return displayHints;
+ }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeString.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeString.java
index c62168e40e0..cd4d18c57bd 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeString.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeString.java
@@ -24,8 +24,8 @@ import org.eclipse.osee.framework.jdk.core.util.io.xml.XmlTextInputStream;
*/
public final class AttributeTypeString extends AttributeTypeGeneric<String> {
- public AttributeTypeString(Long id, NamespaceToken namespace, String name, String mediaType, String description, TaggerTypeToken taggerType, String fileExtension) {
- super(id, namespace, name, mediaType, description, taggerType, fileExtension, "");
+ public AttributeTypeString(Long id, NamespaceToken namespace, String name, String mediaType, String description, TaggerTypeToken taggerType, String fileExtension, DisplayHint... displayHints) {
+ super(id, namespace, name, mediaType, description, taggerType, fileExtension, "", displayHints);
}
@Override
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeToken.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeToken.java
index b6ea73fd6bd..e82e77b8767 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeToken.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/AttributeTypeToken.java
@@ -13,6 +13,7 @@
package org.eclipse.osee.framework.core.data;
+import java.util.Set;
import javax.ws.rs.core.MediaType;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.osee.framework.core.enums.EnumToken;
@@ -40,6 +41,8 @@ public interface AttributeTypeToken extends AttributeTypeId, FullyNamed, HasDesc
String getFileExtension();
+ Set<DisplayHint> getDisplayHints();
+
default NamespaceToken getNamespace() {
return NamespaceToken.SENTINEL;
}
@@ -161,4 +164,12 @@ public interface AttributeTypeToken extends AttributeTypeId, FullyNamed, HasDesc
}
throw new OseeTypeDoesNotExist("Attribute type [%s] is not an enum type.", getName());
}
+
+ default boolean isSingleLine() {
+ return getDisplayHints().contains(DisplayHint.SingleLine);
+ }
+
+ default boolean isMultiLine() {
+ return getDisplayHints().contains(DisplayHint.MultiLine);
+ }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/DisplayHint.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/DisplayHint.java
new file mode 100644
index 00000000000..b695892dcfd
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/DisplayHint.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2020 Boeing.
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.core.data;
+
+import org.eclipse.osee.framework.jdk.core.type.NamedIdBase;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class DisplayHint extends NamedIdBase {
+
+ public static DisplayHint SingleLine = new DisplayHint(1L, "Single Line");
+ public static DisplayHint MultiLine = new DisplayHint(2L, "Multiline");
+ public static DisplayHint NoGeneralEdit = new DisplayHint(3L, "No General Edit");
+
+ private DisplayHint(Long id, String name) {
+ super(id, name);
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/OrcsTypeTokens.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/OrcsTypeTokens.java
index 5c24316881b..9b299f0aec0 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/OrcsTypeTokens.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/OrcsTypeTokens.java
@@ -267,21 +267,22 @@ public class OrcsTypeTokens {
/**
* Methods for creating String AttributeType
*/
- public @NonNull AttributeTypeString createString(Long id, String name, String mediaType, String description, TaggerTypeToken taggerType, String fileExtension) {
+ public @NonNull AttributeTypeString createString(Long id, String name, String mediaType, String description, TaggerTypeToken taggerType, String fileExtension, DisplayHint... displayHints) {
return attributeTypes.addAndReturn(
- new AttributeTypeString(id, namespace, name, mediaType, description, taggerType, fileExtension));
+ new AttributeTypeString(id, namespace, name, mediaType, description, taggerType, fileExtension, displayHints));
}
- public @NonNull AttributeTypeString createString(Long id, String name, String mediaType, String description) {
+ public @NonNull AttributeTypeString createString(Long id, String name, String mediaType, String description, DisplayHint... displayHints) {
return createString(id, name, mediaType, description, determineTaggerType(mediaType),
- defaultFileExtension(mediaType));
+ defaultFileExtension(mediaType), displayHints);
}
- public @NonNull AttributeTypeString createString(Long id, String name, String mediaType, String description, String fileExtension) {
- return createString(id, name, mediaType, description, determineTaggerType(mediaType), fileExtension);
+ public @NonNull AttributeTypeString createString(Long id, String name, String mediaType, String description, String fileExtension, DisplayHint... displayHints) {
+ return createString(id, name, mediaType, description, determineTaggerType(mediaType), fileExtension,
+ displayHints);
}
- public @NonNull AttributeTypeString createStringNoTag(Long id, String name, String mediaType, String description) {
+ public @NonNull AttributeTypeString createStringNoTag(Long id, String name, String mediaType, String description, DisplayHint... displayHints) {
return createString(id, name, mediaType, description, TaggerTypeToken.SENTINEL, defaultFileExtension(mediaType));
}
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreArtifactTypes.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreArtifactTypes.java
index 36cf130c837..77c16539570 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreArtifactTypes.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreArtifactTypes.java
@@ -33,9 +33,9 @@ public interface CoreArtifactTypes {
ArtifactTypeToken AbstractAccessControlled = osee.add(osee.artifactType(17L, "Abstract Access Controlled", true, Artifact)
.any(AccessContextId));
ArtifactTypeToken AbstractHeading = osee.add(osee.artifactType(805L, "Abstract Heading", true, Artifact)
- .zeroOrOne(DoorsHierarchy, DoorsHierarchy.Unspecified)
- .any(DoorsId, DoorsId.Unspecified)
- .any(DoorsModId, DoorsModId.Unspecified));
+ .zeroOrOne(DoorsHierarchy)
+ .any(DoorsId)
+ .any(DoorsModId));
ArtifactTypeToken AbstractImplementationDetails = osee.add(osee.artifactType(921211884L, "Abstract Implementation Details", true, Artifact)
.zeroOrOne(DataRightsBasis)
.zeroOrOne(DataRightsClassification, DataRightsClassification.Unspecified)
@@ -116,9 +116,9 @@ public interface CoreArtifactTypes {
ArtifactTypeToken DesignMsWord = osee.add(osee.artifactType(346L, "Design - MS Word", false, MsWordTemplate)
.zeroOrOne(DataRightsBasis)
.zeroOrOne(DataRightsClassification, DataRightsClassification.Unspecified)
- .zeroOrOne(DoorsHierarchy, DoorsHierarchy.Unspecified)
- .any(DoorsId, DoorsId.Unspecified)
- .any(DoorsModId, DoorsModId.Unspecified)
+ .zeroOrOne(DoorsHierarchy)
+ .any(DoorsId)
+ .any(DoorsModId)
.zeroOrOne(IaPlan)
.zeroOrOne(LegacyDal, LegacyDal.Unspecified)
.zeroOrOne(PotentialSecurityImpact)
@@ -157,16 +157,16 @@ public interface CoreArtifactTypes {
.zeroOrOne(PlainTextContent));
ArtifactTypeToken AcronymPlainText = osee.add(osee.artifactType(5034328852220100337L, "Acronym Plain Text", false, PlainText)
.zeroOrOne(Acronym)
- .any(DoorsId, DoorsId.Unspecified));
+ .any(DoorsId));
ArtifactTypeToken ImplementationDetailsPlainText = osee.add(osee.artifactType(638269899L, "Implementation Details Plain Text", false, PlainText, AbstractImplementationDetails));
ArtifactTypeToken PlainTextDataRights = osee.add(osee.artifactType(4527862492986312222L, "Plain Text With Data Rights", false, PlainText)
.zeroOrOne(DataRightsBasis)
.zeroOrOne(DataRightsClassification, DataRightsClassification.Unspecified)
- .zeroOrOne(DoorsHierarchy, DoorsHierarchy.Unspecified)
- .any(DoorsId, DoorsId.Unspecified)
+ .zeroOrOne(DoorsHierarchy)
+ .any(DoorsId)
.zeroOrOne(PageOrientation, PageOrientation.Portrait));
ArtifactTypeToken ReferenceDocument = osee.add(osee.artifactType(2084059074565751746L, "Reference Document", false, GeneralDocument)
- .any(DoorsId, DoorsId.Unspecified));
+ .any(DoorsId));
ArtifactTypeToken RendererTemplateWholeWord = osee.add(osee.artifactType(9L, "Renderer Template - Whole Word", false, MsWordWholeDocument)
.exactlyOne(RendererOptions, "{\"ElementType\" : \"Artifact\", \"OutliningOptions\" : [ {\"Outlining\" : true, \"RecurseChildren\" : false, \"HeadingAttributeType\" : \"Name\", \"ArtifactName\" : \"Default\", \"OutlineNumber\" : \"\" }], \"AttributeOptions\" : [{\"AttrType\" : \"*\", \"Label\" : \"\", \"FormatPre\" : \"\", \"FormatPost\" : \"\"}]}")
.any(TemplateMatchCriteria));
@@ -177,9 +177,9 @@ public interface CoreArtifactTypes {
.zeroOrOne(DataRightsClassification, DataRightsClassification.Unspecified)
.zeroOrOne(SubjectMatterExpert));
ArtifactTypeToken AbstractSpecRequirement = osee.add(osee.artifactType(58551193202327573L, "Abstract Spec Requirement", false, Requirement)
- .zeroOrOne(DoorsHierarchy, DoorsHierarchy.Unspecified)
- .any(DoorsId, DoorsId.Unspecified)
- .any(DoorsModId, DoorsModId.Unspecified)
+ .zeroOrOne(DoorsHierarchy)
+ .any(DoorsId)
+ .any(DoorsModId)
.zeroOrOne(LegacyDal, LegacyDal.Unspecified)
.zeroOrOne(LegacyId)
.zeroOrOne(PotentialSecurityImpact)
@@ -248,14 +248,14 @@ public interface CoreArtifactTypes {
ArtifactTypeToken TestResultWholeWord = osee.add(osee.artifactType(40L, "Test Result - Whole Word", false, MsWordWholeDocument, AbstractTestResult));
ArtifactTypeToken TestUnit = osee.add(osee.artifactType(4L, "Test Unit", true, Artifact));
ArtifactTypeToken IntegrationTestProcedureMsWord = osee.add(osee.artifactType(443398723457743215L, "Integration Test Procedure - MS Word", false, MsWordTemplate, TestUnit)
- .zeroOrOne(DoorsHierarchy, DoorsHierarchy.Unspecified)
- .any(DoorsId, DoorsId.Unspecified));
+ .zeroOrOne(DoorsHierarchy)
+ .any(DoorsId));
ArtifactTypeToken SoftwareTestProcedurePlainText = osee.add(osee.artifactType(564397212436322878L, "Software Test Procedure Plain Text", false, PlainText, TestUnit)
- .zeroOrOne(DoorsHierarchy, DoorsHierarchy.Unspecified)
- .any(DoorsId, DoorsId.Unspecified));
+ .zeroOrOne(DoorsHierarchy)
+ .any(DoorsId));
ArtifactTypeToken IntegrationTestProcedureWholeWord = osee.add(osee.artifactType(443398723457743216L, "Integration Test Procedure - Whole Word", false, MsWordWholeDocument, TestUnit)
- .zeroOrOne(DoorsHierarchy, DoorsHierarchy.Unspecified)
- .any(DoorsId, DoorsId.Unspecified));
+ .zeroOrOne(DoorsHierarchy)
+ .any(DoorsId));
ArtifactTypeToken TestCase = osee.add(osee.artifactType(82L, "Test Case", false, TestUnit));
ArtifactTypeToken TestInformationSheetMsWord = osee.add(osee.artifactType(41L, "Test Information Sheet - MS Word", false, MsWordTemplate, TestUnit)
.exactlyOne(TisTestCategory, TisTestCategory.DEV)
@@ -299,11 +299,11 @@ public interface CoreArtifactTypes {
ArtifactTypeToken UserGroup = osee.add(osee.artifactType(7L, "User Group", false, AbstractAccessControlled, GroupArtifact)
.zeroOrOne(DefaultGroup));
ArtifactTypeToken SoftwareTestProcedureWholeWord = osee.add(osee.artifactType(554486323432951757L, "Software Test Procedure - Whole Word", false, MsWordWholeDocument, TestUnit)
- .any(DoorsId, DoorsId.Unspecified)
- .zeroOrOne(DoorsHierarchy, DoorsHierarchy.Unspecified));
+ .any(DoorsId)
+ .zeroOrOne(DoorsHierarchy));
ArtifactTypeToken SoftwareTestProcedureMsWord = osee.add(osee.artifactType(554486323432951758L, "Software Test Procedure - MS Word", false, MsWordTemplate, TestUnit)
- .any(DoorsId, DoorsId.Unspecified)
- .zeroOrOne(DoorsHierarchy, DoorsHierarchy.Unspecified));
+ .any(DoorsId)
+ .zeroOrOne(DoorsHierarchy));
ArtifactTypeToken SubscriptionGroup = osee.add(osee.artifactType(6753071794573299176L, "Subscription Group", false, UserGroup));
ArtifactTypeToken WorkItemDefinition = osee.add(osee.artifactType(50L, "Work Item Definition", true, Artifact)
.any(WorkData)
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreAttributeTypes.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreAttributeTypes.java
index 02eb6b58783..64d313450be 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreAttributeTypes.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/CoreAttributeTypes.java
@@ -23,7 +23,7 @@ import org.eclipse.osee.framework.core.data.AttributeTypeInteger;
import org.eclipse.osee.framework.core.data.AttributeTypeJoin;
import org.eclipse.osee.framework.core.data.AttributeTypeString;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
-import org.eclipse.osee.framework.core.data.DynamicEnumAttributeType;
+import org.eclipse.osee.framework.core.data.DisplayHint;
import org.eclipse.osee.framework.core.enums.token.ComponentAttributeType;
import org.eclipse.osee.framework.core.enums.token.CsciAttributeType;
import org.eclipse.osee.framework.core.enums.token.DataRightsClassificationAttributeType;
@@ -53,7 +53,7 @@ import org.eclipse.osee.framework.core.enums.token.VerificationLevelAttributeTyp
public interface CoreAttributeTypes {
// @formatter:off
- AttributeTypeString AccessContextId = osee.createString(1152921504606847102L, "Access Context Id", MediaType.TEXT_PLAIN, "");
+ AttributeTypeString AccessContextId = osee.createString(1152921504606847102L, "Access Context Id", MediaType.TEXT_PLAIN, "", DisplayHint.SingleLine);
AttributeTypeString Acronym = osee.createString(4723834159825897915L, "Acronym", MediaType.TEXT_PLAIN, "");
AttributeTypeBoolean Active = osee.createBoolean(1152921504606847065L, "Active", MediaType.TEXT_PLAIN, "");
AttributeTypeString Annotation = osee.createString(1152921504606847094L, "Annotation", MediaType.TEXT_PLAIN, "");
@@ -80,9 +80,9 @@ public interface CoreAttributeTypes {
AttributeTypeBoolean Developmental = osee.createBooleanNoTag(1152921504606847137L, "Developmental", MediaType.TEXT_PLAIN, "");
AttributeTypeString Dictionary = osee.createString(1152921504606847083L, "Dictionary", MediaType.TEXT_PLAIN, "");
AttributeTypeString DisplayText = osee.createStringNoTag(188458869981237L, "Display Text", MediaType.TEXT_PLAIN, "");
- DynamicEnumAttributeType DoorsHierarchy = osee.createEnum(1873562488122323009L, "Doors Hierarchy", MediaType.TEXT_PLAIN, "");
- DynamicEnumAttributeType DoorsId = osee.createEnum(8243262488122393232L, "Doors ID", MediaType.TEXT_PLAIN, "External doors id for import support");
- DynamicEnumAttributeType DoorsModId = osee.createEnum(5326122488147393161L, "Doors Mod ID", MediaType.TEXT_PLAIN, "Modified External doors id for import support");
+ AttributeTypeString DoorsHierarchy = osee.createString(1873562488122323009L, "Doors Hierarchy", MediaType.TEXT_PLAIN, "");
+ AttributeTypeString DoorsId = osee.createString(8243262488122393232L, "Doors ID", MediaType.TEXT_PLAIN, "External doors id for import support", DisplayHint.SingleLine);
+ AttributeTypeString DoorsModId = osee.createString(5326122488147393161L, "Doors Mod ID", MediaType.TEXT_PLAIN, "Modified External doors id for import support", DisplayHint.SingleLine );
AttributeTypeString Effectivity = osee.createStringNoTag(1152921504606847108L, "Effectivity", MediaType.TEXT_PLAIN, "");
AttributeTypeString Email = osee.createString(1152921504606847082L, "Email", MediaType.TEXT_PLAIN, "");
AttributeTypeString ExcludePath = osee.createString(1152921504606847708L, "Exclude Path", MediaType.TEXT_PLAIN, "");
@@ -109,7 +109,7 @@ public interface CoreAttributeTypes {
AttributeTypeBoolean IaPlan = osee.createBoolean(1253931514616857210L, "IA Plan", MediaType.TEXT_PLAIN, "");
IdalAttributeType IDAL = osee.createEnum(new IdalAttributeType());
AttributeTypeString IdalRationale = osee.createStringNoTag(2517743638468399405L, "IDAL Rationale", MediaType.TEXT_PLAIN, "Item Development Assurance Level Rationale");
- AttributeTypeString IdValue = osee.createString(72057896045641815L, "Id Value", MediaType.TEXT_PLAIN, "Key-Value attribute where key (attribute id) is supplied by framework and value is supplied by user.");
+ AttributeTypeString IdValue = osee.createString(72057896045641815L, "Id Value", MediaType.TEXT_PLAIN, "Key-Value attribute where key (attribute id) is supplied by framework and value is supplied by user.", DisplayHint.SingleLine);
AttributeTypeInputStream ImageContent = osee.createInputStreamNoTag(1152921504606847868L, "Image Content", AttributeTypeToken.IMAGE, "Binary Image content");
AttributeTypeString JavaCode = osee.createString(1253931606616948117L, "Java Code", MediaType.TEXT_PLAIN, "code that can be compiled into java");
LegacyDalAttributeType LegacyDal = osee.createEnum(new LegacyDalAttributeType());
@@ -129,7 +129,7 @@ public interface CoreAttributeTypes {
AttributeTypeBoolean PotentialSecurityImpact = osee.createBoolean(1152921504606847109L, "Potential Security Impact", MediaType.TEXT_PLAIN, "");
AttributeTypeBoolean PublishInline = osee.createBoolean(1152921504606847122L, "PublishInline", MediaType.TEXT_PLAIN, "");
QualificationMethodAttributeType QualificationMethod = osee.createEnum(new QualificationMethodAttributeType());
- AttributeTypeString RelationOrder = osee.createStringNoTag(1152921504606847089L, "Relation Order", MediaType.TEXT_PLAIN, "Defines relation ordering information");
+ AttributeTypeString RelationOrder = osee.createStringNoTag(1152921504606847089L, "Relation Order", MediaType.TEXT_PLAIN, "Defines relation ordering information", DisplayHint.MultiLine);
AttributeTypeString RendererOptions = osee.createString(904L, "Renderer Options", MediaType.APPLICATION_JSON, "", "txt");
AttributeTypeString RepositoryUrl = osee.createString(1152921504606847700L, "Repository URL", MediaType.TEXT_PLAIN, "");
AttributeTypeBoolean RequireConfirmation = osee.createBooleanNoTag(188458869981239L, "Require Confirmation", MediaType.TEXT_PLAIN, "");
@@ -144,7 +144,7 @@ public interface CoreAttributeTypes {
AttributeTypeBoolean SoftwareSafetyImpact = osee.createBooleanNoTag(8318805403746485981L, "Software Safety Impact", MediaType.TEXT_PLAIN, "Software Safety Impact");
AttributeTypeString StartPage = osee.createStringNoTag(1152921504606847135L, "osee.wi.Start Page", MediaType.TEXT_PLAIN, "");
AttributeTypeString State = osee.createString(1152921504606847070L, "State", MediaType.TEXT_PLAIN, "");
- AttributeTypeString StaticId = osee.createString(1152921504606847095L, "Static Id", MediaType.TEXT_PLAIN, "");
+ AttributeTypeString StaticId = osee.createString(1152921504606847095L, "Static Id", MediaType.TEXT_PLAIN, "", DisplayHint.SingleLine);
AttributeTypeString Street = osee.createString(1152921504606847069L, "Street", MediaType.TEXT_PLAIN, "");
AttributeTypeString SubjectMatterExpert = osee.createString(72057594037928275L, "Subject Matter Expert", MediaType.TEXT_PLAIN, "Name of the Subject Matter Expert");
SubsystemAttributeType Subsystem = osee.createEnum(new SubsystemAttributeType());
@@ -165,9 +165,9 @@ public interface CoreAttributeTypes {
VerificationLevelAttributeType VerificationLevel = osee.createEnum(new VerificationLevelAttributeType());
AttributeTypeString WebPreferences = osee.createString(1152921504606847386L, "Web Preferences", MediaType.TEXT_PLAIN, "", "xml");
AttributeTypeString Website = osee.createString(1152921504606847084L, "Website", AttributeTypeToken.TEXT_URI_LIST, "");
- AttributeTypeString WholeWordContent = osee.createString(1152921504606847099L, "Whole Word Content", AttributeTypeToken.APPLICATION_MSWORD, "value must comply with WordML xml schema");
+ AttributeTypeString WholeWordContent = osee.createString(1152921504606847099L, "Whole Word Content", AttributeTypeToken.APPLICATION_MSWORD, "value must comply with WordML xml schema", DisplayHint.MultiLine);
AttributeTypeString WordOleData = osee.createStringNoTag(1152921504606847092L, "Word Ole Data", AttributeTypeToken.APPLICATION_MSWORD, "Word Ole Data");
- AttributeTypeString WordTemplateContent = osee.createString(1152921504606847098L, "Word Template Content", AttributeTypeToken.APPLICATION_MSWORD, "value must comply with WordML xml schema");
+ AttributeTypeString WordTemplateContent = osee.createString(1152921504606847098L, "Word Template Content", AttributeTypeToken.APPLICATION_MSWORD, "value must comply with WordML xml schema", DisplayHint.MultiLine);
AttributeTypeString WorkData = osee.createStringNoTag(1152921504606847126L, "osee.wi.Work Data", MediaType.TEXT_XML, "");
AttributeTypeString WorkDescription = osee.createStringNoTag(1152921504606847129L, "osee.wi.Work Description", MediaType.TEXT_PLAIN, "");
AttributeTypeString WorkId = osee.createStringNoTag(1152921504606847127L, "osee.wi.Work Id", MediaType.TEXT_PLAIN, "");
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/AttributeTypeToXWidgetName.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/AttributeTypeToXWidgetName.java
index a35992652b6..d3654fc6c94 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/AttributeTypeToXWidgetName.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/AttributeTypeToXWidgetName.java
@@ -16,7 +16,6 @@ package org.eclipse.osee.framework.skynet.core.utility;
import org.eclipse.osee.framework.core.data.ArtifactTypeToken;
import org.eclipse.osee.framework.core.data.AttributeTypeEnum;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
-import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
import org.eclipse.osee.framework.core.enums.EnumToken;
import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.skynet.core.internal.ServiceUtil;
@@ -27,13 +26,10 @@ import org.eclipse.osee.framework.skynet.core.internal.ServiceUtil;
public class AttributeTypeToXWidgetName {
public static <T extends EnumToken> String getXWidgetName(ArtifactTypeToken artType, AttributeTypeToken attributeType) {
- artType = ServiceUtil.getOrcsTokenService().getArtifactType(artType.getId()); //Remove this when ArtifactType class is removed
int minOccurrence = artType.getMin(attributeType);
int maxOccurrence = artType.getMax(attributeType);
String xWidgetName = "";
- if (attributeType.equals(CoreAttributeTypes.AccessContextId)) {
- xWidgetName = "XTextFlatDam";
- } else if (attributeType.isEnumerated()) {
+ if (attributeType.isEnumerated()) {
AttributeTypeEnum<T> enumeratedType =
(AttributeTypeEnum<T>) ServiceUtil.getOrcsTokenService().getAttributeType(attributeType.getId());
@@ -51,9 +47,6 @@ public class AttributeTypeToXWidgetName {
} else {
xWidgetName = "XComboBooleanDam";
}
- } else if (attributeType.matches(CoreAttributeTypes.WordTemplateContent) || attributeType.matches(
- CoreAttributeTypes.WholeWordContent) || attributeType.matches(CoreAttributeTypes.RelationOrder)) {
- xWidgetName = "XStackedDam";
} else if (attributeType.isDate()) {
xWidgetName = "XDateDam";
} else if (attributeType.isInteger()) {
@@ -68,18 +61,23 @@ public class AttributeTypeToXWidgetName {
xWidgetName = "XBranchSelectWidget";
} else if (attributeType.isArtifactId()) {
xWidgetName = "XListDropViewWithSave";
- } else if (attributeType.equals(CoreAttributeTypes.IdValue)) {
- xWidgetName = "XTextFlatDam";
} else if (attributeType.isString()) {
if (maxOccurrence == 1) {
- xWidgetName = "XTextDam";
+ if (attributeType.isMultiLine()) {
+ xWidgetName = "XStackedDam";
+ } else {
+ xWidgetName = "XTextDam";
+ }
} else {
- xWidgetName = "XStackedDam";
+ if (attributeType.isSingleLine()) {
+ xWidgetName = "XTextFlatDam";
+ } else {
+ xWidgetName = "XStackedDam";
+ }
}
} else {
xWidgetName = "XStackedDam";
}
return xWidgetName;
}
-
-}
+} \ No newline at end of file

Back to the top