feature[ats_TW3120]: deleting unused ui.define project.
Change-Id: I808dae4f1a43bc6615e493f44e0066ff4c5a3736
diff --git a/org.eclipse.osee.ote.ui.define/.classpath b/org.eclipse.osee.ote.ui.define/.classpath
deleted file mode 100644
index 1fa3e68..0000000
--- a/org.eclipse.osee.ote.ui.define/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.osee.ote.ui.define/.pmd b/org.eclipse.osee.ote.ui.define/.pmd
deleted file mode 100644
index c7b0a9f..0000000
--- a/org.eclipse.osee.ote.ui.define/.pmd
+++ /dev/null
@@ -1,925 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<pmd>
- <useProjectRuleSet>false</useProjectRuleSet>
- <ruleSetFile>.ruleset</ruleSetFile>
- <rules>
- <rule>
- <name>LooseCoupling</name>
- <ruleset>Type Resolution Rules</ruleset>
- </rule>
- <rule>
- <name>CloneMethodMustImplementCloneable</name>
- <ruleset>Type Resolution Rules</ruleset>
- </rule>
- <rule>
- <name>UnusedImports</name>
- <ruleset>Type Resolution Rules</ruleset>
- </rule>
- <rule>
- <name>SignatureDeclareThrowsException</name>
- <ruleset>Type Resolution Rules</ruleset>
- </rule>
- <rule>
- <name>IfStmtsMustUseBraces</name>
- <ruleset>Braces Rules</ruleset>
- </rule>
- <rule>
- <name>WhileLoopsMustUseBraces</name>
- <ruleset>Braces Rules</ruleset>
- </rule>
- <rule>
- <name>IfElseStmtsMustUseBraces</name>
- <ruleset>Braces Rules</ruleset>
- </rule>
- <rule>
- <name>ForLoopsMustUseBraces</name>
- <ruleset>Braces Rules</ruleset>
- </rule>
- <rule>
- <name>UseSingleton</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>SimplifyBooleanReturns</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>SimplifyBooleanExpressions</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>SwitchStmtsShouldHaveDefault</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidDeeplyNestedIfStmts</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidReassigningParameters</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>SwitchDensity</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>ConstructorCallsOverridableMethod</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>AccessorClassGeneration</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>FinalFieldCouldBeStatic</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>CloseResource</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>NonStaticInitializer</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>DefaultLabelNotLastInSwitchStmt</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>NonCaseLabelInSwitchStatement</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>OptimizableToArrayCall</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>BadComparison</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>EqualsNull</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>ConfusingTernary</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>InstantiationToGetClass</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>IdempotentOperations</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>SimpleDateFormatNeedsLocale</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>ImmutableField</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>UseLocaleWithCaseConversions</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidProtectedFieldInFinalClass</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>AssignmentToNonFinalStatic</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>MissingStaticMethodInNonInstantiatableClass</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidSynchronizedAtMethodLevel</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>MissingBreakInSwitch</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>UseNotifyAllInsteadOfNotify</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidInstanceofChecksInCatchClause</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>AbstractClassWithoutAbstractMethod</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>SimplifyConditional</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>CompareObjectsWithEquals</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>PositionLiteralsFirstInComparisons</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>UnnecessaryLocalBeforeReturn</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>NonThreadSafeSingleton</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>UncommentedEmptyMethod</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>UncommentedEmptyConstructor</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidConstantsInterface</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>UnsynchronizedStaticDateFormatter</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>PreserveStackTrace</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>UseCollectionIsEmpty</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>ClassWithOnlyPrivateConstructorsShouldBeFinal</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>EmptyMethodInAbstractClassShouldBeAbstract</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>SingularField</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>ReturnEmptyArrayRatherThanNull</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>AbstractClassWithoutAnyMethod</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>TooFewBranchesForASwitchStatement</name>
- <ruleset>Design Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidCatchingThrowable</name>
- <ruleset>Strict Exception Rules</ruleset>
- </rule>
- <rule>
- <name>SignatureDeclareThrowsException</name>
- <ruleset>Type Resolution Rules</ruleset>
- </rule>
- <rule>
- <name>ExceptionAsFlowControl</name>
- <ruleset>Strict Exception Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidCatchingNPE</name>
- <ruleset>Strict Exception Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidThrowingRawExceptionTypes</name>
- <ruleset>Strict Exception Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidThrowingNullPointerException</name>
- <ruleset>Strict Exception Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidRethrowingException</name>
- <ruleset>Strict Exception Rules</ruleset>
- </rule>
- <rule>
- <name>DoNotExtendJavaLangError</name>
- <ruleset>Strict Exception Rules</ruleset>
- </rule>
- <rule>
- <name>DoNotThrowExceptionInFinally</name>
- <ruleset>Strict Exception Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidThrowingNewInstanceOfSameException</name>
- <ruleset>Strict Exception Rules</ruleset>
- </rule>
- <rule>
- <name>UnusedPrivateField</name>
- <ruleset>Unused Code Rules</ruleset>
- </rule>
- <rule>
- <name>UnusedLocalVariable</name>
- <ruleset>Unused Code Rules</ruleset>
- </rule>
- <rule>
- <name>UnusedPrivateMethod</name>
- <ruleset>Unused Code Rules</ruleset>
- </rule>
- <rule>
- <name>UnusedFormalParameter</name>
- <ruleset>Unused Code Rules</ruleset>
- </rule>
- <rule>
- <name>MoreThanOneLogger</name>
- <ruleset>Java Logging Rules</ruleset>
- </rule>
- <rule>
- <name>LoggerIsNotStaticFinal</name>
- <ruleset>Java Logging Rules</ruleset>
- </rule>
- <rule>
- <name>SystemPrintln</name>
- <ruleset>Java Logging Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidPrintStackTrace</name>
- <ruleset>Java Logging Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidDuplicateLiterals</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>StringInstantiation</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>StringToString</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>InefficientStringBuffering</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>UnnecessaryCaseChange</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>UseStringBufferLength</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>AppendCharacterWithChar</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>ConsecutiveLiteralAppends</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>UseIndexOfChar</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>InefficientEmptyStringCheck</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>InsufficientStringBufferDeclaration</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>UselessStringValueOf</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>StringBufferInstantiationWithChar</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>UseEqualsToCompareStrings</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidStringBufferField</name>
- <ruleset>String and StringBuffer Rules</ruleset>
- </rule>
- <rule>
- <name>ReplaceVectorWithList</name>
- <ruleset>Migration Rules</ruleset>
- </rule>
- <rule>
- <name>ReplaceHashtableWithMap</name>
- <ruleset>Migration Rules</ruleset>
- </rule>
- <rule>
- <name>ReplaceEnumerationWithIterator</name>
- <ruleset>Migration Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidEnumAsIdentifier</name>
- <ruleset>Migration Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidAssertAsIdentifier</name>
- <ruleset>Migration Rules</ruleset>
- </rule>
- <rule>
- <name>IntegerInstantiation</name>
- <ruleset>Migration Rules</ruleset>
- </rule>
- <rule>
- <name>ByteInstantiation</name>
- <ruleset>Migration Rules</ruleset>
- </rule>
- <rule>
- <name>ShortInstantiation</name>
- <ruleset>Migration Rules</ruleset>
- </rule>
- <rule>
- <name>LongInstantiation</name>
- <ruleset>Migration Rules</ruleset>
- </rule>
- <rule>
- <name>JUnit4TestShouldUseBeforeAnnotation</name>
- <ruleset>Migration Rules</ruleset>
- </rule>
- <rule>
- <name>JUnit4TestShouldUseAfterAnnotation</name>
- <ruleset>Migration Rules</ruleset>
- </rule>
- <rule>
- <name>JUnit4TestShouldUseTestAnnotation</name>
- <ruleset>Migration Rules</ruleset>
- </rule>
- <rule>
- <name>JUnit4SuitesShouldUseSuiteAnnotation</name>
- <ruleset>Migration Rules</ruleset>
- </rule>
- <rule>
- <name>JUnitUseExpected</name>
- <ruleset>Migration Rules</ruleset>
- </rule>
- <rule>
- <name>UseProperClassLoader</name>
- <ruleset>J2EE Rules</ruleset>
- </rule>
- <rule>
- <name>MDBAndSessionBeanNamingConvention</name>
- <ruleset>J2EE Rules</ruleset>
- </rule>
- <rule>
- <name>RemoteSessionInterfaceNamingConvention</name>
- <ruleset>J2EE Rules</ruleset>
- </rule>
- <rule>
- <name>LocalInterfaceSessionNamingConvention</name>
- <ruleset>J2EE Rules</ruleset>
- </rule>
- <rule>
- <name>LocalHomeNamingConvention</name>
- <ruleset>J2EE Rules</ruleset>
- </rule>
- <rule>
- <name>RemoteInterfaceNamingConvention</name>
- <ruleset>J2EE Rules</ruleset>
- </rule>
- <rule>
- <name>DoNotCallSystemExit</name>
- <ruleset>J2EE Rules</ruleset>
- </rule>
- <rule>
- <name>StaticEJBFieldShouldBeFinal</name>
- <ruleset>J2EE Rules</ruleset>
- </rule>
- <rule>
- <name>DoNotUseThreads</name>
- <ruleset>J2EE Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidInstantiatingObjectsInLoops</name>
- <ruleset>Optimization Rules</ruleset>
- </rule>
- <rule>
- <name>UseArrayListInsteadOfVector</name>
- <ruleset>Optimization Rules</ruleset>
- </rule>
- <rule>
- <name>SimplifyStartsWith</name>
- <ruleset>Optimization Rules</ruleset>
- </rule>
- <rule>
- <name>UseStringBufferForStringAppends</name>
- <ruleset>Optimization Rules</ruleset>
- </rule>
- <rule>
- <name>UseArraysAsList</name>
- <ruleset>Optimization Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidArrayLoops</name>
- <ruleset>Optimization Rules</ruleset>
- </rule>
- <rule>
- <name>UnnecessaryWrapperObjectCreation</name>
- <ruleset>Optimization Rules</ruleset>
- </rule>
- <rule>
- <name>AddEmptyString</name>
- <ruleset>Optimization Rules</ruleset>
- </rule>
- <rule>
- <name>EmptyCatchBlock</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>EmptyIfStmt</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>EmptyWhileStmt</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>EmptyTryBlock</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>EmptyFinallyBlock</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>EmptySwitchStatements</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>JumbledIncrementer</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>ForLoopShouldBeWhileLoop</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>UnnecessaryConversionTemporary</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>OverrideBothEqualsAndHashcode</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>DoubleCheckedLocking</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>ReturnFromFinallyBlock</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>EmptySynchronizedBlock</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>UnnecessaryReturn</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>EmptyStaticInitializer</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>UnconditionalIfStatement</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>EmptyStatementNotInLoop</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>BooleanInstantiation</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>UnnecessaryFinalModifier</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>CollapsibleIfStatements</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>UselessOverridingMethod</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>ClassCastExceptionWithToArray</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidDecimalLiteralsInBigDecimalConstructor</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>UselessOperationOnImmutable</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>MisplacedNullCheck</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>UnusedNullCheckInEquals</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidThreadGroup</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>BrokenNullCheck</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>BigIntegerInstantiation</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidUsingOctalValues</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidUsingHardCodedIP</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>CheckResultSet</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidMultipleUnaryOperators</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>EmptyInitializer</name>
- <ruleset>Basic Rules</ruleset>
- </rule>
- <rule>
- <name>MethodReturnsInternalArray</name>
- <ruleset>Security Code Guidelines</ruleset>
- </rule>
- <rule>
- <name>ArrayIsStoredDirectly</name>
- <ruleset>Security Code Guidelines</ruleset>
- </rule>
- <rule>
- <name>CouplingBetweenObjects</name>
- <ruleset>Coupling Rules</ruleset>
- </rule>
- <rule>
- <name>ExcessiveImports</name>
- <ruleset>Coupling Rules</ruleset>
- </rule>
- <rule>
- <name>LooseCoupling</name>
- <ruleset>Type Resolution Rules</ruleset>
- </rule>
- <rule>
- <name>DuplicateImports</name>
- <ruleset>Import Statement Rules</ruleset>
- </rule>
- <rule>
- <name>DontImportJavaLang</name>
- <ruleset>Import Statement Rules</ruleset>
- </rule>
- <rule>
- <name>UnusedImports</name>
- <ruleset>Type Resolution Rules</ruleset>
- </rule>
- <rule>
- <name>ImportFromSamePackage</name>
- <ruleset>Import Statement Rules</ruleset>
- </rule>
- <rule>
- <name>TooManyStaticImports</name>
- <ruleset>Import Statement Rules</ruleset>
- </rule>
- <rule>
- <name>JUnitStaticSuite</name>
- <ruleset>JUnit Rules</ruleset>
- </rule>
- <rule>
- <name>JUnitSpelling</name>
- <ruleset>JUnit Rules</ruleset>
- </rule>
- <rule>
- <name>JUnitAssertionsShouldIncludeMessage</name>
- <ruleset>JUnit Rules</ruleset>
- </rule>
- <rule>
- <name>JUnitTestsShouldIncludeAssert</name>
- <ruleset>JUnit Rules</ruleset>
- </rule>
- <rule>
- <name>TestClassWithoutTestCases</name>
- <ruleset>JUnit Rules</ruleset>
- </rule>
- <rule>
- <name>UnnecessaryBooleanAssertion</name>
- <ruleset>JUnit Rules</ruleset>
- </rule>
- <rule>
- <name>UseAssertEqualsInsteadOfAssertTrue</name>
- <ruleset>JUnit Rules</ruleset>
- </rule>
- <rule>
- <name>UseAssertSameInsteadOfAssertTrue</name>
- <ruleset>JUnit Rules</ruleset>
- </rule>
- <rule>
- <name>UseAssertNullInsteadOfAssertTrue</name>
- <ruleset>JUnit Rules</ruleset>
- </rule>
- <rule>
- <name>SimplifyBooleanAssertion</name>
- <ruleset>JUnit Rules</ruleset>
- </rule>
- <rule>
- <name>UnnecessaryConstructor</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>NullAssignment</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>UnusedModifier</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>AssignmentInOperand</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>AtLeastOneConstructor</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>DontImportSun</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>SuspiciousOctalEscape</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>CallSuperInConstructor</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>UnnecessaryParentheses</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>DefaultPackage</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>BooleanInversion</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>DataflowAnomalyAnalysis</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidFinalLocalVariable</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidUsingShortType</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidUsingVolatile</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidUsingNativeCode</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidAccessibilityAlteration</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>DoNotCallGarbageCollectionExplicitly</name>
- <ruleset>Controversial Rules</ruleset>
- </rule>
- <rule>
- <name>MethodNamingConventions</name>
- <ruleset>Naming Rules</ruleset>
- </rule>
- <rule>
- <name>ClassNamingConventions</name>
- <ruleset>Naming Rules</ruleset>
- </rule>
- <rule>
- <name>AbstractNaming</name>
- <ruleset>Naming Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidDollarSigns</name>
- <ruleset>Naming Rules</ruleset>
- </rule>
- <rule>
- <name>MethodWithSameNameAsEnclosingClass</name>
- <ruleset>Naming Rules</ruleset>
- </rule>
- <rule>
- <name>SuspiciousHashcodeMethodName</name>
- <ruleset>Naming Rules</ruleset>
- </rule>
- <rule>
- <name>SuspiciousConstantFieldName</name>
- <ruleset>Naming Rules</ruleset>
- </rule>
- <rule>
- <name>SuspiciousEqualsMethodName</name>
- <ruleset>Naming Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidFieldNameMatchingTypeName</name>
- <ruleset>Naming Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidFieldNameMatchingMethodName</name>
- <ruleset>Naming Rules</ruleset>
- </rule>
- <rule>
- <name>NoPackage</name>
- <ruleset>Naming Rules</ruleset>
- </rule>
- <rule>
- <name>PackageCase</name>
- <ruleset>Naming Rules</ruleset>
- </rule>
- <rule>
- <name>MisleadingVariableName</name>
- <ruleset>Naming Rules</ruleset>
- </rule>
- <rule>
- <name>BooleanGetMethodName</name>
- <ruleset>Naming Rules</ruleset>
- </rule>
- <rule>
- <name>NPathComplexity</name>
- <ruleset>Code Size Rules</ruleset>
- </rule>
- <rule>
- <name>ExcessiveMethodLength</name>
- <ruleset>Code Size Rules</ruleset>
- </rule>
- <rule>
- <name>ExcessiveParameterList</name>
- <ruleset>Code Size Rules</ruleset>
- </rule>
- <rule>
- <name>ExcessiveClassLength</name>
- <ruleset>Code Size Rules</ruleset>
- </rule>
- <rule>
- <name>CyclomaticComplexity</name>
- <ruleset>Code Size Rules</ruleset>
- </rule>
- <rule>
- <name>ExcessivePublicCount</name>
- <ruleset>Code Size Rules</ruleset>
- </rule>
- <rule>
- <name>TooManyFields</name>
- <ruleset>Code Size Rules</ruleset>
- </rule>
- <rule>
- <name>NcssMethodCount</name>
- <ruleset>Code Size Rules</ruleset>
- </rule>
- <rule>
- <name>NcssTypeCount</name>
- <ruleset>Code Size Rules</ruleset>
- </rule>
- <rule>
- <name>NcssConstructorCount</name>
- <ruleset>Code Size Rules</ruleset>
- </rule>
- <rule>
- <name>TooManyMethods</name>
- <ruleset>Code Size Rules</ruleset>
- </rule>
- <rule>
- <name>EmptyFinalizer</name>
- <ruleset>Finalizer Rules</ruleset>
- </rule>
- <rule>
- <name>FinalizeOnlyCallsSuperFinalize</name>
- <ruleset>Finalizer Rules</ruleset>
- </rule>
- <rule>
- <name>FinalizeOverloaded</name>
- <ruleset>Finalizer Rules</ruleset>
- </rule>
- <rule>
- <name>FinalizeDoesNotCallSuperFinalize</name>
- <ruleset>Finalizer Rules</ruleset>
- </rule>
- <rule>
- <name>FinalizeShouldBeProtected</name>
- <ruleset>Finalizer Rules</ruleset>
- </rule>
- <rule>
- <name>AvoidCallingFinalize</name>
- <ruleset>Finalizer Rules</ruleset>
- </rule>
- <rule>
- <name>UseCorrectExceptionLogging</name>
- <ruleset>Jakarta Commons Logging Rules</ruleset>
- </rule>
- <rule>
- <name>ProperLogger</name>
- <ruleset>Jakarta Commons Logging Rules</ruleset>
- </rule>
- <rule>
- <name>MissingSerialVersionUID</name>
- <ruleset>JavaBean Rules</ruleset>
- </rule>
- <rule>
- <name>ProperCloneImplementation</name>
- <ruleset>Clone Implementation Rules</ruleset>
- </rule>
- <rule>
- <name>CloneThrowsCloneNotSupportedException</name>
- <ruleset>Clone Implementation Rules</ruleset>
- </rule>
- <rule>
- <name>CloneMethodMustImplementCloneable</name>
- <ruleset>Type Resolution Rules</ruleset>
- </rule>
- </rules>
- <includeDerivedFiles>false</includeDerivedFiles>
- <violationsAsErrors>true</violationsAsErrors>
-</pmd>
diff --git a/org.eclipse.osee.ote.ui.define/.project b/org.eclipse.osee.ote.ui.define/.project
deleted file mode 100644
index 11018ed..0000000
--- a/org.eclipse.osee.ote.ui.define/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.osee.ote.ui.define</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.osee.ote.ui.define/META-INF/MANIFEST.MF b/org.eclipse.osee.ote.ui.define/META-INF/MANIFEST.MF
deleted file mode 100644
index df515b3..0000000
--- a/org.eclipse.osee.ote.ui.define/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,52 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: OTE UI Define Plug-in (Incubation)
-Bundle-SymbolicName: org.eclipse.osee.ote.ui.define;singleton:=true
-Bundle-Version: 0.23.2.qualifier
-Bundle-Activator: org.eclipse.osee.ote.ui.define.OteUiDefinePlugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.filesystem,
- org.eclipse.ui,
- org.eclipse.ui.ide,
- org.eclipse.core.resources,
- org.eclipse.osee.framework.plugin.core,
- org.eclipse.osee.framework.skynet.core,
- org.eclipse.osee.framework.ui.plugin,
- org.eclipse.osee.framework.ui.skynet,
- org.eclipse.osee.framework.ui.swt,
- org.eclipse.osee.ote.define,
- org.eclipse.nebula.widgets.xviewer,
- org.eclipse.osee.framework.core.model
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.osee.ote.ui.define,
- org.eclipse.osee.ote.ui.define.dialogs,
- org.eclipse.osee.ote.ui.define.importer,
- org.eclipse.osee.ote.ui.define.jobs,
- org.eclipse.osee.ote.ui.define.panels,
- org.eclipse.osee.ote.ui.define.reports,
- org.eclipse.osee.ote.ui.define.reports.output,
- org.eclipse.osee.ote.ui.define.utilities,
- org.eclipse.osee.ote.ui.define.viewers,
- org.eclipse.osee.ote.ui.define.viewers.actions,
- org.eclipse.osee.ote.ui.define.viewers.data,
- org.eclipse.osee.ote.ui.define.views
-Bundle-Vendor: Eclipse Open System Engineering Environment
-Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: com.lowagie.text;version="2.1.7",
- org.apache.commons.lang;version="2.4.0",
- org.eclipse.nebula.widgets.xviewer.core.model,
- org.eclipse.osee.framework.access,
- org.eclipse.osee.framework.core.client,
- org.eclipse.osee.framework.core.client.server,
- org.eclipse.osee.framework.core.data,
- org.eclipse.osee.framework.core.enums,
- org.eclipse.osee.framework.core.exception,
- org.eclipse.osee.framework.core.model,
- org.eclipse.osee.framework.core.model.type,
- org.eclipse.osee.framework.core.util,
- org.eclipse.osee.framework.help.ui,
- org.eclipse.osee.framework.jdk.core.type,
- org.eclipse.osee.framework.jdk.core.util,
- org.eclipse.osee.framework.jdk.core.util.io.xml,
- org.eclipse.osee.framework.logging,
- org.eclipse.ui.forms.widgets
diff --git a/org.eclipse.osee.ote.ui.define/build.properties b/org.eclipse.osee.ote.ui.define/build.properties
deleted file mode 100644
index 36d75b6..0000000
--- a/org.eclipse.osee.ote.ui.define/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- images/,\
- templates/
diff --git a/org.eclipse.osee.ote.ui.define/images/addition.gif b/org.eclipse.osee.ote.ui.define/images/addition.gif
deleted file mode 100644
index 05a9f5a..0000000
--- a/org.eclipse.osee.ote.ui.define/images/addition.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/childBranch.gif b/org.eclipse.osee.ote.ui.define/images/childBranch.gif
deleted file mode 100644
index 5211f45..0000000
--- a/org.eclipse.osee.ote.ui.define/images/childBranch.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/chkbox_disabled.gif b/org.eclipse.osee.ote.ui.define/images/chkbox_disabled.gif
deleted file mode 100644
index 7aa131a..0000000
--- a/org.eclipse.osee.ote.ui.define/images/chkbox_disabled.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/chkbox_enabled.gif b/org.eclipse.osee.ote.ui.define/images/chkbox_enabled.gif
deleted file mode 100644
index 9cacb96..0000000
--- a/org.eclipse.osee.ote.ui.define/images/chkbox_enabled.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/collapseState.gif b/org.eclipse.osee.ote.ui.define/images/collapseState.gif
deleted file mode 100644
index e38d016..0000000
--- a/org.eclipse.osee.ote.ui.define/images/collapseState.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/commit.gif b/org.eclipse.osee.ote.ui.define/images/commit.gif
deleted file mode 100644
index b67692d..0000000
--- a/org.eclipse.osee.ote.ui.define/images/commit.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/commit_wiz.png b/org.eclipse.osee.ote.ui.define/images/commit_wiz.png
deleted file mode 100644
index 8c1c2d9..0000000
--- a/org.eclipse.osee.ote.ui.define/images/commit_wiz.png
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/confauto_ov.gif b/org.eclipse.osee.ote.ui.define/images/confauto_ov.gif
deleted file mode 100644
index e1fd67f..0000000
--- a/org.eclipse.osee.ote.ui.define/images/confauto_ov.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/delete.gif b/org.eclipse.osee.ote.ui.define/images/delete.gif
deleted file mode 100644
index 2cd9c54..0000000
--- a/org.eclipse.osee.ote.ui.define/images/delete.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/deleteAll.gif b/org.eclipse.osee.ote.ui.define/images/deleteAll.gif
deleted file mode 100644
index 28a3785..0000000
--- a/org.eclipse.osee.ote.ui.define/images/deleteAll.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/expandState.gif b/org.eclipse.osee.ote.ui.define/images/expandState.gif
deleted file mode 100644
index 41ab570..0000000
--- a/org.eclipse.osee.ote.ui.define/images/expandState.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/file.gif b/org.eclipse.osee.ote.ui.define/images/file.gif
deleted file mode 100644
index 7ccc6a7..0000000
--- a/org.eclipse.osee.ote.ui.define/images/file.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/filter_history.gif b/org.eclipse.osee.ote.ui.define/images/filter_history.gif
deleted file mode 100644
index 6fe6f0e..0000000
--- a/org.eclipse.osee.ote.ui.define/images/filter_history.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/flat_layout.gif b/org.eclipse.osee.ote.ui.define/images/flat_layout.gif
deleted file mode 100644
index 1ef74cf..0000000
--- a/org.eclipse.osee.ote.ui.define/images/flat_layout.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/function.gif b/org.eclipse.osee.ote.ui.define/images/function.gif
deleted file mode 100644
index b8c995a..0000000
--- a/org.eclipse.osee.ote.ui.define/images/function.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/latest_versions.gif b/org.eclipse.osee.ote.ui.define/images/latest_versions.gif
deleted file mode 100644
index 4fc84e4..0000000
--- a/org.eclipse.osee.ote.ui.define/images/latest_versions.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/obstructed.gif b/org.eclipse.osee.ote.ui.define/images/obstructed.gif
deleted file mode 100644
index 3f43a29..0000000
--- a/org.eclipse.osee.ote.ui.define/images/obstructed.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/obstructed_16x16.gif b/org.eclipse.osee.ote.ui.define/images/obstructed_16x16.gif
deleted file mode 100644
index fd3b845..0000000
--- a/org.eclipse.osee.ote.ui.define/images/obstructed_16x16.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/outfile_import.gif b/org.eclipse.osee.ote.ui.define/images/outfile_import.gif
deleted file mode 100644
index 22fddb0..0000000
--- a/org.eclipse.osee.ote.ui.define/images/outfile_import.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/parentBranch.gif b/org.eclipse.osee.ote.ui.define/images/parentBranch.gif
deleted file mode 100644
index 9c4a675..0000000
--- a/org.eclipse.osee.ote.ui.define/images/parentBranch.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/procedure.gif b/org.eclipse.osee.ote.ui.define/images/procedure.gif
deleted file mode 100644
index d11c996..0000000
--- a/org.eclipse.osee.ote.ui.define/images/procedure.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/refresh.gif b/org.eclipse.osee.ote.ui.define/images/refresh.gif
deleted file mode 100644
index a063c23..0000000
--- a/org.eclipse.osee.ote.ui.define/images/refresh.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/remove.gif b/org.eclipse.osee.ote.ui.define/images/remove.gif
deleted file mode 100644
index 2cd9c54..0000000
--- a/org.eclipse.osee.ote.ui.define/images/remove.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/removeAll.gif b/org.eclipse.osee.ote.ui.define/images/removeAll.gif
deleted file mode 100644
index 28a3785..0000000
--- a/org.eclipse.osee.ote.ui.define/images/removeAll.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/repository.gif b/org.eclipse.osee.ote.ui.define/images/repository.gif
deleted file mode 100644
index 0470e15..0000000
--- a/org.eclipse.osee.ote.ui.define/images/repository.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/switched.gif b/org.eclipse.osee.ote.ui.define/images/switched.gif
deleted file mode 100644
index 288b56c..0000000
--- a/org.eclipse.osee.ote.ui.define/images/switched.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/synch.gif b/org.eclipse.osee.ote.ui.define/images/synch.gif
deleted file mode 100644
index 153fb24..0000000
--- a/org.eclipse.osee.ote.ui.define/images/synch.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/testRunView.gif b/org.eclipse.osee.ote.ui.define/images/testRunView.gif
deleted file mode 100644
index e32b794..0000000
--- a/org.eclipse.osee.ote.ui.define/images/testRunView.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/testrun.gif b/org.eclipse.osee.ote.ui.define/images/testrun.gif
deleted file mode 100644
index 2b347ac..0000000
--- a/org.eclipse.osee.ote.ui.define/images/testrun.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/tree_layout.gif b/org.eclipse.osee.ote.ui.define/images/tree_layout.gif
deleted file mode 100644
index 2344861..0000000
--- a/org.eclipse.osee.ote.ui.define/images/tree_layout.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/images/version_controlled.gif b/org.eclipse.osee.ote.ui.define/images/version_controlled.gif
deleted file mode 100644
index eb71a3c..0000000
--- a/org.eclipse.osee.ote.ui.define/images/version_controlled.gif
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.osee.ote.ui.define/plugin.xml b/org.eclipse.osee.ote.ui.define/plugin.xml
deleted file mode 100644
index 989f787..0000000
--- a/org.eclipse.osee.ote.ui.define/plugin.xml
+++ /dev/null
@@ -1,178 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <extension-point id="ITestRunReport" name="ITestRunReport" schema="schema/ITestRunReport.exsd"/>
- <extension
- point="org.eclipse.ui.importWizards">
- <wizard
- category="org.eclipse.osee.define.import.category"
- class="org.eclipse.osee.ote.ui.define.importer.OutfileImportWizard"
- icon="images/outfile_import.gif"
- id="org.eclipse.osee.ote.ui.define.importer.outfileImportWizard"
- name="Test Outfiles">
- </wizard>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <category
- id="osee.test.category"
- name="OSEE Test">
- </category>
- <view
- allowMultiple="false"
- category="osee.test.category"
- class="org.eclipse.osee.ote.ui.define.views.TestRunView"
- icon="images/testRunView.gif"
- id="org.eclipse.osee.ote.ui.define.views.TestRunView"
- name="Test Run View">
- </view>
- </extension>
- <extension
- point="org.eclipse.osee.framework.ui.plugin.XNavigateItem">
- <XNavigateItem
- classname="org.eclipse.osee.ote.ui.define.views.TestRunViewNavigateItem"
- viewId="org.eclipse.osee.ote.ui.navigate.OteNavigateView">
- </XNavigateItem>
- </extension>
- <extension
- point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension
- targetID="org.eclipse.osee.ote.ui.TestPerspective">
- <viewShortcut
- id="org.eclipse.osee.ote.ui.define.views.TestRunView">
- </viewShortcut>
- </perspectiveExtension>
- </extension>
- <extension
- point="org.eclipse.osee.framework.skynet.core.HttpServerRequest">
- <IHttpServerRequest
- classname="org.eclipse.osee.ote.ui.define.reports.HttpReportRequest">
- </IHttpServerRequest>
- </extension>
- <extension
- point="org.eclipse.ui.commands">
- <command
- description="Display test runs grouped by branch"
- id="org.eclipse.osee.ote.ui.define.views.TestRunView.flatPresentation.command"
- name="By Branch">
- </command>
- <command
- description="Displays test runs grouped by script name and revision"
- id="org.eclipse.osee.ote.ui.define.views.TestRunView.groupedPresentation.command"
- name="By Script Revision">
- </command>
- <command
- description="Displays items in long notation"
- id="org.eclipse.osee.ote.ui.define.views.TestRunView.longNamesPresentation.command"
- name="Long">
- </command>
- <command
- description="Displays items in short notation"
- id="org.eclipse.osee.ote.ui.define.views.TestRunView.shortNamesPresentation.command"
- name="Short">
- </command>
- <command
- description="Displays the latest test run of each script."
- id="org.eclipse.osee.ote.ui.define.views.TestRunView.latestOnlyFilterHandler.command"
- name="Show only the latest run">
- </command>
- </extension>
- <extension
- name="Test Run View Commands"
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.osee.ote.ui.define.views.handlers.FlatPresentationHandler"
- commandId="org.eclipse.osee.ote.ui.define.views.TestRunView.flatPresentation.command">
- </handler>
- <handler
- class="org.eclipse.osee.ote.ui.define.views.handlers.GroupedPresentationHandler"
- commandId="org.eclipse.osee.ote.ui.define.views.TestRunView.groupedPresentation.command">
- </handler>
- <handler
- class="org.eclipse.osee.ote.ui.define.views.handlers.LongNamesPresentationHandler"
- commandId="org.eclipse.osee.ote.ui.define.views.TestRunView.longNamesPresentation.command">
- </handler>
- <handler
- class="org.eclipse.osee.ote.ui.define.views.handlers.ShortNamesPresentationHandler"
- commandId="org.eclipse.osee.ote.ui.define.views.TestRunView.shortNamesPresentation.command">
- </handler>
- <handler
- class="org.eclipse.osee.ote.ui.define.views.handlers.ToggleFilterHandler"
- commandId="org.eclipse.osee.ote.ui.define.views.TestRunView.latestOnlyFilterHandler.command">
- </handler>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- locationURI="menu:org.eclipse.osee.ote.ui.define.views.TestRunView">
- <menu
- label="Group By">
- <command
- commandId="org.eclipse.osee.ote.ui.define.views.TestRunView.groupedPresentation.command"
- icon="images/tree_layout.gif"
- id="org.eclipse.osee.ote.ui.define.views.TestRunView.groupedCommand"
- style="radio">
- </command>
- <command
- commandId="org.eclipse.osee.ote.ui.define.views.TestRunView.flatPresentation.command"
- icon="images/flat_layout.gif"
- id="org.eclipse.osee.ote.ui.define.views.TestRunView.flatCommand"
- style="radio">
- </command>
- </menu>
- <menu
- label="Notation">
- <command
- commandId="org.eclipse.osee.ote.ui.define.views.TestRunView.longNamesPresentation.command"
- id="org.eclipse.osee.ote.ui.define.views.TestRunView.longNamesCommand"
- style="radio">
- </command>
- <command
- commandId="org.eclipse.osee.ote.ui.define.views.TestRunView.shortNamesPresentation.command"
- id="org.eclipse.osee.ote.ui.define.views.TestRunView.shortNamesCommand"
- style="radio">
- </command>
- </menu>
- <menu
- label="Filters">
- <command
- commandId="org.eclipse.osee.ote.ui.define.views.TestRunView.latestOnlyFilterHandler.command"
- icon="images/latest_versions.gif"
- id="org.eclipse.osee.ote.ui.define.views.TestRunView.latestOnlyFilterCommand"
- style="toggle">
- </command>
- </menu>
- </menuContribution>
- </extension>
- <extension
- id="org.eclipse.osee.ote.ui.define.reports.HighLevelSummary"
- name="High Level Test Run Summary"
- point="org.eclipse.osee.ote.ui.define.ITestRunReport">
- <ITestRunReport
- classname="org.eclipse.osee.ote.ui.define.reports.HighLevelSummary"
- icon="images/latest_versions.gif">
- </ITestRunReport>
- </extension>
- <extension
- id="org.eclipse.osee.ote.ui.define.reports.HistoricalTestRunData"
- name="Historical Test Run Report"
- point="org.eclipse.osee.ote.ui.define.ITestRunReport">
- <ITestRunReport
- classname="org.eclipse.osee.ote.ui.define.reports.HistoricalTestRunData"
- icon="images/latest_versions.gif">
- </ITestRunReport>
- </extension>
- <extension
- point="org.eclipse.osee.framework.ui.plugin.PropertyStoreControl">
- <PropertyStoreControl
- classname="org.eclipse.osee.ote.ui.define.views.TestRunArtifactOptions"
- viewId="org.eclipse.osee.ote.ui.test.manager">
- </PropertyStoreControl>
- </extension>
- <extension
- point="org.eclipse.osee.framework.ui.skynet.ArtifactImageProvider">
- <ArtifactImageProvider
- class="org.eclipse.osee.ote.ui.define.OteArtifactImageProvider">
- </ArtifactImageProvider>
- </extension>
-</plugin>
diff --git a/org.eclipse.osee.ote.ui.define/pom.xml b/org.eclipse.osee.ote.ui.define/pom.xml
deleted file mode 100644
index 7a6da81..0000000
--- a/org.eclipse.osee.ote.ui.define/pom.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.eclipse.osee</groupId>
- <artifactId>org.eclipse.osee.client.parent</artifactId>
- <version>0.23.2-SNAPSHOT</version>
- <relativePath>../../plugins/org.eclipse.osee.client.parent</relativePath>
- </parent>
-
- <artifactId>org.eclipse.osee.ote.ui.define</artifactId>
- <packaging>eclipse-plugin</packaging>
- <name>OSEE OTE UI Define (Incubation)</name>
-
- <build>
- <!-- workaround for https://issues.sonatype.org/browse/TYCHO-168 -->
- <resources>
- <resource>
- <directory>src</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
-</project>
\ No newline at end of file
diff --git a/org.eclipse.osee.ote.ui.define/schema/ITestRunReport.exsd b/org.eclipse.osee.ote.ui.define/schema/ITestRunReport.exsd
deleted file mode 100644
index 50849fe..0000000
--- a/org.eclipse.osee.ote.ui.define/schema/ITestRunReport.exsd
+++ /dev/null
@@ -1,115 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.osee.ote.ui.define">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.osee.ote.ui.define" id="ITestRunReport" name="ITestRunReport"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="ITestRunReport"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="ITestRunReport">
- <complexType>
- <attribute name="classname" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.osee.ote.ui.define.reports.ITestRunReport"/>
- </appInfo>
- </annotation>
- </attribute>
- <attribute name="icon" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="resource"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/OteArtifactImageProvider.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/OteArtifactImageProvider.java
deleted file mode 100644
index e2a88c1..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/OteArtifactImageProvider.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define;
-
-import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.ui.skynet.ArtifactImageManager;
-import org.eclipse.osee.framework.ui.skynet.ArtifactImageProvider;
-
-/**
- * @author Donald G. Dunne
- */
-public class OteArtifactImageProvider extends ArtifactImageProvider {
-
- @Override
- public void init() throws OseeCoreException {
- ArtifactImageManager.registerBaseImage(CoreArtifactTypes.TestProcedure, OteDefineImage.TEST_PROCEDURE, this);
- ArtifactImageManager.registerBaseImage(CoreArtifactTypes.TestRun, OteDefineImage.TEST_RUN, this);
- ArtifactImageManager.registerBaseImage(CoreArtifactTypes.TestCase, OteDefineImage.TEST_CASE, this);
- ArtifactImageManager.registerBaseImage(CoreArtifactTypes.TestSupport, OteDefineImage.TEST_SUPPORT, this);
- }
-}
\ No newline at end of file
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/OteDefineImage.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/OteDefineImage.java
deleted file mode 100644
index 1120c44..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/OteDefineImage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.osee.framework.ui.swt.KeyedImage;
-
-/**
- * @author Andrew M. Finkbeiner
- * @author Ryan Schmitt
- */
-public enum OteDefineImage implements KeyedImage {
- ADDITION("addition.gif"),
- CHECKBOX_ENABLED("chkbox_enabled.gif"),
- CHECKBOX_DISABLED("chkbox_disabled.gif"),
- CHILD_BRANCH("childBranch.gif"),
- COLLAPSE_STATE("collapseState.gif"),
- COMMIT("commit.gif"),
- COMMIT_WIZ("commit_wiz.png"),
- CONFAUTO_OV("confauto_ov.gif"),
- DELETE("delete.gif"),
- DELETE_ALL("deleteAll.gif"),
- EXPAND_STATE("expandState.gif"),
- OBSTRUCTED("obstructed.gif"),
- OBSTRUCTED_16_BY_16("obstructed_16x16.gif"),
- REFRESH("refresh.gif"),
- REMOVE("remove.gif"),
- REMOVE_ALL("removeAll.gif"),
- SWITCHED("switched.gif"),
- TEST_CASE("file.gif"),
- TEST_PROCEDURE("procedure.gif"),
- TEST_RUN("testrun.gif"),
- TEST_RUN_VIEW("testRunView.gif"),
- TEST_SUPPORT("function.gif"),
-
- VERSION_CONTROLLED("version_controlled.gif");
-
- private final String fileName;
-
- private OteDefineImage(String fileName) {
- this.fileName = fileName;
- }
-
- @Override
- public ImageDescriptor createImageDescriptor() {
- return ImageManager.createImageDescriptor(OteUiDefinePlugin.PLUGIN_ID, "images", fileName);
- }
-
- @Override
- public String getImageKey() {
- return OteUiDefinePlugin.PLUGIN_ID + ".images." + fileName;
- }
-}
\ No newline at end of file
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/OteUiDefinePlugin.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/OteUiDefinePlugin.java
deleted file mode 100644
index c86edef..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/OteUiDefinePlugin.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define;
-
-import org.eclipse.osee.framework.ui.plugin.OseeUiActivator;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class OteUiDefinePlugin extends OseeUiActivator {
-
- public static final String PLUGIN_ID = "org.eclipse.osee.ote.ui.define";
-
- public OteUiDefinePlugin() {
- super(PLUGIN_ID);
- }
-
- private static OteUiDefinePlugin plugin;
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- public static OteUiDefinePlugin getInstance() {
- return plugin;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java
deleted file mode 100644
index d7bc107..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.dialogs;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.logging.Level;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osee.framework.core.data.TestRunStorageKey;
-import org.eclipse.osee.framework.core.model.Branch;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
-import org.eclipse.osee.framework.ui.skynet.panels.BranchSelectSimpleComposite;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.osee.ote.ui.define.OteDefineImage;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author Roberto E. Escobar
- */
-public class BranchComboDialog extends TitleAreaDialog implements Listener {
- private static final Image TITLE_BAR_IMAGE = ImageManager.getImage(OteDefineImage.CHILD_BRANCH);
- private static final Image MESSAGE_IMAGE = ImageManager.getImage(OteDefineImage.COMMIT_WIZ);
- private static final String MESSAGE_TITLE = "Select a Working Branch";
- private static final String TITLE_BAR_TEXT = "Working Branch";
- private static final String MESSAGE = "Select a working branch";
-
- protected static final int COMBO_HISTORY_LENGTH = 5;
-
- private BranchSelectSimpleComposite branchSelectComposite;
-
- private BranchComboDialog(Shell parentShell) {
- super(parentShell);
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite content = (Composite) super.createDialogArea(parent);
-
- branchSelectComposite = BranchSelectSimpleComposite.createWorkingBranchSelectComposite(content, SWT.NONE);
- restoreWidgetValues();
- branchSelectComposite.addListener(this);
- setTitle(MESSAGE_TITLE);
- setTitleImage(MESSAGE_IMAGE);
- setMessage(MESSAGE);
- getShell().setText(TITLE_BAR_TEXT);
- getShell().setImage(TITLE_BAR_IMAGE);
-
- return branchSelectComposite;
- }
-
- @Override
- protected Control createButtonBar(Composite parent) {
- Control toReturn = super.createButtonBar(parent);
- checkState();
- return toReturn;
- }
-
- public Branch getSelection() {
- return branchSelectComposite.getSelectedBranch();
- }
-
- private boolean isValid() {
- return getSelection() != null;
- }
-
- private void checkState() {
- getButton(IDialogConstants.OK_ID).setEnabled(isValid());
- if (isValid() != true) {
- setErrorMessage("Branch cannot be empty.");
- } else {
- setErrorMessage(null);
- }
- }
-
- @Override
- protected void okPressed() {
- saveWidgetValues();
- super.okPressed();
- }
-
- @Override
- public void handleEvent(Event event) {
- checkState();
- }
-
- protected void restoreWidgetValues() {
- IDialogSettings settings = OteUiDefinePlugin.getInstance().getDialogSettings();
- if (settings != null) {
- String[] branchUuids = settings.getArray(TestRunStorageKey.BRANCH_IDS);
- String lastSelected = settings.get(TestRunStorageKey.SELECTED_BRANCH_ID);
- branchSelectComposite.restoreWidgetValues(branchUuids, lastSelected);
- }
- }
-
- protected void saveWidgetValues() {
- IDialogSettings settings = OteUiDefinePlugin.getInstance().getDialogSettings();
- if (settings != null) {
- // update source names history
- String[] branchUuids = settings.getArray(TestRunStorageKey.BRANCH_IDS);
- if (branchUuids == null) {
- branchUuids = new String[0];
- }
-
- try {
- Branch branch = getSelection();
- if (branch != null && branch.hasParentBranch()) {
- String lastBranchSelected = Long.toString(branch.getUuid());
-
- List<String> history = new ArrayList<>(Arrays.asList(branchUuids));
- history.remove(lastBranchSelected);
- history.add(0, lastBranchSelected);
- if (history.size() > COMBO_HISTORY_LENGTH) {
- history.remove(COMBO_HISTORY_LENGTH);
- }
- branchUuids = new String[history.size()];
- history.toArray(branchUuids);
-
- settings.put(TestRunStorageKey.BRANCH_IDS, branchUuids);
- settings.put(TestRunStorageKey.SELECTED_BRANCH_ID, lastBranchSelected);
- try {
- settings.save(this.getClass().getName());
- } catch (IOException ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
- } catch (OseeCoreException ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
- }
-
- public static Branch getBranchFromUser() throws OseeCoreException {
- Branch toReturn = null;
- BranchComboDialog branchSelection = new BranchComboDialog(AWorkbench.getActiveShell());
- int result = branchSelection.open();
- if (result == Window.OK) {
- toReturn = branchSelection.getSelection();
- if (toReturn != null && toReturn.hasParentBranch() == false) {
- toReturn = null;
- }
- }
- return toReturn;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/CommitDialog.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/CommitDialog.java
deleted file mode 100644
index dec27e0..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/CommitDialog.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.dialogs;
-
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.osee.ote.ui.define.OteDefineImage;
-import org.eclipse.osee.ote.ui.define.panels.CommentComposite;
-import org.eclipse.osee.ote.ui.define.panels.IOverrideHandler;
-import org.eclipse.osee.ote.ui.define.panels.SelectionComposite;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author Roberto E. Escobar
- */
-public class CommitDialog extends TitleAreaDialog {
-
- private static final Image MESSAGE_IMAGE = ImageManager.getImage(OteDefineImage.COMMIT_WIZ);
- private static final Image TITLE_BAR_IMAGE = ImageManager.getImage(OteDefineImage.COMMIT);
-
- private static final String MESSAGE_TITLE = "Enter a commit comment";
- private static final String TITLE_BAR_TEXT = "OSEE Commit";
- private static final String COMMENT_GROUP_TEXT = "Comment";
- private static final String MESSAGE =
- "You can specify a comment describing the changes in the area below. " + "Empty comments are allowed, but adding a comment would help others understand your changes. \n";
- private static final String CONFLICT_MESSAGE =
- "NOTE: Exclamation marks denote items that already exist in the repository or are missing revision infromation. These items will not be committed. \n";
-
- private SelectionComposite selectionComposite;
- private CommentComposite commentComposite;
- private final ITableLabelProvider tableLabelProvider;
- private Object[] selectable;
- private Object[] unselectable;
- private Object[] selected;
- private final String[] columnNames;
- private IOverrideHandler overrideHandler;
-
- public CommitDialog(Shell parent, String[] columnNames, ITableLabelProvider tableLabelProvider) {
- super(parent);
- setShellStyle(SWT.SHELL_TRIM);
- this.columnNames = columnNames;
- this.tableLabelProvider = tableLabelProvider;
- this.selectable = this.selected = new Object[0];
- this.overrideHandler = null;
- }
-
- @Override
- protected Control createButtonBar(Composite parent) {
- Label separator = new Label(parent, SWT.HORIZONTAL | SWT.SEPARATOR);
- separator.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, false));
- return super.createButtonBar(parent);
- }
-
- /*
- * @see Dialog#createDialogArea(Composite)
- */
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite content = (Composite) super.createDialogArea(parent);
-
- Composite composite = new Composite(content, SWT.NONE);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- SashForm sash = new SashForm(composite, SWT.VERTICAL);
- sash.setLayout(new GridLayout());
- sash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- createCommentArea(sash);
- createCommitArea(sash);
- sash.setWeights(new int[] {1, 2});
-
- setTitle(MESSAGE_TITLE);
- setTitleImage(MESSAGE_IMAGE);
- setMessage(MESSAGE + (unselectable != null && unselectable.length > 0 ? CONFLICT_MESSAGE : ""));
- getShell().setText(TITLE_BAR_TEXT);
- getShell().setImage(TITLE_BAR_IMAGE);
- return sash;
- }
-
- private void createCommentArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, true));
-
- Group group = new Group(composite, SWT.NONE);
- group.setLayout(new GridLayout());
- group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- group.setText(COMMENT_GROUP_TEXT);
-
- commentComposite = new CommentComposite(group, SWT.NONE);
- commentComposite.setLayout(new GridLayout());
- commentComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- Label separator = new Label(composite, SWT.HORIZONTAL | SWT.SEPARATOR);
- separator.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, false));
- }
-
- private void createCommitArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.verticalSpacing = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- selectionComposite =
- new SelectionComposite(composite, SWT.BORDER, columnNames, tableLabelProvider, selectable, true, selected,
- unselectable, overrideHandler);
- selectionComposite.setLayout(new GridLayout());
- selectionComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- }
-
- public void setInput(Object[] input) {
- this.selectable = input;
- }
-
- public void setSelected(Object[] selected) {
- this.selected = selected;
- }
-
- public void setUnSelectable(Object[] unselectable) {
- this.unselectable = unselectable;
- }
-
- public void setOverrideHandler(IOverrideHandler overrideHandler) {
- this.overrideHandler = overrideHandler;
- }
-
- public String getComments() {
- return commentComposite.getMessage();
- }
-
- public Object[] getSelectedResources() {
- return selectionComposite.getSelectedResources();
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java
deleted file mode 100644
index 96fc12f..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.dialogs;
-
-import java.util.HashSet;
-import java.util.Set;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.ote.define.artifacts.ArtifactTestRunOperator;
-import org.eclipse.osee.ote.ui.define.panels.IOverrideHandler;
-
-/**
- * @author Roberto E. Escobar
- */
-public class OverrideInvalidScriptRevisions implements IOverrideHandler {
-
- @Override
- public String getText() {
- return "Allow Invalid Script Revisions.";
- }
-
- @Override
- public String getToolTipText() {
- return "Allows invalid script revisions to be committed.\nWARNING: Duplicate commits are not overridable.";
- }
-
- @Override
- public Set<Object> getOverridableFromUnselectable(Set<Object> unselectable) throws OseeCoreException {
- Set<Object> toReturn = new HashSet<>();
- for (Object object : unselectable) {
- if (object instanceof Artifact) {
- ArtifactTestRunOperator operator = new ArtifactTestRunOperator(((Artifact) object));
- if (operator.hasNotBeenCommitted() != false) {
- toReturn.add(object);
- }
- }
- }
- return toReturn;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ReportsDialog.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ReportsDialog.java
deleted file mode 100644
index e39f903..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ReportsDialog.java
+++ /dev/null
@@ -1,521 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.dialogs;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.jdk.core.type.Pair;
-import org.eclipse.osee.framework.jdk.core.util.Strings;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.swt.Displays;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.osee.framework.ui.swt.Widgets;
-import org.eclipse.osee.ote.define.jobs.RemoteResourceRequestJob;
-import org.eclipse.osee.ote.ui.define.OteDefineImage;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.osee.ote.ui.define.panels.ListSelectionPanel;
-import org.eclipse.osee.ote.ui.define.panels.PreviewPanel;
-import org.eclipse.osee.ote.ui.define.panels.PreviewPanel.PanelEnum;
-import org.eclipse.osee.ote.ui.define.reports.ExtensionDefinedReports;
-import org.eclipse.osee.ote.ui.define.reports.HttpReportRequest;
-import org.eclipse.osee.ote.ui.define.reports.ITestRunReport;
-import org.eclipse.osee.ote.ui.define.reports.output.OutputFactory;
-import org.eclipse.osee.ote.ui.define.reports.output.OutputFormat;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @author Roberto E. Escobar
- */
-public class ReportsDialog extends TitleAreaDialog {
- private static final Image MESSAGE_IMAGE = ImageManager.getImage(OteDefineImage.COMMIT_WIZ);
- private static final Image TITLE_BAR_IMAGE = ImageManager.getImage(OteDefineImage.COMMIT);
-
- private static final String MESSAGE_TITLE = "Select a report";
- private static final String TITLE_BAR_TEXT = "OSEE Test Run Reports";
- private static final String MESSAGE = "The preview window displays an example of the selected report.";
- private static final String REPORT_SELECTION_TITLE = "Select a Report";
- private static final String PREVIEW_TITLE = "Preview";
- private static final String FORMAT_TITLE = "Select a Format";
- private static final String REPORT_DESCRIPTION = "Report Description";
- private static final String PREVIEW_DESCRIPTION = "Enter Preview Size";
-
- private static final String REPORT_STORE_ID = ReportsDialog.class.getName() + ".reportId";
- private static final String FORMAT_STORE_ID = ReportsDialog.class.getName() + ".formatId";
- private static final String PREVIEW_SIZE_STORE_ID = ReportsDialog.class.getName() + ".previewSize";
-
- private static final int DEFAULT_PREVIEW_SIZE = 5;
-
- private PreviewPanel previewPanel;
- private org.eclipse.osee.ote.ui.define.panels.ListSelectionPanel listSelectionPanel;
- private SelectionChangedListener selectionChangedListener;
- private Text descriptionArea;
- private Text previewSizeArea;
- private String selectedReportId;
- private OutputFormat selectedReportFormat;
- private final List<IFile> filesToDelete;
- private Map<OutputFormat, Button> formatButtons;
-
- public ReportsDialog(Shell parent) {
- super(parent);
- this.filesToDelete = new ArrayList<>();
- setShellStyle(SWT.SHELL_TRIM);
- }
-
- @Override
- protected Control createButtonBar(Composite parent) {
- Label separator = new Label(parent, SWT.HORIZONTAL | SWT.SEPARATOR);
- separator.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, false));
- return super.createButtonBar(parent);
- }
-
- /*
- * @see Dialog#createDialogArea(Composite)
- */
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite content = (Composite) super.createDialogArea(parent);
-
- Composite composite = new Composite(content, SWT.NONE);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- composite.setFont(parent.getFont());
-
- SashForm sash = new SashForm(composite, SWT.HORIZONTAL);
- sash.setLayout(new GridLayout());
- sash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- sash.setFont(parent.getFont());
-
- createReportSelectionArea(sash);
-
- Composite panel = new Composite(sash, SWT.NONE);
- GridLayout gL1 = new GridLayout();
- gL1.marginHeight = 0;
- gL1.marginWidth = 0;
- panel.setLayout(gL1);
- panel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- createFormatAndDescriptionArea(panel);
- createPreviewArea(panel);
- sash.setWeights(new int[] {1, 2});
-
- setTitle(MESSAGE_TITLE);
- setTitleImage(MESSAGE_IMAGE);
- setMessage(MESSAGE);
- getShell().setText(TITLE_BAR_TEXT);
- getShell().setImage(TITLE_BAR_IMAGE);
- attachListeners();
- restoreDialog();
- return sash;
- }
-
- private void restoreDialog() {
- IDialogSettings settings = OteUiDefinePlugin.getInstance().getDialogSettings();
- if (settings != null) {
- String reportSelected = settings.get(REPORT_STORE_ID);
- String format = settings.get(FORMAT_STORE_ID);
-
- int value = 0;
- try {
- value = settings.getInt(PREVIEW_SIZE_STORE_ID);
- } catch (Exception ex) {
- value = DEFAULT_PREVIEW_SIZE;
- }
- clamp(previewSizeArea, value);
-
- OutputFormat outputFormat = OutputFormat.HTML;
- int index = 0;
- if (Strings.isValid(reportSelected) && Strings.isValid(format)) {
- Pair<String, String> pair = ExtensionDefinedReports.getInstance().getIdAndName(reportSelected);
- index = listSelectionPanel.indexOf(pair);
- outputFormat = OutputFormat.fromString(format);
- }
- if (index > -1) {
- listSelectionPanel.setSelection(index);
- }
- setReportFormat(outputFormat);
- for (OutputFormat key : formatButtons.keySet()) {
- Button button = formatButtons.get(key);
- button.setSelection(key.equals(outputFormat));
- }
- }
- }
-
- private void saveDialog() {
- IDialogSettings settings = OteUiDefinePlugin.getInstance().getDialogSettings();
- if (settings != null) {
- String reportSelected = getReportSelected();
- String format = getReportFormat();
- int previewSize = getPreviewSize();
- settings.put(REPORT_STORE_ID, reportSelected);
- settings.put(FORMAT_STORE_ID, format);
- settings.put(PREVIEW_SIZE_STORE_ID, previewSize);
- }
- }
-
- @Override
- protected void okPressed() {
- saveDialog();
- cleanUp(filesToDelete);
- super.okPressed();
- }
-
- private void createReportSelectionArea(Composite parent) {
- Group composite = new Group(parent, SWT.NONE);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- composite.setFont(parent.getFont());
- composite.setText(REPORT_SELECTION_TITLE);
-
- listSelectionPanel = new ListSelectionPanel(composite, SWT.NONE, 300, 300, new ListLabelProvider());
- listSelectionPanel.setSorter(new ViewerSorter() {
-
- @Override
- @SuppressWarnings("unchecked")
- public int compare(Viewer viewer, Object o1, Object o2) {
- Pair<String, String> pair1 = (Pair<String, String>) o1;
- Pair<String, String> pair2 = (Pair<String, String>) o2;
- return getComparator().compare(pair1.getSecond(), pair2.getSecond());
- }
-
- });
- Pair<String, String>[] reportNames = ExtensionDefinedReports.getInstance().getIdsAndNames();
- listSelectionPanel.setInput(reportNames);
- listSelectionPanel.setSelection(0);
- }
-
- private void createFormatAndDescriptionArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout gL = new GridLayout(2, false);
- gL.marginHeight = 0;
- gL.marginWidth = 0;
- composite.setLayout(gL);
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- createFormatArea(composite);
-
- Composite panel = new Composite(composite, SWT.NONE);
- GridLayout gL1 = new GridLayout();
- gL1.marginHeight = 0;
- gL1.marginWidth = 0;
- panel.setLayout(gL1);
- panel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- createDescriptionArea(panel);
- createPreviewSizeArea(panel);
- }
-
- private void createPreviewSizeArea(Composite parent) {
- Group group = new Group(parent, SWT.NONE);
- group.setLayout(new GridLayout(2, false));
- group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- group.setFont(parent.getFont());
- group.setText(PREVIEW_DESCRIPTION);
-
- previewSizeArea = new Text(group, SWT.SINGLE | SWT.BORDER);
- previewSizeArea.setTextLimit(2);
- GridData gd = new GridData(SWT.RIGHT, SWT.FILL, false, false);
- gd.heightHint = convertHeightInCharsToPixels(1);
- gd.widthHint = convertWidthInCharsToPixels(4);
- previewSizeArea.setLayoutData(gd);
- new Widgets.IntegerTextEntryHandler(previewSizeArea, false, 2) {
- @Override
- public void applyValue(long value) {
- clamp(previewSizeArea, value);
- }
- };
-
- Label label = new Label(group, SWT.NONE);
- label.setText("[ 0-10 ]");
- label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- }
-
- private void clamp(Text text, long value) {
- if (value < 0) {
- previewSizeArea.setText(Integer.toString(0));
- }
- if (value > 10) {
- previewSizeArea.setText(Integer.toString(10));
- }
- }
-
- private void createDescriptionArea(Composite parent) {
- Group group = new Group(parent, SWT.NONE);
- group.setLayout(new GridLayout());
- group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- group.setFont(parent.getFont());
- group.setText(REPORT_DESCRIPTION);
-
- descriptionArea = new Text(group, SWT.WRAP | SWT.MULTI);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false);
- gd.heightHint = 100;
- gd.widthHint = 100;
- descriptionArea.setLayoutData(gd);
- descriptionArea.setEditable(false);
- }
-
- private void createFormatArea(Composite parent) {
- Group group = new Group(parent, SWT.NONE);
- group.setLayout(new GridLayout());
- group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
- group.setFont(parent.getFont());
- group.setText(FORMAT_TITLE);
-
- this.formatButtons = new HashMap<>();
- for (OutputFormat format : OutputFormat.values()) {
- Button button = new Button(group, SWT.RADIO);
- button.setText(format.name());
- button.setData(format);
- if (format.equals(OutputFormat.HTML)) {
- button.setSelection(true);
- }
- button.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- Button button = (Button) e.getSource();
- if (button.getSelection() != false) {
- setReportFormat((OutputFormat) button.getData());
- }
- }
- });
- formatButtons.put(format, button);
- }
- }
-
- private void createPreviewArea(Composite parent) {
- Group group = new Group(parent, SWT.NONE);
- group.setLayout(new GridLayout());
- group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- group.setFont(parent.getFont());
- group.setText(PREVIEW_TITLE);
- previewPanel = new PreviewPanel(group, SWT.NONE);
- }
-
- private void attachListeners() {
- listSelectionPanel.addDoubleClickListener(new IDoubleClickListener() {
- @Override
- @SuppressWarnings("unchecked")
- public void doubleClick(DoubleClickEvent event) {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- if (selection != null) {
- Pair<String, String> item = (Pair<String, String>) selection.getFirstElement();
- if (item != null) {
- selectedReportId = item.getFirst();
- }
- }
- okPressed();
- }
- });
-
- selectionChangedListener = new SelectionChangedListener();
- listSelectionPanel.addSelectionChangedListener(selectionChangedListener);
- }
-
- public String getReportSelected() {
- return selectedReportId;
- }
-
- public String getReportFormat() {
- return selectedReportFormat.name();
- }
-
- private void setReportFormat(OutputFormat reportFormat) {
- this.selectedReportFormat = reportFormat;
- selectionChangedListener.selectionChanged(null);
- }
-
- private PanelEnum asPanelEnum(OutputFormat format) {
- PanelEnum toReturn = PanelEnum.DEFAULT;
- switch (format) {
- case HTML:
- case PDF:
- case EXCEL:
- case RTF:
- toReturn = PanelEnum.BROWSER;
- break;
- default:
- toReturn = PanelEnum.DEFAULT;
- break;
- }
- return toReturn;
- }
-
- private void updatePanel(final PanelEnum panelId, final URI uri, final String description, final List<IFile> oldIFiles) {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- previewPanel.updatePreview(panelId, uri);
- previewPanel.setDisplay(panelId);
- descriptionArea.setText(description);
- }
- });
- cleanUp(oldIFiles);
- }
-
- private int getPreviewSize() {
- int toReturn = DEFAULT_PREVIEW_SIZE;
- String value = previewSizeArea.getText();
- try {
- toReturn = Integer.parseInt(value);
- } catch (Exception ex) {
- toReturn = DEFAULT_PREVIEW_SIZE;
- updatePreviewSizeValue(toReturn);
- }
- return toReturn;
- }
-
- private void updatePreviewSizeValue(final int value) {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- previewSizeArea.setText(Integer.toString(value));
- }
- });
- }
-
- private void generatePreview(final OutputFormat outputFormat, final String reportId, final ITestRunReport report) throws URISyntaxException, OseeCoreException {
- String urlRequest = HttpReportRequest.getUrl(reportId, outputFormat.name(), "local", getPreviewSize());
- String fileName = OutputFactory.getOutputFilename(outputFormat, reportId);
- switch (outputFormat) {
- case HTML:
- updatePanel(asPanelEnum(outputFormat), new URI(urlRequest), report.getDescription(), filesToDelete);
- break;
- default:
- remoteFileToLocal(outputFormat, urlRequest, fileName, report);
- break;
- }
- }
-
- private void remoteFileToLocal(final OutputFormat outputFormat, final String urlRequest, final String fileName, final ITestRunReport report) {
- RemoteResourceRequestJob requestJob = new RemoteResourceRequestJob(urlRequest, fileName);
- requestJob.addJobChangeListener(new PreviewUpdateJobChangeListener(report, outputFormat));
- requestJob.getDownloadedFile();
- requestJob.schedule();
- }
-
- private final class SelectionChangedListener implements ISelectionChangedListener {
- @Override
- @SuppressWarnings("unchecked")
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = listSelectionPanel.getSelection();
- if (selection != null) {
- Pair<String, String> item = (Pair<String, String>) selection.getFirstElement();
- if (item != null) {
- ITestRunReport report = ExtensionDefinedReports.getInstance().getReportGenerator(item.getFirst());
- if (report != null) {
- selectedReportId = item.getFirst();
- try {
- generatePreview(selectedReportFormat, selectedReportId, report);
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
- }
- }
- }
- }
-
- private final class ListLabelProvider extends LabelProvider {
-
- @SuppressWarnings("unchecked")
- @Override
- public Image getImage(Object element) {
- Image toReturn = null;
- if (element instanceof Pair) {
- toReturn = ExtensionDefinedReports.getInstance().getImage(((Pair<String, String>) element).getFirst());
- }
- return toReturn;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public String getText(Object element) {
- if (element instanceof Pair) {
- return ((Pair<String, String>) element).getSecond();
- }
- return super.getText(element);
- }
- }
-
- private final class PreviewUpdateJobChangeListener extends JobChangeAdapter {
- private final ITestRunReport report;
- private final OutputFormat format;
-
- private PreviewUpdateJobChangeListener(ITestRunReport report, OutputFormat format) {
- this.report = report;
- this.format = format;
- }
-
- @Override
- public void done(IJobChangeEvent event) {
- IStatus status = event.getResult();
- if (status.equals(Status.OK_STATUS) || status.getCode() == IStatus.OK) {
- IFile iFile = ((RemoteResourceRequestJob) event.getJob()).getDownloadedFile();
- if (iFile != null) {
- updatePanel(asPanelEnum(format), iFile.getLocationURI(), report.getDescription(), filesToDelete);
- filesToDelete.add(iFile);
- }
- }
- }
- }
-
- private void cleanUp(final List<IFile> iFiles) {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- for (IFile iFile : iFiles) {
- if (iFile != null && iFile.exists()) {
- try {
- iFile.delete(true, new NullProgressMonitor());
- filesToDelete.remove(iFile);
- } catch (CoreException ex) {
- // Do Nothing
- }
- }
- }
- }
- });
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ResourceSelectionDialog.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ResourceSelectionDialog.java
deleted file mode 100644
index 4323964..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ResourceSelectionDialog.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.dialogs;
-
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.dialogs.CheckedTreeSelectionDialog;
-
-public class ResourceSelectionDialog extends CheckedTreeSelectionDialog {
-
- public ResourceSelectionDialog(Shell parent, ILabelProvider labelProvider, ITreeContentProvider contentProvider) {
- super(parent, labelProvider, contentProvider);
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(GridData.FILL_BOTH));
- applyDialogFont(composite);
-
- Label messageLabel = createMessageArea(composite);
- CheckboxTreeViewer treeViewer = createTreeViewer(composite);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.widthHint = convertWidthInCharsToPixels(80);
- data.heightHint = convertHeightInCharsToPixels(16);
- Tree treeWidget = treeViewer.getTree();
- treeViewer.addCheckStateListener(new ICheckStateListener() {
-
- @Override
- public void checkStateChanged(CheckStateChangedEvent event) {
- boolean wasChecked = event.getChecked();
- CheckboxTreeViewer viewer = getTreeViewer();
- TreeItem[] items = viewer.getTree().getItems();
- for (int i = 0; i < items.length; i++) {
- viewer.setSubtreeChecked(items[i], false);
- }
- event.getCheckable().setChecked(event.getElement(), wasChecked);
- }
-
- });
- treeWidget.setLayoutData(data);
- treeWidget.setFont(parent.getFont());
- messageLabel.setEnabled(true);
- treeWidget.setEnabled(true);
- return composite;
- }
-};
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/ImportOutfileUIOperation.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/ImportOutfileUIOperation.java
deleted file mode 100644
index 9ce3a6a..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/ImportOutfileUIOperation.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.importer;
-
-import java.net.URI;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
-import org.eclipse.osee.framework.ui.swt.Displays;
-import org.eclipse.osee.ote.define.jobs.FindCommitableJob;
-import org.eclipse.osee.ote.define.jobs.OutfileToArtifactJob;
-import org.eclipse.osee.ote.ui.define.jobs.CommitTestRunJob;
-import org.eclipse.osee.ote.ui.define.jobs.ReportErrorsJob;
-import org.eclipse.osee.ote.ui.define.utilities.CommitConfiguration;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * @author Roberto E. Escobar
- */
-public class ImportOutfileUIOperation {
-
- private final URI[] fileSystemObjects;
- private final IOseeBranch selectedBranch;
-
- public ImportOutfileUIOperation(IOseeBranch selectedBranch, URI... fileSystemObjects) {
- this.fileSystemObjects = fileSystemObjects;
- this.selectedBranch = selectedBranch;
- }
-
- public boolean execute() {
- boolean toReturn = true;
- if (fileSystemObjects.length > 0) {
- launchImportJob();
- } else {
- toReturn = false;
- Shell shell = AWorkbench.getActiveShell();
- MessageDialog.openInformation(shell, "Information", "There were no resources currently selected for import.");
- }
- return toReturn;
- }
-
- private void launchImportJob() {
- OutfileToArtifactJob convertJob = new OutfileToArtifactJob(selectedBranch, fileSystemObjects);
- convertJob.addJobChangeListener(new JobChangeAdapter() {
-
- @Override
- public void done(IJobChangeEvent event) {
- if (wasJobSuccessful(event)) {
- OutfileToArtifactJob job = (OutfileToArtifactJob) event.getJob();
-
- URI[] itemsWithError = job.getUnparseableFiles();
- Artifact[] artifacts = job.getResults();
- // Report Parse Errors
- if (itemsWithError.length > 0) {
- reportFilesWithErrors(itemsWithError, artifacts);
- } else {
- launchFindCommitableJob(artifacts);
- }
- }
- }
- });
- convertJob.schedule();
- }
-
- private void launchCommitJob(final FindCommitableJob job) {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- CommitTestRunJob newJob =
- new CommitTestRunJob(job.getAll(), job.getCommitAllowed(), job.getCommitNotAllowed(),
- CommitConfiguration.isCommitOverrideAllowed());
- newJob.schedule();
- }
- });
- }
-
- private void launchFindCommitableJob(final Artifact[] artifacts) {
- // Find Commit Allowed
- FindCommitableJob commitableJob = new FindCommitableJob(artifacts);
- commitableJob.addJobChangeListener(new JobChangeAdapter() {
-
- @Override
- public void done(IJobChangeEvent event) {
- if (wasJobSuccessful(event)) {
- FindCommitableJob job = (FindCommitableJob) event.getJob();
- launchCommitJob(job);
- }
- }
- });
- commitableJob.schedule();
- }
-
- private void reportFilesWithErrors(final Object[] items, final Artifact[] artifacts) {
- String title = "Outfile Import Error";
- String message = "The following file(s) had errors during the parsing operation: ";
-
- JobChangeAdapter listener = new JobChangeAdapter() {
-
- @Override
- public void done(IJobChangeEvent event) {
- launchFindCommitableJob(artifacts);
- }
- };
-
- ReportErrorsJob.openError(title, message, listener, items);
- }
-
- private boolean wasJobSuccessful(IJobChangeEvent event) {
- IStatus status = event.getResult();
- return status.equals(Status.OK_STATUS) || status.equals(IStatus.OK);
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java
deleted file mode 100644
index c770b42..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.importer;
-
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.Level;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
-import org.eclipse.osee.framework.core.data.TestRunStorageKey;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
-import org.eclipse.osee.framework.ui.skynet.widgets.XBranchSelectWidget;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.ui.dialogs.ContainerCheckedTreeViewer;
-import org.eclipse.ui.dialogs.WizardDataTransferPage;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * @author Roberto E. Escobar
- */
-public class OutfileImportPage extends WizardDataTransferPage {
- private static final String PAGE_NAME = "Outfile Import";
-
- private CheckboxTreeViewer treeViewer;
- private final IStructuredSelection startingResourceSelection;
- private final boolean treeSelectionMode;
- private final ITreeContentProvider contentProvider;
- private final ILabelProvider labelProvider;
- private final List<ViewerFilter> filters;
- private final Object treeInput;
- private XBranchSelectWidget branchSelect;
-
- protected OutfileImportPage(IStructuredSelection selection) {
- super(PAGE_NAME);
- this.treeInput = ResourcesPlugin.getWorkspace().getRoot();
- this.treeSelectionMode = true;
- this.contentProvider = new WorkbenchContentProvider();
- this.labelProvider = new WorkbenchLabelProvider();
- this.filters = new ArrayList<>();
- // this.filters.add(new FileFilter());
- this.startingResourceSelection = selection;
- }
-
- @Override
- protected boolean allowNewContainerName() {
- return false;
- }
-
- @Override
- public void handleEvent(Event event) {
- updateWidgetEnablements();
- }
-
- @Override
- public void createControl(Composite parent) {
- initializeDialogUnits(parent);
-
- Composite composite = new Composite(parent, SWT.NULL);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));
- composite.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
- composite.setFont(parent.getFont());
-
- Group group = new Group(composite, SWT.NONE);
- group.setLayout(new GridLayout());
- group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- group.setText("Select a Branch to import files into");
- group.setToolTipText("Opens the branch selection dialog");
- branchSelect = new XBranchSelectWidget("branch");
- branchSelect.createWidgets(group, SWT.BORDER | SWT.READ_ONLY);
-
- createFileSelectArea(composite);
-
- restoreWidgetValues();
- updateWidgetEnablements();
- setErrorMessage(null); // should not initially have error message
- setControl(composite);
- }
-
- private void createFileSelectArea(Composite parent) {
- Group group = new Group(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
- layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
- layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
- layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
- group.setLayout(layout);
- group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- group.setText("Select Files");
- group.setToolTipText("Select files to import");
-
- Composite composite = new Composite(group, SWT.NULL);
- composite.setLayout(new GridLayout());
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- composite.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
- composite.setFont(parent.getFont());
-
- if (treeSelectionMode) {
- treeViewer = new ContainerCheckedTreeViewer(composite, SWT.BORDER);
- } else {
- treeViewer = new CheckboxTreeViewer(composite, SWT.BORDER);
- }
-
- treeViewer.setContentProvider(contentProvider);
- treeViewer.setLabelProvider(labelProvider);
- treeViewer.addCheckStateListener(new ICheckStateListener() {
- @Override
- public void checkStateChanged(CheckStateChangedEvent event) {
- setPageComplete(determinePageCompletion());
- }
- });
- if (filters != null) {
- for (int i = 0; i != filters.size(); i++) {
- treeViewer.addFilter(filters.get(i));
- }
- }
- treeViewer.setInput(treeInput);
-
- Tree treeWidget = treeViewer.getTree();
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- data.widthHint = convertWidthInCharsToPixels(80);
- data.heightHint = convertHeightInCharsToPixels(16);
- treeWidget.setLayout(new GridLayout());
- treeWidget.setLayoutData(data);
- treeWidget.setFont(composite.getFont());
- treeWidget.setEnabled(true);
-
- createSelectionButtons(composite);
- }
-
- private Button createButton(Composite parent, int id, String label, boolean defaultButton) {
- // increment the number of columns in the button bar
- ((GridLayout) parent.getLayout()).numColumns++;
- Button button = new Button(parent, SWT.PUSH);
- button.setText(label);
- button.setFont(JFaceResources.getDialogFont());
- button.setData(new Integer(id));
- setButtonLayoutData(button);
- return button;
- }
-
- private Composite createSelectionButtons(Composite composite) {
- Composite buttonComposite = new Composite(composite, SWT.RIGHT);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- buttonComposite.setLayout(layout);
- buttonComposite.setFont(composite.getFont());
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
- data.grabExcessHorizontalSpace = true;
- composite.setData(data);
- Button selectButton = createButton(buttonComposite, IDialogConstants.SELECT_ALL_ID, "Select All", false);
- SelectionListener listener = new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- Object[] viewerElements = contentProvider.getElements(treeInput);
- if (treeSelectionMode) {
- treeViewer.setCheckedElements(viewerElements);
- } else {
- for (int i = 0; i < viewerElements.length; i++) {
- treeViewer.setSubtreeChecked(viewerElements[i], true);
- }
- }
- updateWidgetEnablements();
- }
- };
- selectButton.addSelectionListener(listener);
- Button deselectButton = createButton(buttonComposite, IDialogConstants.DESELECT_ALL_ID, "Deselect All", false);
- listener = new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- treeViewer.setCheckedElements(new Object[0]);
- updateWidgetEnablements();
- }
- };
- deselectButton.addSelectionListener(listener);
- return buttonComposite;
- }
-
- @Override
- protected void restoreWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- String lastSelected = settings.get(TestRunStorageKey.SELECTED_BRANCH_ID);
- try {
- branchSelect.setSelection(BranchManager.getBranch(Long.parseLong(lastSelected)));
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
- onStartSelectedResource();
- }
-
- private void onStartSelectedResource() {
- if (startingResourceSelection != null) {
- if (startingResourceSelection.size() > 0) {
- for (Object firstElement : startingResourceSelection.toArray()) {
- if (firstElement instanceof IAdaptable) {
- Object resource = ((IAdaptable) firstElement).getAdapter(IResource.class);
- if (resource != null) {
- IResource currentResource = (IResource) resource;
- if (currentResource.getType() == IResource.FILE) {
- IResource parentResource = currentResource.getParent();
- if (parentResource != null && parentResource.isAccessible() != false) {
- treeViewer.expandToLevel(parentResource, IResource.DEPTH_ONE);
- treeViewer.setChecked(currentResource, true);
- }
- }
- }
- }
- }
- }
- }
- }
-
- @Override
- protected boolean validateSourceGroup() {
- boolean toReturn = super.validateSourceGroup();
- URI[] selectedResources = getSelectedResources();
- if (selectedResources.length == 0) {
- setMessage(null);
- setErrorMessage("There are no resources currently selected for import.");
- toReturn &= false;
- }
- return toReturn;
- }
-
- @Override
- protected boolean validateDestinationGroup() {
- boolean toReturn = super.validateDestinationGroup();
- IOseeBranch branch = branchSelect.getData();
- if (branch == null) {
- setMessage(null);
- setErrorMessage("Please select a working branch. Cannot import into a null branch.");
- toReturn &= false;
- } else {
- try {
- if (!BranchManager.getBranch(branch).hasParentBranch()) {
- setMessage(null);
- setErrorMessage("Please select a working branch. Cannot import into a top-level branch.");
- toReturn &= false;
- }
- } catch (OseeCoreException ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
- return toReturn;
- }
-
- @Override
- protected void updateWidgetEnablements() {
- boolean pageComplete = determinePageCompletion();
- setPageComplete(pageComplete);
- if (pageComplete) {
- setMessage(null);
- }
- super.updateWidgetEnablements();
- }
-
- @Override
- protected void saveWidgetValues() {
- IDialogSettings settings = getDialogSettings();
- if (settings != null) {
- // update source names history
- String[] branchUuids = settings.getArray(TestRunStorageKey.BRANCH_IDS);
- if (branchUuids == null) {
- branchUuids = new String[0];
- }
-
- IOseeBranch branch = branchSelect.getData();
- try {
- if (branch != null && BranchManager.getBranch(branch).hasParentBranch()) {
- String lastBranchSelected = Long.toString(branch.getUuid());
- branchUuids = addToHistory(branchUuids, lastBranchSelected);
-
- settings.put(TestRunStorageKey.BRANCH_IDS, branchUuids);
- settings.put(TestRunStorageKey.SELECTED_BRANCH_ID, lastBranchSelected);
- try {
- settings.save(this.getClass().getName());
- } catch (IOException ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
- } catch (OseeCoreException ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
- }
-
- private URI[] getSelectedResources() {
- Object[] selected = treeViewer.getCheckedElements();
- List<URI> selectedResources = new ArrayList<>();
- for (Object object : selected) {
- if (object instanceof IFile) {
- IFile iFile = (IFile) object;
- selectedResources.add(iFile.getLocationURI());
- }
- }
- return selectedResources.toArray(new URI[selectedResources.size()]);
- }
-
- public boolean finish() {
- saveWidgetValues();
- return new ImportOutfileUIOperation(branchSelect.getData(), getSelectedResources()).execute();
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportWizard.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportWizard.java
deleted file mode 100644
index 54e57ad..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportWizard.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.importer;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.osee.ote.ui.define.OteDefineImage;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.ui.IImportWizard;
-import org.eclipse.ui.IWorkbench;
-
-/**
- * @author Roberto E. Escobar
- */
-public class OutfileImportWizard extends Wizard implements IImportWizard {
- private static final String TITLE = "Import outfiles into Define";
- private static final ImageDescriptor WIZARD_IMAGE = ImageManager.getImageDescriptor(OteDefineImage.COMMIT_WIZ);
- private OutfileImportPage mainPage;
-
- public OutfileImportWizard() {
- super();
- setDialogSettings(OteUiDefinePlugin.getInstance().getDialogSettings());
- setWindowTitle("Outfile Import Wizard");
- setDefaultPageImageDescriptor(WIZARD_IMAGE);
- }
-
- @Override
- public boolean performFinish() {
- return mainPage.finish();
- }
-
- @Override
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.mainPage = new OutfileImportPage(selection);
- mainPage.setTitle(TITLE);
- mainPage.setDescription("Import artifacts into Define");
- addPage(mainPage);
- }
-
- @Override
- public IWizardPage getNextPage(IWizardPage page) {
- return null;
- }
-
- @Override
- public IWizardPage getPreviousPage(IWizardPage page) {
- return null;
- }
-
- @Override
- public boolean canFinish() {
- return mainPage.isPageComplete();
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/AddArtifactsToViewerJob.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/AddArtifactsToViewerJob.java
deleted file mode 100644
index 7d27c73..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/AddArtifactsToViewerJob.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.jobs;
-
-import java.util.List;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-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.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.osee.ote.ui.define.viewers.XViewerDataManager;
-
-/**
- * @author Roberto E. Escobar
- */
-public class AddArtifactsToViewerJob extends Job {
- private static final String JOB_NAME = "Adding Artifacts to Table";
- private final List<Artifact> artifacts;
- private final XViewerDataManager viewerDataManager;
-
- public AddArtifactsToViewerJob(XViewerDataManager viewerDataManager, final List<Artifact> artifacts) {
- super(JOB_NAME);
- this.artifacts = artifacts;
- this.viewerDataManager = viewerDataManager;
- setUser(true);
- setPriority(Job.LONG);
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- IStatus toReturn = Status.CANCEL_STATUS;
- monitor.beginTask(getName(), artifacts.size());
- try {
- viewerDataManager.addArtifacts(monitor, artifacts);
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, OseeLevel.SEVERE_POPUP, ex);
- return new Status(IStatus.ERROR, OteUiDefinePlugin.PLUGIN_ID, -1, ex.getMessage(), ex);
- }
- if (monitor.isCanceled() != true) {
- toReturn = Status.OK_STATUS;
- }
- monitor.done();
- return toReturn;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java
deleted file mode 100644
index 03de0e3..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.jobs;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.logging.Level;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.BaseLabelProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.osee.ote.define.artifacts.ArtifactTestRunOperator;
-import org.eclipse.osee.ote.ui.define.OteDefineImage;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.osee.ote.ui.define.dialogs.CommitDialog;
-import org.eclipse.osee.ote.ui.define.dialogs.OverrideInvalidScriptRevisions;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * @author Roberto E. Escobar
- */
-class CommitJobDialog extends UIJob {
- private static final Image CHILD_BRANCH_IMAGE = ImageManager.getImage(OteDefineImage.CHILD_BRANCH);
-
- private static String JOB_NAME = "Commit Test Run";
- private String message;
- private Object[] items;
-
- private final Artifact[] allItems;
- private final Artifact[] preSelected;
- private final Artifact[] unselectable;
- private final boolean isOverrideAllowed;
-
- public CommitJobDialog(Artifact[] allitems, Artifact[] preSelected, boolean isOverrideAllowed) {
- this(allitems, preSelected, null, isOverrideAllowed);
- }
-
- public CommitJobDialog(Artifact[] allitems, Artifact[] preSelected, Artifact[] unselectable, boolean isOverrideAllowed) {
- super(JOB_NAME);
- this.allItems = allitems;
- this.preSelected = preSelected;
- this.unselectable = unselectable;
- setUser(false);
- setPriority(Job.LONG);
- if (unselectable == null) {
- unselectable = new Artifact[0];
- }
- this.isOverrideAllowed = isOverrideAllowed;
- this.message = null;
- this.items = null;
- }
-
- public String getMessage() {
- return message;
- }
-
- public Object[] getSelected() {
- return items;
- }
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- IStatus toReturn = Status.CANCEL_STATUS;
- monitor.setTaskName(getName());
- Shell shell = AWorkbench.getActiveShell();
- CommitDialog dialog = new CommitDialog(shell, CommitColumnEnum.toStringArray(), new TestRunTableLabelProvider());
- dialog.setBlockOnOpen(true);
- dialog.setInput(allItems);
- dialog.setUnSelectable(unselectable);
- dialog.setSelected(preSelected);
- if (isOverrideAllowed != false) {
- dialog.setOverrideHandler(new OverrideInvalidScriptRevisions());
- }
- int result = dialog.open();
- if (result == Window.OK) {
- message = dialog.getComments();
- items = dialog.getSelectedResources();
- toReturn = Status.OK_STATUS;
- }
- return toReturn;
- }
-
- private enum CommitColumnEnum {
-
- Branch,
- Name,
- Id,
- Outfile;
-
- public static String[] toStringArray() {
-
- CommitColumnEnum[] cols = CommitColumnEnum.values();
- String[] toReturn = new String[cols.length];
- for (int index = 0; index < cols.length; index++) {
- toReturn[index] = cols[index].name();
- }
- return toReturn;
- }
- }
-
- private final class TestRunTableLabelProvider extends BaseLabelProvider implements ITableLabelProvider {
- private final HashSet<Object> unselectableItems = new HashSet<>();
- private final int DUMMY_COLUMNS = 1;
-
- public TestRunTableLabelProvider() {
- if (unselectable != null) {
- this.unselectableItems.addAll(Arrays.asList(unselectable));
- }
- }
-
- @Override
- public Image getColumnImage(Object element, int columnIndex) {
- Image toReturn = null;
- if (columnIndex >= DUMMY_COLUMNS) {
- CommitColumnEnum column = CommitColumnEnum.values()[columnIndex - DUMMY_COLUMNS];
- switch (column) {
- case Branch:
- toReturn = CHILD_BRANCH_IMAGE;
- break;
- default:
- break;
- }
- }
- return toReturn;
- }
-
- @Override
- public String getColumnText(Object element, int columnIndex) {
- String toReturn = "";
- if (columnIndex >= DUMMY_COLUMNS) {
- if (element instanceof Artifact) {
- Artifact artifact = (Artifact) element;
- if (artifact != null && artifact.isDeleted() != true) {
- CommitColumnEnum column = CommitColumnEnum.values()[columnIndex - DUMMY_COLUMNS];
- switch (column) {
- case Branch:
- toReturn = artifact.getBranch().getName();
- break;
- case Id:
- try {
- toReturn = new ArtifactTestRunOperator(artifact).getChecksum();
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, "Error getting Checksum", ex);
- }
- break;
- case Name:
- toReturn = artifact.getName();
- break;
- case Outfile:
- try {
- toReturn = new ArtifactTestRunOperator(artifact).getOutfileAttribute().getDisplayableString();
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, "Error getting Outfile", ex);
- }
- break;
- default:
- break;
- }
- }
- }
- }
- return toReturn;
- }
- }
-}
\ No newline at end of file
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java
deleted file mode 100644
index 8ab91c6..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.jobs;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.ote.define.operations.ImportOutfileOperation;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-
-/**
- * @author Roberto E. Escobar
- */
-public class CommitTestRunJob extends Job {
-
- private static final String JOB_NAME = "Commit Test Runs";
-
- private final CommitJobDialog jobDialog;
- private Artifact[] committed;
-
- public CommitTestRunJob(Artifact[] allitems, Artifact[] preSelected, boolean isOverrideAllowed) {
- this(allitems, preSelected, null, isOverrideAllowed);
- }
-
- public CommitTestRunJob(Artifact[] allitems, Artifact[] preSelected, Artifact[] unselectable, boolean isOverrideAllowed) {
- super(JOB_NAME);
- jobDialog = new CommitJobDialog(allitems, preSelected, unselectable, isOverrideAllowed);
- }
-
- public Artifact[] getCommitted() {
- return committed;
- }
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- IStatus toReturn = Status.CANCEL_STATUS;
- jobDialog.schedule();
- try {
- jobDialog.join();
- } catch (InterruptedException ex1) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex1.toString(), ex1);
- }
-
- toReturn = jobDialog.getResult();
- if (toReturn.getSeverity() == IStatus.OK) {
- Object[] items = jobDialog.getSelected();
- String comment = jobDialog.getMessage();
- monitor.beginTask("Commit Artifacts", items.length * 2);
- try {
- committed = commitSelectedArtifacts(monitor, comment, items);
- toReturn = Status.OK_STATUS;
- } catch (Exception ex) {
- if (monitor.isCanceled() != true) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, "Error committing Artifacts.", ex);
- toReturn = new Status(IStatus.ERROR, OteUiDefinePlugin.PLUGIN_ID, "Error committing Artifacts.", ex);
- }
- }
- }
- return toReturn;
- }
-
- private Artifact[] commitSelectedArtifacts(IProgressMonitor monitor, String comment, Object[] items) throws Exception {
- Map<IOseeBranch, List<Artifact>> commitMap = getArtifactsByBranch(items);
- List<Artifact> committedList = new ArrayList<>();
- for (IOseeBranch branch : commitMap.keySet()) {
- monitor.setTaskName(String.format("Committing Artifacts into Branch: [%s]", branch.getName()));
- List<Artifact> artList = commitMap.get(branch);
- ImportOutfileOperation.commitTestRunTx(monitor, comment, branch, artList.toArray(new Artifact[artList.size()]));
- committedList.addAll(artList);
- }
- return committedList.toArray(new Artifact[committedList.size()]);
- }
-
- private Map<IOseeBranch, List<Artifact>> getArtifactsByBranch(Object[] items) {
- Map<IOseeBranch, List<Artifact>> branchMap = new HashMap<>();
- for (Object object : items) {
- Artifact testRun = (Artifact) object;
- IOseeBranch branch = testRun.getBranch();
- List<Artifact> artList = branchMap.get(branch);
- if (artList == null) {
- artList = new ArrayList<>();
- branchMap.put(branch, artList);
- }
- artList.add(testRun);
- }
- return branchMap;
- }
-}
\ No newline at end of file
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/ReportErrorsJob.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/ReportErrorsJob.java
deleted file mode 100644
index b0ca1d9..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/ReportErrorsJob.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.jobs;
-
-import java.util.Arrays;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobChangeListener;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
-import org.eclipse.osee.framework.ui.swt.Displays;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * @author Roberto E. Escobar
- */
-public class ReportErrorsJob extends UIJob {
-
- private final Object[] objectsWithErrors;
- private final String message;
-
- private ReportErrorsJob(String title, String message, Object... objectsWithErrors) {
- super(title);
- setUser(false);
- setPriority(LONG);
- this.objectsWithErrors = objectsWithErrors;
- this.message = message;
- }
-
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- final String errorMessage = Arrays.deepToString(objectsWithErrors).replaceAll(",", ",\n");
- Shell shell = AWorkbench.getActiveShell();
- ResourceErrorDialog dialog = new ResourceErrorDialog(shell, getName(), message, errorMessage);
- dialog.open();
- return Status.OK_STATUS;
- }
-
- public static void openError(final String title, final String message, final Object... objectsWithErrors) {
- openError(title, message, null, objectsWithErrors);
- }
-
- public static void openError(final String title, final String message, final IJobChangeListener listener, final Object... objectsWithErrors) {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- ReportErrorsJob errorDialog = new ReportErrorsJob(title, message, objectsWithErrors);
- if (listener != null) {
- errorDialog.addJobChangeListener(listener);
- }
- errorDialog.schedule();
- }
- });
- }
- private final class ResourceErrorDialog extends MessageDialog {
-
- private final String errorMessage;
-
- public ResourceErrorDialog(Shell parentShell, String dialogTitle, String dialogMessage, String errorMessage) {
- super(parentShell, dialogTitle, PlatformUI.getWorkbench().getSharedImages().getImage(
- ISharedImages.IMG_OBJS_ERROR_TSK), dialogMessage, MessageDialog.ERROR,
- new String[] {IDialogConstants.OK_LABEL}, 0);
- this.errorMessage = errorMessage;
- }
-
- @Override
- protected Control createCustomArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- composite.setLayout(new GridLayout());
-
- Text text = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.H_SCROLL);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
- data.heightHint = 300;
- data.widthHint = 300;
- data.minimumWidth = 300;
- data.minimumHeight = 300;
- text.setLayoutData(data);
- text.setEditable(false);
- text.setText(errorMessage);
- text.setBackground(AWorkbench.getSystemColor(SWT.COLOR_WHITE));
- return composite;
- }
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/CommentComposite.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/CommentComposite.java
deleted file mode 100644
index 28db559..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/CommentComposite.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.panels;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @author Roberto E. Escobar
- */
-public class CommentComposite extends Composite {
-
- protected Text textArea;
- protected String message;
-
- public CommentComposite(Composite parent, int style) {
- super(parent, style);
- this.message = "";
- createControls();
- }
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- textArea.setText(message);
- }
-
- private void createControls() {
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- this.setLayout(layout);
-
- this.textArea = new Text(this, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData data = new GridData(GridData.FILL_BOTH);
- data.heightHint = 80;
- this.textArea.setLayoutData(data);
- this.textArea.selectAll();
-
- this.textArea.addModifyListener(new ModifyListener() {
- @Override
- public void modifyText(ModifyEvent e) {
- message = textArea.getText();
- }
- });
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java
deleted file mode 100644
index 5de27bb..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/GrayableBranchSelectionComposite.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.panels;
-
-import org.eclipse.osee.framework.core.client.ClientSessionManager;
-import org.eclipse.osee.framework.core.model.Branch;
-import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
-import org.eclipse.osee.framework.skynet.core.event.listener.IAccessControlEventListener;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
-import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEventType;
-import org.eclipse.osee.framework.skynet.core.event.model.Sender;
-import org.eclipse.osee.framework.ui.skynet.panels.BranchSelectSimpleComposite;
-import org.eclipse.osee.framework.ui.swt.Displays;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Roberto E. Escobar
- */
-public class GrayableBranchSelectionComposite extends Composite implements IAccessControlEventListener {
-
- private static final String GROUP_TEXT = "Upload results into OSEE";
- private static final String CHECK_BUTTON_TEXT = "Enable upload";
- private static final String CHECK_BUTTON_TOOL_TIP =
- "Select to store outfiles as Test Run Artifacts.\n" + "NOTE: User must be authenticated to create Artifacts.";
- private static final String AUTHENTICATION_WARNING_MESSAGE =
- "Authentication failure - Outfile upload not allowed. Double-Click on the lock icon at the bottom of the screen to authenticate.";
- private static final String FEATURE_DISABLED = "Feature disabled.";
-
- private BranchSelectSimpleComposite branchSelectComposite;
- private Button branchSelectEnabled;
- private Composite statusComposite;
- private Composite selectableComposite;
- private Label statusLabel;
- private StackLayout stackedLayout;
- private Group group;
- private boolean featureEnabled;
-
- public GrayableBranchSelectionComposite(Composite parent, int style) {
- super(parent, style);
- createControl(this);
- }
-
- @Override
- public void handleAccessControlArtifactsEvent(Sender sender, AccessControlEvent accessControlEvent) {
- if (accessControlEvent.getEventType() == AccessControlEventType.UserAuthenticated) {
- handleUserAuthenticated();
- }
- }
-
- private void createControl(Composite parent) {
- GridLayout gL = new GridLayout();
- gL.marginWidth = 0;
- gL.marginHeight = 0;
- parent.setLayout(gL);
- parent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- group = new Group(parent, SWT.NONE);
- group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- stackedLayout = new StackLayout();
- group.setLayout(stackedLayout);
- group.setText(GROUP_TEXT);
-
- createStatusBar(group);
- createSelectableArea(group);
- handleBranchSelectEnabled(false);
- OseeEventManager.addListener(this);
- }
-
- private void createSelectableArea(Composite parent) {
- selectableComposite = new Composite(parent, SWT.NONE);
- selectableComposite.setLayout(new GridLayout());
- selectableComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- branchSelectEnabled = new Button(selectableComposite, SWT.CHECK);
- branchSelectEnabled.setText(CHECK_BUTTON_TEXT);
- branchSelectEnabled.setToolTipText(CHECK_BUTTON_TOOL_TIP);
-
- branchSelectEnabled.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleBranchSelectEnabled(branchSelectEnabled.getSelection());
- }
- });
- this.branchSelectComposite =
- BranchSelectSimpleComposite.createWorkingBranchSelectComposite(selectableComposite, SWT.NONE);
- }
-
- private void createStatusBar(Composite parent) {
- statusComposite = new Composite(parent, SWT.BORDER);
- statusComposite.setLayout(new GridLayout(2, false));
- statusComposite.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false));
- statusComposite.setBackground(Displays.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- statusComposite.setForeground(Displays.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
-
- Label imageLabel = new Label(statusComposite, SWT.NONE);
- imageLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false));
- imageLabel.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK));
- imageLabel.setBackground(Displays.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- imageLabel.setForeground(Displays.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
-
- statusLabel = new Label(statusComposite, SWT.NONE);
- statusLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- statusLabel.setText("");
- statusLabel.setBackground(Displays.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- statusLabel.setForeground(Displays.getSystemColor(SWT.COLOR_RED));
- }
-
- private void handleBranchSelectEnabled(boolean isSelected) {
- setSelectable(true);
- if (ClientSessionManager.isSessionValid() != true) {
- statusLabel.setText(AUTHENTICATION_WARNING_MESSAGE);
- setSelectable(false);
- isSelected = false;
- }
- branchSelectEnabled.setSelection(isSelected);
- branchSelectComposite.setEnabled(isSelected);
- for (Control control : branchSelectComposite.getChildren()) {
- control.setEnabled(isSelected);
- }
- }
-
- public Branch getSelectedBranch() {
- return branchSelectComposite.getSelectedBranch();
- }
-
- public boolean isBranchSelectEnabled() {
- return branchSelectEnabled.getSelection();
- }
-
- public void setFeatureEnabled(final boolean isEnabled) {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- featureEnabled = isEnabled;
- handleBranchSelectEnabled(false);
- statusLabel.setText(featureEnabled != true ? FEATURE_DISABLED : "");
- setEnabled(featureEnabled);
- setSelectable(featureEnabled);
- }
- });
- }
-
- private boolean isFeatureEnabled() {
- return featureEnabled;
- }
-
- @Override
- public void setEnabled(boolean enabled) {
- super.setEnabled(enabled);
- for (Control child : group.getChildren()) {
- child.setEnabled(enabled);
- }
- branchSelectEnabled.setEnabled(enabled);
- }
-
- public String[] getBranchIds() {
- return branchSelectComposite.getBranchIds();
- }
-
- public void restoreWidgetValues(boolean saveAsArtifact, String[] branchUuids, String lastSelected) {
- branchSelectEnabled.setSelection(saveAsArtifact && ClientSessionManager.isSessionValid());
- branchSelectComposite.restoreWidgetValues(branchUuids, lastSelected);
- }
-
- private void setSelectable(final boolean isSelectable) {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- if (isSelectable != false) {
- stackedLayout.topControl = selectableComposite;
- } else {
- stackedLayout.topControl = statusComposite;
- }
- group.layout();
- }
- });
- }
-
- @Override
- public void dispose() {
- OseeEventManager.removeListener(this);
- super.dispose();
- }
-
- private void handleUserAuthenticated() {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- if (branchSelectEnabled != null && branchSelectEnabled.isDisposed() != true && isFeatureEnabled() != false) {
- handleBranchSelectEnabled(branchSelectEnabled.getSelection());
- }
- }
- });
- }
-
- public boolean runOnEventInDisplayThread() {
- return true;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/IOverrideHandler.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/IOverrideHandler.java
deleted file mode 100644
index 9a2db1f..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/IOverrideHandler.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.panels;
-
-import java.util.Set;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-
-/**
- * @author Roberto E. Escobar
- */
-public interface IOverrideHandler {
-
- public String getText();
-
- public String getToolTipText();
-
- public Set<Object> getOverridableFromUnselectable(Set<Object> unselectable) throws OseeCoreException;
-
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/ListSelectionPanel.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/ListSelectionPanel.java
deleted file mode 100644
index e6cc0da..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/ListSelectionPanel.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.panels;
-
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.IBaseLabelProvider;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableItem;
-
-/**
- * @author Roberto E. Escobar
- */
-public class ListSelectionPanel extends Composite {
-
- private TableViewer tableViewer;
- private final IBaseLabelProvider labelProvider;
- private final int width;
- private final int height;
-
- public ListSelectionPanel(Composite parent, int style, int width, int height, IBaseLabelProvider labelProvider) {
- super(parent, style);
- this.width = width;
- this.height = height;
- this.labelProvider = labelProvider;
- createControl(this);
- }
-
- private void createControl(Composite parent) {
- GridLayout layout = new GridLayout();
- layout.marginWidth = 0;
- layout.marginHeight = 0;
-
- parent.setLayout(layout);
- parent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- tableViewer = new TableViewer(parent, getTableStyle());
- tableViewer.setContentProvider(new ArrayContentProvider());
- tableViewer.setLabelProvider(labelProvider);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = width;
- gd.widthHint = height;
- Table table = tableViewer.getTable();
- table.setLayoutData(gd);
- table.setFont(parent.getFont());
- }
-
- private int getTableStyle() {
- return SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
- }
-
- public void addDoubleClickListener(IDoubleClickListener listener) {
- tableViewer.addDoubleClickListener(listener);
- }
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- tableViewer.addSelectionChangedListener(listener);
- }
-
- public void setInput(Object input) {
- tableViewer.setInput(input);
- }
-
- public void setSelection(int index) {
- tableViewer.getTable().select(index);
- }
-
- public void setSorter(ViewerSorter sorter) {
- tableViewer.setSorter(sorter);
- }
-
- public IStructuredSelection getSelection() {
- return (IStructuredSelection) tableViewer.getSelection();
- }
-
- public int indexOf(Object object) {
- int found = -1;
- TableItem[] items = tableViewer.getTable().getItems();
- for (int index = 0; index < items.length; index++) {
- TableItem item = items[index];
- if (item.getData().equals(object)) {
- found = index;
- break;
- }
- }
- return found;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/PreviewPanel.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/PreviewPanel.java
deleted file mode 100644
index 793b255..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/PreviewPanel.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.panels;
-
-import java.net.URI;
-import java.util.logging.Level;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.swt.Displays;
-import org.eclipse.osee.framework.ui.swt.FontManager;
-import org.eclipse.osee.framework.ui.swt.Widgets;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-
-/**
- * @author Roberto E. Escobar
- */
-public class PreviewPanel extends Composite {
- private static final String PREVIEW_DEFAULT_TITLE = "Preview Not Available";
-
- public enum PanelEnum {
- DEFAULT,
- BROWSER;
- }
-
- private Composite stackedComposite;
- private StackLayout stackLayout;
- private Composite defaultComposite;
- private Browser browser;
-
- public PreviewPanel(Composite parent, int style) {
- super(parent, style);
- GridLayout layout = new GridLayout();
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- this.setLayout(layout);
- this.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- createControl(this);
- }
-
- private void createControl(Composite parent) {
- stackedComposite = new Composite(parent, SWT.BORDER);
- stackLayout = new StackLayout();
- stackLayout.marginWidth = 0;
- stackLayout.marginHeight = 0;
- stackedComposite.setLayout(stackLayout);
- stackedComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
- stackedComposite.addDisposeListener(new DisposeListener() {
-
- @Override
- public void widgetDisposed(DisposeEvent e) {
- if (Widgets.isAccessible(browser)) {
- browser.dispose();
- }
- }
- });
-
- createBrowserArea(stackedComposite);
- createPreviewNotAllowed(stackedComposite);
- }
-
- private void createBrowserArea(Composite parent) {
- browser = new Browser(parent, SWT.EMBEDDED | SWT.BORDER);
- browser.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL));
- browser.setBackground(Displays.getSystemColor(SWT.COLOR_GREEN));
- }
-
- private void createPreviewNotAllowed(Composite parent) {
- defaultComposite = new Composite(parent, SWT.BORDER);
- defaultComposite.setLayout(new GridLayout());
- defaultComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- defaultComposite.setBackground(Displays.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
-
- Label label = new Label(defaultComposite, SWT.NONE);
- label.setFont(FontManager.getFont("Courier New", 10, SWT.BOLD));
- label.setForeground(Displays.getSystemColor(SWT.COLOR_DARK_RED));
- label.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true));
- label.setText(PREVIEW_DEFAULT_TITLE);
- label.setBackground(Displays.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- }
-
- private Control getControl(PanelEnum panelId) {
- Control control = defaultComposite;
- if (panelId.equals(PanelEnum.BROWSER)) {
- control = browser;
- }
- return control;
- }
-
- public void setDisplay(final PanelEnum panelId) {
- Control control = getControl(panelId);
- stackLayout.topControl = control;
- stackedComposite.layout();
- stackedComposite.getParent().layout();
- getParent().layout();
- getParent().getParent().layout();
- }
-
- public void updatePreview(final PanelEnum panelId, final URI uri) {
- try {
- if (panelId.equals(PanelEnum.BROWSER)) {
- browser.setUrl(uri.toURL().toString());
- }
- } catch (Exception ex) {
- OseeLog.logf(OteUiDefinePlugin.class, Level.SEVERE, ex, "Error Updating Preview [%s]", panelId);
- }
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/SelectionComposite.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/SelectionComposite.java
deleted file mode 100644
index b79dcd3..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/SelectionComposite.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.panels;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.logging.Level;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.CellLabelProvider;
-import org.eclipse.jface.viewers.CheckboxCellEditor;
-import org.eclipse.jface.viewers.ColumnViewer;
-import org.eclipse.jface.viewers.DecorationOverlayIcon;
-import org.eclipse.jface.viewers.EditingSupport;
-import org.eclipse.jface.viewers.IDecoration;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerCell;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.osee.framework.jdk.core.type.MutableBoolean;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.osee.ote.ui.define.OteDefineImage;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-
-/**
- * @author Roberto E. Escobar
- */
-public class SelectionComposite extends Composite {
- private static final Image CONFLICT_IMAGE = ImageManager.getImage(OteDefineImage.OBSTRUCTED);
- private static final Image CHECKED_IMAGE = ImageManager.getImage(OteDefineImage.CHECKBOX_ENABLED);
- private static final Image UNCHECKED_IMAGE = ImageManager.getImage(OteDefineImage.CHECKBOX_DISABLED);
- private static Image CHECK_OVERRIDEN_IMAGE = null;
- private static Image UNCHECKED_OVERRIDEN_IMAGE = null;
-
- private final ITableLabelProvider tableLabelProvider;
- private TableViewer tableViewer;
- private final Object[] resources;
- private final boolean isSelectAllByDefault;
- private final Map<Object, MutableBoolean> selectableMap;
- private final Set<Object> userSelectedResources = new HashSet<>();
- private final Set<Object> notSelectableResources = new HashSet<>();
- private final Set<Object> overridable = new HashSet<>();
- private final String[] columnNames;
- private Label lblSelectedResourcesNumber;
- private IOverrideHandler overrideHandler;
- private boolean areOverridesAllowed;
-
- public SelectionComposite(Composite parent, int style, String[] columnNames, ITableLabelProvider tableLabelProvider, Object[] resources, boolean isSelectAllByDefault, IOverrideHandler overrideHandler) throws OseeCoreException {
- this(parent, style, columnNames, tableLabelProvider, resources, isSelectAllByDefault, null, null, overrideHandler);
- }
-
- public SelectionComposite(Composite parent, int style, String[] columnNames, ITableLabelProvider tableLabelProvider, Object[] resources, boolean isSelectAllByDefault, Object[] userSelectedResources, Object[] unSelectableResources, IOverrideHandler overrideHandler) {
- super(parent, style);
- this.columnNames = columnNames;
- this.tableLabelProvider = tableLabelProvider;
- this.selectableMap = new HashMap<>();
- this.resources = resources;
- this.isSelectAllByDefault = isSelectAllByDefault;
- if (userSelectedResources != null) {
- this.userSelectedResources.addAll(Arrays.asList(userSelectedResources));
- }
- if (unSelectableResources != null) {
- this.notSelectableResources.addAll(Arrays.asList(unSelectableResources));
- }
- this.overrideHandler = overrideHandler;
- if (overrideHandler != null) {
- try {
- this.overridable.addAll(overrideHandler.getOverridableFromUnselectable(notSelectableResources));
- } catch (OseeCoreException ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
- this.areOverridesAllowed = false;
- createControls();
- }
-
- private void createControls() {
- GridLayout gridLayout = new GridLayout();
- gridLayout.marginHeight = 0;
- gridLayout.marginWidth = 0;
- this.setLayout(gridLayout);
-
- createTableArea(this);
- Composite buttonComposite = createButtonArea(this);
- createLabelArea(buttonComposite);
- }
-
- private void createTableArea(Composite parent) {
- int style = SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER;
- Table table = new Table(parent, style);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- TableLayout layout = new TableLayout();
- table.setLayout(layout);
-
- this.tableViewer = new TableViewer(table);
- this.tableViewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
- this.tableViewer.setLabelProvider(this.tableLabelProvider);
- this.tableViewer.setContentProvider(new TableContentProvider());
- this.tableViewer.setSorter(new ViewerSorter());
-
- TableViewerColumn viewerColumn = new TableViewerColumn(tableViewer, SWT.NONE);
- viewerColumn.setEditingSupport(new CheckColumnEditingSupport(tableViewer));
- viewerColumn.setLabelProvider(new CheckCellLabelProvider());
-
- createColumns();
-
- initializeSelections();
- this.tableViewer.setInput(this.resources);
- packColumnData();
- }
-
- private void packColumnData() {
- TableColumn[] columns = tableViewer.getTable().getColumns();
- for (TableColumn column : columns) {
- column.pack();
- }
- }
-
- private void createColumns() {
- Table table = tableViewer.getTable();
- for (String item : columnNames) {
- TableColumn column = new TableColumn(table, SWT.NONE);
- column.setResizable(true);
- column.setText(item);
- }
- }
-
- private void createLabelArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.horizontalSpacing = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- this.lblSelectedResourcesNumber = new Label(composite, SWT.RIGHT);
- this.lblSelectedResourcesNumber.setText(selectItemsToString(getSelectedCount()));
- this.lblSelectedResourcesNumber.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- }
-
- private Composite createButtonArea(Composite parent) {
- Composite composite = new Composite(parent, SWT.RIGHT);
- GridLayout gLayout = new GridLayout();
- gLayout.numColumns = overrideHandler != null ? 4 : 3;
- gLayout.marginWidth = 0;
- composite.setLayout(gLayout);
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
-
- Button selectButton = new Button(composite, SWT.PUSH);
- selectButton.setText("Select All");
- selectButton.setLayoutData(new GridData());
- selectButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setAllItemsChecked(true);
- }
- });
-
- Button deselectButton = new Button(composite, SWT.PUSH);
- deselectButton.setText("Deselect All");
- deselectButton.setLayoutData(new GridData());
- deselectButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setAllItemsChecked(false);
- }
- });
-
- if (overrideHandler != null) {
- final Button overrideButton = new Button(composite, SWT.CHECK);
- overrideButton.setText(overrideHandler.getText());
- overrideButton.setToolTipText(overrideHandler.getToolTipText());
- overrideButton.setLayoutData(new GridData());
- overrideButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- areOverridesAllowed = overrideButton.getSelection();
- if (areOverridesAllowed != false) {
- for (Object object : overridable) {
- selectableMap.put(object, new MutableBoolean(false));
- }
- } else {
- for (Object object : overridable) {
- selectableMap.remove(object);
- }
- }
- refresh();
- }
- });
- }
- return composite;
- }
-
- private void setAllItemsChecked(boolean state) {
- for (Object key : selectableMap.keySet()) {
- MutableBoolean mutable = selectableMap.get(key);
- mutable.setValue(state);
- selectableMap.put(key, mutable);
- }
- refresh();
- }
-
- private void refresh() {
- lblSelectedResourcesNumber.setText(selectItemsToString(getSelectedCount()));
- tableViewer.refresh();
- }
-
- protected void initializeSelections() {
- for (Object object : resources) {
- if (notSelectableResources.contains(object) != true) {
- boolean initialValue = userSelectedResources.contains(object) || isSelectAllByDefault;
- selectableMap.put(object, new MutableBoolean(initialValue));
- }
- }
- }
-
- protected String selectItemsToString(int value) {
- return String.format("Selected: %s of %s", String.valueOf(value), String.valueOf(resources.length));
- }
-
- public void addOverrideHandler(IOverrideHandler overrideHandler) {
- this.overrideHandler = overrideHandler;
- }
-
- public Object[] getSelectedResources() {
- return getSelectedItems(true);
- }
-
- public Object[] getNotSelectedResources() {
- return getSelectedItems(false);
- }
-
- private Object[] getSelectedItems(boolean thatMatchTrue) {
- List<Object> toReturn = new ArrayList<>();
- for (Object key : selectableMap.keySet()) {
- if (selectableMap.get(key).getValue() == thatMatchTrue) {
- toReturn.add(key);
- }
- }
- return toReturn.toArray(new Object[toReturn.size()]);
- }
-
- public int getSelectedCount() {
- int count = 0;
- for (MutableBoolean value : selectableMap.values()) {
- if (value.getValue() == true) {
- count++;
- }
- }
- return count;
- }
-
- private boolean isOverridable(Object element) {
- return overridable.contains(element) != false && areOverridesAllowed != false;
- }
-
- private final class TableContentProvider implements IStructuredContentProvider {
- @Override
- public void dispose() {
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- @Override
- public Object[] getElements(Object inputElement) {
- return resources;
- }
- }
-
- private final class CheckCellLabelProvider extends CellLabelProvider {
-
- public CheckCellLabelProvider() {
- super();
- }
-
- @Override
- public void update(ViewerCell cell) {
- if (cell.getColumnIndex() == 0) {
- Object data = cell.getItem().getData();
- if (notSelectableResources.contains(data) && isOverridable(data) != true) {
- cell.setImage(CONFLICT_IMAGE);
- } else {
- MutableBoolean isSelectedObject = selectableMap.get(data);
- boolean isSelected = isSelectedObject != null && isSelectedObject.getValue() == true;
- boolean isOverriden = overridable.contains(data);
- cell.setImage(getImage(isSelected, isOverriden));
- }
- }
- }
-
- private Image getImage(boolean isChecked, boolean isOverriden) {
- Image toReturn = isChecked != false ? CHECKED_IMAGE : UNCHECKED_IMAGE;
- if (isOverriden != false) {
- if (CHECK_OVERRIDEN_IMAGE == null || UNCHECKED_OVERRIDEN_IMAGE == null) {
- DecorationOverlayIcon overlay =
- new DecorationOverlayIcon(toReturn, ImageManager.getImageDescriptor(OteDefineImage.SWITCHED),
- IDecoration.BOTTOM_RIGHT);
-
- Image overlayedImage = overlay.createImage();
- if (isChecked != false) {
- CHECK_OVERRIDEN_IMAGE = overlayedImage;
- } else {
- UNCHECKED_OVERRIDEN_IMAGE = overlayedImage;
- }
- }
- toReturn = isChecked != false ? CHECK_OVERRIDEN_IMAGE : UNCHECKED_OVERRIDEN_IMAGE;
- }
- return toReturn;
- }
- }
-
- private final class CheckColumnEditingSupport extends EditingSupport {
-
- private final CheckboxCellEditor editor;
-
- public CheckColumnEditingSupport(ColumnViewer viewer) {
- super(viewer);
- this.editor = new CheckboxCellEditor((Composite) viewer.getControl());
- viewer.setCellEditors(new CellEditor[] {editor});
- }
-
- @Override
- protected boolean canEdit(Object element) {
- return notSelectableResources.contains(element) != true || overridable.contains(element);
- }
-
- @Override
- protected CellEditor getCellEditor(Object element) {
- return editor;
- }
-
- @Override
- protected Object getValue(Object element) {
- MutableBoolean value = selectableMap.get(element);
- return value != null ? value.getValue() : false;
- }
-
- @Override
- protected void setValue(Object element, Object value) {
- MutableBoolean object = selectableMap.get(element);
- if (object != null) {
- object.setValue((Boolean) value);
- }
- refresh();
- }
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java
deleted file mode 100644
index 8067072..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.reports;
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.logging.Level;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osee.framework.jdk.core.type.Pair;
-import org.eclipse.osee.framework.jdk.core.util.Strings;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.plugin.core.util.ExtensionPoints;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.swt.graphics.Image;
-import org.osgi.framework.Bundle;
-
-/**
- * @author Roberto E. Escobar
- */
-public class ExtensionDefinedReports {
- private static final String EXTENSION_ID = "ITestRunReport";
- private final Map<String, ReportData> reportMap;
- private Map<String, Pair<String, String>> idsAndNameMap;
-
- private static ExtensionDefinedReports instance = null;
-
- private ExtensionDefinedReports() {
- this.reportMap = new HashMap<>();
- loadReports();
- }
-
- public static ExtensionDefinedReports getInstance() {
- if (instance == null) {
- instance = new ExtensionDefinedReports();
- }
- return instance;
- }
-
- @SuppressWarnings("unchecked")
- public Pair<String, String>[] getIdsAndNames() {
- if (idsAndNameMap == null) {
- this.idsAndNameMap = new HashMap<>();
- Set<String> ids = reportMap.keySet();
- for (String id : ids) {
- ReportData data = reportMap.get(id);
- this.idsAndNameMap.put(id, new Pair<String, String>(id, data.getName()));
- }
- }
- return idsAndNameMap.values().toArray(new Pair[idsAndNameMap.size()]);
- }
-
- public Image getImage(String key) {
- ReportData data = reportMap.get(key);
- Image toReturn = data.getIcon();
- return toReturn != null ? toReturn : ImageManager.getImage(ImageManager.MISSING);
- }
-
- public ITestRunReport getReportGenerator(String key) {
- ReportData data = reportMap.get(key);
- return data != null ? data.getTestRunReport() : null;
- }
-
- public Pair<String, String> getIdAndName(String id) {
- return idsAndNameMap.get(id);
- }
-
- private void loadReports() {
- List<IConfigurationElement> elements =
- ExtensionPoints.getExtensionElements(OteUiDefinePlugin.getInstance(), EXTENSION_ID, EXTENSION_ID);
- for (IConfigurationElement element : elements) {
- IExtension extension = (IExtension) element.getParent();
- String identifier = extension.getUniqueIdentifier();
- String name = extension.getLabel();
- String className = element.getAttribute("classname");
- String iconName = element.getAttribute("icon");
- String bundleName = element.getContributor().getName();
-
- if (Strings.isValid(bundleName) && Strings.isValid(className)) {
- try {
- Bundle bundle = Platform.getBundle(bundleName);
- Class<?> taskClass = bundle.loadClass(className);
- ITestRunReport object = (ITestRunReport) taskClass.newInstance();
- if (object != null) {
- URL url = bundle.getEntry(iconName);
- ImageDescriptor imageDescriptor = ImageDescriptor.createFromURL(url);
- reportMap.put(identifier, new ReportData(identifier, name, object, imageDescriptor.createImage()));
- }
- } catch (Exception ex) {
- OseeLog.logf(OteUiDefinePlugin.class, Level.SEVERE,
- ex, "Error loading report [%s]", className);
- }
- }
- }
- }
-
- private final class ReportData {
- private final String name;
- private final Image icon;
- private final ITestRunReport testRunReport;
-
- public ReportData(String id, String name, ITestRunReport testRunReport, Image icon) {
- super();
- this.name = name;
- this.icon = icon;
- this.testRunReport = testRunReport;
- }
-
- /**
- * @return the name
- */
- public String getName() {
- return name;
- }
-
- /**
- * @return the icon
- */
- public Image getIcon() {
- return icon;
- }
-
- /**
- * @return the testRunReport
- */
- public ITestRunReport getTestRunReport() {
- return testRunReport;
- }
-
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HighLevelSummary.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HighLevelSummary.java
deleted file mode 100644
index 263f35e..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HighLevelSummary.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.reports;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.ote.define.artifacts.TestRunOperator;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-
-/**
- * @author Roberto E. Escobar
- */
-public class HighLevelSummary implements ITestRunReport {
- private static final String[] HEADER = new String[] {
- CoreAttributeTypes.Partition.getName(),
- CoreAttributeTypes.Subsystem.getName(),
- "ScriptCount",
- "RunTime Issues",
- "Scripts with Failures",
- "Scripts Pass"};
- private final Map<String, CollectedData> dataMap;
-
- public HighLevelSummary() {
- this.dataMap = new HashMap<>();
- }
-
- @Override
- public void gatherData(IProgressMonitor monitor, TestRunOperator... items) throws Exception {
- clear();
- for (int index = 0; index < items.length; index++) {
- TestRunOperator operator = items[index];
- monitor.subTask(String.format("Processing [%s of%s]", index + 1, items.length));
- String partition = operator.getPartition();
- String subsystem = operator.getSubsystem();
- String key = String.format("%s:%s", partition, subsystem);
- CollectedData data = dataMap.get(key);
- if (data == null) {
- data = new CollectedData(partition, subsystem);
- dataMap.put(key, data);
- }
- try {
- processData(data, operator);
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- if (monitor.isCanceled()) {
- break;
- }
- }
- }
-
- @Override
- public String[][] getBody() {
- int numRows = dataMap.size();
- List<String> keys = new ArrayList<>(dataMap.keySet());
- String[][] toReturn = new String[numRows][getHeader().length];
- for (int row = 0; row < numRows; row++) {
- String key = keys.get(row);
- CollectedData collectedData = dataMap.get(key);
- toReturn[row] = addRow(collectedData);
- }
- return toReturn;
- }
-
- private String[] addRow(CollectedData data) {
- List<String> values = new ArrayList<>();
- values.add(data.getPartition());
- values.add(data.getSubsytem());
- values.add(Integer.toString(data.getScriptCount()));
- values.add(Integer.toString(data.getRunTimeIssues()));
- values.add(Integer.toString(data.getScriptWithFailures()));
- values.add(Integer.toString(data.getScriptPassed()));
- return values.toArray(new String[values.size()]);
- }
-
- @Override
- public String[] getHeader() {
- return HEADER;
- }
-
- @Override
- public String getTitle() {
- return "High Level Test Run Summary";
- }
-
- private void processData(CollectedData data, TestRunOperator operator) throws OseeCoreException {
- data.incrementScriptCount();
-
- int failed = operator.getTestPointsFailed();
- int passed = operator.getTestPointsPassed();
- int total = operator.getTotalTestPoints();
- boolean wasAborted = operator.wasAborted();
-
- if (wasAborted) {
- data.incrementRunTimeIssues();
- } else if (total == 0) {
- data.incrementRunTimeIssues();
- } else if (failed > 0) {
- data.incrementScriptWithFailures();
- } else if (passed == total && failed == 0) {
- data.incrementScriptPassed();
- }
- }
-
- private final class CollectedData {
- private final String partition;
- private final String subsytem;
- private int scriptCount;
- private int runTimeIssues;
- private int scriptWithFailures;
- private int scriptPassed;
-
- public CollectedData(String partition, String subsytem) {
- this.partition = partition;
- this.subsytem = subsytem;
- this.scriptCount = 0;
- this.runTimeIssues = 0;
- this.scriptWithFailures = 0;
- this.scriptPassed = 0;
- }
-
- public String getPartition() {
- return partition;
- }
-
- public String getSubsytem() {
- return subsytem;
- }
-
- public int getScriptCount() {
- return scriptCount;
- }
-
- public int getRunTimeIssues() {
- return runTimeIssues;
- }
-
- public int getScriptWithFailures() {
- return scriptWithFailures;
- }
-
- public int getScriptPassed() {
- return scriptPassed;
- }
-
- public void incrementScriptCount() {
- this.scriptCount++;
- }
-
- public void incrementRunTimeIssues() {
- this.runTimeIssues++;
- }
-
- public void incrementScriptWithFailures() {
- this.scriptWithFailures++;
- }
-
- public void incrementScriptPassed() {
- this.scriptPassed++;
- }
- }
-
- @Override
- public String getDescription() {
- return "Generates a summary report of all test runs.";
- }
-
- @Override
- public void clear() {
- this.dataMap.clear();
- }
-
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HistoricalTestRunData.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HistoricalTestRunData.java
deleted file mode 100644
index 1b11930..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HistoricalTestRunData.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.reports;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.logging.Level;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.ote.define.artifacts.TestRunOperator;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-
-/**
- * @author Roberto E. Escobar
- */
-public class HistoricalTestRunData implements ITestRunReport {
- private static final String DATE_HEADER = "Date";
- private static final String[] PER_SCRIPT_HEADER = new String[] {"Passed", "Failed", "Total", "Status"};
-
- private static final DateFormat formatter = SimpleDateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
-
- private final HashMap<Date, Map<String, TestRunOperator>> runByCollection;
- private final Set<String> runsByName;
-
- public HistoricalTestRunData() {
- this.runByCollection = new HashMap<>();
- this.runsByName = new TreeSet<>();
- }
-
- @Override
- public void gatherData(IProgressMonitor monitor, TestRunOperator... artifacts) throws Exception {
- clear();
- for (TestRunOperator operator : artifacts) {
- try {
- Date date = operator.getEndDate();
- Map<String, TestRunOperator> theMap = runByCollection.get(date);
- if (theMap == null) {
- theMap = new HashMap<>();
- runByCollection.put(date, theMap);
- }
- String name = operator.getScriptSimpleName();
- theMap.put(name, operator);
- runsByName.add(name);
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
- }
-
- @Override
- public String[][] getBody() {
- String[][] toReturn = new String[runByCollection.size() + 1][getHeader().length];
- int index = 0;
- toReturn[index++] = getTitleRow();
- List<Date> dateList = new ArrayList<>(runByCollection.keySet());
- Collections.sort(dateList);
- for (Date date : dateList) {
- Map<String, TestRunOperator> theMap = runByCollection.get(date);
- toReturn[index++] = getRow(date, theMap);
- }
- return toReturn;
- }
-
- private String[] getRow(Date date, Map<String, TestRunOperator> theMap) {
- List<String> row = new ArrayList<>();
- row.add(formatter.format(date));
- for (String name : runsByName) {
- TestRunOperator operator = theMap.get(name);
- for (String entry : getData(operator)) {
- row.add(entry);
- }
- }
- return row.toArray(new String[row.size()]);
- }
-
- private String[] getData(TestRunOperator operator) {
- String[] data = new String[PER_SCRIPT_HEADER.length];
- Arrays.fill(data, ONE_SPACE_STRING);
- try {
- if (operator != null) {
- data[0] = Integer.toString(operator.getTestPointsPassed());
- data[1] = Integer.toString(operator.getTestPointsFailed());
- data[2] = Integer.toString(operator.getTotalTestPoints());
- data[3] = operator.getTestResultStatus();
- }
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- return data;
- }
-
- private String[] getTitleRow() {
- List<String> header = new ArrayList<>();
- header.add(ONE_SPACE_STRING);
- for (int index = 0; index < runsByName.size(); index++) {
- header.addAll(Arrays.asList(PER_SCRIPT_HEADER));
- }
- return header.toArray(new String[header.size()]);
- }
-
- @Override
- public String getDescription() {
- return "Creates a table of run results by date.";
- }
-
- @Override
- public String[] getHeader() {
- List<String> header = new ArrayList<>();
- header.add(DATE_HEADER);
- for (String name : runsByName) {
- header.add(name);
- header.add(ONE_SPACE_STRING);
- header.add(ONE_SPACE_STRING);
- header.add(ONE_SPACE_STRING);
- }
- return header.toArray(new String[header.size()]);
- }
-
- @Override
- public String getTitle() {
- return "Test Run Historical Trend";
- }
-
- @Override
- public void clear() {
- this.runByCollection.clear();
- this.runsByName.clear();
- }
-
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HttpReportRequest.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HttpReportRequest.java
deleted file mode 100644
index c8252a5..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HttpReportRequest.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.reports;
-
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.osee.framework.core.client.server.HttpRequest;
-import org.eclipse.osee.framework.core.client.server.HttpResponse;
-import org.eclipse.osee.framework.core.client.server.HttpUrlBuilderClient;
-import org.eclipse.osee.framework.core.client.server.IHttpServerRequest;
-import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
-import org.eclipse.osee.framework.jdk.core.util.Strings;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.swt.Displays;
-import org.eclipse.osee.ote.define.artifacts.ArtifactTestRunOperator;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.osee.ote.ui.define.reports.output.IReportWriter;
-import org.eclipse.osee.ote.ui.define.reports.output.OutputFactory;
-import org.eclipse.osee.ote.ui.define.reports.output.OutputFormat;
-import org.eclipse.osee.ote.ui.define.utilities.SelectionHelper;
-import org.eclipse.osee.ote.ui.define.views.TestRunView;
-
-/**
- * @author Roberto E. Escobar
- */
-public class HttpReportRequest implements IHttpServerRequest {
- private static final String REQUEST_TYPE = "GET.REPORT";
- private static final String REPORT_ID = "id";
- private static final String REPORT_FORMAT = "format";
- private static final String REPORT_SOURCE = "source";
- private static final String PREVIEW_SIZE = "preview";
-
- @Override
- public String getRequestType() {
- return REQUEST_TYPE;
- }
-
- public static String getUrl(String id, String format, String source) throws OseeStateException {
- return getUrl(id, format, source, -1);
- }
-
- public static String getUrl(String id, String format, String source, int preview) throws OseeStateException {
- Map<String, String> parameters = new HashMap<>();
- parameters.put(REPORT_ID, id);
- parameters.put(REPORT_FORMAT, format);
- parameters.put(REPORT_SOURCE, source);
- if (preview > -1) {
- parameters.put(PREVIEW_SIZE, Integer.toString(preview));
- }
- return HttpUrlBuilderClient.getInstance().getUrlForLocalSkynetHttpServer(HttpReportRequest.REQUEST_TYPE,
- parameters);
- }
-
- @Override
- public void processRequest(HttpRequest httpRequest, HttpResponse httpResponse) {
- if (httpRequest.getOriginatingAddress().isLoopbackAddress()) {
- String reportId = httpRequest.getParameter(REPORT_ID);
- String format = httpRequest.getParameter(REPORT_FORMAT);
-
- try {
- OutputFormat outputFormat = OutputFormat.fromString(format);
- ITestRunReport report = ExtensionDefinedReports.getInstance().getReportGenerator(reportId);
- report.gatherData(new NullProgressMonitor(), getSourceData(httpRequest));
-
- IReportWriter writer = OutputFactory.getReportWriter(outputFormat);
- writer.writeTitle(report.getTitle());
- writer.writeHeader(report.getHeader());
- String[][] body = report.getBody();
- for (int index = 0; index < body.length; index++) {
- writer.writeRow(body[index]);
- }
- report.clear();
-
- if (outputFormat.equals(OutputFormat.HTML) != true) {
- httpResponse.setReponseHeader("Accept-Ranges", "bytes");
- httpResponse.setContentEncoding("ISO-8859-1");
- String fileName = URLEncoder.encode(OutputFactory.getOutputFilename(outputFormat, reportId), "UTF-8");
- httpResponse.setContentDisposition(String.format("attachment; filename=%s", fileName));
- }
- httpResponse.setContentType(OutputFactory.getContentType(outputFormat));
- httpResponse.sendResponseHeaders(200, writer.length());
- writer.writeToOutput(httpResponse.getOutputStream());
-
- } catch (Exception ex) {
- handleException(httpRequest, httpResponse, ex);
- }
- }
- }
-
- private ArtifactTestRunOperator[] getSourceData(HttpRequest httpRequest) {
- String source = httpRequest.getParameter(REPORT_SOURCE);
-
- List<ArtifactTestRunOperator> toReturn = new ArrayList<>();
- if (source.equals("local")) {
- LocalSourceSelection selection = new LocalSourceSelection();
- Displays.ensureInDisplayThread(selection);
- ArtifactTestRunOperator[] data = selection.getArtifacts();
- addData(httpRequest, data, toReturn);
- }
- return toReturn.toArray(new ArtifactTestRunOperator[toReturn.size()]);
- }
-
- private void addData(HttpRequest httpRequest, ArtifactTestRunOperator[] source, List<ArtifactTestRunOperator> destination) {
- String previewSize = httpRequest.getParameter(PREVIEW_SIZE);
- if (Strings.isValid(previewSize)) {
- int size = 5;
- try {
- size = Integer.parseInt(previewSize);
- } catch (Exception ex) {
- size = 5;
- }
- if (size > source.length) {
- size = source.length;
- }
- for (int index = 0; index < size; index++) {
- destination.add(source[index]);
- }
- } else {
- destination.addAll(Arrays.asList(source));
- }
- }
-
- private void handleException(HttpRequest httpRequest, HttpResponse httpResponse, Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, "Exception occurred.", ex);
- }
-
- private final class LocalSourceSelection implements Runnable {
-
- private ArtifactTestRunOperator[] artifacts;
- private boolean done = false;
-
- public ArtifactTestRunOperator[] getArtifacts() {
- while (this.isDone() != true) {
- ;
- }
- return artifacts;
- }
-
- @Override
- public void run() {
- done = false;
- List<ArtifactTestRunOperator> toReturn = new ArrayList<>();
- StructuredViewer viewer = TestRunView.getViewer();
- if (viewer != null) {
- toReturn.addAll(SelectionHelper.getInstance().getSelections(viewer));
- }
- artifacts = toReturn.toArray(new ArtifactTestRunOperator[toReturn.size()]);
- done = true;
- }
-
- public boolean isDone() {
- return done;
- }
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ITestRunReport.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ITestRunReport.java
deleted file mode 100644
index d9d86bf..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ITestRunReport.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.reports;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.osee.ote.define.artifacts.TestRunOperator;
-
-/**
- * @author Roberto E. Escobar
- */
-public interface ITestRunReport {
-
- public static final String ONE_SPACE_STRING = " ";
- public static final String EMPTY_STRING = "";
- public static final String FLOAT_TYPE = "float";
-
- public void gatherData(IProgressMonitor monitor, TestRunOperator... artifacts) throws Exception;
-
- public String getTitle();
-
- public String[] getHeader();
-
- public String[][] getBody();
-
- public String getDescription();
-
- public void clear();
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTable.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTable.java
deleted file mode 100644
index 46d86e2..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTable.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.reports.html;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.osee.framework.jdk.core.util.Lib;
-import org.eclipse.osee.framework.jdk.core.util.Strings;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.osee.ote.ui.define.utilities.HtmlStringUtils;
-import org.osgi.framework.Bundle;
-
-/**
- * @author Roberto E. Escobar
- */
-public class HtmlActiveTable {
- private static final String TEMPLATE_PATH = "templates/HtmlActiveTableTemplate";
-
- private static final String ELEMENT_NAME_TAG = "##ELEMENT_NAME##";
- private static final String TABLE_HEIGHT = "##HEIGHT##";
- private static final String TABLE_WIDTH = "##WIDTH##";
- private static final String TABLE_TITLE = "##TABLE_TITLE##";
-
- private static final String TABLE_DATA_TAG = "##TABLE_DATA##";
- private static final String CUSTOM_FUNCTIONS_TAG = "##CUSTOM_FUNCTIONS##";
- private static final String COLUMN_METADATA_TAG = "##COLUMN_DATA##";
- private static final String COLUMN_CUSTOMIZATIONS_TAG = "##COLUMN_CUSTOMIZATIONS_DATA##";
- private static final String AUTO_EXPAND_ON_COLUMN = "##AUTO_EXPAND_COLUMN##";
-
- private String elementName;
- private String tableHeight;
- private String tableWidth;
- private String tableTitle;
- private final List<List<String>> rowData;
- private final List<HtmlActiveTableColumnData> columnList;
-
- public HtmlActiveTable() {
- super();
- this.rowData = new ArrayList<>();
- this.columnList = new ArrayList<>();
- this.elementName = "ID";
- this.tableHeight = "";
- this.tableWidth = "";
- this.tableTitle = this.getClass().getName();
- }
-
- public void setElementName(String elementName) {
- this.elementName = elementName;
- }
-
- public void setTableHeight(String tableHeight) {
- this.tableHeight = tableHeight;
- }
-
- public void setTableWidth(String tableWidth) {
- this.tableWidth = tableWidth;
- }
-
- public void setTableTitle(String tableTitle) {
- this.tableTitle = tableTitle;
- }
-
- private URL getTemplate() throws IOException {
- URL url = null;
- Bundle bundle = OteUiDefinePlugin.getInstance().getBundle();
- if (bundle != null) {
- url = bundle.getEntry(TEMPLATE_PATH);
- url = FileLocator.resolve(url);
- }
- return url;
- }
-
- public void addColumn(HtmlActiveTableColumnData columnData) {
- this.columnList.add(columnData);
- }
-
- private String getColumnDataStoreInfo() {
- StringBuilder builder = new StringBuilder();
- int size = columnList.size();
- for (int index = 0; index < size; index++) {
- HtmlActiveTableColumnData data = columnList.get(index);
- builder.append(data.asMetaData());
- if (index + 1 < size) {
- builder.append(",\n");
- }
- }
- return builder.toString();
- }
-
- private String getColumnCustomizations() {
- StringBuilder builder = new StringBuilder();
- int size = columnList.size();
- for (int index = 0; index < size; index++) {
- HtmlActiveTableColumnData data = columnList.get(index);
- String row = data.asColumnCustomization();
-
- if (index == 0) {
- row = row.substring(1, row.length());
- builder.append("{ id:");
- String name = data.getName().toLowerCase();
- builder.append(HtmlStringUtils.addSingleQuotes(HtmlStringUtils.escapeString(name)));
- builder.append(", ");
- }
- builder.append(row);
- if (index + 1 < size) {
- builder.append(",\n");
- }
- }
- return builder.toString();
- }
-
- public String generate() throws IOException {
- URL url = getTemplate();
- String template = Lib.inputStreamToString(url.openStream());
-
- try {
- template = template.replace(ELEMENT_NAME_TAG, elementName);
- String widthEntry = "autoWidth: true";
- if (Strings.isValid(tableWidth)) {
- widthEntry = "width: " + tableWidth;
- }
- template = template.replace(TABLE_WIDTH, widthEntry);
- String heightEntry = "autoHeight: true";
- if (Strings.isValid(tableHeight)) {
- heightEntry = "height: " + tableHeight;
- }
- template = template.replace(TABLE_HEIGHT, heightEntry);
- template = template.replace(TABLE_TITLE, tableTitle);
- template = template.replace(COLUMN_METADATA_TAG, getColumnDataStoreInfo());
- template = template.replace(TABLE_DATA_TAG, generateTableData());
- template = template.replace(CUSTOM_FUNCTIONS_TAG, getCustomFunction());
- template = template.replace(COLUMN_CUSTOMIZATIONS_TAG, getColumnCustomizations());
- template = template.replace(AUTO_EXPAND_ON_COLUMN, getAutoExpandColumn());
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- return template;
- }
-
- private String getAutoExpandColumn() {
- StringBuilder builder = new StringBuilder();
- if (columnList.size() > 0) {
- builder.append("autoExpandColumn: ");
- HtmlActiveTableColumnData data = columnList.get(0);
- String name = data.getName().toLowerCase();
- builder.append(HtmlStringUtils.addSingleQuotes(HtmlStringUtils.escapeString(name)));
- builder.append(", autoExpandMin: ");
- builder.append(data.getWidth());
- builder.append(", autoExpandMax: ");
- builder.append(data.getWidth() * 10);
- }
- return builder.toString();
- }
-
- private String generateTableData() {
- StringBuilder builder = new StringBuilder();
- for (int index = 0; index < rowData.size(); index++) {
- builder.append(processRow(rowData.get(index)));
- if (index + 1 < rowData.size()) {
- builder.append(", ");
- }
- }
- return builder.toString();
- }
-
- private String processRow(List<String> values) {
- StringBuilder builder = new StringBuilder();
- builder.append("[ ");
- for (int index = 0; index < values.size(); index++) {
- String rawData = values.get(index);
- String data = HtmlStringUtils.escapeString(rawData != null ? rawData : "");
- HtmlActiveTableColumnData metaData = columnList.get(index);
- if (Strings.isValid(metaData.getType()) != true || metaData.getType().equalsIgnoreCase("string")) {
- data = HtmlStringUtils.addSingleQuotes(data);
- }
- builder.append(data);
- if (index + 1 < values.size()) {
- builder.append(",");
- }
- }
- builder.append(" ]\n");
- return builder.toString();
- }
-
- public void addDataRow(String... values) {
- this.rowData.add(Arrays.asList(values));
- }
-
- public String getElementName() {
- return elementName;
- }
-
- private String getCustomFunction() {
- StringBuilder builder = new StringBuilder();
- // TODO: Create Custom Colors
- // function change(val){
- // if(val > 0){
- // return '<span style="color:green;">' + val + '</span>';
- // }else if(val < 0){
- // return '<span style="color:red;">' + val + '</span>';
- // }
- // return val;
- // }
- return builder.toString();
- }
-
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTableColumnData.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTableColumnData.java
deleted file mode 100644
index 1f3ba20..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTableColumnData.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.reports.html;
-
-import org.eclipse.osee.framework.jdk.core.util.Strings;
-import org.eclipse.osee.ote.ui.define.utilities.HtmlStringUtils;
-
-/**
- * @author Roberto E. Escobar
- */
-public class HtmlActiveTableColumnData {
-
- private String name;
- private String type;
- private String dataFormat;
- private boolean sortable;
- private int width;
-
- public HtmlActiveTableColumnData(String name) {
- this(name, "");
- }
-
- public HtmlActiveTableColumnData(String name, String type) {
- super();
- this.name = name;
- this.type = type;
- this.dataFormat = "";
- this.sortable = true;
- this.width = name.length();
- }
-
- public String asMetaData() {
- StringBuilder builder = new StringBuilder();
- builder.append("{");
- builder.append("name: ");
- builder.append(escapeString(getName().toLowerCase()));
- if (Strings.isValid(getType())) {
- builder.append(", type: ");
- builder.append(escapeString(getType()));
- }
- if (Strings.isValid(getDataFormat())) {
- builder.append(", dateFormat: ");
- builder.append(escapeString(getDataFormat()));
- }
- builder.append("}");
- return builder.toString();
- }
-
- public String asColumnCustomization() {
- StringBuilder builder = new StringBuilder();
- builder.append("{");
- builder.append("header: ");
- builder.append("\"");
- builder.append(HtmlStringUtils.escapeString(getName()));
- builder.append("\"");
- // builder.append(", width: ");
- // builder.append(getWidth());
- builder.append(", sortable: ");
- builder.append(isSortable());
-
- //TODO: Add special renderer calls
-
- builder.append(", dataIndex: ");
- builder.append(escapeString(getName().toLowerCase()));
- builder.append("}");
- return builder.toString();
- }
-
- private String escapeString(String value) {
- return HtmlStringUtils.addSingleQuotes(HtmlStringUtils.escapeString(value));
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getDataFormat() {
- return dataFormat;
- }
-
- public void setDataFormat(String dataFormat) {
- this.dataFormat = dataFormat;
- }
-
- public boolean isSortable() {
- return sortable;
- }
-
- public void setSortable(boolean sortable) {
- this.sortable = sortable;
- }
-
- public int getWidth() {
- return width;
- }
-
- public void setWidth(int width) {
- this.width = width;
- }
-
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlTableReport.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlTableReport.java
deleted file mode 100644
index 259c15d..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlTableReport.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.reports.html;
-
-import java.io.IOException;
-import java.text.DateFormat;
-import java.util.Date;
-
-/**
- * @author Roberto E. Escobar
- */
-public class HtmlTableReport {
- private static String HTML_HEADER =
- "<html><meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"><head>";
- private static String HTML_FOOTER = "</body></html>";
-
- private String reportTitle;
- private final HtmlActiveTable activeTable;
-
- public HtmlTableReport() {
- this.activeTable = new HtmlActiveTable();
- this.reportTitle = "Report";
- }
-
- public void setReportTitle(String title) {
- this.reportTitle = title;
- }
-
- public HtmlActiveTable getActiveTable() {
- return activeTable;
- }
-
- public String generate() throws IOException {
- StringBuilder builder = new StringBuilder();
- builder.append(HTML_HEADER);
- builder.append("<title>");
- builder.append(reportTitle);
- builder.append("</title>");
- builder.append(activeTable.generate());
- builder.append("</head>");
- builder.append(getReportSummary());
- builder.append("<br/>");
- builder.append("<div id=\"");
- builder.append(activeTable.getElementName());
- builder.append("\" style=\"width:100%;\">");
- builder.append("</div>");
- builder.append(HTML_FOOTER);
- return builder.toString();
- }
-
- private String getReportSummary() {
- StringBuilder builder = new StringBuilder();
- builder.append("<div id=\"title\" class=\"x-grid3-hd-text\" style=\"color:#15428b;background:#ebf3fd;border:1px solid #aaccf6;\">");
- builder.append("<table class=\" x-grid3-summary-row x-grid3-hd-text\" style=\"width:95%;color:#15428b;\">");
- builder.append("<tr>");
- builder.append("<td style=\"text-align:left; font-size:14px;\"><b>");
- builder.append(reportTitle);
- builder.append("</b></td>");
- builder.append("<td style=\"text-align:right; font-size:14px;\"><b>");
- builder.append(DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT).format(new Date()));
- builder.append("</b></td>");
- builder.append("</tr>");
- builder.append("</table>");
- builder.append("</div>");
- return builder.toString();
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/ExcelReportWriter.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/ExcelReportWriter.java
deleted file mode 100644
index bafa45a..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/ExcelReportWriter.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.reports.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.StringWriter;
-import java.util.Date;
-import java.util.logging.Level;
-import org.eclipse.osee.framework.jdk.core.util.io.xml.ExcelXmlWriter;
-import org.eclipse.osee.framework.jdk.core.util.io.xml.ISheetWriter;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-
-/**
- * @author Roberto E. Escobar
- */
-public class ExcelReportWriter implements IReportWriter {
- private ISheetWriter sheetWriter;
- private final StringWriter stringWriter;
- private String result;
- private String title;
-
- public ExcelReportWriter() {
- this.title = Long.toString(new Date().getTime());
- this.stringWriter = new StringWriter();
- try {
- this.sheetWriter = new ExcelXmlWriter(stringWriter);
- } catch (IOException ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
-
- @Override
- public String getReport() throws IOException {
- if (result == null) {
- generate();
- }
- return result;
- }
-
- @Override
- public int length() throws IOException {
- if (result == null) {
- generate();
- }
- return result.length();
- }
-
- @Override
- public void writeHeader(String[] headers) {
- try {
- this.sheetWriter.startSheet(title, headers.length);
- this.sheetWriter.writeRow(headers);
- } catch (IOException ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
-
- @Override
- public void writeRow(String... cellData) {
- try {
- this.sheetWriter.writeRow(cellData);
- } catch (IOException ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
-
- @Override
- public void writeTitle(String title) {
- this.title = title;
- }
-
- @Override
- public void writeToOutput(OutputStream outputStream) throws IOException {
- if (result == null) {
- generate();
- }
- outputStream.write(result.getBytes("UTF-8"));
- }
-
- private void generate() throws IOException {
- this.sheetWriter.endSheet();
- this.sheetWriter.endWorkbook();
- this.result = stringWriter.toString();
- }
-}
\ No newline at end of file
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/HtmlReportWriter.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/HtmlReportWriter.java
deleted file mode 100644
index 19c14d3..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/HtmlReportWriter.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.reports.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Arrays;
-import java.util.Date;
-import org.eclipse.osee.ote.ui.define.reports.html.HtmlActiveTable;
-import org.eclipse.osee.ote.ui.define.reports.html.HtmlActiveTableColumnData;
-import org.eclipse.osee.ote.ui.define.reports.html.HtmlTableReport;
-
-/**
- * @author Roberto E. Escobar
- */
-public class HtmlReportWriter implements IReportWriter {
-
- private final HtmlTableReport report;
- private String reportHtml;
-
- public HtmlReportWriter() {
- this.report = new HtmlTableReport();
- report.getActiveTable().setTableTitle("Results");
- }
-
- @Override
- public void writeTitle(String title) {
- report.getActiveTable().setElementName("tbl" + new Date().getTime());
- report.setReportTitle(title);
- }
-
- @Override
- public void writeHeader(String[] headers) {
- HtmlActiveTable table = report.getActiveTable();
- String[] metadata = new String[headers.length];
- Arrays.fill(metadata, "");
- for (int index = 0; index < headers.length; index++) {
- table.addColumn(new HtmlActiveTableColumnData(headers[index], metadata[index]));
- }
- }
-
- @Override
- public void writeRow(String... cellData) {
- report.getActiveTable().addDataRow(cellData);
- }
-
- @Override
- public int length() throws IOException {
- if (reportHtml == null) {
- generate();
- }
- return reportHtml.length();
- }
-
- @Override
- public String getReport() throws IOException {
- if (reportHtml == null) {
- generate();
- }
- return reportHtml;
- }
-
- @Override
- public void writeToOutput(OutputStream outputStream) throws IOException {
- outputStream.write(getReport().getBytes("UTF-8"));
- }
-
- private void generate() throws IOException {
- reportHtml = report.generate();
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/IReportWriter.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/IReportWriter.java
deleted file mode 100644
index 2083ceb..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/IReportWriter.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.reports.output;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * @author Roberto E. Escobar
- */
-public interface IReportWriter {
-
- public void writeTitle(String title);
-
- public void writeHeader(String[] headers);
-
- public void writeRow(String... cellData);
-
- public int length() throws Exception;
-
- public String getReport() throws IOException;
-
- public void writeToOutput(OutputStream outputStream) throws IOException;
-
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/OutputFactory.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/OutputFactory.java
deleted file mode 100644
index ea3b7c2..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/OutputFactory.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.reports.output;
-
-import java.util.Date;
-import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
-
-/**
- * @author Roberto E. Escobar
- */
-public class OutputFactory {
- private static final String SEPARATOR = ".";
-
- private OutputFactory() {
- }
-
- public static IReportWriter getReportWriter(OutputFormat format) throws OseeArgumentException {
- IReportWriter toReturn = null;
- switch (format) {
- case EXCEL:
- toReturn = new ExcelReportWriter();
- break;
- case PDF:
- case HTML:
- case RTF:
- toReturn = new ReportWriter(format.name());
- break;
- default:
- throw new OseeArgumentException("Unsupported format [%s]", format);
- }
- return toReturn;
- }
-
- public static String getOutputFilename(OutputFormat format, String reportId) throws OseeArgumentException {
- String extension = "";
- switch (format) {
- case HTML:
- extension = "html";
- break;
- case EXCEL:
- extension = "xml";
- break;
- case PDF:
- extension = "pdf";
- break;
- case RTF:
- extension = "rtf";
- break;
- default:
- throw new OseeArgumentException("Unsupported format [%s]", format);
- }
- StringBuilder builder = new StringBuilder(reportId);
- builder.append(SEPARATOR);
- builder.append(Long.toString(new Date().getTime()));
- builder.append(SEPARATOR);
- builder.append(extension);
- return builder.toString();
- }
-
- public static String getContentType(OutputFormat format) throws OseeArgumentException {
- String toReturn = "";
- switch (format) {
- case HTML:
- toReturn = "text/html";
- break;
- case EXCEL:
- toReturn = "application/excel";
- break;
- case PDF:
- toReturn = "application/pdf";
- break;
- case RTF:
- toReturn = "application/rtf";
- break;
- default:
- throw new OseeArgumentException("Unsupported format [%s]", format);
- }
- return toReturn;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/OutputFormat.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/OutputFormat.java
deleted file mode 100644
index 2c8164a..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/OutputFormat.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.reports.output;
-
-import org.eclipse.osee.framework.jdk.core.util.Strings;
-
-/**
- * @author Roberto E. Escobar
- */
-public enum OutputFormat {
-
- HTML,
- PDF,
- RTF,
- EXCEL;
-
- public static OutputFormat fromString(String value) {
- OutputFormat toReturn = OutputFormat.HTML;
- if (Strings.isValid(value)) {
- try {
- toReturn = OutputFormat.valueOf(value.toUpperCase());
- } catch (Exception ex) {
- toReturn = OutputFormat.HTML;
- }
- }
- return toReturn;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/ReportWriter.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/ReportWriter.java
deleted file mode 100644
index 494edd6..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/output/ReportWriter.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.reports.output;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.logging.Level;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.skynet.util.TableWriterAdaptor;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-
-/**
- * @author Roberto E. Escobar
- */
-public class ReportWriter implements IReportWriter {
- private TableWriterAdaptor tableWriterAdapter;
- private ByteArrayOutputStream outputStream;
-
- public ReportWriter(String writerId) {
- try {
- this.outputStream = new ByteArrayOutputStream();
- this.tableWriterAdapter = new TableWriterAdaptor(writerId, outputStream);
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
-
- @Override
- public String getReport() throws IOException {
- return outputStream.toString(TableWriterAdaptor.ENCODING);
- }
-
- @Override
- public int length() throws Exception {
- if (!tableWriterAdapter.isCompleted()) {
- try {
- tableWriterAdapter.openDocument();
- tableWriterAdapter.writeDocument();
- } finally {
- tableWriterAdapter.close();
- }
- }
- return outputStream.toByteArray().length;
- }
-
- @Override
- public void writeHeader(String[] headers) {
- try {
- tableWriterAdapter.writeHeader(headers);
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
-
- @Override
- public void writeRow(String... cellData) {
- tableWriterAdapter.writeRow(cellData);
- }
-
- @Override
- public void writeTitle(String title) {
- tableWriterAdapter.writeTitle(title);
- }
-
- @Override
- public void writeToOutput(OutputStream outputStream) throws IOException {
- outputStream.write(this.outputStream.toByteArray());
- }
-
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/CommitConfiguration.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/CommitConfiguration.java
deleted file mode 100644
index 9e4d5b2..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/CommitConfiguration.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.utilities;
-
-import java.util.Collection;
-import org.eclipse.osee.framework.core.enums.CoreRelationTypes;
-import org.eclipse.osee.framework.skynet.core.User;
-import org.eclipse.osee.framework.skynet.core.UserManager;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-
-/**
- * @author Roberto E. Escobar
- */
-public class CommitConfiguration {
- private static final CommitConfiguration instance = new CommitConfiguration();
-
- private CommitConfiguration() {
- }
-
- private boolean isUserAllowedToOverride() {
- boolean isAllowed = false;
-
- try {
- User user = UserManager.getUser();
- Collection<Artifact> teams = user.getRelatedArtifacts(CoreRelationTypes.TeamMember_Team);
- for (Artifact team : teams) {
- if (team.getName().equals("OSEE")) {
- isAllowed = true;
- }
- }
- } catch (Exception ex) {
- // Do Nothing!
- }
- return isAllowed;
- }
-
- public static boolean isCommitOverrideAllowed() {
- return instance.isUserAllowedToOverride();
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/EditorUtility.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/EditorUtility.java
deleted file mode 100644
index 1adccd6..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/EditorUtility.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.utilities;
-
-import java.io.File;
-import java.net.URL;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.osee.ote.define.jobs.RemoteResourceRequestJob;
-import org.eclipse.osee.ote.ui.define.reports.HttpReportRequest;
-import org.eclipse.osee.ote.ui.define.reports.output.OutputFactory;
-import org.eclipse.osee.ote.ui.define.reports.output.OutputFormat;
-import org.eclipse.swt.program.Program;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.browser.IWebBrowser;
-import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
-
-/**
- * @author Roberto E. Escobar
- */
-public class EditorUtility {
-
- private EditorUtility() {
- }
-
- public static void openEditor(String reportId, String format) {
- try {
- OutputFormat outputFormat = OutputFormat.fromString(format);
- String url = HttpReportRequest.getUrl(reportId, outputFormat.name(), "local");
- String tempFileName = OutputFactory.getOutputFilename(outputFormat, reportId);
- switch (outputFormat) {
- case HTML:
- openAsHtml(reportId, url);
- break;
- case EXCEL:
- case PDF:
- default:
- openAsNative(tempFileName, url);
- break;
- }
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- }
-
- private static void openAsHtml(String fileName, String url) throws Exception {
- IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
- IWebBrowser browser = browserSupport.createBrowser(IWorkbenchBrowserSupport.AS_EDITOR, fileName, fileName, "");
- browser.openURL(new URL(url));
- }
-
- private static void openAsNative(String fileName, final String url) throws Exception {
- Job job = new RemoteResourceRequestJob(url, fileName);
- job.addJobChangeListener(new JobChangeAdapter() {
-
- @Override
- public void done(IJobChangeEvent event) {
- org.eclipse.core.runtime.IStatus status = event.getResult();
- if (status.equals(Status.OK_STATUS) || status.getCode() == IStatus.OK) {
- IFile file = ((RemoteResourceRequestJob) event.getJob()).getDownloadedFile();
- if (file != null && file.exists()) {
- Program.launch(new File(file.getLocationURI()).getAbsolutePath());
- }
- }
- }
- });
- job.schedule();
- }
-
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/HtmlStringUtils.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/HtmlStringUtils.java
deleted file mode 100644
index e4f2ae5..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/HtmlStringUtils.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.utilities;
-
-/**
- * @author Roberto E. Escobar
- */
-public class HtmlStringUtils {
- private HtmlStringUtils() {
-
- }
-
- public static String addSingleQuotes(String value) {
- return "'" + value + "'";
- }
-
- public static String escapeString(String value) {
- return value.replaceAll("'", "\\'");
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/SelectionHelper.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/SelectionHelper.java
deleted file mode 100644
index 9b33d90..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/SelectionHelper.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.utilities;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.osee.ote.define.artifacts.ArtifactTestRunOperator;
-import org.eclipse.osee.ote.ui.define.viewers.data.ArtifactItem;
-
-/**
- * @author Roberto E. Escobar
- */
-public class SelectionHelper {
-
- private static SelectionHelper instance = null;
-
- private SelectionHelper() {
- }
-
- public static SelectionHelper getInstance() {
- if (instance == null) {
- instance = new SelectionHelper();
- }
- return instance;
- }
-
- public ArtifactTestRunOperator getSelection(StructuredViewer viewer) {
- ArtifactTestRunOperator toReturn = null;
- if (viewer != null) {
- IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
- if (selection != null && selection.size() == 1) {
- Object object = selection.getFirstElement();
- ArtifactTestRunOperator operator = asTestRunOperator(object);
- if (operator != null && operator.hasValidArtifact() != false) {
- toReturn = operator;
- }
- }
- }
- return toReturn;
- }
-
- public ArtifactTestRunOperator asTestRunOperator(Object object) {
- ArtifactTestRunOperator operator = null;
- if (object instanceof ArtifactItem) {
- ArtifactItem artItem = (ArtifactItem) object;
- operator = artItem.getOperator();
- }
- return operator;
- }
-
- public List<ArtifactTestRunOperator> getSelections(StructuredViewer viewer) {
- List<ArtifactTestRunOperator> toReturn = new ArrayList<>();
- if (viewer != null) {
- IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
- if (selection != null && selection.isEmpty() != true) {
- Iterator<?> iterator = selection.iterator();
- while (iterator.hasNext()) {
- Object object = iterator.next();
- ArtifactTestRunOperator operator = asTestRunOperator(object);
- if (operator != null && operator.hasValidArtifact() != false) {
- toReturn.add(operator);
- }
- }
- }
- }
- return toReturn;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java
deleted file mode 100644
index 6a7c78d..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.logging.Level;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.util.LocalSelectionTransfer;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
-import org.eclipse.osee.framework.core.model.Branch;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.artifact.ArtifactData;
-import org.eclipse.osee.framework.ui.skynet.artifact.ArtifactTransfer;
-import org.eclipse.osee.ote.define.jobs.OutfileToArtifactJob;
-import org.eclipse.osee.ote.define.utilities.OutfileParserExtensionManager;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.osee.ote.ui.define.dialogs.BranchComboDialog;
-import org.eclipse.osee.ote.ui.define.jobs.AddArtifactsToViewerJob;
-import org.eclipse.osee.ote.ui.define.jobs.ReportErrorsJob;
-import org.eclipse.osee.ote.ui.define.views.TestRunView;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.DragSource;
-import org.eclipse.swt.dnd.DragSourceEvent;
-import org.eclipse.swt.dnd.DragSourceListener;
-import org.eclipse.swt.dnd.DropTarget;
-import org.eclipse.swt.dnd.DropTargetAdapter;
-import org.eclipse.swt.dnd.DropTargetEvent;
-import org.eclipse.swt.dnd.Transfer;
-
-/**
- * @author Roberto E. Escobar
- */
-public class DragDropHandler {
-
- private final XViewerDataManager viewerDataManager;
-
- public DragDropHandler(XViewerDataManager viewerDataManager) {
- this.viewerDataManager = viewerDataManager;
- setupDropSupport();
- setupDragSupport();
- }
-
- private void setupDropSupport() {
- DropTarget dropTarget = new DropTarget(viewerDataManager.getControl(), DND.DROP_COPY);
- dropTarget.setTransfer(new Transfer[] {LocalSelectionTransfer.getTransfer(), ArtifactTransfer.getInstance(),});
- dropTarget.addDropListener(new DropTargetAdapter() {
-
- @Override
- public void drop(DropTargetEvent event) {
- try {
- performDrop(event);
- } catch (OseeCoreException ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
-
- @Override
- public void dragOver(DropTargetEvent event) {
- event.detail = DND.DROP_COPY;
- }
- });
- }
-
- private void setupDragSupport() {
- DragSource dragSource = new DragSource(viewerDataManager.getControl(), DND.DROP_COPY);
- dragSource.setTransfer(new Transfer[] {ArtifactTransfer.getInstance()});
- dragSource.addDragListener(new DragSourceListener() {
-
- @Override
- public void dragFinished(DragSourceEvent event) {
- }
-
- @Override
- public void dragSetData(DragSourceEvent event) {
- List<Artifact> artifacts = viewerDataManager.getSelectedArtifacts();
- if (artifacts.size() > 0) {
- event.data =
- new ArtifactData(artifacts.toArray(new Artifact[artifacts.size()]), "", TestRunView.VIEW_ID);
- }
- }
-
- @Override
- public void dragStart(DragSourceEvent event) {
- event.doit = false;
- List<Artifact> artifacts = viewerDataManager.getSelectedArtifacts();
- if (artifacts.size() > 0) {
- event.doit = true;
- }
- }
- });
-
- }
-
- private void performDrop(DropTargetEvent e) throws OseeCoreException {
- Object object = e.data;
- if (object instanceof ArtifactData) {
- handleArtifactDrops((ArtifactData) object);
- } else if (object instanceof TreeSelection) {
- StructuredSelection selection = (StructuredSelection) object;
- if (selection.size() > 0) {
- URI[] iFiles = toResourceArray(selection.toArray());
- if (iFiles.length > 0) {
- try {
- handleResourceDrops(iFiles);
- } catch (OseeCoreException ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- } else {
- OseeLog.log(OteUiDefinePlugin.class, Level.WARNING, "No valid files dropped");
- }
- }
- }
- }
-
- private URI[] toResourceArray(Object[] objects) {
- List<URI> toReturn = new ArrayList<>();
- for (Object object : objects) {
- if (object instanceof IAdaptable) {
- Object resource = ((IAdaptable) object).getAdapter(IResource.class);
- if (resource != null) {
- IResource iResource = (IResource) resource;
- if (isResourceAllowed(iResource)) {
- toReturn.add(iResource.getLocationURI());
- }
- }
- }
- }
- return toReturn.toArray(new URI[toReturn.size()]);
- }
-
- private boolean isResourceAllowed(IResource resource) {
- if (resource.getType() == IResource.FILE && resource.isAccessible()) {
- String toCheck = resource.getFileExtension();
- try {
- for (String extension : OutfileParserExtensionManager.getInstance().getSupportedExtensions()) {
- if (toCheck.equalsIgnoreCase(extension)) {
- return true;
- }
- }
- } catch (OseeCoreException ex) {
- // Do Nothing
- }
- }
- return false;
-
- }
-
- private void handleArtifactDrops(ArtifactData artifactData) throws OseeCoreException {
- Artifact[] artifactsDropped = artifactData.getArtifacts();
- Set<Artifact> artifactsToAdd = new HashSet<>();
- for (Artifact artifact : artifactsDropped) {
- if (artifact.isOfType(CoreArtifactTypes.TestRun)) {
- artifactsToAdd.add(artifact);
- }
- }
- addArtifactsToTable(new ArrayList<Artifact>(artifactsToAdd));
- }
-
- private void handleResourceDrops(URI[] iFiles) throws OseeCoreException {
- Branch branch = BranchComboDialog.getBranchFromUser();
- if (branch != null) {
- OutfileToArtifactJob artifactJob = new OutfileToArtifactJob(branch, iFiles);
- artifactJob.addJobChangeListener(new JobChangeAdapter() {
-
- @Override
- public void done(IJobChangeEvent event) {
- IStatus status = event.getResult();
- if (status.equals(Status.OK_STATUS)) {
- OutfileToArtifactJob job = (OutfileToArtifactJob) event.getJob();
- Artifact[] results = job.getResults();
- URI[] unparseable = job.getUnparseableFiles();
- reportUnparseableItems(unparseable);
- addArtifactsToTable(Arrays.asList(results));
- }
- }
- });
- artifactJob.schedule();
- }
- }
-
- private void addArtifactsToTable(final List<Artifact> artifacts) {
- Job job = new AddArtifactsToViewerJob(viewerDataManager, artifacts);
- job.schedule();
- }
-
- private void reportUnparseableItems(final URI[] unparseable) {
- if (unparseable.length > 0) {
- String title = "Artifact Drop Error";
- String message = "The following file(s) had errors during the parsing operation: ";
- ReportErrorsJob.openError(title, message, (Object[]) unparseable);
- }
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/IDataChangedListener.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/IDataChangedListener.java
deleted file mode 100644
index cad2894..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/IDataChangedListener.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers;
-
-/**
- * @author Roberto E. Escobar
- */
-public interface IDataChangedListener {
-
- public abstract void onDataChanged();
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java
deleted file mode 100644
index 4fba947..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java
+++ /dev/null
@@ -1,303 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.logging.Level;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.nebula.widgets.xviewer.XViewer;
-import org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn;
-import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
-import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist;
-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.artifact.ArtifactTypeManager;
-import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
-import org.eclipse.osee.framework.ui.skynet.artifact.ArtifactPromptChange;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes;
-import org.eclipse.osee.ote.ui.define.OteDefineImage;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.osee.ote.ui.define.jobs.CommitTestRunJob;
-import org.eclipse.osee.ote.ui.define.utilities.CommitConfiguration;
-import org.eclipse.osee.ote.ui.define.viewers.actions.AbstractActionHandler;
-import org.eclipse.osee.ote.ui.define.viewers.actions.LaunchReportsAction;
-import org.eclipse.osee.ote.ui.define.viewers.actions.OpenAssociatedOutfile;
-import org.eclipse.osee.ote.ui.define.viewers.actions.OpenAssociatedScript;
-import org.eclipse.osee.ote.ui.define.viewers.actions.OpenInArtifactEditor;
-import org.eclipse.osee.ote.ui.define.viewers.data.ArtifactItem;
-import org.eclipse.osee.ote.ui.define.viewers.data.DataItemContentProvider;
-import org.eclipse.osee.ote.ui.define.viewers.data.DataItemLabelProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.swt.widgets.TreeItem;
-
-/**
- * @author Roberto E. Escobar
- */
-public class TestRunXViewer extends XViewer {
-
- private static final ImageDescriptor COMMIT_IMAGE = ImageManager.getImageDescriptor(OteDefineImage.COMMIT);
- private static final ImageDescriptor REMOVE_IMAGE = ImageManager.getImageDescriptor(OteDefineImage.REMOVE);
- private static final ImageDescriptor REMOVE_ALL_IMAGE = ImageManager.getImageDescriptor(OteDefineImage.REMOVE_ALL);
- private XViewerDataManager dataManager;
- private final List<AbstractActionHandler> actionList = new ArrayList<>();
- private Action editDisposition;
-
- public TestRunXViewer(Composite parent) {
- super(parent, //SWT.VIRTUAL |
- SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, new TestRunXViewerFactory());
- setSorter(null);
- setContentProvider(new DataItemContentProvider());
- setLabelProvider(new DataItemLabelProvider(this));
- setUseHashlookup(true);
- setupActions();
- getMenuManager().addMenuListener(new IMenuListener() {
- @Override
- public void menuAboutToShow(IMenuManager manager) {
- customActions();
- }
- });
- }
-
- private void customActions() {
- MenuManager manager = getMenuManager();
- manager.insertBefore(XViewer.MENU_GROUP_PRE, editDisposition);
- manager.insertBefore(XViewer.MENU_GROUP_PRE, new Separator());
- manager.add(new Separator());
- for (int index = 0; index < actionList.size(); index++) {
- Action action = actionList.get(index);
- if (index + 1 >= actionList.size() || index + 2 >= actionList.size() || index == 3) {
- manager.add(new Separator());
- }
- manager.add(action);
- }
- }
-
- @Override
- protected void createSupportWidgets(Composite parent) {
- super.createSupportWidgets(parent);
- this.dataManager = new XViewerDataManager(this);
- new DragDropHandler(dataManager);
- }
-
- public void registerListener(IDataChangedListener listener) {
- dataManager.registerListener(listener);
- }
-
- public void deRegisterListener(IDataChangedListener listener) {
- dataManager.deRegisterListener(listener);
- }
-
- private void setupActions() {
- try {
- editDisposition = new Action("Edit Disposition", IAction.AS_PUSH_BUTTON) {
- @Override
- public void run() {
- try {
- handleChangeDisposition();
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, OseeLevel.SEVERE_POPUP, ex);
- }
- }
- };
-
- actionList.add(new OpenInArtifactEditor(this, "Open as Artifact"));
- actionList.add(new OpenAssociatedOutfile(this, "Open Outfile"));
- actionList.add(new OpenAssociatedScript(this, "Open Script"));
- actionList.add(new RemoveAction("Remove", REMOVE_IMAGE));
- actionList.add(new RemoveAllAction("Remove All", REMOVE_ALL_IMAGE));
- actionList.add(new LaunchReportsAction(this, "Reports..."));
- actionList.add(new CommitAction("Commit Test Runs...", COMMIT_IMAGE));
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, OseeLevel.SEVERE_POPUP, ex);
- }
- }
-
- @Override
- public void refresh() {
- super.refresh();
- try {
- if (getTree() == null || getTree().isDisposed() || actionList == null) {
- return;
- }
- for (AbstractActionHandler action : actionList) {
- action.updateState();
- }
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, OseeLevel.SEVERE_POPUP, ex);
- }
- }
-
- private final class CommitAction extends AbstractActionHandler {
-
- public CommitAction(String text, ImageDescriptor image) throws Exception {
- super(TestRunXViewer.this, text, image);
- }
-
- @Override
- public void run() {
- Artifact[] preSelected = dataManager.getSelectedForCommit();
- Artifact[] unSelectable = dataManager.getUnCommitable();
-
- Job job = new CommitTestRunJob(getAllItemsList(), preSelected, unSelectable, isOverrideAllowed());
- job.addJobChangeListener(new JobChangeAdapter() {
- @Override
- public void done(IJobChangeEvent event) {
- Artifact[] committed = ((CommitTestRunJob) event.getJob()).getCommitted();
- dataManager.removeFromCommitable(Arrays.asList(committed));
- }
- });
- job.schedule();
- }
-
- @Override
- public void updateState() {
- boolean haveUnCommitableItems = dataManager.getUnCommitable().length > 0;
- boolean haveCommitableItems = dataManager.getAllCommitable().length > 0;
- this.setEnabled(haveCommitableItems || CommitConfiguration.isCommitOverrideAllowed() && haveUnCommitableItems);
- }
-
- private boolean isOverrideAllowed() {
- return CommitConfiguration.isCommitOverrideAllowed();
- }
-
- private Artifact[] getAllItemsList() {
- List<Artifact> allItems = new ArrayList<>();
- allItems.addAll(Arrays.asList(dataManager.getAllCommitable()));
- if (isOverrideAllowed() != false) {
- allItems.addAll(Arrays.asList(dataManager.getUnCommitable()));
- }
- return allItems.toArray(new Artifact[allItems.size()]);
- }
- }
-
- private final class RemoveAllAction extends AbstractActionHandler {
-
- public RemoveAllAction(String text, ImageDescriptor image) throws Exception {
- super(TestRunXViewer.this, text, image);
- }
-
- @Override
- public void run() {
- dataManager.removeAll();
- }
-
- @Override
- public void updateState() {
- this.setEnabled(dataManager.isEmpty() != true);
- }
- }
-
- private final class RemoveAction extends AbstractActionHandler {
-
- public RemoveAction(String text, ImageDescriptor image) throws Exception {
- super(TestRunXViewer.this, text, image);
- }
-
- @Override
- public void run() {
- dataManager.removeSelected();
- }
-
- @Override
- public void updateState() {
- this.setEnabled(getSelection().isEmpty() != true);
- }
- }
-
- public boolean handleChangeDisposition() throws OseeCoreException {
- if (!getSelectedArtifacts().isEmpty()) {
- return setDisposition(getSelectedArtifacts());
- }
- return false;
- }
-
- @Override
- public boolean handleAltLeftClick(TreeColumn treeColumn, TreeItem treeItem) {
- XViewerColumn xCol = (XViewerColumn) treeColumn.getData();
- Object holder = treeItem.getData();
- boolean returnValue = false;
- if (holder instanceof ArtifactItem) {
- if (xCol.equals(TestRunXViewerFactory.DISPOSITION)) {
- ArrayList<Artifact> list = new ArrayList<>();
- list.add(((ArtifactItem) holder).getData());
- try {
- returnValue = setDisposition(list);
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- }
- }
- return returnValue;
- }
-
- private boolean setDisposition(ArrayList<Artifact> selectedArtifacts) throws OseeCoreException {
- boolean returnValue = false;
- ArrayList<Artifact> dispositionArtifacts = new ArrayList<>();
- for (Artifact artifact : selectedArtifacts) {
- if (artifact.isOfType(CoreArtifactTypes.TestRun)) {
- String name = artifact.getName();
- if (!name.equals(Artifact.UNNAMED)) {
- Artifact dispoArtifact = null;
- try {
- dispoArtifact =
- ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.TestRunDisposition, name,
- artifact.getBranch());
- } catch (ArtifactDoesNotExist ex) {
- dispoArtifact =
- ArtifactTypeManager.addArtifact(CoreArtifactTypes.TestRunDisposition, artifact.getBranch());
- dispoArtifact.setName(name);
- }
- if (dispoArtifact != null) {
- dispositionArtifacts.add(dispoArtifact);
- }
- }
- }
- }
- try {
- returnValue =
- ArtifactPromptChange.promptChangeAttribute(OteAttributeTypes.TestDisposition, dispositionArtifacts, true,
- false);
- refresh();
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- return returnValue;
- }
-
- public ArrayList<Artifact> getSelectedArtifacts() {
- ArrayList<Artifact> arts = new ArrayList<>();
- TreeItem items[] = getTree().getSelection();
- if (items.length > 0) {
- for (TreeItem item : items) {
- if (item.getData() instanceof ArtifactItem) {
- arts.add(((ArtifactItem) item.getData()).getData());
- }
- }
- }
- return arts;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewerFactory.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewerFactory.java
deleted file mode 100644
index 52c5839..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewerFactory.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers;
-
-import org.eclipse.nebula.widgets.xviewer.core.model.CustomizeData;
-import org.eclipse.nebula.widgets.xviewer.core.model.SortDataType;
-import org.eclipse.nebula.widgets.xviewer.core.model.XViewerAlign;
-import org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn;
-import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.SkynetXViewerFactory;
-import org.eclipse.osee.ote.ui.define.views.TestRunView;
-
-/**
- * @author Roberto E. Escobar
- */
-public class TestRunXViewerFactory extends SkynetXViewerFactory {
-
- public static final XViewerColumn DISPOSITION = new XViewerColumn("ote.test.run.view.Disposition", "Disposition",
- 300, XViewerAlign.Left, true, SortDataType.String, true, null);
-
- public TestRunXViewerFactory() {
- super(TestRunView.VIEW_ID);
- registerAllAttributeColumns();
- registerColumns(new XViewerColumn("ote.test.run.view.Name", "Name", 150, XViewerAlign.Left, true, SortDataType.String,
- false, null));
- registerColumns(new XViewerColumn("ote.test.run.view.Passed", "Passed", 50, XViewerAlign.Left, true, SortDataType.Integer,
- false, null));
- registerColumns(new XViewerColumn("ote.test.run.view.Failed", "Failed", 50, XViewerAlign.Left, true, SortDataType.Integer,
- false, null));
- registerColumns(new XViewerColumn("ote.test.run.view.Total Test Points", "Total Test Points", 50, XViewerAlign.Left,
- false, SortDataType.Integer, false, null));
- registerColumns(new XViewerColumn("ote.test.run.view.Status", "Status", 150, XViewerAlign.Left, true, SortDataType.String,
- false, null));
- registerColumns(new XViewerColumn("ote.test.run.view.Script Aborted", "Script Aborted", 150, XViewerAlign.Left, false,
- SortDataType.Boolean, false, null));
-
- registerColumns(new XViewerColumn("ote.test.run.view.Ran In Batch Mode", "Ran In Batch Mode", 150, XViewerAlign.Left,
- false, SortDataType.Boolean, false, null));
- registerColumns(new XViewerColumn("ote.test.run.view.Is Batch Mode Allowed", "Is Batch Mode Allowed", 150,
- XViewerAlign.Left, false, SortDataType.Boolean, false, null));
-
- registerColumns(new XViewerColumn("ote.test.run.view.Start Date", "Start Date", 150, XViewerAlign.Left, false,
- SortDataType.Date, false, null));
- registerColumns(new XViewerColumn("ote.test.run.view.End Date", "End Date", 150, XViewerAlign.Left, false,
- SortDataType.Date, false, null));
- registerColumns(new XViewerColumn("ote.test.run.view.Elapsed Date", "Elapsed Date", 150, XViewerAlign.Left, false,
- SortDataType.String, false, null));
-
- registerColumns(new XViewerColumn("ote.test.run.view.Processor ID", "Processor ID", 150, XViewerAlign.Left, false,
- SortDataType.String, false, null));
- registerColumns(new XViewerColumn("ote.test.run.view.Build Id", "Build Id", 150, XViewerAlign.Left, false,
- SortDataType.String, false, null));
- registerColumns(new XViewerColumn("ote.test.run.view.Qualification Level", "Qualification Level", 150, XViewerAlign.Left,
- true, SortDataType.String, false, null));
- registerColumns(new XViewerColumn("ote.test.run.view.Last Author", "Last Author", 150, XViewerAlign.Left, false,
- SortDataType.String, false, null));
- registerColumns(new XViewerColumn("ote.test.run.view.Last Modified Date", "Last Modified Date", 150, XViewerAlign.Left,
- false, SortDataType.Date, false, null));
- registerColumns(new XViewerColumn("ote.test.run.view.Revision", "Revision", 150, XViewerAlign.Left, false,
- SortDataType.String, false, null));
-
- registerColumns(new XViewerColumn("ote.test.run.view.OS Name", "OS Name", 150, XViewerAlign.Left, false,
- SortDataType.String, false, null));
- registerColumns(new XViewerColumn("ote.test.run.view.User Id", "User Id", 150, XViewerAlign.Left, false,
- SortDataType.String, false, null));
- registerColumns(DISPOSITION);
- }
-
- @Override
- public CustomizeData getDefaultTableCustomizeData() {
- CustomizeData custData = new CustomizeData();
- custData.getSortingData().setSortingNames("ote.test.run.view.Name");
- custData.getColumnData().setColumns(getColumns());
- custData.setNameSpace(getNamespace());
- custData.setName("Artifacts");
- return custData;
- }
-
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java
deleted file mode 100644
index 94d90b8..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.nebula.widgets.xviewer.XViewer;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
-import org.eclipse.osee.framework.core.exception.AttributeDoesNotExist;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.ui.skynet.artifact.massEditor.MassXViewerFactory;
-import org.eclipse.osee.framework.ui.swt.Displays;
-import org.eclipse.osee.ote.define.artifacts.ArtifactTestRunOperator;
-import org.eclipse.osee.ote.ui.define.viewers.data.ArtifactItem;
-import org.eclipse.osee.ote.ui.define.viewers.data.BranchItem;
-import org.eclipse.osee.ote.ui.define.viewers.data.DataItem;
-import org.eclipse.osee.ote.ui.define.viewers.data.ScriptItem;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.TreeItem;
-
-/**
- * @author Roberto E. Escobar
- */
-public class XViewerDataManager {
-
- private final XViewer xViewer;
- private final List<DataItem> commitableItems;
- private final List<DataItem> uncommitableItems;
- private final Map<IOseeBranch, DataItem> branchMap;
- private final List<DataItem> backingData;
- private final Collection<IDataChangedListener> listeners;
- private boolean isInitialized;
-
- public XViewerDataManager(XViewer xViewer) {
- super();
- this.backingData = new ArrayList<>();
- this.isInitialized = false;
- this.xViewer = xViewer;
- this.branchMap = new HashMap<>();
- this.commitableItems = new ArrayList<>();
- this.uncommitableItems = new ArrayList<>();
- this.listeners = Collections.synchronizedSet(new HashSet<IDataChangedListener>());
- }
-
- private void ensureInitialized() {
- if (isInitialized != true) {
- isInitialized = true;
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- xViewer.setInput(backingData);
- }
- });
- }
- }
-
- public void addArtifacts(IProgressMonitor monitor, final List<Artifact> artifacts) throws OseeCoreException, AttributeDoesNotExist {
- if (branchMap.isEmpty()) {
- if (xViewer.getXViewerFactory() instanceof MassXViewerFactory) {
- ((MassXViewerFactory) xViewer.getXViewerFactory()).registerAllAttributeColumnsForArtifacts(artifacts, true);
- }
- }
- int total = artifacts.size();
- for (int index = 0; index < artifacts.size(); index++) {
- Artifact artifact = artifacts.get(index);
- monitor.subTask(String.format("Adding to Table: [%s] [%s of %s]", artifact.getName(), index + 1, total));
-
- DataItem branchItem = getBranchItem(artifact);
- DataItem scriptItem = getScriptItem(branchItem, artifact);
-
- ArtifactItem tempItem = new ArtifactItem(xViewer, artifact, null);
-
- DataItem itemFound = scriptItem.getChild(tempItem.getKey());
- if (itemFound == null) {
- scriptItem.addChild(tempItem.getKey(), tempItem);
- tempItem.setParent(scriptItem);
- ArtifactTestRunOperator operator = tempItem.getOperator();
- if (operator.isFromLocalWorkspace()) {
- if (operator.isCommitAllowed()) {
- commitableItems.add(tempItem);
- } else {
- uncommitableItems.add(tempItem);
- }
- }
- }
- monitor.worked(1);
- }
-
- refresh();
- }
-
- private void refresh() {
- ensureInitialized();
- notifyOnDataChanged();
-
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- xViewer.refresh();
- };
- });
- }
-
- private DataItem getScriptItem(DataItem branchItem, Artifact artifact) throws OseeCoreException {
- ArtifactTestRunOperator testRunArtifact = new ArtifactTestRunOperator(artifact);
- DataItem tempItem = new ScriptItem(testRunArtifact.getScriptUrl(), testRunArtifact.getScriptRevision(), null);
- DataItem scriptItem = branchItem.getChild(tempItem.getKey());
- if (scriptItem == null) {
- scriptItem = tempItem;
- scriptItem.setParent(branchItem);
- branchItem.addChild(scriptItem.getKey(), scriptItem);
- }
- return scriptItem;
- }
-
- private DataItem getBranchItem(Artifact artifact) {
- IOseeBranch branch = artifact.getBranch();
- DataItem toReturn = branchMap.get(branch);
- if (toReturn == null) {
- toReturn = new BranchItem(branch, null);
- branchMap.put(branch, toReturn);
- backingData.add(toReturn);
- }
- return toReturn;
- }
-
- private void removeHelper(DataItem item) {
- if (item != null) {
- DataItem parent = item.getParent();
- if (parent != null) {
- parent.removeChild(item);
- if (parent.hasChildren() != true) {
- removeHelper(parent);
- parent.dispose();
- }
- } else {
- branchMap.remove(item.getKey());
- backingData.remove(item);
- }
- }
- }
-
- public void removeSelected() {
- List<DataItem> items = getSelected();
- for (DataItem item : items) {
- removeHelper(item);
- item.dispose();
- commitableItems.remove(item);
- uncommitableItems.remove(item);
- }
- refresh();
- }
-
- public void removeAll() {
- commitableItems.clear();
- uncommitableItems.clear();
- for (DataItem dataItem : branchMap.values()) {
- dataItem.dispose();
- }
- branchMap.clear();
- backingData.clear();
- refresh();
- }
-
- public Control getControl() {
- return xViewer.getTree();
- }
-
- private List<DataItem> getSelected() {
- List<DataItem> toReturn = new ArrayList<>();
- TreeItem items[] = xViewer.getTree().getSelection();
- if (items.length > 0) {
- for (TreeItem item : items) {
- toReturn.add((DataItem) item.getData());
- }
- }
- return toReturn;
- }
-
- public List<Artifact> getSelectedArtifacts() {
- List<Artifact> toReturn = new ArrayList<>();
- for (DataItem item : getSelected()) {
- Object object = item.getData();
- if (object instanceof Artifact) {
- toReturn.add((Artifact) object);
- }
- }
- return toReturn;
- }
-
- public Artifact[] getUnCommitable() {
- return getArtifactsFromDataItemList(uncommitableItems);
- }
-
- public Artifact[] getAllCommitable() {
- return getArtifactsFromDataItemList(commitableItems);
- }
-
- private Artifact[] getArtifactsFromDataItemList(List<DataItem> sourceList) {
- List<Artifact> toReturn = new ArrayList<>();
- for (DataItem item : sourceList) {
- toReturn.add((Artifact) item.getData());
- }
- return toReturn.toArray(new Artifact[toReturn.size()]);
- }
-
- public Artifact[] getSelectedForCommit() {
- List<Artifact> toReturn = new ArrayList<>();
- for (DataItem item : getSelected()) {
- if (commitableItems.contains(item)) {
- toReturn.add((Artifact) item.getData());
- }
- }
- return toReturn.toArray(new Artifact[toReturn.size()]);
- }
-
- public void removeFromCommitable(final Collection<Artifact> artifacts) {
- removeArtifactsFromDataItemList(commitableItems, artifacts);
- removeArtifactsFromDataItemList(uncommitableItems, artifacts);
- refresh();
- }
-
- private void removeArtifactsFromDataItemList(List<DataItem> sourceList, final Collection<Artifact> artifactsToRemove) {
- List<DataItem> itemsToRemove = new ArrayList<>();
- for (DataItem item : sourceList) {
- Object object = item.getData();
- if (artifactsToRemove.contains(object)) {
- itemsToRemove.add(item);
- }
- }
- sourceList.removeAll(itemsToRemove);
- }
-
- private void notifyOnDataChanged() {
- synchronized (listeners) {
- for (IDataChangedListener listener : listeners) {
- listener.onDataChanged();
- }
- }
- }
-
- public void registerListener(IDataChangedListener listener) {
- synchronized (listeners) {
- listeners.add(listener);
- }
- }
-
- public void deRegisterListener(IDataChangedListener listener) {
- synchronized (listeners) {
- if (listeners.contains(listener)) {
- listeners.remove(listener);
- }
- }
- }
-
- public boolean isEmpty() {
- return branchMap.isEmpty();
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/AbstractActionHandler.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/AbstractActionHandler.java
deleted file mode 100644
index 2035992..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/AbstractActionHandler.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-
-/**
- * @author Roberto E. Escobar
- */
-public abstract class AbstractActionHandler extends Action implements ISelectionChangedListener {
-
- private final StructuredViewer viewer;
-
- public AbstractActionHandler(StructuredViewer viewer, String text) throws Exception {
- super(text);
- updateState();
- this.viewer = viewer;
- viewer.addSelectionChangedListener(this);
- }
-
- public AbstractActionHandler(StructuredViewer viewer, String text, ImageDescriptor image) throws Exception {
- super(text, image);
- updateState();
- this.viewer = viewer;
- viewer.addSelectionChangedListener(this);
- }
-
- protected StructuredViewer getViewer() {
- return viewer;
- }
-
- public abstract void updateState() throws Exception;
-
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- try {
- updateState();
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, OseeLevel.SEVERE_POPUP, ex);
- }
- };
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/EditDispositionAction.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/EditDispositionAction.java
deleted file mode 100644
index 2086580..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/EditDispositionAction.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers.actions;
-
-import java.util.logging.Level;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.osee.framework.access.AccessControlManager;
-import org.eclipse.osee.framework.core.enums.PermissionEnum;
-import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.skynet.core.UserManager;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.ui.skynet.render.PresentationType;
-import org.eclipse.osee.framework.ui.skynet.render.RendererManager;
-import org.eclipse.osee.ote.define.artifacts.ArtifactTestRunOperator;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.osee.ote.ui.define.utilities.SelectionHelper;
-
-/**
- * @author Theron Virgin
- */
-public class EditDispositionAction extends AbstractActionHandler {
-
- public EditDispositionAction(StructuredViewer viewer, String text) throws Exception {
- super(viewer, text);
- }
-
- public EditDispositionAction(StructuredViewer viewer, String text, ImageDescriptor image) throws Exception {
- super(viewer, text, image);
- }
-
- @Override
- public void run() {
- try {
- ArtifactTestRunOperator operator = SelectionHelper.getInstance().getSelection(getViewer());
- if (isValidSelection(operator)) {
- Artifact artifact = operator.getTestRunArtifact();
- checkPermissions(artifact);
- RendererManager.open(artifact, PresentationType.DEFAULT_OPEN);
- }
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, "Unable to open artifact.", ex);
- }
- }
-
- @Override
- public void updateState() throws OseeCoreException {
- ArtifactTestRunOperator operator = SelectionHelper.getInstance().getSelection(getViewer());
- setEnabled(isValidSelection(operator));
- }
-
- private boolean isValidSelection(ArtifactTestRunOperator operator) throws OseeCoreException {
- return operator != null && operator.hasValidArtifact() && operator.isFromLocalWorkspace() != true;
- }
-
- private void checkPermissions(Artifact artifact) throws OseeCoreException {
- if (true != AccessControlManager.hasPermission(artifact, PermissionEnum.READ)) {
- throw new OseeArgumentException("The user %s does not have read access to %s",
- UserManager.getUser(), artifact);
- }
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/LaunchReportsAction.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/LaunchReportsAction.java
deleted file mode 100644
index cb70204..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/LaunchReportsAction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers.actions;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
-import org.eclipse.osee.framework.ui.swt.Displays;
-import org.eclipse.osee.ote.ui.define.dialogs.ReportsDialog;
-import org.eclipse.osee.ote.ui.define.utilities.EditorUtility;
-import org.eclipse.osee.ote.ui.define.utilities.SelectionHelper;
-
-/**
- * @author Roberto E. Escobar
- */
-public class LaunchReportsAction extends AbstractActionHandler {
-
- public LaunchReportsAction(StructuredViewer viewer, String text) throws Exception {
- super(viewer, text);
- }
-
- public LaunchReportsAction(StructuredViewer viewer, String text, ImageDescriptor image) throws Exception {
- super(viewer, text, image);
- }
-
- @Override
- public void run() {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- ReportsDialog dialog = new ReportsDialog(AWorkbench.getActiveShell());
- int result = dialog.open();
- if (result == Window.OK) {
- String reportId = dialog.getReportSelected();
- String format = dialog.getReportFormat();
- EditorUtility.openEditor(reportId, format);
- }
- }
- });
- }
-
- @Override
- public void updateState() {
- if (getViewer() != null) {
- setEnabled(SelectionHelper.getInstance().getSelections(getViewer()).size() > 0);
- }
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/OpenAssociatedOutfile.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/OpenAssociatedOutfile.java
deleted file mode 100644
index ad67a21..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/OpenAssociatedOutfile.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers.actions;
-
-import java.net.URI;
-import java.util.logging.Level;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
-import org.eclipse.osee.framework.ui.swt.Displays;
-import org.eclipse.osee.ote.define.artifacts.TestRunOperator;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.osee.ote.ui.define.utilities.SelectionHelper;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-
-/**
- * @author Roberto E. Escobar
- */
-public class OpenAssociatedOutfile extends AbstractActionHandler {
-
- public OpenAssociatedOutfile(StructuredViewer viewer, String text) throws Exception {
- super(viewer, text);
- }
-
- public OpenAssociatedOutfile(StructuredViewer viewer, String text, ImageDescriptor image) throws Exception {
- super(viewer, text, image);
- }
-
- @Override
- public void updateState() {
- TestRunOperator artifact = SelectionHelper.getInstance().getSelection(getViewer());
- setEnabled(artifact != null);
- }
-
- @Override
- public void run() {
- TestRunOperator operator = SelectionHelper.getInstance().getSelection(getViewer());
- try {
- String targetFile = operator.getOutfileUrl();
- openEditorUtility(new URI(targetFile));
- } catch (Exception ex) {
- handleException(ex);
- }
- }
-
- private void openEditorUtility(final URI resource) {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- try {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IDE.openEditorOnFileStore(page, EFS.getStore(resource));
- } catch (Exception ex) {
- handleException(ex);
- }
- }
- });
- }
-
- private void handleException(Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.WARNING, "Unable to open outfile.", ex);
- Shell shell = AWorkbench.getActiveShell();
- MessageDialog.openError(shell, "Open Outfile", "Unable to open outfile.");
- }
-}
\ No newline at end of file
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/OpenAssociatedScript.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/OpenAssociatedScript.java
deleted file mode 100644
index 86bbaef..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/OpenAssociatedScript.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers.actions;
-
-import java.net.URL;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.osee.framework.logging.OseeLevel;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
-import org.eclipse.osee.ote.define.artifacts.ArtifactTestRunOperator;
-import org.eclipse.osee.ote.define.artifacts.TestRunOperator;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.osee.ote.ui.define.utilities.SelectionHelper;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.browser.IWebBrowser;
-import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
-
-/**
- * @author Roberto E. Escobar
- */
-public class OpenAssociatedScript extends AbstractActionHandler {
- private static final SelectionHelper selectionHelper = SelectionHelper.getInstance();
-
- public OpenAssociatedScript(StructuredViewer viewer, String text) throws Exception {
- super(viewer, text);
- }
-
- public OpenAssociatedScript(StructuredViewer viewer, String text, ImageDescriptor image) throws Exception {
- super(viewer, text, image);
- }
-
- @Override
- public void updateState() {
- TestRunOperator operator = selectionHelper.getSelection(getViewer());
- setEnabled(operator != null);
- }
-
- @Override
- public void run() {
- try {
- ArtifactTestRunOperator operator = selectionHelper.getSelection(getViewer());
- if (operator.isScriptRevisionValid()) {
- openRemoteScript(operator.getScriptUrl(), operator.getScriptRevision());
- } else {
- handleException();
- }
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, OseeLevel.SEVERE_POPUP, ex);
- }
- }
-
- private void handleException() {
- MessageDialog.openError(AWorkbench.getActiveShell(), "Open Script", "Unable to open script with invalid url.");
- }
-
- private void openRemoteScript(String scriptUrl, String revision) {
- try {
- URL urlToOpen = new URL(scriptUrl);
- if (urlToOpen != null) {
- IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
- IWebBrowser browser =
- browserSupport.createBrowser(IWorkbenchBrowserSupport.AS_EDITOR, "org.eclipse.ui.browser.editor",
- scriptUrl, "");
- browser.openURL(urlToOpen);
- }
- } catch (Exception ex) {
- handleException();
- }
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/OpenInArtifactEditor.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/OpenInArtifactEditor.java
deleted file mode 100644
index c772c8b..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/actions/OpenInArtifactEditor.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers.actions;
-
-import java.util.logging.Level;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.osee.framework.access.AccessControlManager;
-import org.eclipse.osee.framework.core.enums.PermissionEnum;
-import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.skynet.core.UserManager;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.ui.skynet.render.PresentationType;
-import org.eclipse.osee.framework.ui.skynet.render.RendererManager;
-import org.eclipse.osee.ote.define.artifacts.ArtifactTestRunOperator;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.osee.ote.ui.define.utilities.SelectionHelper;
-
-/**
- * @author Roberto E. Escobar
- */
-public class OpenInArtifactEditor extends AbstractActionHandler {
-
- public OpenInArtifactEditor(StructuredViewer viewer, String text) throws Exception {
- super(viewer, text);
- }
-
- public OpenInArtifactEditor(StructuredViewer viewer, String text, ImageDescriptor image) throws Exception {
- super(viewer, text, image);
- }
-
- @Override
- public void run() {
- try {
- ArtifactTestRunOperator operator = SelectionHelper.getInstance().getSelection(getViewer());
- if (isValidSelection(operator)) {
- Artifact artifact = operator.getTestRunArtifact();
- checkPermissions(artifact);
- RendererManager.open(artifact, PresentationType.GENERALIZED_EDIT);
- }
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, "Unable to open artifact.", ex);
- }
- }
-
- @Override
- public void updateState() throws OseeCoreException {
- ArtifactTestRunOperator operator = SelectionHelper.getInstance().getSelection(getViewer());
- setEnabled(isValidSelection(operator));
- }
-
- private boolean isValidSelection(ArtifactTestRunOperator operator) throws OseeCoreException {
- return operator != null && operator.hasValidArtifact() && operator.isFromLocalWorkspace() != true;
- }
-
- private void checkPermissions(Artifact artifact) throws OseeCoreException {
- if (true != AccessControlManager.hasPermission(artifact, PermissionEnum.READ)) {
- throw new OseeArgumentException("The user %s does not have read access to %s",
- UserManager.getUser(), artifact);
- }
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/ArtifactItem.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/ArtifactItem.java
deleted file mode 100644
index 9626215..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/ArtifactItem.java
+++ /dev/null
@@ -1,330 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers.data;
-
-import java.util.Date;
-import java.util.List;
-import java.util.logging.Level;
-import org.eclipse.jface.viewers.DecorationOverlayIcon;
-import org.eclipse.jface.viewers.IDecoration;
-import org.eclipse.nebula.widgets.xviewer.XViewer;
-import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
-import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
-import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist;
-import org.eclipse.osee.framework.core.model.type.AttributeType;
-import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
-import org.eclipse.osee.framework.skynet.core.attribute.AttributeTypeManager;
-import org.eclipse.osee.framework.skynet.core.attribute.DateAttribute;
-import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
-import org.eclipse.osee.framework.skynet.core.event.filter.IEventFilter;
-import org.eclipse.osee.framework.skynet.core.event.listener.IArtifactEventListener;
-import org.eclipse.osee.framework.skynet.core.event.model.ArtifactEvent;
-import org.eclipse.osee.framework.skynet.core.event.model.Sender;
-import org.eclipse.osee.framework.ui.skynet.ArtifactImageManager;
-import org.eclipse.osee.framework.ui.swt.Displays;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.osee.framework.ui.swt.OverlayImage;
-import org.eclipse.osee.framework.ui.swt.OverlayImage.Location;
-import org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes;
-import org.eclipse.osee.ote.define.artifacts.ArtifactTestRunOperator;
-import org.eclipse.osee.ote.ui.define.OteDefineImage;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.TreeColumn;
-
-/**
- * @author Roberto E. Escobar
- */
-public class ArtifactItem extends DataItem implements IXViewerItem, IArtifactEventListener {
- private static Image FROM_LOCAL_WS_COMMIT_ALLOWED_IMAGE = null;
- private static Image FROM_DATABASE_IMAGE = null;
- private static Image FROM_LOCAL_WS_COMMIT_NOT_ALLOWED_IMAGE = null;
- private static Image INVALID_SCRIPT_IMAGE = null;
- private static boolean isFullDescriptionMode = true;
-
- private final XViewer xViewer;
- private Artifact artifact;
- private ArtifactTestRunOperator operator;
- private String key;
-
- public ArtifactItem(XViewer xViewer, Artifact artifact, DataItem parent) throws OseeArgumentException {
- super(parent);
- this.xViewer = xViewer;
- setArtifact(artifact);
- OseeEventManager.addListener(this);
- }
-
- @Override
- public Artifact getData() {
- return artifact;
- }
-
- @Override
- public void dispose() {
- OseeEventManager.removeListener(this);
- super.dispose();
- }
-
- private void setArtifact(Artifact artifact) throws OseeArgumentException {
- this.artifact = artifact;
- this.operator = new ArtifactTestRunOperator(artifact);
- try {
- this.key =
- String.format("%s:%s:%s", getOperator().getChecksum(), getOperator().isFromLocalWorkspace(),
- getOperator().hasNotBeenCommitted());
- } catch (Exception ex) {
- this.key = "";
- }
- }
-
- public XViewer getXViewer() {
- return xViewer;
- }
-
- public ArtifactTestRunOperator getOperator() {
- return operator;
- }
-
- @Override
- public String getLabel(int index) {
- String toReturn = "";
- Artifact artifact = getData();
- try {
- if (artifact != null && artifact.isDeleted() != true) {
-
- if (index <= xViewer.getTree().getColumns().length - 1) {
-
- TreeColumn treeCol = xViewer.getTree().getColumns()[index];
- String colName = treeCol.getText();
- if (colName.equals("GUID")) {
- toReturn = artifact.getGuid();
- } else if (colName.equals("Artifact_Type")) {
- toReturn = artifact.getArtifactTypeName();
- if (getOperator().isFromLocalWorkspace()) {
- toReturn += " (Local)";
- }
- } else if (colName.equals("Status")) {
- try {
- toReturn = getOperator().getTestResultStatus();
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- toReturn = ex.getLocalizedMessage();
- }
- } else if (colName.equals("Disposition")) {
- //Special case for the Disposition Artifact
- String name = artifact.getSoleAttributeValueAsString(CoreAttributeTypes.Name, "");
- if (name != "") {
- try {
- Artifact dispoArtifact =
- ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.TestRunDisposition, name,
- artifact.getBranch());
- if (dispoArtifact != null) {
- return dispoArtifact.getSoleAttributeValueAsString(OteAttributeTypes.TestDisposition, "");
- }
- } catch (ArtifactDoesNotExist ex) {
- //ignore if not defined
- }
- }
- return "";
- } else {
- AttributeType attributeType = AttributeTypeManager.getType(colName);
- if (artifact.isAttributeTypeValid(attributeType)) {
- if (AttributeTypeManager.isBaseTypeCompatible(DateAttribute.class, attributeType)) {
- Date date = null;
- try {
- date = artifact.getSoleAttributeValue(attributeType);
- } catch (Exception ex) {
- // Do Nothing;
- }
- if (date != null) {
- toReturn = new DateAttribute().MMDDYYHHMM.format(date);
- } else {
- toReturn = "NOT SET";
- }
- } else {
- toReturn = artifact.getAttributesToString(attributeType);
- if (colName.equals("Name")) {
- toReturn = getArtifactName(toReturn);
- }
- }
- }
- }
- }
- }
- } catch (OseeCoreException ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- toReturn = ex.getLocalizedMessage();
- }
- return toReturn;
- }
-
- private String getArtifactName(String rawName) throws OseeCoreException {
- String name = rawName;
- if (isFullDescriptionModeEnabled() != true) {
- String[] qualifiers = rawName.split("\\.");
- name = qualifiers[qualifiers.length - 1];
- }
- return String.format("%s%s [%s]", getOperator().isFromLocalWorkspace() ? "> " : "", name,
- getOperator().getChecksum());
- }
-
- @Override
- public Image getImage() {
- Image toReturn = null;
- try {
- Artifact artifact = getData();
- if (artifact != null && artifact.isDeleted() != true) {
- if (areImagesInitialized() != true) {
- initializeImages();
- }
- ArtifactTestRunOperator operator = getOperator();
- if (operator.isFromLocalWorkspace() == true) {
- if (operator.isCommitAllowed() == true) {
- toReturn = FROM_LOCAL_WS_COMMIT_ALLOWED_IMAGE;
- } else {
- if (operator.isScriptRevisionValid() != true) {
- toReturn = INVALID_SCRIPT_IMAGE;
- } else {
- toReturn = FROM_LOCAL_WS_COMMIT_NOT_ALLOWED_IMAGE;
- }
- }
- } else {
- toReturn = FROM_DATABASE_IMAGE;
- }
- }
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.SEVERE, ex);
- }
- return toReturn;
- }
-
- private boolean areImagesInitialized() {
- return FROM_LOCAL_WS_COMMIT_ALLOWED_IMAGE != null && FROM_DATABASE_IMAGE != null && FROM_LOCAL_WS_COMMIT_NOT_ALLOWED_IMAGE != null;
- }
-
- private void initializeImages() {
- Artifact artifact = getData();
- Image defaultImage = ArtifactImageManager.getImage(artifact);
- DecorationOverlayIcon overlay = null;
- if (FROM_LOCAL_WS_COMMIT_ALLOWED_IMAGE == null) {
- OverlayImage overlayImage =
- new OverlayImage(defaultImage, ImageManager.getImageDescriptor(OteDefineImage.ADDITION), Location.BOT_RIGHT);
- FROM_LOCAL_WS_COMMIT_ALLOWED_IMAGE = overlayImage.createImage();
- }
- if (FROM_LOCAL_WS_COMMIT_NOT_ALLOWED_IMAGE == null) {
- overlay =
- new DecorationOverlayIcon(defaultImage, ImageManager.getImageDescriptor(OteDefineImage.CONFAUTO_OV),
- IDecoration.BOTTOM_RIGHT);
- FROM_LOCAL_WS_COMMIT_NOT_ALLOWED_IMAGE = overlay.createImage();
- }
- if (FROM_DATABASE_IMAGE == null) {
- overlay =
- new DecorationOverlayIcon(defaultImage, ImageManager.getImageDescriptor(OteDefineImage.VERSION_CONTROLLED),
- IDecoration.BOTTOM_RIGHT);
- FROM_DATABASE_IMAGE = overlay.createImage();
- }
- if (INVALID_SCRIPT_IMAGE == null) {
- overlay =
- new DecorationOverlayIcon(defaultImage, ImageManager.getImageDescriptor(OteDefineImage.OBSTRUCTED),
- IDecoration.BOTTOM_RIGHT);
- INVALID_SCRIPT_IMAGE = overlay.createImage();
- }
- }
-
- @Override
- public Object getKey() {
- return key;
- }
-
- public static void setFullDescriptionModeEnabled(boolean isEnabled) {
- ArtifactItem.isFullDescriptionMode = isEnabled;
- }
-
- public static boolean isFullDescriptionModeEnabled() {
- return ArtifactItem.isFullDescriptionMode;
- }
-
- // @Override
- // public void handleTransactionEvent(Sender sender, TransactionEvent transData) {
- // if (artifact.isDeleted()) {
- // return;
- // }
- //
- //// transData.getTransactions()
- // TransactionChange change = null;
- // change.
- // if (transData.isDeleted(artifact)) {
- // Displays.ensureInDisplayThread(new Runnable() {
- // @Override
- // public void run() {
- // if (!xViewer.getTree().isDisposed()) {
- // xViewer.remove(this);
- // }
- // dispose();
- // }
- // });
- // return;
- // }
- // if (transData.isRelAddedChangedDeleted(artifact) || transData.isChanged(artifact)) {
- // Displays.ensureInDisplayThread(new Runnable() {
- // @Override
- // public void run() {
- // if (!xViewer.getTree().isDisposed()) {
- // xViewer.remove(this);
- // } else {
- // xViewer.update(this, null);
- // }
- // }
- // });
- // }
- // }
-
- @Override
- public List<? extends IEventFilter> getEventFilters() {
- return null;
- }
-
- @Override
- public void handleArtifactEvent(ArtifactEvent artifactEvent, Sender sender) {
- if (artifact.isDeleted()) {
- return;
- }
- if (artifactEvent.isDeletedPurged(artifact)) {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- if (!xViewer.getTree().isDisposed()) {
- xViewer.remove(this);
- }
- dispose();
- }
- });
- return;
- }
- if (artifactEvent.isRelAddedChangedDeleted(artifact) || artifactEvent.isModified(artifact)) {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- if (!xViewer.getTree().isDisposed()) {
- xViewer.remove(this);
- } else {
- xViewer.update(this, null);
- }
- }
- });
- }
- }
-
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java
deleted file mode 100644
index dfa560b..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers.data;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.osee.ote.ui.define.OteDefineImage;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Roberto E. Escobar
- */
-public class BranchItem extends DataItem implements IXViewerItem {
-
- private final IOseeBranch branch;
- private static boolean isScriptItemGrouped = true;
-
- public BranchItem(IOseeBranch branch, DataItem parentItem) {
- super(parentItem);
- this.branch = branch;
- }
-
- @Override
- public String getData() {
- return branch.getName();
- }
-
- @Override
- public Image getImage() {
- return ImageManager.getImage(OteDefineImage.CHILD_BRANCH);
- }
-
- @Override
- public String getLabel(int index) {
- return index == 0 ? getData() : "";
- }
-
- @Override
- public Object getKey() {
- return branch;
- }
-
- @Override
- public DataItem[] getChildren() {
- DataItem[] toReturn = super.getChildren();
- if (isGroupModeEnabled() != true) {
- List<DataItem> tempList = new ArrayList<>();
- for (DataItem item : toReturn) {
- if (item.hasChildren()) {
- for (DataItem itemX : item.getChildren()) {
- tempList.add(itemX);
- }
- }
- }
- toReturn = tempList.toArray(new DataItem[tempList.size()]);
- }
- return toReturn;
- }
-
- public static void setGroupModeEnabled(boolean isEnabled) {
- BranchItem.isScriptItemGrouped = isEnabled;
- }
-
- public static boolean isGroupModeEnabled() {
- return BranchItem.isScriptItemGrouped;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItem.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItem.java
deleted file mode 100644
index 15d68b8..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItem.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers.data;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author Roberto E. Escobar
- */
-public abstract class DataItem {
-
- private DataItem parentItem;
- private final Map<Object, DataItem> childrenMap;
-
- public DataItem(DataItem parentItem) {
- this.parentItem = parentItem;
- this.childrenMap = new HashMap<>();
- }
-
- public void addChild(Object key, DataItem child) {
- childrenMap.put(key, child);
- child.setParent(this);
- }
-
- public void removeChild(DataItem child) {
- childrenMap.remove(child.getKey());
- child.setParent(null);
- child.dispose();
- }
-
- public DataItem[] getChildren() {
- Collection<DataItem> collection = childrenMap.values();
- return collection.toArray(new DataItem[collection.size()]);
- }
-
- public boolean hasChildren() {
- return childrenMap.size() > 0;
- }
-
- public void setParent(DataItem parent) {
- this.parentItem = parent;
- }
-
- public DataItem getParent() {
- return this.parentItem;
- }
-
- public void dispose() {
- if (hasChildren() != false) {
- for (DataItem item : getChildren()) {
- item.dispose();
- }
- }
- }
-
- public abstract Object getData();
-
- public abstract Object getKey();
-
- public boolean hasItem(Object key) {
- return childrenMap.containsKey(key);
- }
-
- public DataItem getChild(Object key) {
- return childrenMap.get(key);
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItemContentProvider.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItemContentProvider.java
deleted file mode 100644
index ebab053..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItemContentProvider.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers.data;
-
-import java.util.Collection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-
-/**
- * @author Roberto E. Escobar
- */
-public class DataItemContentProvider implements ITreeContentProvider {
-
- private static final Object[] EMPTY_ARRAY = new Object[0];
-
- @Override
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof Collection) {
- return ((Collection) parentElement).toArray();
- }
- if (parentElement instanceof DataItem) {
- return ((DataItem) parentElement).getChildren();
- }
- return EMPTY_ARRAY;
- }
-
- @Override
- public Object getParent(Object element) {
- if (element instanceof DataItem) {
- return ((DataItem) element).getParent();
- }
- return null;
- }
-
- @Override
- public boolean hasChildren(Object element) {
- if (element instanceof Collection<?>) {
- return true;
- }
- if (element instanceof DataItem) {
- return ((DataItem) element).hasChildren();
- }
- return false;
- }
-
- @Override
- public Object[] getElements(Object inputElement) {
- if (inputElement instanceof String) {
- return new Object[] {inputElement};
- }
- return getChildren(inputElement);
- }
-
- @Override
- public void dispose() {
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItemLabelProvider.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItemLabelProvider.java
deleted file mode 100644
index 4230e10..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItemLabelProvider.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers.data;
-
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.nebula.widgets.xviewer.XViewer;
-import org.eclipse.nebula.widgets.xviewer.XViewerLabelProvider;
-import org.eclipse.nebula.widgets.xviewer.core.model.XViewerColumn;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Roberto E. Escobar
- */
-public class DataItemLabelProvider extends XViewerLabelProvider {
-
- public DataItemLabelProvider(XViewer viewer) {
- super(viewer);
- }
-
- @Override
- public Image getColumnImage(Object element, XViewerColumn col, int columnIndex) {
- Image toReturn = null;
- if (columnIndex == 0) {
- if (element instanceof IXViewerItem) {
- toReturn = ((IXViewerItem) element).getImage();
- }
- }
- return toReturn;
- }
-
- @Override
- public String getColumnText(Object element, XViewerColumn col, int columnIndex) {
- String toReturn = "";
- if (element instanceof String && columnIndex == 1) {
- toReturn = (String) element;
- } else if (element instanceof IXViewerItem) {
- toReturn = ((IXViewerItem) element).getLabel(columnIndex);
- }
- return toReturn;
- }
-
- @Override
- public void addListener(ILabelProviderListener listener) {
- }
-
- @Override
- public void dispose() {
- }
-
- @Override
- public boolean isLabelProperty(Object element, String property) {
- return false;
- }
-
- @Override
- public void removeListener(ILabelProviderListener listener) {
- }
-
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/IXViewerItem.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/IXViewerItem.java
deleted file mode 100644
index df02cf2..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/IXViewerItem.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers.data;
-
-import org.eclipse.swt.graphics.Image;
-
-/**
- * @author Roberto E. Escobar
- */
-public interface IXViewerItem {
-
- public abstract Image getImage();
-
- public abstract String getLabel(int index);
-
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/ScriptItem.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/ScriptItem.java
deleted file mode 100644
index 3634a56..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/ScriptItem.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.viewers.data;
-
-import java.net.URI;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.apache.commons.lang.StringUtils;
-import org.eclipse.osee.framework.jdk.core.util.Lib;
-import org.eclipse.osee.framework.jdk.core.util.Strings;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * @author Roberto E. Escobar
- */
-public class ScriptItem extends DataItem implements IXViewerItem {
- private static final Matcher urlMatcher = Pattern.compile("(.*)?/(branches|trunk|tags)?(.*)").matcher("");
- private static final String DEFAULT_SCRIPT_NAME = "Script Unknown";
- private static final String DEFAULT_REVISION = "?";
- private static boolean isFullDescriptionMode = true;
-
- private String scriptUrl;
- private String revision;
- private final Integer key;
-
- public ScriptItem(String scriptUrl, String revision, DataItem parentItem) {
- super(parentItem);
- setScriptUrlAndRevision(scriptUrl, revision);
- this.key = generateKey();
- }
-
- private void setScriptUrlAndRevision(String scriptUrl, String revision) {
- boolean wasThereAnError = false;
- try {
- URI url = new URI(scriptUrl);
- if (url != null) {
- this.scriptUrl = scriptUrl;
- } else {
- wasThereAnError = true;
- }
- } catch (Exception ex) {
- wasThereAnError = true;
- }
- try {
- if (Strings.isValid(revision)) {
- this.revision = revision;
- } else {
- wasThereAnError = true;
- }
- } catch (Exception ex) {
- wasThereAnError = true;
- }
-
- if (wasThereAnError == true) {
- setDefaultValues();
- }
- }
-
- private void setDefaultValues() {
- this.scriptUrl = DEFAULT_SCRIPT_NAME;
- this.revision = DEFAULT_REVISION;
- }
-
- @Override
- public String getData() {
- return String.format("[%s][%s]", scriptUrl, revision);
- }
-
- @Override
- public Image getImage() {
- return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
- }
-
- @Override
- public String getLabel(int index) {
- String toReturn = "";
- if (index == 0) {
- if (scriptUrl.equals(DEFAULT_SCRIPT_NAME) != true && revision.equals(DEFAULT_REVISION) != true && isFullDescriptionModeEnabled() != false) {
- toReturn = getFullLabel();
- } else {
- toReturn = getShortLabel();
- }
- }
- return toReturn;
- }
-
- private String getFullLabel() {
- String repository = null;
- String type = null;
- String path = null;
- urlMatcher.reset(scriptUrl);
- if (urlMatcher.find()) {
- repository = urlMatcher.group(1);
- type = urlMatcher.group(2);
- if (!Strings.isValid(type)) {
- type = "";
- }
- path = urlMatcher.group(3);
- }
- return String.format("%s [%s] [%s, %s: %s]", getScriptName(), revision, repository, StringUtils.capitalize(type),
- path);
- }
-
- private String getScriptName() {
- String url = scriptUrl;
- int lastIndex = url.lastIndexOf("/") + 1;
- url = url.substring(lastIndex, url.length());
- return Lib.removeExtension(url);
- }
-
- private String getShortLabel() {
- String url = scriptUrl;
- if (!DEFAULT_SCRIPT_NAME.equals(scriptUrl)) {
- url = getScriptName();
- }
- return String.format("%s [%s]", url, revision);
- }
-
- @Override
- public Object getKey() {
- return key;
- }
-
- private Integer generateKey() {
- int value = 0;
- for (byte aByte : (scriptUrl + revision).getBytes()) {
- value += aByte;
- }
- return new Integer(value);
- }
-
- public static void setFullDescriptionModeEnabled(boolean isEnabled) {
- ScriptItem.isFullDescriptionMode = isEnabled;
- }
-
- public static boolean isFullDescriptionModeEnabled() {
- return ScriptItem.isFullDescriptionMode;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunArtifactOptions.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunArtifactOptions.java
deleted file mode 100644
index 32820f5..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunArtifactOptions.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.views;
-
-import org.eclipse.osee.framework.core.data.TestRunStorageKey;
-import org.eclipse.osee.framework.core.model.Branch;
-import org.eclipse.osee.framework.jdk.core.type.IPropertyStore;
-import org.eclipse.osee.framework.ui.plugin.widgets.IPropertyStoreBasedControl;
-import org.eclipse.osee.ote.ui.define.panels.GrayableBranchSelectionComposite;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-
-/**
- * @author Roberto E. Escobar
- */
-public class TestRunArtifactOptions implements IPropertyStoreBasedControl {
-
- private GrayableBranchSelectionComposite panel;
-
- @Override
- public Control createControl(Composite parent) {
- this.panel = new GrayableBranchSelectionComposite(parent, SWT.NONE);
- this.panel.setFeatureEnabled(true);
- return this.panel;
- }
-
- @Override
- public void load(IPropertyStore propertyStore) {
- boolean widgetEnabled = propertyStore.getBoolean(TestRunStorageKey.STORAGE_ENABLED);
- String lastBranchSelected = propertyStore.get(TestRunStorageKey.SELECTED_BRANCH_ID);
- String[] branchUuids = propertyStore.getArray(TestRunStorageKey.BRANCH_IDS);
-
- this.panel.restoreWidgetValues(widgetEnabled, branchUuids, lastBranchSelected);
- }
-
- @Override
- public void save(IPropertyStore propertyStore) {
- propertyStore.put(TestRunStorageKey.STORAGE_ENABLED, this.panel.isBranchSelectEnabled());
- propertyStore.put(TestRunStorageKey.BRANCH_IDS, this.panel.getBranchIds());
-
- Branch branch = this.panel.getSelectedBranch();
- long branchUuid = -1;
- if (branch != null) {
- branchUuid = branch.getUuid();
- }
- propertyStore.put(TestRunStorageKey.SELECTED_BRANCH_ID, branchUuid);
- }
-
- @Override
- public boolean areSettingsValid() {
- boolean result = true;
- if (this.panel.isBranchSelectEnabled() != false) {
- result &= this.panel.getSelectedBranch() != null;
- }
- return result;
- }
-
- @Override
- public String getErrorMessage() {
- StringBuilder builder = new StringBuilder();
- if (areSettingsValid() != true) {
- builder.append("Artifact Upload: Please select a branch to upload test runs into.");
- }
- return builder.toString();
- }
-
- @Override
- public int getPriority() {
- return 2;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunView.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunView.java
deleted file mode 100644
index 366aa83..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunView.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.views;
-
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Level;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.osee.framework.help.ui.OseeHelpContext;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
-import org.eclipse.osee.framework.ui.plugin.util.HelpUtil;
-import org.eclipse.osee.framework.ui.skynet.widgets.GenericViewPart;
-import org.eclipse.osee.framework.ui.swt.Displays;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.osee.ote.ui.define.OteDefineImage;
-import org.eclipse.osee.ote.ui.define.OteUiDefinePlugin;
-import org.eclipse.osee.ote.ui.define.viewers.IDataChangedListener;
-import org.eclipse.osee.ote.ui.define.viewers.TestRunXViewer;
-import org.eclipse.osee.ote.ui.define.viewers.data.ArtifactItem;
-import org.eclipse.osee.ote.ui.define.viewers.data.BranchItem;
-import org.eclipse.osee.ote.ui.define.viewers.data.ScriptItem;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.IHandlerService;
-
-/**
- * @author Roberto E. Escobar
- */
-public class TestRunView extends GenericViewPart implements IDataChangedListener {
- public static final String VIEW_ID = TestRunView.class.getName();
- private static final String BEGIN_MESSAGE =
- "To begin, drag and drop a test run artifact from artifact explorer or from an artifact search result window. Alternatively, you can drag and drop a test outfile onto this view.";
-
- private Action expandAction, collapseAction, refreshAction;
- private static TestRunXViewer viewer = null;
- @SuppressWarnings("unused")
- private IHandlerService handlerService;
- private ShowOnlyLatestRuns latestRunFilter;
- private boolean isFilterOn;
-
- // private static final String FLAT_KEY = "flat";
-
- @Override
- public void createPartControl(Composite parent) {
-
- parent.setLayout(new GridLayout());
-
- PlatformUI.getWorkbench().getService(IHandlerService.class);
- handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
-
- viewer = new TestRunXViewer(parent);
- Tree tree = viewer.getTree();
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData.minimumHeight = 350;
- tree.setLayoutData(gridData);
- tree.setHeaderVisible(true);
- tree.setLinesVisible(true);
- tree.setFont(parent.getFont());
-
- parent.layout();
- createActions();
- createMenus();
- createToolbar();
-
- latestRunFilter = new ShowOnlyLatestRuns();
- isFilterOn = false;
- viewer.registerListener(this);
- viewer.getTree().addKeyListener(new KeyAdapter() {
-
- @Override
- public void keyPressed(KeyEvent event) {
- if (event.stateMask == SWT.CTRL && (event.keyCode == 'A' || event.keyCode == 'a')) {
- Object object = event.getSource();
- if (object instanceof Tree) {
- Tree tree = (Tree) object;
- tree.selectAll();
- }
- }
- }
- });
- onDataChanged();
-
- HelpUtil.setHelp(parent, OseeHelpContext.TEST_RUN_VIEW);
- HelpUtil.setHelp(viewer.getTree(), OseeHelpContext.TEST_RUN_VIEW);
-
- setFocusWidget(viewer.getControl());
- }
-
- protected void createActions() {
- expandAction = new Action("Expand All") {
-
- @Override
- public void run() {
- viewer.getTree().setRedraw(false);
- viewer.expandAll();
- viewer.getTree().setRedraw(true);
- }
- };
- expandAction.setImageDescriptor(ImageManager.getImageDescriptor(OteDefineImage.EXPAND_STATE));
- expandAction.setToolTipText("Expand All");
-
- collapseAction = new Action("Collapse All") {
-
- @Override
- public void run() {
- viewer.getTree().setRedraw(false);
- viewer.collapseAll();
- viewer.getTree().setRedraw(true);
- }
- };
- collapseAction.setImageDescriptor(ImageManager.getImageDescriptor(OteDefineImage.COLLAPSE_STATE));
- collapseAction.setToolTipText("Collapse All");
-
- refreshAction = new Action("Refresh") {
-
- @Override
- public void run() {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- viewer.refresh();
- };
- });
- }
- };
- refreshAction.setToolTipText("Refresh Table");
- refreshAction.setImageDescriptor(ImageManager.getImageDescriptor(PluginUiImage.REFRESH));
-
- }
-
- private void createMenus() {
- MenuManager menuManager = new MenuManager();
- getSite().registerContextMenu(VIEW_ID, menuManager, viewer);
- menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- menuManager.setParent(getViewSite().getActionBars().getMenuManager());
- fillMenu(menuManager);
- getSite().setSelectionProvider(viewer);
- }
-
- private void fillMenu(IMenuManager menuManager) {
- menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
-
- private void createToolbar() {
- IToolBarManager toolbarManager = getViewSite().getActionBars().getToolBarManager();
- toolbarManager.add(refreshAction);
- toolbarManager.add(expandAction);
- toolbarManager.add(collapseAction);
- }
-
- public void setDescription(final String message) {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- setContentDescription(message);
- }
- });
- }
-
- @Override
- public void onDataChanged() {
- String message = BEGIN_MESSAGE;
- Object object = viewer.getInput();
- if (object != null && object instanceof Collection<?>) {
- if (!((Collection<?>) object).isEmpty()) {
- message = "";
- }
- }
- setDescription(message);
- }
-
- public static StructuredViewer getViewer() {
- return viewer;
- }
-
- public void presentGroupedByBranch() {
- BranchItem.setGroupModeEnabled(true);
- viewer.refresh();
- }
-
- public void presentGroupedByScript() {
- BranchItem.setGroupModeEnabled(false);
- viewer.refresh();
- }
-
- public void presentWithShortNames() {
- ScriptItem.setFullDescriptionModeEnabled(false);
- ArtifactItem.setFullDescriptionModeEnabled(false);
- viewer.refresh();
- }
-
- public void presentWithLongNames() {
- ScriptItem.setFullDescriptionModeEnabled(true);
- ArtifactItem.setFullDescriptionModeEnabled(true);
- viewer.refresh();
- }
-
- public void toggleFilter() {
- latestRunFilter.clear();
- if (isFilterOn != true) {
- isFilterOn = true;
- viewer.addFilter(latestRunFilter);
- } else {
- isFilterOn = false;
- viewer.removeFilter(latestRunFilter);
- }
- viewer.refresh();
- }
-
- private final class ShowOnlyLatestRuns extends ViewerFilter {
- private final Map<String, ArtifactItem> latestMap = new HashMap<>();
-
- @Override
- public Object[] filter(Viewer viewer, Object parent, Object[] elements) {
- return super.filter(viewer, parent, elements);
- }
-
- @Override
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- boolean toReturn = false;
- if (element instanceof ArtifactItem) {
- ArtifactItem item1 = (ArtifactItem) element;
- String name = item1.getOperator().getDescriptiveName();
-
- ArtifactItem item2 = latestMap.get(name);
- if (item2 == null) {
- latestMap.put(name, item1);
- toReturn = true;
- } else {
- try {
- Date date1 = item1.getOperator().getEndDate();
- Date date2 = item2.getOperator().getEndDate();
- if (date1.after(date2) || date1.equals(date2)) {
- latestMap.put(name, item1);
- toReturn = true;
- }
- } catch (Exception ex) {
- OseeLog.log(OteUiDefinePlugin.class, Level.WARNING, "Error comparing run dates.", ex);
- }
- }
- } else {
- toReturn = true;
- }
- return toReturn;
- }
-
- public void clear() {
- latestMap.clear();
- }
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunViewNavigateItem.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunViewNavigateItem.java
deleted file mode 100644
index 9e8ee77..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunViewNavigateItem.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.views;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.jface.action.Action;
-import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
-import org.eclipse.osee.framework.ui.plugin.util.ViewPartUtil;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.IXNavigateContainer;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
-import org.eclipse.osee.ote.ui.define.OteDefineImage;
-
-/**
- * @author Roberto E. Escobar
- */
-public class TestRunViewNavigateItem implements IXNavigateContainer {
-
- public TestRunViewNavigateItem() {
- super();
- }
-
- @Override
- public List<XNavigateItem> getNavigateItems() {
- List<XNavigateItem> items = new ArrayList<>();
-
- XNavigateItem msgItem = new XNavigateItem(null, "Test Analysis", PluginUiImage.FOLDER);
- new XNavigateItemAction(msgItem, new OpenTestRunView(), OteDefineImage.TEST_RUN_VIEW, false);
- items.add(msgItem);
-
- return items;
- }
-
- private final class OpenTestRunView extends Action {
-
- public OpenTestRunView() {
- super("Open Test Run View");
- }
-
- @Override
- public void run() {
- ViewPartUtil.openOrShowView(TestRunView.class.getName());
- }
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/FlatPresentationHandler.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/FlatPresentationHandler.java
deleted file mode 100644
index 44b3917..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/FlatPresentationHandler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.views.handlers;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.osee.ote.ui.define.views.TestRunView;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class FlatPresentationHandler extends AbstractHandler {
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- ((TestRunView) HandlerUtil.getActivePartChecked(event)).presentGroupedByScript();
- return null;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/GroupedPresentationHandler.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/GroupedPresentationHandler.java
deleted file mode 100644
index 2cca0dc..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/GroupedPresentationHandler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.views.handlers;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.osee.ote.ui.define.views.TestRunView;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class GroupedPresentationHandler extends AbstractHandler {
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- ((TestRunView) HandlerUtil.getActivePartChecked(event)).presentGroupedByBranch();
- return null;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/LongNamesPresentationHandler.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/LongNamesPresentationHandler.java
deleted file mode 100644
index ad3a08f..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/LongNamesPresentationHandler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.views.handlers;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.osee.ote.ui.define.views.TestRunView;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class LongNamesPresentationHandler extends AbstractHandler {
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- ((TestRunView) HandlerUtil.getActivePartChecked(event)).presentWithLongNames();
- return null;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/ShortNamesPresentationHandler.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/ShortNamesPresentationHandler.java
deleted file mode 100644
index aea6022..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/ShortNamesPresentationHandler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.views.handlers;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.osee.ote.ui.define.views.TestRunView;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-public class ShortNamesPresentationHandler extends AbstractHandler {
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- ((TestRunView) HandlerUtil.getActivePartChecked(event)).presentWithShortNames();
- return null;
- }
-}
diff --git a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/ToggleFilterHandler.java b/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/ToggleFilterHandler.java
deleted file mode 100644
index 9a6554f..0000000
--- a/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/handlers/ToggleFilterHandler.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.ote.ui.define.views.handlers;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.osee.ote.ui.define.views.TestRunView;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * @author Roberto E. Escobar
- */
-public class ToggleFilterHandler extends AbstractHandler {
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- ((TestRunView) HandlerUtil.getActivePartChecked(event)).toggleFilter();
- return null;
- }
-
- @Override
- public boolean isEnabled() {
- return true;
- }
-
-}
diff --git a/org.eclipse.osee.ote.ui.define/templates/HtmlActiveTableTemplate b/org.eclipse.osee.ote.ui.define/templates/HtmlActiveTableTemplate
deleted file mode 100644
index 7cb602a..0000000
--- a/org.eclipse.osee.ote.ui.define/templates/HtmlActiveTableTemplate
+++ /dev/null
@@ -1,43 +0,0 @@
-<link rel="stylesheet" type="text/css" href="resources/css/ext-all.css" />
-<script type="text/javascript" src="adapter/ext/ext-base.js"></script>
-
-<script type="text/javascript" src="ext-all.js"></script>
-<link rel="stylesheet" type="text/css" href="examples/grid/grid-examples.css" />
-<link rel="stylesheet" type="text/css" href="examples/examples.css" />
-<link rel="stylesheet" type="text/css" href="examples/lib.css" />
-<script type="text/javascript">
- Ext.onReady(function(){
- Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
-
- var myData = [##TABLE_DATA##];
-
- ##CUSTOM_FUNCTIONS##
-
- // create the data store
- var store = new Ext.data.SimpleStore({
- fields: [##COLUMN_DATA##]
- });
- store.loadData(myData);
-
- // create the Grid
- var grid = new Ext.grid.GridPanel({
- store: store,
- columns: [ ##COLUMN_CUSTOMIZATIONS_DATA##],
- stripeRows: true,
- viewConfig: {
- autoFill: true
- },
- sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
- ##HEIGHT##,
- ##WIDTH##,
- autoSizeColumns: true,
- ##AUTO_EXPAND_COLUMN##,
- renderTo: '##ELEMENT_NAME##',
- title:'##TABLE_TITLE##'
- });
- grid
- grid.getSelectionModel().selectFirstRow();
-});
-</script>
-
-