Package org.eclipse.ui.dialogs

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


            return new Status(IStatus.ERROR, CasEditorPlugin.ID, 0, "Please select a corpus!", null);
          }
        });

        folderSelectionDialog.open();

        Object[] results = folderSelectionDialog.getResult();

        if (results != null) {
          // validator makes sure that one CorpusElement is selected
View Full Code Here


        return new Status(IStatus.ERROR, CasEditorPlugin.ID, 0, "Please select a file!", null);
      }
    });

    fileSelectionDialog.open();

    Object[] results = fileSelectionDialog.getResult();

    if (results != null) {
      return ((IFile) results[0]).getFullPath().removeFirstSegments(1).toString();
View Full Code Here

        return new Status(IStatus.ERROR, CasEditorPlugin.ID, 0, "Please select a folder!", null);
      }
    });

    folderSelectionDialog.open();

    Object[] results = folderSelectionDialog.getResult();

    if (results.length != 1) {
      return null;
View Full Code Here

        return new Status(IStatus.ERROR, CasEditorPlugin.ID, 0, "Please select a folder!", null);
      }
    });

    folderSelectionDialog.open();

    Object[] results = folderSelectionDialog.getResult();

    if (results != null) {
      return ((IFolder) results[0]).getFullPath().removeFirstSegments(1).toString();
View Full Code Here

        dialog.setTitle("Select descriptor");
        dialog.setMessage("Select descriptor");
        dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
        dialog.setInitialSelection(ResourcesPlugin.getWorkspace().getRoot().
                findMember(typeSystemText.getText()));
        if (dialog.open() == IDialogConstants.OK_ID) {
          IResource resource = (IResource) dialog.getFirstResult();
          if (resource != null) {
            String fileLoc = resource.getFullPath().toString();
            typeSystemText.setText(fileLoc);
          }
View Full Code Here

      dialog.setAllowMultiple(false);
      dialog.setEmptyListMessage("No types available");
      dialog.setSorter(new ViewerSorter());
      if (initialSelection != null)
        dialog.setInitialSelection(initialSelection);
      if (dialog.open() == ElementTreeSelectionDialog.OK){
        Object selectedObject = dialog.getFirstResult();
        if (selectedObject instanceof ToolType)
          return (ToolType)selectedObject;
        else
          return null;
View Full Code Here

    IProject project = ProjectUtilities.getProject(projectName);
    dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());

    if (project != null)
      dialog.setInitialSelection(project);
    if (dialog.open() == Window.OK) {
      Object element = dialog.getFirstResult();
      try {
        if (element instanceof IContainer) {
          IContainer container = (IContainer) element;
          folderText.setText(container.getFullPath().toString());
View Full Code Here

    IProject project = ProjectUtilities.getProject(projectName);
    dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());

    if (project != null)
      dialog.setInitialSelection(project);
    if (dialog.open() == Window.OK) {
      Object element = dialog.getFirstResult();
      try {
        if (element instanceof IContainer) {
          IContainer container = (IContainer) element;
          folderText.setText(container.getFullPath().toString());
View Full Code Here

    IProject project = ResourcesPlugin.getWorkspace().getRoot().findMember(projectName).getProject();
    dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());

    if (project != null)
      dialog.setInitialSelection(project);
    if (dialog.open() == Window.OK) {
      Object element = dialog.getFirstResult();
      try {
        if (element instanceof IContainer) {
          IContainer container = (IContainer) element;
          folderText.setText(container.getFullPath().toString());
View Full Code Here

    IProject project = ResourcesPlugin.getWorkspace().getRoot().findMember(projectName).getProject();
    dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());

    if (project != null)
      dialog.setInitialSelection(project);
    if (dialog.open() == Window.OK) {
      Object element = dialog.getFirstResult();
      try {
        if (element instanceof IContainer) {
          IContainer container = (IContainer) element;
          folderText.setText(container.getFullPath().toString());
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.