1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2011-09-11 18:54:40 -07:00
parent 7d5892884b
commit 775c95143c
2 changed files with 19 additions and 26 deletions

View file

@ -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. <code>null</code> 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;
@ -326,10 +321,10 @@ public class ElementSelectionDialog extends TypeSelectionDialog {
} finally {
index.releaseReadLock();
}
} catch(CoreException ce) {
CUIPlugin.log(ce);
} catch(InterruptedException ie) {
CUIPlugin.log(ie);
} catch (CoreException e) {
CUIPlugin.log(e);
} catch (InterruptedException e) {
CUIPlugin.log(e);
}
}
return types.toArray(new ITypeInfo[types.size()]);
@ -393,8 +388,8 @@ public class ElementSelectionDialog extends TypeSelectionDialog {
}
int asterisk= userFilter.indexOf("*"); //$NON-NLS-1$
int questionMark= userFilter.indexOf("?"); //$NON-NLS-1$
int prefixEnd = asterisk < 0 ? questionMark
: (questionMark < 0 ? asterisk : Math.min(asterisk, questionMark));
int prefixEnd = asterisk < 0 ? questionMark :
questionMark < 0 ? asterisk : Math.min(asterisk, questionMark);
return (prefixEnd == -1 ? userFilter : userFilter.substring(0, prefixEnd)).toCharArray();
}
@ -406,5 +401,4 @@ public class ElementSelectionDialog extends TypeSelectionDialog {
}
return new String(currentPrefix).equals(new String(newPrefix, 0, currentPrefix.length));
}
}

View file

@ -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 };