Examples of open()


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

    Shell shell = new Shell(Display.getDefault());
    FilteredResourcesSelectionDialog dialog =
      new FilteredResourcesSelectionDialog(
        shell, false, ResourcesPlugin.getWorkspace().getRoot(), IResource.FILE);
    dialog.setInitialPattern("*.dpans");
    if (dialog.open() == ResourceSelectionDialog.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        System.out.println(result[0].getClass());
        if (result[0] instanceof File) {
          File resource = (File) result[0];
View Full Code Here

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

      return null;
    }
    IWorkbench _workbench_1 = PlatformUI.getWorkbench();
    IWorkingSetManager _workingSetManager = _workbench_1.getWorkingSetManager();
    final IWorkingSetSelectionDialog dialog = _workingSetManager.createWorkingSetSelectionDialog(shell, true);
    int _open = dialog.open();
    boolean _notEquals = (_open != Window.OK);
    if (_notEquals) {
      throw new InterruptedException();
    }
    final IWorkingSet[] workingSets = dialog.getSelection();
View Full Code Here

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

    dialog.setContentProvider(new FileStructuredContentProvider(".tmlscript"));
    dialog.setLabelProvider(new FileLabelProvider());
    dialog.setInput(_model.getTMLScriptDirectory());
    dialog.setTitle("Please select an initialisation script");
   
    int result = dialog.open();
    if (result == ListDialog.OK) {
      IFile selectedScript = (IFile) dialog.getResult()[0];
      IPath selectedScriptPath = selectedScript.getLocation();
      IPath tmlScriptDirectoryPath = new Path(_model.getTMLScriptDirectory().getAbsolutePath());     
      _txtInitScript.setText(computePathToScriptFrom(tmlScriptDirectoryPath,selectedScriptPath));
View Full Code Here

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

        ArrayContentProvider.getInstance(),
        new WorkbenchLabelProvider(),
        "message");
    dialog.setTitle("title");
    dialog.setHelpAvailable(false);
    if (dialog.open() != Window.OK) return;
    for (Object each: dialog.getResult()) fProjectListDialogField.addElement(each);
  }

  @SuppressWarnings("unchecked")
  private Collection getNotYetRequiredProjects() {
View Full Code Here

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

        fNewFolderButton.setEnabled(fSelectedContainer != null);
    }

    protected void newFolderButtonPressed() {
        final NewFolderDialog dialog = new NewFolderDialog(getShell(), fSelectedContainer);
        if (dialog.open() == Window.OK) {
            final TreeViewer treeViewer = getTreeViewer();
            treeViewer.refresh(fSelectedContainer);
            final Object createdFolder = dialog.getResult()[0];
            treeViewer.reveal(createdFolder);
            treeViewer.setSelection(new StructuredSelection(createdFolder));
View Full Code Here

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

     **/
    protected void browseFiles() {
        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
        ResourceListSelectionDialog dialog = new ResourceListSelectionDialog(getShell(), root, IResource.FILE);
        dialog.setTitle(Constants.SEARCH_TITLE);
        if (dialog.open() == Window.OK) {
            Object[] files = dialog.getResult();
            IFile file = (IFile) files[0];
            fileText.setText(file.getFullPath().toString());
        }

View Full Code Here

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

        ResourceSelectionDialog dialog = new ResourceSelectionDialog(getShell(), currentContainer,
                "Selection Dialog");
        dialog.setTitle("Selection Dialog");
        dialog.setMessage("Please select a file:");
        dialog.open();
        Object[] result = dialog.getResult();
        if (result[0] != null) {
          IResource res = (IResource) result[0];
          text.setText(res.getProjectRelativePath().toOSString());
        }
View Full Code Here

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

            if ( !( getEditorInput() instanceof NonExistingServerConfigurationInput ) )
            {
                dialog.setOriginalFile( ResourcesPlugin.getWorkspace().getRoot().getFile(
                    new Path( getEditorInput().getToolTipText() ) ) );
            }
            if ( dialog.open() != Dialog.OK )
            {
                return false;
            }

            // Getting if the resulting file
View Full Code Here

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

              dialog.setTitle("Debug Type");
          } else {
              dialog.setTitle("Run Type");
          }
          //dialog.setMultipleSelection(false); TODO now part of the dialog constructor
          if (dialog.open() == Window.OK) { return (IType) dialog.getResult()[0]; //TODO out of range exception possible?
          return null;
      } catch(Exception e) {
        return null;
      }
    }
View Full Code Here

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

      selDialog.setSorter(new JavaElementSorter());
      dialog = selDialog;
    }
    dialog.setTitle(BeansUIPlugin.getResourceString(DIALOG_TITLE));
    dialog.setMessage(BeansUIPlugin.getResourceString(DIALOG_MESSAGE));
    if (dialog.open() == Window.OK) {
      Object[] selection = dialog.getResult();
      if (selection != null && selection.length > 0) {
        for (Object element : selection) {
          String config = null;
          if (element instanceof ZipEntryStorage) {
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.