diff options
author | rbrooks | 2008-10-30 17:22:15 +0000 |
---|---|---|
committer | rbrooks | 2008-10-30 17:22:15 +0000 |
commit | 548548c598b681d3fec2bfa736d79d900c2cd7ca (patch) | |
tree | 9870e2945a34acf9c51dd390610ddb6ab5c2e929 /org.eclipse.osee.framework.ui.skynet | |
parent | de875e5418f94c0c6b931e9cc56ad00be2677d17 (diff) | |
download | org.eclipse.osee-548548c598b681d3fec2bfa736d79d900c2cd7ca.tar.gz org.eclipse.osee-548548c598b681d3fec2bfa736d79d900c2cd7ca.tar.xz org.eclipse.osee-548548c598b681d3fec2bfa736d79d900c2cd7ca.zip |
"Team Workflow" - RQD43 - "Add support for making attribute validity branch specific"
Diffstat (limited to 'org.eclipse.osee.framework.ui.skynet')
8 files changed, 28 insertions, 38 deletions
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportPage.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportPage.java index 41c7e363e57..c6c46617da5 100644 --- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportPage.java +++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportPage.java @@ -268,7 +268,7 @@ public class ArtifactImportPage extends WizardDataTransferPage { try { int defaultBranchIndex = 0; - for (Branch branch : BranchPersistenceManager.getBranches()) { + for (Branch branch : BranchPersistenceManager.getNormalBranches()) { branchList.add(branch.getBranchName()); branchList.setData(branch.getBranchName(), branch); if (branch.equals(defaultBranch)) { diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/BranchImportPage.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/BranchImportPage.java index 3623df9e047..f50802eeae9 100644 --- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/BranchImportPage.java +++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/BranchImportPage.java @@ -204,7 +204,7 @@ public class BranchImportPage extends WizardDataTransferPage { try { int defaultBranchIndex = 0; - for (Branch branch : BranchPersistenceManager.getBranches()) { + for (Branch branch : BranchPersistenceManager.getNormalBranches()) { branchList.add(branch.getBranchName()); branchList.setData(branch.getBranchName(), branch); if (branch.equals(defaultBranch)) { diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ImportMetaPage.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ImportMetaPage.java index ea577e905d3..95ca9c8ffca 100644 --- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ImportMetaPage.java +++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ImportMetaPage.java @@ -115,7 +115,7 @@ public class ImportMetaPage extends WizardDataTransferPage { Branch defaultBranch = BranchPersistenceManager.getDefaultBranch(); int defaultBranchIndex = 0; - for (Branch branch : BranchPersistenceManager.getBranches()) { + for (Branch branch : BranchPersistenceManager.getNormalBranches()) { branchList.add(branch.getBranchName()); branchList.setData(branch.getBranchName(), branch); if (branch.equals(defaultBranch)) { diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/DetailsBrowserComposite.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/DetailsBrowserComposite.java index 4aa45fff50a..57c81043355 100644 --- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/DetailsBrowserComposite.java +++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/DetailsBrowserComposite.java @@ -5,8 +5,11 @@ */
package org.eclipse.osee.framework.ui.skynet.artifact.editor;
+import java.util.logging.Level;
import org.eclipse.osee.framework.jdk.core.util.AHTML;
+import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
+import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.ToolBar;
@@ -36,6 +39,7 @@ public class DetailsBrowserComposite extends BrowserComposite { sb.append(AHTML.getLabelValueStr("Last Modified", String.valueOf(artifact.getLastModified())) + AHTML.newline());
sb.append(AHTML.getLabelValueStr("Last Modified By", String.valueOf(artifact.getLastModifiedBy())) + AHTML.newline());
} catch (Exception ex) {
+ OseeLog.log(SkynetGuiPlugin.class, Level.SEVERE, ex);
sb.append(AHTML.getLabelStr("Exception in rendering details: ", ex.getLocalizedMessage()));
}
setHtml(AHTML.simplePage(sb.toString()));
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/SortRelationsByBranch.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/SortRelationsByBranch.java index 1797096e2c6..4a1fe6df493 100644 --- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/SortRelationsByBranch.java +++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/SortRelationsByBranch.java @@ -43,27 +43,10 @@ public class SortRelationsByBranch extends AbstractBlam { Connection connection = null;
try {
connection = OseeDbConnection.getConnection();
-
int totalWork = 0;
-
monitor.beginTask(getName(), totalWork);
- List<Branch> branches = BranchPersistenceManager.getBranches();
- List<Branch> branchesToSort = new ArrayList<Branch>(branches.size());
- branchesToSort.add(BranchPersistenceManager.getBranch("Common"));
- branchesToSort.add(BranchPersistenceManager.getBranch("Block III - FTB0"));
- branchesToSort.add(BranchPersistenceManager.getBranch("Block III - FTB2"));
- branchesToSort.add(BranchPersistenceManager.getBranch("MYII V11"));
- branchesToSort.add(BranchPersistenceManager.getBranch("AH-64 MSA PDSP"));
- branchesToSort.add(BranchPersistenceManager.getBranch("LBA Help - FAQs - Instructions"));
- branchesToSort.add(BranchPersistenceManager.getBranch("MYII V13"));
- branchesToSort.add(BranchPersistenceManager.getBranch("V11_REU"));
-
- for (Branch branch : branches) {
- if (!branchesToSort.contains(branch)) {
- branchesToSort.add(branch);
- }
- }
+ List<Branch> branchesToSort = BranchPersistenceManager.getTopLevelBranches();
for (Branch branch : branchesToSort) {
IOperation op = new UpdateRelationsSortOrder(branch);
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dialogs/BranchSelectionDialog.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dialogs/BranchSelectionDialog.java index 9152bde9855..0a68343c5d0 100644 --- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dialogs/BranchSelectionDialog.java +++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dialogs/BranchSelectionDialog.java @@ -79,7 +79,7 @@ public class BranchSelectionDialog extends ElementTreeSelectionDialog { private void initialize() { try { - List<Branch> branchList = BranchPersistenceManager.getRootBranches(); + List<Branch> branchList = BranchPersistenceManager.getTopLevelBranches(); setInput(branchList); } catch (Exception ex) { logger.log(Level.SEVERE, "Unable to get root branches.", ex); diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/httpRequests/BranchRequest.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/httpRequests/BranchRequest.java index 08829499bd5..ac6251acf0e 100644 --- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/httpRequests/BranchRequest.java +++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/httpRequests/BranchRequest.java @@ -66,7 +66,7 @@ public class BranchRequest implements IHttpServerRequest { */
public void processRequest(HttpRequest httpRequest, HttpResponse httpResponse) {
try {
- List<Branch> branches = BranchPersistenceManager.getBranches();
+ List<Branch> branches = BranchPersistenceManager.getNormalBranches();
Document doc = Jaxp.newDocument();
Element root = Jaxp.createElement(doc, "skynet.branches", "");
diff --git a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidget.java b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidget.java index 85f1b505170..43111a5c4eb 100644 --- a/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidget.java +++ b/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidget.java @@ -13,10 +13,14 @@ package org.eclipse.osee.framework.ui.skynet.widgets; import java.util.ArrayList;
import java.util.List;
+import java.util.logging.Level;
+import org.eclipse.osee.framework.db.connection.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
+import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Branch;
import org.eclipse.osee.framework.skynet.core.artifact.BranchPersistenceManager;
import org.eclipse.osee.framework.ui.plugin.util.Result;
+import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.panels.BranchSelectComposite;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
@@ -214,25 +218,24 @@ public class XBranchSelectWidget extends XWidget implements Listener { try {
Branch branch = BranchPersistenceManager.getBranch(branchName);
defaultBranch = branch.getBranchId();
- } catch (Exception ex) {
- //OseeLog.log(SkynetGuiPlugin.class, Level.SEVERE, "Unable to set default branch.", ex);
+ } catch (OseeCoreException ex) {
+ OseeLog.log(SkynetGuiPlugin.class, Level.SEVERE, "Unable to set default branch.", ex);
}
}
}
-
- public void addListener(Listener listener){
- listeners .add(listener);
+
+ public void addListener(Listener listener) {
+ listeners.add(listener);
}
-
- public void removeListener(Listener listener){
- listeners.remove(listener);
+
+ public void removeListener(Listener listener) {
+ listeners.remove(listener);
}
-
- private void notifyListeners(Event event){
- for(Listener listener:listeners){
- listener.handleEvent(event);
- }
+
+ private void notifyListeners(Event event) {
+ for (Listener listener : listeners) {
+ listener.handleEvent(event);
+ }
}
-
-
+
}
\ No newline at end of file |