Package org.eclipse.ui.dialogs

Examples of org.eclipse.ui.dialogs.ElementTreeSelectionDialog.open()


            dialog.setTitle("MuClipse");
            dialog.setMessage("Select a java class");
            dialog.setInput(rootDirectory);
            dialog.setValidator(new TypedElementSelectionValidator(
                    new Class[]{IFile.class}, false));
            if(dialog.open() == Window.OK) {
              IResource rc = (IResource)dialog.getFirstResult();
              return rc.getFullPath()
              .removeFirstSegments(1).toString();
             
            }
View Full Code Here


            dialog.setTitle("MuClipse");
            dialog.setMessage("Select a folder");
            dialog.setInput(project);
            dialog.setValidator(new TypedElementSelectionValidator(
                    new Class[]{IFolder.class}, false));
            if(dialog.open() == Window.OK) {
                IResource rc = (IResource)dialog.getFirstResult();
                if (rc != null)
                    return rc.getFullPath().removeFirstSegments(1).toString();
            }
            return null;
View Full Code Here

            dialog.setTitle("MuClipse");
            dialog.setMessage("Select a mutated class");
            dialog.setInput(project);
            dialog.setValidator(new TypedElementSelectionValidator(
                    new Class[]{IFolder.class}, false));
            if(dialog.open() == Window.OK) {
                IResource rc = (IResource)dialog.getFirstResult();
                if (rc != null)
                    return rc.getFullPath().removeFirstSegments(2).toString();
            }
            return null;
View Full Code Here

        if(multiple) {
            dialog.setMessage("Select resources. Press CTRL or SHIFT" +
                    " to select multiple resources.");
            dialog.setValidator(new TypedElementSelectionValidator(
                    new Class[]{IFile.class, IFolder.class}, true));
            if(dialog.open() == Window.OK) {
                Object[] results = dialog.getResult();
                StringBuffer ret = new StringBuffer();
                if (results != null) {
                    for (int i = 0; i < results.length; i++) {
                        IResource rc = (IResource)results[i];
View Full Code Here

            }
        } else {
            dialog.setMessage("Select a .class file");
            dialog.setValidator(new TypedElementSelectionValidator(
                    new Class[]{IFile.class}, false));
            if(dialog.open() == Window.OK) {
                IResource rc = (IResource)dialog.getFirstResult();
                if (rc != null)
                    return rc.getFullPath().removeFirstSegments(1).toString();
            }
        }
View Full Code Here

            dialog.setTitle("MuClipse");
            dialog.setMessage("Select a folder");
            dialog.setInput(project);
            dialog.setValidator(new TypedElementSelectionValidator(
                    new Class[]{IFolder.class}, false));
            if(dialog.open() == Window.OK) {
                IResource rc = (IResource)dialog.getFirstResult();
                if (rc != null)
                    return rc.getFullPath().removeFirstSegments(1).toString();
            }
            return null;
View Full Code Here

        if(multiple) {
            dialog.setMessage("Select resources. Press CTRL or SHIFT" +
                    " to select multiple resources.");
            dialog.setValidator(new TypedElementSelectionValidator(
                    new Class[]{IFile.class, IFolder.class}, true));
            if(dialog.open() == Window.OK) {
                Object[] results = dialog.getResult();
                StringBuffer ret = new StringBuffer();
                if (results != null) {
                    for (int i = 0; i < results.length; i++) {
                        IResource rc = (IResource)results[i];
View Full Code Here

            }
        } else {
            dialog.setMessage("Select a .class file");
            dialog.setValidator(new TypedElementSelectionValidator(
                    new Class[]{IFile.class}, false));
            if(dialog.open() == Window.OK) {
                IResource rc = (IResource)dialog.getFirstResult();
                if (rc != null)
                    return rc.getFullPath().removeFirstSegments(1).toString();
            }
        }
View Full Code Here

            dialog.setTitle("MuClipse");
            dialog.setMessage("Select a java class");
            dialog.setInput(input);
            dialog.setValidator(new TypedElementSelectionValidator(
                    new Class[]{IFile.class}, true));
            if(dialog.open() == Window.OK) {
                Object[] rc = dialog.getResult();
                String toReturn = "";
                for (int i=0;i<rc.length;i++)
                {
                  IResource thisone = (IResource) rc[i];
View Full Code Here

            dialog.setTitle("MuClipse");
            dialog.setMessage("Select a folder");
            dialog.setInput(project);
            dialog.setValidator(new TypedElementSelectionValidator(
                    new Class[]{IFolder.class}, false));
            if(dialog.open() == Window.OK) {
                IResource rc = (IResource)dialog.getFirstResult();
                if (rc != null)
                    return rc.getFullPath().removeFirstSegments(1).toString();
            }
            return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.