Codota Logo
FilteredTypesSelectionDialog
Code IndexAdd Codota to your IDE (free)

How to use
FilteredTypesSelectionDialog
in
org.eclipse.jdt.internal.ui.dialogs

Best Java code snippets using org.eclipse.jdt.internal.ui.dialogs.FilteredTypesSelectionDialog (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private IType chooseException() {
  IJavaElement[] elements= new IJavaElement[] { fProject.getJavaProject() };
  final IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements);
  FilteredTypesSelectionDialog dialog= new FilteredTypesSelectionDialog(getShell(), false,
      PlatformUI.getWorkbench().getProgressService(), scope, IJavaSearchConstants.CLASS);
  dialog.setTitle(RefactoringMessages.ChangeExceptionsControl_choose_title);
  dialog.setMessage(RefactoringMessages.ChangeExceptionsControl_choose_message);
  dialog.setInitialPattern("*Exception*"); //$NON-NLS-1$
  dialog.setValidator(new ISelectionStatusValidator() {
    @Override
    public IStatus validate(Object[] selection) {
      if (selection.length == 0)
        return new StatusInfo(IStatus.ERROR, ""); //$NON-NLS-1$
      try {
        return checkException((IType)selection[0]);
      } catch (JavaModelException e) {
        JavaPlugin.log(e);
        return StatusInfo.OK_STATUS;
      }
    }
  });
  if (dialog.open() == Window.OK) {
    return (IType) dialog.getFirstResult();
  }
  return null;
}
origin: org.eclipse/org.eclipse.jdt.ui

public void triggerSearch() {
  fTypeFilterVersion++;
  applyFilter();
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

  throw new IllegalArgumentException("Invalid style constant."); //$NON-NLS-1$
FilteredTypesSelectionDialog dialog= new FilteredTypesSelectionDialog(parent, multipleSelection,
  context, scope, elementKinds, extension);
dialog.setMessage(JavaUIMessages.JavaUI_defaultDialogMessage);
dialog.setInitialPattern(filter);
return dialog;
origin: org.eclipse/org.eclipse.jdt.ui

  public void run() {
    Shell parent= fViewPart.getSite().getShell();
    FilteredTypesSelectionDialog dialog= new FilteredTypesSelectionDialog(parent, false, 
      PlatformUI.getWorkbench().getProgressService(), 
      SearchEngine.createWorkspaceScope(), IJavaSearchConstants.TYPE);
  
    dialog.setTitle(TypeHierarchyMessages.FocusOnTypeAction_dialog_title); 
    dialog.setMessage(TypeHierarchyMessages.FocusOnTypeAction_dialog_message); 
    if (dialog.open() != IDialogConstants.OK_ID) {
      return;
    }
    
    Object[] types= dialog.getResult();
    if (types != null && types.length > 0) {
      IType type= (IType)types[0];
      fViewPart.setInputElement(type);
    }
  }    
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public int open() {
  if (getInitialPattern() == 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()) {
            setInitialPattern(text, FULL_SELECTION);
          }
        }
      }
    }
  }
  return super.open();
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public void create() {
  super.create();
  Control patternControl= getPatternControl();
  if (patternControl instanceof Text) {
    TextFieldNavigationHandler.install((Text) patternControl);
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
protected void configureShell(Shell newShell) {
  super.configureShell(newShell);
  PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, IJavaHelpContextIds.OPEN_TYPE_DIALOG);
}
origin: org.eclipse/org.eclipse.jdt.ui

public void reloadCache(boolean checkDuplicates, IProgressMonitor monitor) {
  IProgressMonitor remainingMonitor;
  if (ConsistencyRunnable.needsExecution()) {
    monitor.beginTask(JavaUIMessages.TypeSelectionDialog_progress_consistency, 10);
    try {
      ConsistencyRunnable runnable= new ConsistencyRunnable();
      runnable.run(new SubProgressMonitor(monitor, 1));
    } catch (InvocationTargetException e) {
      ExceptionHandler.handle(e, JavaUIMessages.TypeSelectionDialog_error3Title, JavaUIMessages.TypeSelectionDialog_error3Message); 
      close();
      return;
    } catch (InterruptedException e) {
      // cancelled by user
      close();
      return;
    }
    remainingMonitor= new SubProgressMonitor(monitor, 9);
  } else {
    remainingMonitor= monitor;
  }
  super.reloadCache(checkDuplicates, remainingMonitor);
  monitor.done();
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

  @Override
  public void run() {
    Shell parent= fViewPart.getSite().getShell();
    FilteredTypesSelectionDialog dialog= new FilteredTypesSelectionDialog(parent, false,
      PlatformUI.getWorkbench().getProgressService(),
      SearchEngine.createWorkspaceScope(), IJavaSearchConstants.TYPE);

    dialog.setTitle(TypeHierarchyMessages.FocusOnTypeAction_dialog_title);
    dialog.setMessage(TypeHierarchyMessages.FocusOnTypeAction_dialog_message);
    if (dialog.open() != IDialogConstants.OK_ID) {
      return;
    }

    Object[] types= dialog.getResult();
    if (types != null && types.length > 0) {
      IType type= (IType)types[0];
      fViewPart.setInputElement(type);
    }
  }
}
origin: org.eclipse/org.eclipse.jdt.ui

  throw new IllegalArgumentException("Invalid style constant."); //$NON-NLS-1$
FilteredTypesSelectionDialog dialog= new FilteredTypesSelectionDialog(parent, multipleSelection, 
  context, scope, elementKinds, extension);
dialog.setMessage(JavaUIMessages.JavaUI_defaultDialogMessage); 
dialog.setInitialPattern(filter);
return dialog;
origin: org.eclipse/org.eclipse.jdt.ui

public int open() {
  if (getInitialPattern() == 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()) {
            setInitialPattern(text, FULL_SELECTION);
          }
        }
      }
    }
  }
  return super.open();
}
origin: org.eclipse/org.eclipse.jdt.ui

