public int open() { try { ensureConsistency(); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, JavaUIMessages.TypeSelectionDialog_error3Title, JavaUIMessages.TypeSelectionDialog_error3Message); return CANCEL; } catch (InterruptedException e) { // cancelled by user return CANCEL; } if (fInitialFilter == null) { IWorkbenchWindow window= JavaPlugin.getActiveWorkbenchWindow(); if (window != null) { ISelection selection= window.getSelectionService().getSelection(); if (selection instanceof ITextSelection) { String text= ((ITextSelection)selection).getText(); if (text != null) { text= text.trim(); if (text.length() > 0 && JavaConventions.validateJavaTypeName(text, JavaCore.VERSION_1_3, JavaCore.VERSION_1_3).isOK()) { fInitialFilter= text; fSelectionMode= FULL_SELECTION; } } } } } return super.open(); }
@Override public int open() { try { ensureConsistency(); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, JavaUIMessages.TypeSelectionDialog_error3Title, JavaUIMessages.TypeSelectionDialog_error3Message); return CANCEL; } catch (InterruptedException e) { // cancelled by user return CANCEL; } if (fInitialFilter == null) { IWorkbenchWindow window= JavaPlugin.getActiveWorkbenchWindow(); if (window != null) { ISelection selection= window.getSelectionService().getSelection(); if (selection instanceof ITextSelection) { String text= ((ITextSelection)selection).getText(); if (text != null) { text= text.trim(); if (text.length() > 0 && JavaConventions.validateJavaTypeName(text, JavaCore.VERSION_1_3, JavaCore.VERSION_1_3).isOK()) { fInitialFilter= text; fSelectionMode= FULL_SELECTION; } } } } } return super.open(); }
@Override public int open() { try { ensureConsistency(); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, JavaUIMessages.TypeSelectionDialog_error3Title, JavaUIMessages.TypeSelectionDialog_error3Message); return CANCEL; } catch (InterruptedException e) { // cancelled by user return CANCEL; } if (fInitialFilter == null) { IWorkbenchWindow window= JavaPlugin.getActiveWorkbenchWindow(); if (window != null) { ISelection selection= window.getSelectionService().getSelection(); if (selection instanceof ITextSelection) { String text= ((ITextSelection)selection).getText(); if (text != null) { text= text.trim(); if (text.length() > 0 && JavaConventions.validateJavaTypeName(text, JavaCore.VERSION_1_3, JavaCore.VERSION_1_3).isOK()) { fInitialFilter= text; fSelectionMode= FULL_SELECTION; } } } } } return super.open(); }