Commit bcf6ea90 authored by agurov's avatar agurov

Enable team context menu actions on working set (bug 470552)

https://bugs.eclipse.org/bugs/show_bug.cgi?id=470552

git-svn-id: https://dev.eclipse.org/svnroot/technology/org.eclipse.subversive/trunk@21482 ee007c2a-0a25-0410-9ab9-bf268980928c
parent 6c24ee58
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
package org.eclipse.team.svn.ui.action; package org.eclipse.team.svn.ui.action;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
...@@ -70,15 +71,9 @@ public class FilterManager implements IPropertyChangeListener, IResourceStatesLi ...@@ -70,15 +71,9 @@ public class FilterManager implements IPropertyChangeListener, IResourceStatesLi
public boolean checkForResourcesPresence(IResource []selectedResources, IStateFilter stateFilter, boolean recursive) { public boolean checkForResourcesPresence(IResource []selectedResources, IStateFilter stateFilter, boolean recursive) {
boolean computeDeep = SVNTeamPreferences.getDecorationBoolean(SVNTeamUIPlugin.instance().getPreferenceStore(), SVNTeamPreferences.DECORATION_PRECISE_ENABLEMENTS_NAME); boolean computeDeep = SVNTeamPreferences.getDecorationBoolean(SVNTeamUIPlugin.instance().getPreferenceStore(), SVNTeamPreferences.DECORATION_PRECISE_ENABLEMENTS_NAME);
selectedResources = this.connectedToSVN(selectedResources);
if (this.dirty) { if (this.dirty) {
this.dirty = false; this.dirty = false;
if (!this.connectedToSVN(selectedResources)) {
this.flatChecker.clearFilters();
this.flatChecker.checkDisallowed();
this.recursiveChecker.clearFilters();
this.recursiveChecker.checkDisallowed();
return false;
}
if (this.filters2condition.size() > 0) { if (this.filters2condition.size() > 0) {
this.flatChecker.clearFilters(); this.flatChecker.clearFilters();
FileUtility.checkForResourcesPresence(selectedResources, this.flatChecker, IResource.DEPTH_ZERO); FileUtility.checkForResourcesPresence(selectedResources, this.flatChecker, IResource.DEPTH_ZERO);
...@@ -109,13 +104,14 @@ public class FilterManager implements IPropertyChangeListener, IResourceStatesLi ...@@ -109,13 +104,14 @@ public class FilterManager implements IPropertyChangeListener, IResourceStatesLi
return retVal.booleanValue(); return retVal.booleanValue();
} }
protected boolean connectedToSVN(IResource []selectedResources) { protected IResource []connectedToSVN(IResource []selectedResources) {
ArrayList<IResource> retVal = new ArrayList<IResource>(selectedResources.length);
for (int i = 0; i < selectedResources.length; i++) { for (int i = 0; i < selectedResources.length; i++) {
if (!FileUtility.isConnected(selectedResources[i])) { if (FileUtility.isConnected(selectedResources[i])) {
return false; retVal.add(selectedResources[i]);
} }
} }
return true; return retVal.toArray(new IResource[retVal.size()]);
} }
private FilterManager() { private FilterManager() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment