Layout/Sleep/Filter
diff --git a/bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/views/navigator/GotoResourceAction.java b/bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/views/navigator/GotoResourceAction.java
index 2a05223..4376b3b 100644
--- a/bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/views/navigator/GotoResourceAction.java
+++ b/bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/views/navigator/GotoResourceAction.java
@@ -27,14 +27,15 @@
* Collect all resources in the workbench and add them to the <code>resources</code>
* list.
*/
-private void collectAllResources(IContainer container,ArrayList resources) {
+private void collectAllResources(IContainer container,ArrayList resources,ResourcePatternFilter filter) {
try {
IResource members[] = container.members();
for (int i = 0; i < members.length; i++){
IResource r = members[i];
- resources.add(r);
+ if(filter.select(getNavigator().getResourceViewer(),null,r))
+ resources.add(r);
if(r.getType() != IResource.FILE)
- collectAllResources((IContainer)r,resources);
+ collectAllResources((IContainer)r,resources,filter);
}
} catch (CoreException e) {
}
@@ -47,7 +48,7 @@
public void run() {
IContainer cont = (IContainer)getResourceViewer().getInput();
ArrayList resources = new ArrayList();
- collectAllResources(cont,resources);
+ collectAllResources(cont,resources,getNavigator().getPatternFilter());
IResource resourcesArray[] = new IResource[resources.size()];
resources.toArray(resourcesArray);
GotoResourceDialog dialog = new GotoResourceDialog(getShell(),resourcesArray);
diff --git a/bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/views/navigator/GotoResourceDialog.java b/bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/views/navigator/GotoResourceDialog.java
index c75d4ca..6ae093d 100644
--- a/bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/views/navigator/GotoResourceDialog.java
+++ b/bundles/org.eclipse.ui/Eclipse UI Standard Components/org/eclipse/ui/views/navigator/GotoResourceDialog.java
@@ -50,6 +50,9 @@
Display display = resourceNames.getDisplay();
final boolean first[] = {true};
for (int i = 0; i < descriptorsSize;i++) {
+ if(i % 50 == 0) {
+ try { Thread.sleep(10); } catch(InterruptedException e){}
+ }
if(stop || resourceNames.isDisposed()) return;
final int index = i;
if(match(descriptors[index].label)) {
@@ -127,7 +130,8 @@
l.setLayoutData(data);
folderNames = new Table(dialogArea,SWT.SINGLE|SWT.BORDER|SWT.V_SCROLL|SWT.H_SCROLL);
- data = new GridData(GridData.FILL_HORIZONTAL);
+// data = new GridData(GridData.FILL_HORIZONTAL);
+ data = new GridData(GridData.FILL_BOTH);
data.widthHint = 250;
data.heightHint = 3 * folderNames.getItemHeight();
folderNames.setLayoutData(data);
@@ -254,10 +258,13 @@
* update tread.
*/
private void textChanged() {
- updateThread.stop = true;
+ String oldPattern = patternString;
patternString = pattern.getText();
if(!patternString.endsWith("*"))//$NON-NLS-1$
patternString = patternString + "*";//$NON-NLS-1$
+ if(patternString.equals(oldPattern))
+ return;
+ updateThread.stop = true;
stringMatcher = new StringMatcher(patternString,true,false);
resourceNames.removeAll();
startNewThread();