Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2009-08-13 16:07:46 +0000
committerddunne2009-08-13 16:07:46 +0000
commitfd0bcd013639d5c249d4f5d53fe98372918ec1fd (patch)
treeb080a8311e84479de106e430897ba6b3b65a1fcc
parent6184b86ff02cce70f22a52766846bb7a327148d9 (diff)
downloadorg.eclipse.osee-fd0bcd013639d5c249d4f5d53fe98372918ec1fd.tar.gz
org.eclipse.osee-fd0bcd013639d5c249d4f5d53fe98372918ec1fd.tar.xz
org.eclipse.osee-fd0bcd013639d5c249d4f5d53fe98372918ec1fd.zip
-rw-r--r--org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java20
-rw-r--r--org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java21
-rw-r--r--org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java5
-rw-r--r--org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java12
-rw-r--r--org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/UiToTestBlam.java7
-rw-r--r--org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/ConstraintElement.java3
-rw-r--r--org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/MysqlSqlManager.java2
-rw-r--r--org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/OracleSqlManager.java3
-rw-r--r--org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/PostgreSqlManager.java2
-rw-r--r--org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/ReferenceClause.java3
-rw-r--r--org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/SqlManagerImpl.java3
-rw-r--r--org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Collections.java7
-rw-r--r--org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/OseeProperties.java3
-rw-r--r--org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java39
-rw-r--r--org.eclipse.osee.framework.ui.service.control/src/org/eclipse/osee/framework/ui/service/control/wizards/launcher/data/ExecutionCommandFormatter.java8
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java62
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactLabelProvider.java3
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/FrameworkArtifactImageProvider.java2
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ImageManager.java18
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SkynetGuiPlugin.java3
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactSaveNotificationHandler.java75
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/RemoteArtifactSearch.java5
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/filteredTree/MinMaxOSEECheckedFilteredTreeDialog.java11
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/filteredTree/OSEECheckedFilteredTreeDialog.java2
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlinkLabelCmdValueSelection.java24
-rw-r--r--org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlinkLabelValueSelection.java10
-rw-r--r--org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/ImportOutfileOperation.java3
27 files changed, 258 insertions, 98 deletions
diff --git a/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java b/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java
index a369e81156d..b8e405dd52f 100644
--- a/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java
+++ b/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.ats;
-import java.util.logging.Level;
import org.eclipse.osee.ats.artifact.DecisionReviewArtifact;
import org.eclipse.osee.ats.artifact.PeerToPeerReviewArtifact;
import org.eclipse.osee.ats.artifact.StateMachineArtifact;
@@ -18,11 +17,8 @@ import org.eclipse.osee.ats.artifact.TaskArtifact;
import org.eclipse.osee.ats.artifact.TeamWorkflowExtensions;
import org.eclipse.osee.ats.artifact.VersionArtifact;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.exception.OseeTypeDoesNotExist;
-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.skynet.core.artifact.ArtifactTypeManager;
import org.eclipse.osee.framework.ui.plugin.util.OverlayImage.Location;
import org.eclipse.osee.framework.ui.skynet.ArtifactImageProvider;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
@@ -45,18 +41,12 @@ public class AtsArtifactImageProvider extends ArtifactImageProvider {
ImageManager.registerBaseImage("Goal", AtsImage.GOAL);
ImageManager.registerBaseImage("PeerToPeer Review", AtsImage.REVIEW);
- ImageManager.registerOverrideImageProvider(this, ArtifactTypeManager.getType(VersionArtifact.ARTIFACT_NAME));
- ImageManager.registerOverrideImageProvider(this, ArtifactTypeManager.getType(TaskArtifact.ARTIFACT_NAME));
- ImageManager.registerOverrideImageProvider(this,
- ArtifactTypeManager.getType(PeerToPeerReviewArtifact.ARTIFACT_NAME));
- ImageManager.registerOverrideImageProvider(this,
- ArtifactTypeManager.getType(DecisionReviewArtifact.ARTIFACT_NAME));
+ ImageManager.registerOverrideImageProvider(this, VersionArtifact.ARTIFACT_NAME);
+ ImageManager.registerOverrideImageProvider(this, TaskArtifact.ARTIFACT_NAME);
+ ImageManager.registerOverrideImageProvider(this, PeerToPeerReviewArtifact.ARTIFACT_NAME);
+ ImageManager.registerOverrideImageProvider(this, DecisionReviewArtifact.ARTIFACT_NAME);
for (String artName : TeamWorkflowExtensions.getInstance().getAllTeamWorkflowArtifactNames()) {
- try {
- ImageManager.registerOverrideImageProvider(this, ArtifactTypeManager.getType(artName));
- } catch (OseeTypeDoesNotExist ex) {
- OseeLog.log(AtsPlugin.class, Level.INFO, ex);
- }
+ ImageManager.registerOverrideImageProvider(this, artName);
}
}
diff --git a/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java b/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java
index 9a77731ac71..3f0561ca113 100644
--- a/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java
+++ b/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java
@@ -112,12 +112,9 @@ public class TaskEditor extends AbstractArtifactEditor implements IDirtiableEdit
@Override
public void dispose() {
for (TaskArtifact taskArt : tasks)
- if (taskArt != null && !taskArt.isDeleted() && taskArt.isSMAEditorDirty().isTrue())
- taskArt.revertSMA();
- if (taskActionPage.getTaskComposite() != null)
- taskActionPage.getTaskComposite().dispose();
- if (metricsComposite != null)
- metricsComposite.disposeComposite();
+ if (taskArt != null && !taskArt.isDeleted() && taskArt.isSMAEditorDirty().isTrue()) taskArt.revertSMA();
+ if (taskActionPage.getTaskComposite() != null) taskActionPage.getTaskComposite().dispose();
+ if (metricsComposite != null) metricsComposite.disposeComposite();
super.dispose();
}
@@ -127,8 +124,7 @@ public class TaskEditor extends AbstractArtifactEditor implements IDirtiableEdit
for (TaskArtifact taskArt : tasks) {
if (taskArt.isDeleted())
continue;
- else if (taskArt.isSMAEditorDirty().isTrue())
- return true;
+ else if (taskArt.isSMAEditorDirty().isTrue()) return true;
}
return false;
}
@@ -299,8 +295,10 @@ public class TaskEditor extends AbstractArtifactEditor implements IDirtiableEdit
@Override
public VersionArtifact getMetricsVersionArtifact() throws OseeCoreException {
- if (tasks.size() > 0) {
- return tasks.iterator().next().getWorldViewTargetedVersion();
+ for (TaskArtifact taskArt : tasks) {
+ if (taskArt.getWorldViewTargetedVersion() != null) {
+ return taskArt.getWorldViewTargetedVersion();
+ }
}
return null;
}
@@ -345,8 +343,7 @@ public class TaskEditor extends AbstractArtifactEditor implements IDirtiableEdit
@Override
public double getManHoursPerDayPreference() throws OseeCoreException {
- if (tasks.size() == 0)
- return StateMachineArtifact.DEFAULT_MAN_HOURS_PER_DAY;
+ if (tasks.size() == 0) return StateMachineArtifact.DEFAULT_MAN_HOURS_PER_DAY;
return tasks.iterator().next().getManHrsPerDayPreference();
}
}
diff --git a/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java b/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java
index 2196e9aa1ff..d357da058c9 100644
--- a/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java
+++ b/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java
@@ -232,7 +232,7 @@ public class AtsMetricsComposite extends ScrolledComposite {
0,
iAtsMetricsProvider.getMetricsVersionArtifact() == null ? "Not Set" : iAtsMetricsProvider.getMetricsVersionArtifact().getName()));
lines.add(new XBarGraphLine(
- "Version Estimated Release Date",
+ "Targeted Version - Estimated Release Date",
0,
iAtsMetricsProvider.getMetricsVersionArtifact() == null ? "Not Set" : iAtsMetricsProvider.getMetricsVersionArtifact().getSoleAttributeValueAsString(
ATSAttributes.ESTIMATED_RELEASE_DATE_ATTRIBUTE.getStoreName(), "Not Set")));
@@ -385,8 +385,7 @@ public class AtsMetricsComposite extends ScrolledComposite {
}
public void adapt(Control control) {
- if (control == null)
- return;
+ if (control == null) return;
control.setBackground(BACKGROUND_COLOR);
control.setForeground(FOREGROUND_COLOR);
}
diff --git a/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java b/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java
index ddc693a908c..7a054d242dd 100644
--- a/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java
+++ b/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java
@@ -16,6 +16,7 @@ import java.util.List;
import java.util.logging.Level;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osee.ats.AtsPlugin;
+import org.eclipse.osee.ats.artifact.StateMachineArtifact;
import org.eclipse.osee.ats.artifact.VersionArtifact;
import org.eclipse.osee.ats.util.AtsUtil;
import org.eclipse.osee.ats.world.search.WorldSearchItem.SearchType;
@@ -214,7 +215,16 @@ public class WorldEditor extends AbstractArtifactEditor implements IWorldEditor,
@Override
public VersionArtifact getMetricsVersionArtifact() throws OseeCoreException {
- return getWorldEditorProvider().getTargetedVersionArtifact();
+ VersionArtifact verArt = getWorldEditorProvider().getTargetedVersionArtifact();
+ if (verArt != null) return verArt;
+ for (Artifact artifact : getLoadedArtifacts()) {
+ if (artifact instanceof StateMachineArtifact) {
+ if (((StateMachineArtifact) artifact).getWorldViewTargetedVersion() != null) {
+ return ((StateMachineArtifact) artifact).getWorldViewTargetedVersion();
+ }
+ }
+ }
+ return null;
}
public WorldComposite getWorldComposite() {
diff --git a/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/UiToTestBlam.java b/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/UiToTestBlam.java
index 1ecfb0034e3..8275fc7c54d 100644
--- a/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/UiToTestBlam.java
+++ b/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/UiToTestBlam.java
@@ -20,7 +20,6 @@ import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import org.apache.commons.lang.StringUtils;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.resources.IFile;
@@ -204,9 +203,9 @@ public class UiToTestBlam extends AbstractBlam {
List<String> verified = getTrace(testUnit, CoreRelationEnumeration.Verification__Requirement);
List<String> used = getTrace(testUnit, CoreRelationEnumeration.Uses__Requirement);
List<String> validates = getTrace(testUnit, CoreRelationEnumeration.Validation__Requirement);
- String verifyStr = StringUtils.join(verified, ",");
- String usesStr = StringUtils.join(used, ",");
- String validatesStr = StringUtils.join(validates, ",");
+ String verifyStr = org.eclipse.osee.framework.jdk.core.util.Collections.toString(verified, ",");
+ String usesStr = org.eclipse.osee.framework.jdk.core.util.Collections.toString(used, ",");
+ String validatesStr = org.eclipse.osee.framework.jdk.core.util.Collections.toString(validates, ",");
addRow(appendable, asArray(uiTitle, uiType, testType, testUnitName, testUnitType, verifyStr, validatesStr,
usesStr));
diff --git a/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/ConstraintElement.java b/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/ConstraintElement.java
index 586d4aa2b96..e280024d865 100644
--- a/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/ConstraintElement.java
+++ b/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/ConstraintElement.java
@@ -13,7 +13,6 @@ package org.eclipse.osee.framework.database.init;
import java.util.ArrayList;
import java.util.List;
-import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.eclipse.osee.framework.database.init.TableElement.TableSections;
@@ -96,7 +95,7 @@ public class ConstraintElement implements Xmlizable {
}
public String getCommaSeparatedColumnsList() {
- return StringUtils.join(columns, ",");
+ return org.eclipse.osee.framework.jdk.core.util.Collections.toString(columns, ",");
}
@Override
diff --git a/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/MysqlSqlManager.java b/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/MysqlSqlManager.java
index bda1e6e456f..562ed7c3c8d 100644
--- a/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/MysqlSqlManager.java
+++ b/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/MysqlSqlManager.java
@@ -44,7 +44,7 @@ public class MysqlSqlManager extends SqlManagerImpl {
Map<ColumnFields, String> column = columns.get(key).getColumnFields();
lines.add(columnDataToSQL(column));
}
- String toExecute = StringUtils.join(lines, ",\n");
+ String toExecute = org.eclipse.osee.framework.jdk.core.util.Collections.toString(lines, ",\n");
return toExecute;
}
diff --git a/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/OracleSqlManager.java b/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/OracleSqlManager.java
index 1133420b521..7bc2a0cd9bd 100644
--- a/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/OracleSqlManager.java
+++ b/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/OracleSqlManager.java
@@ -15,7 +15,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
-import org.apache.commons.lang.StringUtils;
import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.database.core.ConnectionHandler;
import org.eclipse.osee.framework.database.init.TableElement.ColumnFields;
@@ -38,7 +37,7 @@ public class OracleSqlManager extends SqlManager {
Map<ColumnFields, String> column = columns.get(key).getColumnFields();
lines.add(columnDataToSQL(column));
}
- String toExecute = StringUtils.join(lines, ",\n");
+ String toExecute = org.eclipse.osee.framework.jdk.core.util.Collections.toString(lines, ",\n");
return toExecute;
}
diff --git a/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/PostgreSqlManager.java b/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/PostgreSqlManager.java
index 7e621d5ccac..6ee165a821c 100644
--- a/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/PostgreSqlManager.java
+++ b/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/PostgreSqlManager.java
@@ -43,7 +43,7 @@ public class PostgreSqlManager extends SqlManagerImpl {
Map<ColumnFields, String> column = columns.get(key).getColumnFields();
lines.add(columnDataToSQL(column));
}
- String toExecute = StringUtils.join(lines, ",\n");
+ String toExecute = org.eclipse.osee.framework.jdk.core.util.Collections.toString(lines, ",\n");
return toExecute;
}
diff --git a/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/ReferenceClause.java b/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/ReferenceClause.java
index 63750f0917f..3bd1a31eb98 100644
--- a/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/ReferenceClause.java
+++ b/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/ReferenceClause.java
@@ -13,7 +13,6 @@ package org.eclipse.osee.framework.database.init;
import java.util.ArrayList;
import java.util.List;
-import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.eclipse.osee.framework.jdk.core.persistence.Xmlizable;
@@ -103,7 +102,7 @@ public class ReferenceClause implements Xmlizable {
}
public String getCommaSeparatedColumnsList() {
- return StringUtils.join(columns, ",");
+ return org.eclipse.osee.framework.jdk.core.util.Collections.toString(columns, ",");
}
@Override
diff --git a/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/SqlManagerImpl.java b/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/SqlManagerImpl.java
index 6392714bec4..a3808c55dde 100644
--- a/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/SqlManagerImpl.java
+++ b/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/SqlManagerImpl.java
@@ -15,7 +15,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
-import org.apache.commons.lang.StringUtils;
import org.eclipse.osee.framework.core.exception.OseeDataStoreException;
import org.eclipse.osee.framework.database.core.ConnectionHandler;
import org.eclipse.osee.framework.database.init.TableElement.ColumnFields;
@@ -38,7 +37,7 @@ public class SqlManagerImpl extends SqlManager {
Map<ColumnFields, String> column = columns.get(key).getColumnFields();
lines.add(columnDataToSQL(column));
}
- String toExecute = StringUtils.join(lines, ",\n");
+ String toExecute = org.eclipse.osee.framework.jdk.core.util.Collections.toString(lines, ",\n");
return toExecute;
}
diff --git a/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Collections.java b/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Collections.java
index beea59bc4e5..73f9c17f12b 100644
--- a/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Collections.java
+++ b/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Collections.java
@@ -64,11 +64,14 @@ public class Collections {
return toString(objectsCol, null, separator, null);
}
- @SuppressWarnings("unchecked")
- public static String toString(String separator, Collection c) {
+ public static String toString(String separator, Collection<?> c) {
return toString(c, null, separator, null);
}
+ public static String toString(Collection<?> c, String separator) {
+ return toString(separator, c);
+ }
+
/**
* The resultant set is those elements in superSet which are not in the subSet
*
diff --git a/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/OseeProperties.java b/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/OseeProperties.java
index 154fc0c9153..35abd5edb63 100644
--- a/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/OseeProperties.java
+++ b/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/OseeProperties.java
@@ -16,7 +16,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
-import org.apache.commons.lang.StringUtils;
import org.eclipse.osee.framework.jdk.core.type.Pair;
/**
@@ -151,6 +150,6 @@ public class OseeProperties {
List<String> list = new ArrayList<String>();
toStringHelper(list, getClass());
Collections.sort(list);
- return StringUtils.join(list, "\n");
+ return org.eclipse.osee.framework.jdk.core.util.Collections.toString("\n", list);
}
}
diff --git a/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java b/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java
index 4027c2e1003..dc9bca62f6b 100644
--- a/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java
+++ b/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java
@@ -13,9 +13,11 @@ package org.eclipse.osee.framework.skynet.core.artifact;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
+import java.util.Map.Entry;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.CompositeKeyHashMap;
import org.eclipse.osee.framework.jdk.core.type.HashCollection;
+import org.eclipse.osee.framework.jdk.core.type.Pair;
/**
* @author Ryan D. Brooks
@@ -44,6 +46,31 @@ public class ArtifactCache {
private ArtifactCache() {
}
+ public static Collection<Artifact> getDirtyArtifacts() throws OseeCoreException {
+ Set<Artifact> dirtyArts = new HashSet<Artifact>();
+ for (Artifact art : instance.staticIdArtifactCache.getValues()) {
+ if (art.isDirty()) {
+ dirtyArts.add(art);
+ }
+ }
+ for (Entry<Pair<Integer, Integer>, Artifact> entry : instance.artifactIdCache.entrySet()) {
+ if (entry.getValue().isDirty()) {
+ dirtyArts.add(entry.getValue());
+ }
+ }
+ for (Entry<Pair<String, Integer>, Artifact> entry : instance.artifactGuidCache.entrySet()) {
+ if (entry.getValue().isDirty()) {
+ dirtyArts.add(entry.getValue());
+ }
+ }
+ for (Entry<Pair<String, Branch>, Artifact> entry : instance.keyedArtifactCache.entrySet()) {
+ if (entry.getValue().isDirty()) {
+ dirtyArts.add(entry.getValue());
+ }
+ }
+ return dirtyArts;
+ }
+
/**
* Cache the artifact so that we can avoid creating duplicate instances of an artifact
*
@@ -98,11 +125,9 @@ public class ArtifactCache {
public synchronized static Collection<Artifact> getArtifactsByStaticId(String staticId) {
Set<Artifact> artifacts = new HashSet<Artifact>();
Collection<Artifact> cachedArts = instance.staticIdArtifactCache.getValues(staticId);
- if (cachedArts == null)
- return artifacts;
+ if (cachedArts == null) return artifacts;
for (Artifact artifact : cachedArts) {
- if (!artifact.isDeleted())
- artifacts.add(artifact);
+ if (!artifact.isDeleted()) artifacts.add(artifact);
}
return artifacts;
}
@@ -110,11 +135,9 @@ public class ArtifactCache {
public synchronized static Collection<Artifact> getArtifactsByStaticId(String staticId, Branch branch) {
Set<Artifact> artifacts = new HashSet<Artifact>();
Collection<Artifact> cachedArts = instance.staticIdArtifactCache.getValues(staticId);
- if (cachedArts == null)
- return artifacts;
+ if (cachedArts == null) return artifacts;
for (Artifact artifact : cachedArts) {
- if (!artifact.isDeleted() && artifact.getBranch().equals(branch))
- artifacts.add(artifact);
+ if (!artifact.isDeleted() && artifact.getBranch().equals(branch)) artifacts.add(artifact);
}
return artifacts;
}
diff --git a/org.eclipse.osee.framework.ui.service.control/src/org/eclipse/osee/framework/ui/service/control/wizards/launcher/data/ExecutionCommandFormatter.java b/org.eclipse.osee.framework.ui.service.control/src/org/eclipse/osee/framework/ui/service/control/wizards/launcher/data/ExecutionCommandFormatter.java
index f9478cefd04..09eccc86f29 100644
--- a/org.eclipse.osee.framework.ui.service.control/src/org/eclipse/osee/framework/ui/service/control/wizards/launcher/data/ExecutionCommandFormatter.java
+++ b/org.eclipse.osee.framework.ui.service.control/src/org/eclipse/osee/framework/ui/service/control/wizards/launcher/data/ExecutionCommandFormatter.java
@@ -12,7 +12,6 @@ package org.eclipse.osee.framework.ui.service.control.wizards.launcher.data;
import java.util.ArrayList;
import java.util.List;
-import org.apache.commons.lang.StringUtils;
/**
* @author Roberto E. Escobar
@@ -38,7 +37,8 @@ abstract class ExecutionCommandFormatter {
String applicationArgsString = "";
if (applicationArgs.size() > 0) {
applicationArgsString =
- ServiceItem.EXEC_SEPARATOR + StringUtils.join(applicationArgs, ServiceItem.EXEC_SEPARATOR);
+ ServiceItem.EXEC_SEPARATOR + org.eclipse.osee.framework.jdk.core.util.Collections.toString(
+ applicationArgs, ServiceItem.EXEC_SEPARATOR);
}
return applicationArgsString;
}
@@ -46,7 +46,9 @@ abstract class ExecutionCommandFormatter {
public String getJvmArgsString() {
String jvmArgsString = "";
if (jvmArgs.size() > 0) {
- jvmArgsString = ServiceItem.EXEC_SEPARATOR + StringUtils.join(jvmArgs, ServiceItem.EXEC_SEPARATOR);
+ jvmArgsString =
+ ServiceItem.EXEC_SEPARATOR + org.eclipse.osee.framework.jdk.core.util.Collections.toString(jvmArgs,
+ ServiceItem.EXEC_SEPARATOR);
}
return jvmArgsString;
}
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java
index 23510b4d765..e0a35a0b7cb 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java
@@ -28,6 +28,7 @@ public class ArtifactDecorator {
private Action showArtIds;
private Action showArtType;
private Action showArtVersion;
+ private Action showArtBranch;
private ShowAttributeAction attributesAction;
private StructuredViewer viewer;
private final String preferenceKey;
@@ -61,6 +62,17 @@ public class ArtifactDecorator {
};
showArtType.setImageDescriptor(ImageManager.getImageDescriptor(FrameworkImage.FILTERS));
}
+ if (showArtBranch == null) {
+ showArtBranch = new Action("Show Artifact Branch") {
+ @Override
+ public void run() {
+ setChecked(!isChecked());
+ updateShowArtBranchText();
+ viewer.refresh();
+ }
+ };
+ showArtBranch.setImageDescriptor(ImageManager.getImageDescriptor(FrameworkImage.FILTERS));
+ }
if (showArtVersion == null) {
showArtVersion = new Action("Show Artifact Version") {
@Override
@@ -73,7 +85,7 @@ public class ArtifactDecorator {
showArtVersion.setImageDescriptor(ImageManager.getImageDescriptor(FrameworkImage.FILTERS));
}
- if (attributesAction == null) {
+ if (attributesAction == null && branchProvider != null) {
attributesAction = new ShowAttributeAction(branchProvider, viewer, preferenceKey);
}
@@ -106,16 +118,24 @@ public class ArtifactDecorator {
public void addActions(IMenuManager manager, IBranchProvider provider) {
checkActionsCreated(provider);
- manager.add(showArtVersion);
- manager.add(showArtType);
+ if (manager != null) {
+ manager.add(showArtVersion);
+ manager.add(showArtType);
+ manager.add(showArtBranch);
+ }
updateShowArtTypeText();
updateShowArtVersionText();
+ updateShowArtBranchText();
if (showArtIds != null && isAdmin()) {
- manager.add(showArtIds);
+ if (manager != null) {
+ manager.add(showArtIds);
+ }
updateShowArtIdText();
}
- manager.add(attributesAction);
+ if (manager != null) {
+ manager.add(attributesAction);
+ }
}
private void updateShowArtIdText() {
@@ -126,6 +146,10 @@ public class ArtifactDecorator {
showArtType.setText((showArtType.isChecked() ? "Hide" : "Show") + " Artifact Type");
}
+ private void updateShowArtBranchText() {
+ showArtBranch.setText((showArtBranch.isChecked() ? "Hide" : "Show") + " Artifact Branch");
+ }
+
private void updateShowArtVersionText() {
showArtVersion.setText((showArtVersion.isChecked() ? "Hide" : "Show") + " Artifact Version");
}
@@ -142,7 +166,35 @@ public class ArtifactDecorator {
return showArtType != null && showArtType.isChecked();
}
+ public boolean showArtBranch() {
+ return showArtBranch != null && showArtBranch.isChecked();
+ }
+
public boolean showArtVersion() {
return showArtVersion != null && showArtVersion.isChecked();
}
+
+ public void setShowArtType(boolean set) {
+ if (showArtType != null) {
+ showArtType.setChecked(set);
+ }
+ }
+
+ public void setShowArtBranch(boolean set) {
+ if (showArtBranch != null) {
+ showArtBranch.setChecked(set);
+ }
+ }
+
+ public void setShowArtIds(boolean set) {
+ if (showArtIds != null) {
+ showArtIds.setChecked(set);
+ }
+ }
+
+ public void setShowArtVersion(boolean set) {
+ if (showArtVersion != null) {
+ showArtVersion.setChecked(set);
+ }
+ }
}
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactLabelProvider.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactLabelProvider.java
index f8c1ad022b6..4f06ad209ab 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactLabelProvider.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactLabelProvider.java
@@ -71,6 +71,9 @@ public class ArtifactLabelProvider extends LabelProvider { //StyledCellLabelProv
if (artifactDecorator.showArtType()) {
name += " <" + artifact.getArtifactTypeName() + "> ";
}
+ if (artifactDecorator.showArtBranch()) {
+ name += " [" + artifact.getBranch() + "] ";
+ }
name += artifactDecorator.getSelectedAttributeData(artifact);
} catch (Exception ex) {
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/FrameworkArtifactImageProvider.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/FrameworkArtifactImageProvider.java
index fe13c354b93..a8b3c41dc26 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/FrameworkArtifactImageProvider.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/FrameworkArtifactImageProvider.java
@@ -32,7 +32,7 @@ public class FrameworkArtifactImageProvider extends ArtifactImageProvider {
ImageManager.registerBaseImage("Work Widget Definition", FrameworkImage.WIDGET);
ImageManager.registerBaseImage("Universal Group", FrameworkImage.GROUP);
- ImageManager.registerOverrideImageProvider(this, ArtifactTypeManager.getType("User"));
+ ImageManager.registerOverrideImageProvider(this, "User");
}
@Override
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ImageManager.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ImageManager.java
index be8f5529602..2c3a88ac157 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ImageManager.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ImageManager.java
@@ -59,8 +59,8 @@ public class ImageManager {
private static final String SELECT_ARTIFACT_TYPES_IMAGE_QUERY =
"SELECT art_type_id, image FROM osee_artifact_type where image is not null";
private static final ImageManager instance = new ImageManager();
- private final Map<ArtifactType, ArtifactImageProvider> providersOverrideImageMap =
- Collections.synchronizedMap(new HashMap<ArtifactType, ArtifactImageProvider>());
+ private final Map<String, ArtifactImageProvider> providersOverrideImageMap =
+ Collections.synchronizedMap(new HashMap<String, ArtifactImageProvider>());
private final Map<String, OseeImage> artifactTypeImageMap =
Collections.synchronizedMap(new HashMap<String, OseeImage>());
private final ImageRegistry imageRegistry = SkynetGuiPlugin.getInstance().getImageRegistry();
@@ -168,7 +168,7 @@ public class ImageManager {
}
// Check if image provider provides override for this image
- ArtifactImageProvider imageProvider = instance.providersOverrideImageMap.get(artifactType);
+ ArtifactImageProvider imageProvider = instance.providersOverrideImageMap.get(artifactType.getName());
if (imageProvider != null) {
String imageKey = imageProvider.setupImage(artifactType);
if (imageKey != null) {
@@ -192,13 +192,8 @@ public class ImageManager {
return setupImageWithOverlay(BaseImage.getBaseImageEnum(artifact), overlay, location);
}
- public static void registerOverrideImageProvider(ArtifactImageProvider imageProvider, ArtifactType artifactType) {
- instance.providersOverrideImageMap.put(artifactType, imageProvider);
- }
-
- public static void registerOverrideImageProvider(ArtifactImageProvider imageProvider, String artifactTypeName) throws OseeDataStoreException, OseeTypeDoesNotExist {
- ArtifactType artifactType = ArtifactTypeManager.getType(artifactTypeName);
- instance.providersOverrideImageMap.put(artifactType, imageProvider);
+ public static void registerOverrideImageProvider(ArtifactImageProvider imageProvider, String artifactTypeName) {
+ instance.providersOverrideImageMap.put(artifactTypeName, imageProvider);
}
public static void registerBaseImage(String artifactTypeName, OseeImage oseeImage) {
@@ -248,7 +243,8 @@ public class ImageManager {
private synchronized String setupImage(Artifact artifact) {
try {
- ArtifactImageProvider imageProvider = instance.providersOverrideImageMap.get(artifact.getArtifactType());
+ ArtifactImageProvider imageProvider =
+ instance.providersOverrideImageMap.get(artifact.getArtifactType().getName());
if (imageProvider != null) {
return imageProvider.setupImage(artifact);
}
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SkynetGuiPlugin.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SkynetGuiPlugin.java
index 90972d36a11..25dcc4c0248 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SkynetGuiPlugin.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SkynetGuiPlugin.java
@@ -23,6 +23,7 @@ import org.eclipse.osee.framework.skynet.core.event.IBroadcastEventListneer;
import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
import org.eclipse.osee.framework.skynet.core.event.Sender;
import org.eclipse.osee.framework.ui.plugin.OseeFormActivator;
+import org.eclipse.osee.framework.ui.skynet.artifact.ArtifactSaveNotificationHandler;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchListener;
@@ -84,6 +85,8 @@ public class SkynetGuiPlugin extends OseeFormActivator implements IBroadcastEven
}
});
}
+ PlatformUI.getWorkbench().addWorkbenchListener(new ArtifactSaveNotificationHandler());
+
}
public static SkynetGuiPlugin getInstance() {
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactSaveNotificationHandler.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactSaveNotificationHandler.java
new file mode 100644
index 00000000000..a6916c2b95f
--- /dev/null
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactSaveNotificationHandler.java
@@ -0,0 +1,75 @@
+/*
+ * Created on Aug 12, 2009
+ *
+ * PLACE_YOUR_DISTRIBUTION_STATEMENT_RIGHT_HERE
+ */
+package org.eclipse.osee.framework.ui.skynet.artifact;
+
+import java.util.Collection;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.type.HashCollection;
+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.ArtifactCache;
+import org.eclipse.osee.framework.skynet.core.artifact.Branch;
+import org.eclipse.osee.framework.skynet.core.utility.Artifacts;
+import org.eclipse.osee.framework.ui.plugin.util.ArrayTreeContentProvider;
+import org.eclipse.osee.framework.ui.skynet.ArtifactDecorator;
+import org.eclipse.osee.framework.ui.skynet.ArtifactLabelProvider;
+import org.eclipse.osee.framework.ui.skynet.ArtifactViewerSorter;
+import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
+import org.eclipse.osee.framework.ui.skynet.util.filteredTree.SimpleCheckFilteredTreeDialog;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchListener;
+
+/**
+ * This handler will find any artifacts in the artifact cache that were dirty and allow user to persist before shutdown.
+ *
+ * @author Donald G. Dunne
+ */
+public class ArtifactSaveNotificationHandler implements IWorkbenchListener {
+
+ @Override
+ public void postShutdown(IWorkbench arg0) {
+ }
+
+ @Override
+ public boolean preShutdown(IWorkbench arg0, boolean arg1) {
+ OseeLog.log(SkynetGuiPlugin.class, OseeLevel.INFO, "Verifying Artifact Persistence");
+ try {
+ Collection<Artifact> dirtyArts = ArtifactCache.getDirtyArtifacts();
+ if (dirtyArts.size() == 0) return true;
+ ArtifactDecorator artDecorator = new ArtifactDecorator("");
+ artDecorator.addActions(null, null);
+ artDecorator.setShowArtBranch(true);
+ artDecorator.setShowArtType(true);
+ SimpleCheckFilteredTreeDialog dialog =
+ new SimpleCheckFilteredTreeDialog(
+ "Unsaved Artifacts Detected",
+ "Some artifacts have not been saved.\n\nSelect any artifact to save (if any) and select Ok or Cancel to stop shutdown.",
+ new ArrayTreeContentProvider(), new ArtifactLabelProvider(artDecorator),
+ new ArtifactViewerSorter(), 0, Integer.MAX_VALUE);
+ dialog.setInput(dirtyArts);
+ if (dialog.open() == 0) {
+ if (dialog.getResult().length == 0) {
+ return true;
+ }
+ HashCollection<Branch, Artifact> branchMap = new HashCollection<Branch, Artifact>();
+ for (Artifact artifact : dirtyArts) {
+ branchMap.put(artifact.getBranch(), artifact);
+ }
+ for (Branch branch : branchMap.keySet()) {
+ OseeLog.log(SkynetGuiPlugin.class, OseeLevel.INFO, String.format(
+ "Persisting [%d] unsaved artifacts for branch [%s]", branchMap.getValues().size(), branch));
+ Artifacts.persistInTransaction(branchMap.getValues(branch));
+ }
+ return true;
+ }
+ } catch (OseeCoreException ex) {
+ OseeLog.log(SkynetGuiPlugin.class, OseeLevel.SEVERE_POPUP, ex);
+ }
+
+ return false;
+ }
+}
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/RemoteArtifactSearch.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/RemoteArtifactSearch.java
index 628bd16ced6..6966c6b9d22 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/RemoteArtifactSearch.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/RemoteArtifactSearch.java
@@ -14,7 +14,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
-import org.apache.commons.lang.StringUtils;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
@@ -84,7 +83,9 @@ final class RemoteArtifactSearch extends AbstractArtifactSearchQuery {
optionsList.add(String.format("Attribute Type Filter:%s", Arrays.deepToString(attributeTypeNames)));
}
- String options = String.format(" - Options:[%s]", StringUtils.join(optionsList, ", "));
+ String options =
+ String.format(" - Options:[%s]", org.eclipse.osee.framework.jdk.core.util.Collections.toString(optionsList,
+ ", "));
return String.format("%s%s", queryString, optionsList.size() > 0 ? options : "");
}
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/filteredTree/MinMaxOSEECheckedFilteredTreeDialog.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/filteredTree/MinMaxOSEECheckedFilteredTreeDialog.java
index 466dda613e2..350d76f690d 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/filteredTree/MinMaxOSEECheckedFilteredTreeDialog.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/filteredTree/MinMaxOSEECheckedFilteredTreeDialog.java
@@ -12,6 +12,8 @@ import org.eclipse.jface.viewers.IContentProvider;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.osee.framework.jdk.core.util.Collections;
import org.eclipse.osee.framework.ui.plugin.util.Result;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.dialogs.PatternFilter;
/**
@@ -29,6 +31,15 @@ public class MinMaxOSEECheckedFilteredTreeDialog extends OSEECheckedFilteredTree
}
@Override
+ protected Control createButtonBar(Composite parent) {
+ Control c = super.createButtonBar(parent);
+ if (this.minSelectionRequired == 0) {
+ okButton.setEnabled(true);
+ }
+ return c;
+ }
+
+ @Override
protected Result isComplete() {
int numberSelected = getResult().length;
if (minSelectionRequired <= numberSelected && maxSelectionRequired >= numberSelected) {
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/filteredTree/OSEECheckedFilteredTreeDialog.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/filteredTree/OSEECheckedFilteredTreeDialog.java
index cb3893e376e..a5df320b736 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/filteredTree/OSEECheckedFilteredTreeDialog.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/filteredTree/OSEECheckedFilteredTreeDialog.java
@@ -31,7 +31,7 @@ import org.eclipse.ui.dialogs.PatternFilter;
public abstract class OSEECheckedFilteredTreeDialog extends MessageDialog {
protected Label statusLabel;
- private Button okButton;
+ protected Button okButton;
private OSEECheckedFilteredTree treeViewer;
private final PatternFilter patternFilter;
private Object input;
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlinkLabelCmdValueSelection.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlinkLabelCmdValueSelection.java
index 5344aa75fe0..f03c5512c8d 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlinkLabelCmdValueSelection.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlinkLabelCmdValueSelection.java
@@ -24,6 +24,7 @@ import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Hyperlink;
/**
* @author Donald G. Dunne
@@ -31,7 +32,7 @@ import org.eclipse.ui.forms.widgets.FormToolkit;
public abstract class XHyperlinkLabelCmdValueSelection extends XWidget {
Label valueLabel;
- HyperLinkLabel selectHyperLinkLabel, clearHyperLinkLabel;
+ Hyperlink selectHyperLinkLabel, clearHyperLinkLabel;
private final boolean supportClear;
public XHyperlinkLabelCmdValueSelection(String label) {
@@ -52,11 +53,11 @@ public abstract class XHyperlinkLabelCmdValueSelection extends XWidget {
}
public String getHyperlinkLabelString() {
- return " (select)";
+ return " <select>";
}
public String getClearHyperlinkLabelString() {
- return "(clear) ";
+ return "<clear> ";
}
public boolean handleSelection() {
@@ -86,8 +87,11 @@ public abstract class XHyperlinkLabelCmdValueSelection extends XWidget {
labelWidget.setToolTipText(getToolTip());
}
}
-
- selectHyperLinkLabel = new HyperLinkLabel(comp, SWT.NONE);
+ if (toolkit == null) {
+ selectHyperLinkLabel = new Hyperlink(comp, SWT.NONE);
+ } else {
+ selectHyperLinkLabel = toolkit.createHyperlink(comp, "<select>", SWT.NONE);
+ }
selectHyperLinkLabel.setToolTipText(Strings.isValid(getToolTip()) ? getToolTip() : "Select to Modify");
selectHyperLinkLabel.addListener(SWT.MouseUp, new Listener() {
public void handleEvent(Event event) {
@@ -98,7 +102,11 @@ public abstract class XHyperlinkLabelCmdValueSelection extends XWidget {
}
});
if (supportClear) {
- clearHyperLinkLabel = new HyperLinkLabel(comp, SWT.NONE);
+ if (toolkit == null) {
+ clearHyperLinkLabel = new Hyperlink(comp, SWT.NONE);
+ } else {
+ clearHyperLinkLabel = toolkit.createHyperlink(comp, "<clear>", SWT.NONE);
+ }
clearHyperLinkLabel.setToolTipText("Select to Clear");
clearHyperLinkLabel.addListener(SWT.MouseUp, new Listener() {
public void handleEvent(Event event) {
@@ -118,10 +126,8 @@ public abstract class XHyperlinkLabelCmdValueSelection extends XWidget {
@Override
public void refresh() {
- selectHyperLinkLabel.refresh();
selectHyperLinkLabel.setText(getHyperlinkLabelString());
if (supportClear) {
- clearHyperLinkLabel.refresh();
clearHyperLinkLabel.setText(getClearHyperlinkLabelString());
}
valueLabel.setText(getCurrentValue());
@@ -139,10 +145,8 @@ public abstract class XHyperlinkLabelCmdValueSelection extends XWidget {
public void adaptControls(FormToolkit toolkit) {
super.adaptControls(toolkit);
toolkit.adapt(selectHyperLinkLabel, true, true);
- selectHyperLinkLabel.refresh();
if (supportClear) {
toolkit.adapt(clearHyperLinkLabel, true, true);
- clearHyperLinkLabel.refresh();
}
}
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlinkLabelValueSelection.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlinkLabelValueSelection.java
index 602c2c861e4..5844fa93d02 100644
--- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlinkLabelValueSelection.java
+++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlinkLabelValueSelection.java
@@ -63,16 +63,14 @@ public abstract class XHyperlinkLabelValueSelection extends XWidget {
if (toolkit == null) {
valueHyperlinkLabel = new Hyperlink(comp, SWT.NONE);
} else {
- valueHyperlinkLabel = toolkit.createHyperlink(comp, "<edit>", SWT.NONE);
+ valueHyperlinkLabel = toolkit.createHyperlink(comp, " <edit>", SWT.NONE);
}
valueHyperlinkLabel.setToolTipText(Strings.isValid(getToolTip()) ? getToolTip() : "Select to Modify");
+ GridData gd = new GridData();
if (isFillHorizontally()) {
- if (isFillHorizontally()) {
- valueHyperlinkLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- } else {
- valueHyperlinkLabel.setLayoutData(new GridData());
- }
+ gd.grabExcessHorizontalSpace = true;
}
+ valueHyperlinkLabel.setLayoutData(gd);
valueHyperlinkLabel.addListener(SWT.MouseUp, new Listener() {
/*
* (non-Javadoc)
diff --git a/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/ImportOutfileOperation.java b/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/ImportOutfileOperation.java
index d194b2623cd..382747c4e33 100644
--- a/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/ImportOutfileOperation.java
+++ b/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/ImportOutfileOperation.java
@@ -17,7 +17,6 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.apache.commons.lang.StringUtils;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
@@ -104,7 +103,7 @@ public class ImportOutfileOperation {
for (Artifact artifact : artifacts) {
toReturn.add(artifact.getName());
}
- return StringUtils.join(toReturn, ",\n");
+ return org.eclipse.osee.framework.jdk.core.util.Collections.toString(toReturn, ",\n");
}
private void commitSelectedArtifacts(IProgressMonitor monitor, String commitComment, Object[] items) throws Exception {

Back to the top