Package org.eclipse.ui.dialogs

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


            while ( !canOverwrite )
            {
                // Open FileDialog
                FileDialog dialog = new FileDialog( shell, SWT.SAVE );
                path = dialog.open();
                if ( path == null )
                {
                    return false;
                }
View Full Code Here

    dialog.getShell().setText(XMLCatalogMessages.UI_LABEL_EXPORT_DIALOG_TITLE);
    dialog.setTitle(XMLCatalogMessages.UI_LABEL_EXPORT_DIALOG_HEADING);
    dialog.setMessage(XMLCatalogMessages.UI_LABEL_EXPORT_DIALOG_MESSAGE);

    dialog.setBlockOnOpen(true);
    int rc = dialog.open();
    if (rc == Window.OK) {
      IPath path = dialog.getResult();
      if (path != null) {
        IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
        String fileName = file.getLocation().toFile().toURI().toString();
View Full Code Here

    public void doSaveAs() {
        SaveAsDialog dialog = new SaveAsDialog(getSite().getWorkbenchWindow()
                .getShell());
        dialog.setOriginalFile(((IFileEditorInput) getEditorInput()).getFile());
        dialog.open();
        IPath path = dialog.getResult();

        if (path == null) {
            return;
        }
View Full Code Here

   * @generated
   */
  @Override
  public void doSaveAs() {
    SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
    saveAsDialog.open();
    IPath path = saveAsDialog.getResult();
    if (path != null) {
      IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
      if (file != null) {
        doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
View Full Code Here

        String message= NLSUtility.format(TextEditorMessages.AbstractDecoratedTextEditor_warning_saveAs_deleted, original.getName());
        dialog.setErrorMessage(null);
        dialog.setMessage(message, IMessageProvider.WARNING);
      }

      if (dialog.open() == Window.CANCEL) {
        if (progressMonitor != null)
          progressMonitor.setCanceled(true);
        return;
      }
     
View Full Code Here

        dialog.create();

        boolean cancelled = false;

        if (dialog.open() == Dialog.CANCEL) {
            if (progressMonitor != null) {
                progressMonitor.setCanceled(true);
                cancelled = true;
            }
        }
View Full Code Here

        dialog.create();

        boolean cancelled = false;

        if (dialog.open() == Dialog.CANCEL) {
            if (progressMonitor != null) {
                progressMonitor.setCanceled(true);
            }
            cancelled = true;
        }
View Full Code Here

      String message = "The original file, '" + original.getName() + "' has been deleted";
      dialog.setErrorMessage(null);
      dialog.setMessage(message, IMessageProvider.WARNING);
    }

    if (dialog.open() == Dialog.CANCEL) {
      if (progressMonitor != null)
        progressMonitor.setCanceled(true);
      editor.setSaveAsStatus(MultiPageEditor.SAVE_AS_CANCELLED);
      return;
    }
View Full Code Here

   * @generated
   */
  @Override
  public void doSaveAs() {
    SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell());
    saveAsDialog.open();
    IPath path = saveAsDialog.getResult();
    if (path != null) {
      IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
      if (file != null) {
        doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file));
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.