public void create() {
  super.create();
  Control patternControl= getPatternControl();
  if (patternControl instanceof Text) {
    TextFieldNavigationHandler.install((Text) patternControl);
  }
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
protected void configureShell(Shell newShell) {
  super.configureShell(newShell);
  PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, IJavaHelpContextIds.OPEN_TYPE_DIALOG);
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public void reloadCache(boolean checkDuplicates, IProgressMonitor monitor) {
  IProgressMonitor remainingMonitor;
  if (ConsistencyRunnable.needsExecution()) {
    monitor.beginTask(JavaUIMessages.TypeSelectionDialog_progress_consistency, 10);
    try {
      ConsistencyRunnable runnable= new ConsistencyRunnable();
      runnable.run(new SubProgressMonitor(monitor, 1));
    } catch (InvocationTargetException e) {
      ExceptionHandler.handle(e, JavaUIMessages.TypeSelectionDialog_error3Title, JavaUIMessages.TypeSelectionDialog_error3Message);
      close();
      return;
    } catch (InterruptedException e) {
      // cancelled by user
      close();
      return;
    }
    remainingMonitor= new SubProgressMonitor(monitor, 9);
  } else {
    remainingMonitor= monitor;
  }
  super.reloadCache(checkDuplicates, remainingMonitor);
  monitor.done();
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

private IType chooseFactoryClass() {
  IJavaProject    proj= getUseFactoryRefactoring().getProject();
  if (proj == null)
    return null;
  IJavaElement[] elements= new IJavaElement[] { proj };
  IJavaSearchScope scope= SearchEngine.createJavaSearchScope(elements);
  FilteredTypesSelectionDialog dialog= new FilteredTypesSelectionDialog(
    getShell(), false, getWizard().getContainer(), scope, IJavaSearchConstants.CLASS);
  dialog.setTitle(RefactoringMessages.IntroduceFactoryInputPage_chooseFactoryClass_title);
  dialog.setMessage(RefactoringMessages.IntroduceFactoryInputPage_chooseFactoryClass_message);
  if (dialog.open() == Window.OK) {
    return (IType) dialog.getFirstResult();
  }
  return null;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

  @Override
  public void run() {
    Shell parent= fViewPart.getSite().getShell();
    FilteredTypesSelectionDialog dialog= new FilteredTypesSelectionDialog(parent, false,
      PlatformUI.getWorkbench().getProgressService(),
      SearchEngine.createWorkspaceScope(), IJavaSearchConstants.TYPE);

    dialog.setTitle(TypeHierarchyMessages.FocusOnTypeAction_dialog_title);
    dialog.setMessage(TypeHierarchyMessages.FocusOnTypeAction_dialog_message);
    if (dialog.open() != IDialogConstants.OK_ID) {
      return;
    }

    Object[] types= dialog.getResult();
    if (types != null && types.length > 0) {
      IType type= (IType)types[0];
      fViewPart.setInputElement(type);
    }
  }
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

  throw new IllegalArgumentException("Invalid style constant."); //$NON-NLS-1$
FilteredTypesSelectionDialog dialog= new FilteredTypesSelectionDialog(parent, multipleSelection,
  context, scope, elementKinds, extension);
dialog.setMessage(JavaUIMessages.JavaUI_defaultDialogMessage);
dialog.setInitialPattern(filter);
return dialog;
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public int open() {
  if (getInitialPattern() == 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()) {
            setInitialPattern(text, FULL_SELECTION);
          }
        }
      }
    }
  }
  return super.open();
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public void create() {
  super.create();
  Control patternControl= getPatternControl();
  if (patternControl instanceof Text) {
    TextFieldNavigationHandler.install((Text) patternControl);
  }
}
origin: org.eclipse/org.eclipse.jdt.ui

protected void configureShell(Shell newShell) {
  super.configureShell(newShell);
  PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, IJavaHelpContextIds.OPEN_TYPE_DIALOG);
}
org.eclipse.jdt.internal.ui.dialogsFilteredTypesSelectionDialog

Javadoc

Shows a list of Java types to the user with a text entry field for a string pattern used to filter the list of types.

Most used methods

  • <init>
    Creates new FilteredTypesSelectionDialog instance.
  • getFirstResult
  • open
  • setMessage
  • setTitle
  • applyFilter
  • close
  • configureShell
  • getInitialPattern
  • getPatternControl
  • getResult
  • getReturnCode
  • getResult,
  • getReturnCode,
  • getSelectionHistory,
  • getShell,
  • setDetailsLabelProvider,
  • setInitialPattern,
  • setListLabelProvider,
  • setListSelectionLabelDecorator,
  • setSearchScope,
  • setSelectionHistory

Popular in Java

  • Making http post requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now