ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r984097 - in /ant/ivy/ivyde/trunk: CHANGES.txt org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditor.java
Date Tue, 10 Aug 2010 15:53:52 GMT
Author: hibou
Date: Tue Aug 10 15:53:52 2010
New Revision: 984097

URL: http://svn.apache.org/viewvc?rev=984097&view=rev
Log:
IVYDE-249 : Filter closed projects from workspace selection dialog (thanks to Sébastien
Moran)

Modified:
    ant/ivy/ivyde/trunk/CHANGES.txt
    ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditor.java

Modified: ant/ivy/ivyde/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/CHANGES.txt?rev=984097&r1=984096&r2=984097&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/CHANGES.txt (original)
+++ ant/ivy/ivyde/trunk/CHANGES.txt Tue Aug 10 15:53:52 2010
@@ -14,6 +14,7 @@
 
 - IMPROVE: Wrap cache cleaning in a job so that it does not block the workspace (IVYDE-207)
(thanks to Jon Schneider)
 - IMPROVE: Allow workspace resolver to skip version matcher (IVYDE-187) (thanks to Phillip
Webb)
+- IMPROVE: Filter closed projects from workspace selection dialog (IVYDE-249) (thanks to
Sebastien Moran)
 
 - FIX: "Ivy Settings Path" Browse button results in an incorrectly formatted URL (IVYDE-191)
(thanks to Jon Schneider)
 - FIX: Workspace Resolver Prevents Source Download (IVYDE-188) (thanks to Phillip Webb)

Modified: ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditor.java
URL: http://svn.apache.org/viewvc/ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditor.java?rev=984097&r1=984096&r2=984097&view=diff
==============================================================================
--- ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditor.java
(original)
+++ ant/ivy/ivyde/trunk/org.apache.ivyde.eclipse/src/java/org/apache/ivyde/eclipse/ui/PathEditor.java
Tue Aug 10 15:53:52 2010
@@ -18,10 +18,13 @@
 package org.apache.ivyde.eclipse.ui;
 
 import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.debug.ui.StringVariableSelectionDialog;
 import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
 import org.eclipse.swt.events.ModifyListener;
@@ -112,6 +115,15 @@ public abstract class PathEditor extends
                 new WorkbenchLabelProvider(), new BaseWorkbenchContentProvider());
         dialog.setTitle("Select a workspace relative file:");
         dialog.setMessage("Select a workspace relative file:");
+        // Filter closed projects
+        dialog.addFilter(new ViewerFilter() {
+            public boolean select(Viewer viewer, Object parentElement, Object element) {
+                if (element instanceof IProject)
+                    return ((IProject) element).isAccessible();
+
+                return true;
+            }
+        });
         dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
         // TODO try to preselect the current file
         dialog.open();



Mime
View raw message