From bb0f0865d8d269e597f77297e06c4329c41f61a5 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Sun, 11 Sep 2011 18:54:40 -0700 Subject: [PATCH] Cosmetics. --- .../opentype/ElementSelectionDialog.java | 44 ++++++++----------- .../classwizard/NamespaceSelectionDialog.java | 1 - 2 files changed, 19 insertions(+), 26 deletions(-) diff --git a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/opentype/ElementSelectionDialog.java b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/opentype/ElementSelectionDialog.java index d7c67811ec2..6f1a856519e 100644 --- a/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/opentype/ElementSelectionDialog.java +++ b/core/org.eclipse.cdt.ui/browser/org/eclipse/cdt/internal/ui/browser/opentype/ElementSelectionDialog.java @@ -9,7 +9,6 @@ * Anton Leherbauer (Wind River Systems) - initial API and implementation * Markus Schorn (Wind River Systems) *******************************************************************************/ - package org.eclipse.cdt.internal.ui.browser.opentype; import java.util.Arrays; @@ -62,12 +61,10 @@ import org.eclipse.cdt.internal.ui.ICHelpContextIds; * @noextend This class is not intended to be subclassed by clients. */ public class ElementSelectionDialog extends TypeSelectionDialog { - /** * Job to update the element list in the background. */ private class UpdateElementsJob extends Job { - /** * The last used prefix to query the index. null means * the query result should be empty. @@ -111,14 +108,12 @@ public class ElementSelectionDialog extends TypeSelectionDialog { } return Status.CANCEL_STATUS; } - } /** * A job listener for simple job status reporting. */ private final class UpdateJobListener extends JobChangeAdapter { - boolean fDone; private IProgressMonitor fMonitor; @@ -183,7 +178,7 @@ public class ElementSelectionDialog extends TypeSelectionDialog { fUpdateJob= new UpdateElementsJob(OpenTypeMessages.ElementSelectionDialog_UpdateElementsJob_name); fUpdateJob.setRule(SINGLE_INSTANCE_RULE); } - + /* * @see org.eclipse.cdt.ui.browser.typeinfo.TypeSelectionDialog#create() */ @@ -242,7 +237,7 @@ public class ElementSelectionDialog extends TypeSelectionDialog { // the low-level filter is useless for us return false; } - + /* * @see org.eclipse.ui.dialogs.TwoPaneElementSelector#createDialogArea(org.eclipse.swt.widgets.Composite) */ @@ -261,7 +256,7 @@ public class ElementSelectionDialog extends TypeSelectionDialog { createProgressMonitorPart(parent); return table; } - + /** * Create the control for progress reporting. * @param parent @@ -290,7 +285,7 @@ public class ElementSelectionDialog extends TypeSelectionDialog { return null; } HashSet types = new HashSet(); - if(prefix != null) { + if (prefix != null) { final IndexFilter filter= new IndexFilter() { @Override public boolean acceptBinding(IBinding binding) throws CoreException { @@ -305,7 +300,7 @@ public class ElementSelectionDialog extends TypeSelectionDialog { index.acquireReadLock(); try { IIndexBinding[] bindings= index.findBindingsForPrefix(prefix, false, filter, monitor); - for(int i=0; i newPrefix.length) { return false; @@ -406,5 +401,4 @@ public class ElementSelectionDialog extends TypeSelectionDialog { } return new String(currentPrefix).equals(new String(newPrefix, 0, currentPrefix.length)); } - } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NamespaceSelectionDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NamespaceSelectionDialog.java index ada34e4faae..a3358bd7f73 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NamespaceSelectionDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NamespaceSelectionDialog.java @@ -15,7 +15,6 @@ import org.eclipse.cdt.ui.browser.typeinfo.TypeSelectionDialog; import org.eclipse.swt.widgets.Shell; public class NamespaceSelectionDialog extends TypeSelectionDialog { - private static final String DIALOG_SETTINGS = NamespaceSelectionDialog.class.getName(); private static final int[] VISIBLE_TYPES = { ICElement.C_NAMESPACE };