Package org.eclipse.ui.dialogs

Examples of org.eclipse.ui.dialogs.ISelectionStatusValidator


        else
          return true;
      }
    });
    dlg.setComparator(new ViewerComparator());
    dlg.setValidator(new ISelectionStatusValidator() {
      public IStatus validate(Object[] selection) {
        for (int i = 0; i < selection.length; ++i)
          if (!(selection[i] instanceof IViewDescriptor))
            return new Status(Status.ERROR, ClientPlugin.getDefault().getBundle().getSymbolicName(), 0, "", null); //$NON-NLS-1$
View Full Code Here


  private String handleKeyStoreWorkspaceSelection( Shell parent ) {
    ILabelProvider lp = new WorkbenchLabelProvider();
    ITreeContentProvider cp = new WorkbenchContentProvider();

    ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog( parent, lp, cp );
    dialog.setValidator( new ISelectionStatusValidator() {

      @Override
      public IStatus validate( final Object[] selection ) {
        if ( selection.length > 1 ) {
          return new Status( IStatus.ERROR, JavaFXUIPlugin.PLUGIN_ID, "Only one file allowed." );
View Full Code Here

TOP

Related Classes of org.eclipse.ui.dialogs.ISelectionStatusValidator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.