Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch')
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ArchiveBranchHandler.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/BranchCreationHandler.java10
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java8
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/OpenAssociatedArtifactHandler.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/SetAssociatedBranchArtifactHandler.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchContributionItem.java8
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchHandler.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitHandler.java8
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoHandler.java3
9 files changed, 27 insertions, 26 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ArchiveBranchHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ArchiveBranchHandler.java
index ffd735ffe50..2fdd61c578a 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ArchiveBranchHandler.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ArchiveBranchHandler.java
@@ -16,7 +16,7 @@ import java.util.List;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.osee.framework.access.AccessControlManager;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.BranchArchivedState;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -34,7 +34,7 @@ public class ArchiveBranchHandler extends CommandHandler {
@Override
public boolean isEnabledWithException(IStructuredSelection structuredSelection) throws OseeCoreException {
- List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
+ List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
return !branches.isEmpty() && AccessControlManager.isOseeAdmin();
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/BranchCreationHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/BranchCreationHandler.java
index c756a2780aa..909bcc462c2 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/BranchCreationHandler.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/BranchCreationHandler.java
@@ -17,7 +17,7 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.osee.framework.access.AccessControlManager;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.CoreBranches;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.model.Branch;
@@ -64,7 +64,7 @@ public class BranchCreationHandler extends CommandHandler {
IExceptionableRunnable runnable = new IExceptionableRunnable() {
@Override
public IStatus run(IProgressMonitor monitor) throws Exception {
- IOseeBranch branch = parentTransactionId.getBranch();
+ BranchId branch = parentTransactionId.getBranch();
if (branch.equals(CoreBranches.SYSTEM_ROOT)) {
BranchManager.createTopLevelBranch(dialog.getEntry());
} else {
@@ -93,10 +93,10 @@ public class BranchCreationHandler extends CommandHandler {
}
Object object = structuredSelection.getFirstElement();
- IOseeBranch branch = null;
+ BranchId branch = null;
- if (object instanceof IOseeBranch) {
- branch = (IOseeBranch) object;
+ if (object instanceof BranchId) {
+ branch = (BranchId) object;
} else if (object instanceof TransactionRecord) {
branch = ((TransactionRecord) object).getBranch();
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java
index a9a1fc34e56..6129f17ee91 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java
@@ -19,7 +19,7 @@ import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.osee.framework.access.AccessControlManager;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.Strings;
@@ -98,13 +98,13 @@ public abstract class GeneralBranchHandler extends CommandHandler {
@Override
public boolean isEnabledWithException(IStructuredSelection structuredSelection) throws OseeCoreException {
- List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
+ List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
return !branches.isEmpty() && (AccessControlManager.isOseeAdmin() || canEnableBranches(branches));
}
- private boolean canEnableBranches(List<? extends IOseeBranch> branches) {
+ private boolean canEnableBranches(List<? extends BranchId> branches) {
boolean canBeDeleted = true;
- for (IOseeBranch branch : branches) {
+ for (BranchId branch : branches) {
if (!isEnableAllowed(BranchManager.getBranch(branch))) {
canBeDeleted = false;
break;
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/OpenAssociatedArtifactHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/OpenAssociatedArtifactHandler.java
index a121b83d485..cddb06ae44b 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/OpenAssociatedArtifactHandler.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/OpenAssociatedArtifactHandler.java
@@ -14,7 +14,7 @@ import java.util.List;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.osee.framework.access.AccessControlManager;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.PermissionEnum;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -64,7 +64,7 @@ public class OpenAssociatedArtifactHandler extends CommandHandler {
@Override
public boolean isEnabledWithException(IStructuredSelection structuredSelection) {
- List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
+ List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
return branches.size() == 1;
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/SetAssociatedBranchArtifactHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/SetAssociatedBranchArtifactHandler.java
index ed9c21e7680..7b773496caa 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/SetAssociatedBranchArtifactHandler.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/SetAssociatedBranchArtifactHandler.java
@@ -16,7 +16,7 @@ import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.osee.framework.access.AccessControlManager;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
@@ -54,7 +54,7 @@ public class SetAssociatedBranchArtifactHandler extends CommandHandler {
@Override
public boolean isEnabledWithException(IStructuredSelection structuredSelection) throws OseeCoreException {
- List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
+ List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
return branches.size() == 1 && AccessControlManager.isOseeAdmin();
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchContributionItem.java
index b74e53ed3ae..4835dc882f8 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchContributionItem.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchContributionItem.java
@@ -18,7 +18,7 @@ import org.eclipse.core.commands.Command;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.UserManager;
@@ -48,10 +48,10 @@ public class ToggleFavoriteBranchContributionItem extends CompoundContributionPr
if (selectionProvider != null && selectionProvider.getSelection() instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection) selectionProvider.getSelection();
- List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
+ List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
if (!branches.isEmpty()) {
- IOseeBranch selectedBranch = branches.iterator().next();
+ BranchId selectedBranch = branches.iterator().next();
if (selectedBranch != null) {
try {
String commandId = ToggleFavoriteBranchHandler.COMMAND_ID;
@@ -73,7 +73,7 @@ public class ToggleFavoriteBranchContributionItem extends CompoundContributionPr
return contributionItems.toArray(new IContributionItem[0]);
}
- private CommandContributionItem createCommand(String label, IOseeBranch branch, String commandId) {
+ private CommandContributionItem createCommand(String label, BranchId branch, String commandId) {
CommandContributionItem contributionItem;
contributionItem = new CommandContributionItem(
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchHandler.java
index 92f4e6f99d1..9121cbce771 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchHandler.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchHandler.java
@@ -13,7 +13,7 @@ package org.eclipse.osee.framework.ui.skynet.commandHandlers.branch;
import java.util.List;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.skynet.core.UserManager;
@@ -43,7 +43,7 @@ public class ToggleFavoriteBranchHandler extends CommandHandler {
@Override
public boolean isEnabledWithException(IStructuredSelection structuredSelection) {
- List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
+ List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
return branches.size() == 1;
}
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitHandler.java
index a0be1d9f8b5..814e2150bc9 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitHandler.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitHandler.java
@@ -21,7 +21,7 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.osee.framework.access.AccessControlManager;
-import org.eclipse.osee.framework.core.data.IOseeBranch;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.enums.CoreBranches;
import org.eclipse.osee.framework.core.model.Branch;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
@@ -123,11 +123,11 @@ public abstract class CommitHandler extends CommandHandler {
branch) && !branch.getArchiveState().isArchived();
}
protected class CommitJob extends Job {
- private final IOseeBranch sourceBranch;
- private final IOseeBranch destinationBranch;
+ private final BranchId sourceBranch;
+ private final BranchId destinationBranch;
private final boolean archiveSourceBranch;
- public CommitJob(IOseeBranch sourceBranch, IOseeBranch destinationBranch, boolean archiveSourceBranch) {
+ public CommitJob(BranchId sourceBranch, BranchId destinationBranch, boolean archiveSourceBranch) {
super("Commit Branch");
this.destinationBranch = destinationBranch;
this.sourceBranch = sourceBranch;
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoHandler.java
index 41ca85f45fd..34ff35250cd 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoHandler.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoHandler.java
@@ -17,6 +17,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.osee.framework.access.AccessControlManager;
+import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.BranchArchivedState;
import org.eclipse.osee.framework.core.enums.BranchType;
@@ -77,7 +78,7 @@ public class CommitIntoHandler extends CommitHandler {
@Override
public boolean isEnabledWithException(IStructuredSelection structuredSelection) {
- List<? extends IOseeBranch> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
+ List<? extends BranchId> branches = Handlers.getBranchesFromStructuredSelection(structuredSelection);
return branches.size() == 1;
}

Back to the top