Examples of SaveAsDialog


Examples of org.eclipse.ui.dialogs.SaveAsDialog

   * @generated
   */
  protected void performSaveAs(IProgressMonitor progressMonitor) {
    Shell shell = getSite().getShell();
    IEditorInput input = getEditorInput();
    SaveAsDialog dialog = new SaveAsDialog(shell);
    IFile original = input instanceof IFileEditorInput ? ((IFileEditorInput) input)
        .getFile()
        : null;
    if (original != null) {
      dialog.setOriginalFile(original);
    }
    dialog.create();
    IDocumentProvider provider = getDocumentProvider();
    if (provider == null) {
      // editor has been programmatically closed while the dialog was open
      return;
    }
    if (provider.isDeleted(input) && original != null) {
      String message = NLS
          .bind(
              eu.admire.visual.pmml.treemodel._40.diagram.part.Messages.PMMLTreeModelDiagramEditor_SavingDeletedFile,
              original.getName());
      dialog.setErrorMessage(null);
      dialog.setMessage(message, IMessageProvider.WARNING);
    }
    if (dialog.open() == Window.CANCEL) {
      if (progressMonitor != null) {
        progressMonitor.setCanceled(true);
      }
      return;
    }
    IPath filePath = dialog.getResult();
    if (filePath == null) {
      if (progressMonitor != null) {
        progressMonitor.setCanceled(true);
      }
      return;
View Full Code Here

Examples of org.eclipse.ui.dialogs.SaveAsDialog

   * <!-- end-user-doc -->
   * @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

Examples of org.eclipse.ui.dialogs.SaveAsDialog

   * @generated
   */
  protected void performSaveAs(IProgressMonitor progressMonitor) {
    Shell shell = getSite().getShell();
    IEditorInput input = getEditorInput();
    SaveAsDialog dialog = new SaveAsDialog(shell);
    IFile original = input instanceof IFileEditorInput ? ((IFileEditorInput) input)
        .getFile() : null;
    if (original != null) {
      dialog.setOriginalFile(original);
    }
    dialog.create();
    IDocumentProvider provider = getDocumentProvider();
    if (provider == null) {
      // editor has been programmatically closed while the dialog was open
      return;
    }
    if (provider.isDeleted(input) && original != null) {
      String message = NLS.bind(
          Messages.DispelDiagramEditor_SavingDeletedFile,
          original.getName());
      dialog.setErrorMessage(null);
      dialog.setMessage(message, IMessageProvider.WARNING);
    }
    if (dialog.open() == Window.CANCEL) {
      if (progressMonitor != null) {
        progressMonitor.setCanceled(true);
      }
      return;
    }
    IPath filePath = dialog.getResult();
    if (filePath == null) {
      if (progressMonitor != null) {
        progressMonitor.setCanceled(true);
      }
      return;
View Full Code Here

Examples of org.eclipse.ui.dialogs.SaveAsDialog

   * @generated
   */
  protected void performSaveAs(IProgressMonitor progressMonitor) {
    Shell shell = getSite().getShell();
    IEditorInput input = getEditorInput();
    SaveAsDialog dialog = new SaveAsDialog(shell);
    IFile original = input instanceof IFileEditorInput ? ((IFileEditorInput) input)
        .getFile()
        : null;
    if (original != null) {
      dialog.setOriginalFile(original);
    }
    dialog.create();
    IDocumentProvider provider = getDocumentProvider();
    if (provider == null) {
      // editor has been programmatically closed while the dialog was open
      return;
    }
    if (provider.isDeleted(input) && original != null) {
      String message = NLS
          .bind(
              eu.admire.visual.pmml.radviz._40.diagram.part.Messages.PMMLDiagramEditor_SavingDeletedFile,
              original.getName());
      dialog.setErrorMessage(null);
      dialog.setMessage(message, IMessageProvider.WARNING);
    }
    if (dialog.open() == Window.CANCEL) {
      if (progressMonitor != null) {
        progressMonitor.setCanceled(true);
      }
      return;
    }
    IPath filePath = dialog.getResult();
    if (filePath == null) {
      if (progressMonitor != null) {
        progressMonitor.setCanceled(true);
      }
      return;
View Full Code Here

Examples of org.eclipse.ui.dialogs.SaveAsDialog

     * @see org.eclipse.ui.ISaveablePart#doSaveAs()
     */
    public void doSaveAs() {
        // Show a SaveAs dialog
        Shell shell = getSite().getWorkbenchWindow().getShell();
        SaveAsDialog dialog = new SaveAsDialog(shell);
        dialog.setOriginalFile(((IFileEditorInput) getEditorInput()).getFile());
        dialog.open();

        IPath path = dialog.getResult();
        if (path != null) {
            // try to save the editor's contents under a different file name
            final IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
            try {
                new ProgressMonitorDialog(shell).run(false, // don't fork
View Full Code Here

Examples of org.eclipse.ui.dialogs.SaveAsDialog

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  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

Examples of org.eclipse.ui.dialogs.SaveAsDialog

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  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

Examples of org.eclipse.ui.dialogs.SaveAsDialog

        MessageDialog.QUESTION,
        buttons,
        0);
       
      if (dialog.open() == Window.OK) {
        SaveAsDialog saveAsDialog = new SaveAsDialog(activeWindow.getShell());
        saveAsDialog.setOriginalFile(resourceInfo.getFile());
        saveAsDialog.open();
       
        IPath path = saveAsDialog.getResult();
        if (path != null) {
          boolean saveSuccess = handler.saveFileAs(
              resourceInfo,
              ResourcesPlugin.getWorkspace().getRoot().getFile(path));
          if (saveSuccess) {
View Full Code Here

Examples of org.eclipse.ui.dialogs.SaveAsDialog

   * @generated
   */
  protected void performSaveAs(IProgressMonitor progressMonitor) {
    Shell shell = getSite().getShell();
    IEditorInput input = getEditorInput();
    SaveAsDialog dialog = new SaveAsDialog(shell);
    IFile original = input instanceof IFileEditorInput ? ((IFileEditorInput) input)
        .getFile() : null;
    if (original != null) {
      dialog.setOriginalFile(original);
    }
    dialog.create();
    IDocumentProvider provider = getDocumentProvider();
    if (provider == null) {
      // editor has been programmatically closed while the dialog was open
      return;
    }
    if (provider.isDeleted(input) && original != null) {
      String message = NLS.bind(
          Messages.CismodelDiagramEditor_SavingDeletedFile,
          original.getName());
      dialog.setErrorMessage(null);
      dialog.setMessage(message, IMessageProvider.WARNING);
    }
    if (dialog.open() == Window.CANCEL) {
      if (progressMonitor != null) {
        progressMonitor.setCanceled(true);
      }
      return;
    }
    IPath filePath = dialog.getResult();
    if (filePath == null) {
      if (progressMonitor != null) {
        progressMonitor.setCanceled(true);
      }
      return;
View Full Code Here

Examples of org.eclipse.ui.dialogs.SaveAsDialog

   * <!-- end-user-doc -->
   * @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.