Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormegumi.telles2017-08-14 12:36:01 -0400
committerMegumi Telles2017-08-15 17:34:04 -0400
commitb8afd26e92c88d44fa185e18784e70ceb2bfdba8 (patch)
tree1c37ac9c21e3bc01f46f76b60d1be4242258afa0
parent234e996d89312e5794e04992590b07cee8a4a522 (diff)
downloadorg.eclipse.osee-b8afd26e92c88d44fa185e18784e70ceb2bfdba8.tar.gz
org.eclipse.osee-b8afd26e92c88d44fa185e18784e70ceb2bfdba8.tar.xz
org.eclipse.osee-b8afd26e92c88d44fa185e18784e70ceb2bfdba8.zip
feature[ats_TW1426]: Remove branch views in Branch Manager
-rw-r--r--plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java7
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java8
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromMultiChoiceBranch.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/FrameworkXWidgetProvider.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchContentProvider.java5
5 files changed, 4 insertions, 20 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java
index bbda25d4b1b..b051c328626 100644
--- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java
+++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java
@@ -87,13 +87,6 @@ public class BranchCache extends AbstractOseeLoadingCache<Branch> {
return views;
}
- public synchronized List<Branch> getBranchesAndViews(Predicate<Branch> branchFilter) {
- List<Branch> branches = getBranches(branchFilter);
- branches.addAll(views);
-
- return branches;
- }
-
public synchronized List<Branch> getBranches(Predicate<Branch> branchFilter) {
return getRawValues().stream().filter(branchFilter).collect(Collectors.toList());
}
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
index d0f34c8ad72..a8042895d4a 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java
@@ -95,10 +95,6 @@ public final class BranchManager {
return ServiceUtil.getOseeCacheService().getBranchCache();
}
- public static List<Branch> getBranchesAndViews(Predicate<Branch> branchFilter) {
- return getCache().getBranchesAndViews(branchFilter);
- }
-
public static List<Branch> getBranches(Predicate<Branch> branchFilter) {
return getCache().getBranches(branchFilter);
}
@@ -538,10 +534,6 @@ public final class BranchManager {
return getBranches(BranchArchivedState.UNARCHIVED, BranchType.BASELINE);
}
- public static List<Branch> getBranchesAndViews(BranchArchivedState archivedState, BranchType... branchTypes) {
- return getCache().getBranchesAndViews(new BranchFilter(archivedState, branchTypes));
- }
-
public static List<Branch> getBranches(BranchArchivedState archivedState, BranchType... branchTypes) {
return getCache().getBranches(new BranchFilter(archivedState, branchTypes));
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromMultiChoiceBranch.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromMultiChoiceBranch.java
index e3e121b18e1..c50d376a562 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromMultiChoiceBranch.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromMultiChoiceBranch.java
@@ -41,7 +41,7 @@ public class XSelectFromMultiChoiceBranch extends XSelectFromDialog<BranchId> {
@Override
public FilteredCheckboxTreeDialog createDialog() {
List<? extends IOseeBranch> branches =
- BranchManager.getBranchesAndViews(BranchArchivedState.UNARCHIVED, BranchType.WORKING, BranchType.BASELINE);
+ BranchManager.getBranches(BranchArchivedState.UNARCHIVED, BranchType.WORKING, BranchType.BASELINE);
Collections.sort(branches);
return new FilteredCheckboxBranchDialog(getLabel(), "Select from the items below", branches);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/FrameworkXWidgetProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/FrameworkXWidgetProvider.java
index 1cd34623ac3..f9697c5d7fe 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/FrameworkXWidgetProvider.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/FrameworkXWidgetProvider.java
@@ -150,7 +150,7 @@ public final class FrameworkXWidgetProvider {
}
try {
List<? extends IOseeBranch> branches =
- BranchManager.getBranchesAndViews(BranchArchivedState.ALL, BranchType.WORKING, BranchType.BASELINE);
+ BranchManager.getBranches(BranchArchivedState.ALL, BranchType.WORKING, BranchType.BASELINE);
Collections.sort(branches);
multiBranchSelect.setSelectableItems(branches);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchContentProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchContentProvider.java
index 4168c4bb297..931fc261530 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchContentProvider.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchContentProvider.java
@@ -118,8 +118,7 @@ public class XBranchContentProvider implements ITreeContentProvider {
Set<BranchId> branchesToReturn = new HashSet<>();
if (showOnlyWorkingBranches) {
- branchesToReturn.addAll(
- BranchManager.getBranchesAndViews(BranchArchivedState.UNARCHIVED, BranchType.WORKING));
+ branchesToReturn.addAll(BranchManager.getBranches(BranchArchivedState.UNARCHIVED, BranchType.WORKING));
}
if (!showChildBranchesAtMainLevel) {
if (AccessControlManager.isOseeAdmin()) {
@@ -137,7 +136,7 @@ public class XBranchContentProvider implements ITreeContentProvider {
}
} else {
branchesToReturn.addAll(
- BranchManager.getBranchesAndViews(branchState, branchTypes.toArray(new BranchType[branchTypes.size()])));
+ BranchManager.getBranches(branchState, branchTypes.toArray(new BranchType[branchTypes.size()])));
}
return branchesToReturn.toArray();
} catch (OseeCoreException ex) {

Back to the top