diff options
author | ddunne | 2008-11-28 18:53:34 +0000 |
---|---|---|
committer | ddunne | 2008-11-28 18:53:34 +0000 |
commit | fcdd015d0ba879d0176bc087c5aedf98378fa3a6 (patch) | |
tree | 8d73993256486f0e81836ea01d848f4924af188b | |
parent | 6c9fdecd547238bbc219df1d4306e71ddd55f589 (diff) | |
download | org.eclipse.osee-fcdd015d0ba879d0176bc087c5aedf98378fa3a6.tar.gz org.eclipse.osee-fcdd015d0ba879d0176bc087c5aedf98378fa3a6.tar.xz org.eclipse.osee-fcdd015d0ba879d0176bc087c5aedf98378fa3a6.zip |
2 files changed, 20 insertions, 19 deletions
diff --git a/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/ExtendedStatusReportJob.java b/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/ExtendedStatusReportJob.java index f86604ca615..3c2a89ed1d8 100644 --- a/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/ExtendedStatusReportJob.java +++ b/org.eclipse.osee.ats/src/org/eclipse/osee/ats/report/ExtendedStatusReportJob.java @@ -11,6 +11,7 @@ package org.eclipse.osee.ats.report; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import java.util.logging.Level; import org.eclipse.core.runtime.IProgressMonitor; @@ -42,32 +43,31 @@ import org.eclipse.swt.widgets.Display; */ public class ExtendedStatusReportJob extends Job { private final ArrayList<Artifact> arts; - private IProgressMonitor monitor; - private final String title; public ExtendedStatusReportJob(String title, ArrayList<Artifact> arts) { super("Creating " + title); - this.title = title; this.arts = arts; - } @Override public IStatus run(IProgressMonitor monitor) { - this.monitor = monitor; - if (arts.size() == 0) { - OseeLog.log(AtsPlugin.class, Level.SEVERE, "No Artifacts Returned"); + return runIt(monitor, getName(), arts); + } + + public static IStatus runIt(IProgressMonitor monitor, final String jobName, Collection<? extends Artifact> teamArts) { + if (teamArts.size() == 0) { + OseeLog.log(AtsPlugin.class, Level.SEVERE, "No Artifacts Returned"); return new Status(Status.ERROR, AtsPlugin.PLUGIN_ID, -1, "No Artifacts Returned", null); } try { - final String html = AHTML.simplePage(getStatusReport()); + final String html = AHTML.simplePage(getStatusReport(monitor, jobName, teamArts)); Display.getDefault().asyncExec(new Runnable() { public void run() { XResultView.getResultView().addResultPage( - new XResultPage(title + " - " + XDate.getDateNow(XDate.MMDDYYHHMM), html, + new XResultPage(jobName + " - " + XDate.getDateNow(XDate.MMDDYYHHMM), html, Manipulations.HTML_MANIPULATIONS)); - AWorkbench.popup("Complete", title + " Complete...Results in ATS Results"); + AWorkbench.popup("Complete", jobName + " Complete...Results in ATS Results"); } }); monitor.done(); @@ -78,10 +78,10 @@ public class ExtendedStatusReportJob extends Job { } } - public String getStatusReport() throws OseeCoreException { + private static String getStatusReport(IProgressMonitor monitor, String title, Collection<? extends Artifact> teamArts) throws OseeCoreException { StringBuilder sb = new StringBuilder(); sb.append(AHTML.heading(3, title)); - sb.append(getStatusReportBody()); + sb.append(getStatusReportBody(monitor, title, teamArts)); return sb.toString(); } @@ -115,7 +115,7 @@ public class ExtendedStatusReportJob extends Job { } }; - public String getStatusReportBody() throws OseeCoreException { + private static String getStatusReportBody(IProgressMonitor monitor, String title, Collection<? extends Artifact> arts) throws OseeCoreException { StringBuilder sb = new StringBuilder(); sb.append(AHTML.beginMultiColumnTable(100, 1)); sb.append(AHTML.addHeaderRowMultiColumnTable(Columns.getColumnNames())); @@ -140,7 +140,7 @@ public class ExtendedStatusReportJob extends Job { return sb.toString(); } - public void addTableRow(StringBuilder sb, StateMachineArtifact sma) throws OseeCoreException { + private static void addTableRow(StringBuilder sb, StateMachineArtifact sma) throws OseeCoreException { List<String> values = new ArrayList<String>(); SMAManager smaMgr = new SMAManager(sma); for (Columns col : Columns.values()) { diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChange.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChange.java index 2b8fc1e2d91..0fcfa54bc9d 100644 --- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChange.java +++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChange.java @@ -64,7 +64,8 @@ public class ArtifactPromptChange { } else if (attributeBaseType.equals(EnumeratedAttribute.class)) {
return ArtifactPromptChange.promptChangeEnumeratedAttribute(attributeName, displayName, artifacts, persist);
} else if (attributeBaseType.equals(StringAttribute.class)) {
- return ArtifactPromptChange.promptChangeStringAttribute(attributeName, displayName, artifacts, persist);
+ return ArtifactPromptChange.promptChangeStringAttribute(attributeName, displayName, artifacts, persist,
+ true);
} else
AWorkbench.popup("ERROR", "Unhandled attribute type. Can't edit through this view");
} catch (Exception ex) {
@@ -99,12 +100,12 @@ public class ArtifactPromptChange { return promptChangeStringAttribute(attributeName, displayName, VALID_FLOAT_REG_EX, smas, persist, false);
}
- public static boolean promptChangeStringAttribute(String attributeName, String displayName, final Artifact artifact, boolean persist) throws Exception {
- return promptChangeStringAttribute(attributeName, displayName, null, Arrays.asList(artifact), persist, true);
+ public static boolean promptChangeStringAttribute(String attributeName, String displayName, final Artifact artifact, boolean persist, boolean multiLine) throws Exception {
+ return promptChangeStringAttribute(attributeName, displayName, null, Arrays.asList(artifact), persist, multiLine);
}
- public static boolean promptChangeStringAttribute(String attributeName, String displayName, final Collection<? extends Artifact> smas, boolean persist) throws Exception {
- return promptChangeStringAttribute(attributeName, displayName, null, smas, persist, true);
+ public static boolean promptChangeStringAttribute(String attributeName, String displayName, final Collection<? extends Artifact> smas, boolean persist, boolean multiLine) throws Exception {
+ return promptChangeStringAttribute(attributeName, displayName, null, smas, persist, multiLine);
}
public static boolean promptChangeDate(String attributeName, String displayName, Artifact artifact, boolean persist) throws Exception {
|