org.eclipse.ui.ide.IDE.saveAllEditors()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(319)

本文整理了Java中org.eclipse.ui.ide.IDE.saveAllEditors()方法的一些代码示例,展示了IDE.saveAllEditors()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IDE.saveAllEditors()方法的具体详情如下:
包路径:org.eclipse.ui.ide.IDE
类名称:IDE
方法名:saveAllEditors

IDE.saveAllEditors介绍

[英]Save all dirty editors in the workbench whose editor input is a child resource of one of the IResource's provided. Opens a dialog to prompt the user if confirm is true. Return true if successful. Return false if the user has canceled the command.
[中]将所有脏编辑器保存在工作台中,该工作台的编辑器输入是提供的IResource之一的子资源。打开一个对话框,提示用户confirm是否为真。如果成功,则返回true。如果用户已取消该命令,则返回false。

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.team.ui

/**
 * Save all dirty editors in the workbench that are open on files that may
 * be affected by this operation. Opens a dialog to prompt the user if
 * <code>confirm</code> is true. Return true if successful. Return false
 * if the user has canceled the command. Must be called from the UI thread.
 * @param resources the root resources being operated on
 * @param confirm prompt the user if true
 * @return boolean false if the operation was canceled.
 */
public final boolean saveAllEditors(IResource[] resources, boolean confirm) {
  return IDE.saveAllEditors(resources, confirm);
}

代码示例来源:origin: org.eclipse/org.eclipse.team.ui

/**
 * Save all dirty editors in the workbench that are open on files that may
 * be affected by this operation. Opens a dialog to prompt the user if
 * <code>confirm</code> is true. Return true if successful. Return false
 * if the user has canceled the command. Must be called from the UI thread.
 * @param resources the root resources being operated on
 * @param confirm prompt the user if true
 * @return boolean false if the operation was canceled.
 */
public final boolean saveAllEditors(IResource[] resources, boolean confirm) {
  return IDE.saveAllEditors(resources, confirm);
}

代码示例来源:origin: org.eclipse/org.eclipse.team.ui

/**
 * Save all dirty editors in the workbench that are open on files that may
 * be affected by this operation. Opens a dialog to prompt the user if
 * <code>confirm</code> is true. Return true if successful. Return false
 * if the user has canceled the command. Must be called from the UI thread.
 * @param resources the root resources being operated on
 * @param confirm prompt the user if true
 * @return boolean false if the operation was canceled.
 */
public final boolean saveAllEditors(IResource[] resources, boolean confirm) {
  return IDE.saveAllEditors(resources, confirm);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui

/**
 * Performs the save of the editor parts returned by getScopedResources
 */
protected void doSave() {
  if(fSaves != null) {
    IDE.saveAllEditors(fSaves, false);
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.team.ui

/**
 * Save all dirty editors in the workbench that are open on files that may
 * be affected by this operation. Opens a dialog to prompt the user if
 * <code>confirm</code> is true. Return true if successful. Return false
 * if the user has canceled the command. Must be called from the UI thread.
 * @param resources the root resources being operated on
 * @param confirm prompt the user if true
 * @return boolean false if the operation was canceled.
 */
public final boolean saveAllEditors(IResource[] resources, boolean confirm) {
  return IDE.saveAllEditors(resources, confirm);
}

代码示例来源:origin: org.eclipse/org.eclipse.compare

/**
 * This method will save all dirty editors. It will prompt the user if the Compare preference to save
 * dirty editors before viewing a patch is <code>false</code>. Clients can use this or provide their own
 * implementation.
 */
protected void saveAllEditors(){
  IDE.saveAllEditors(new IResource[]{ResourcesPlugin.getWorkspace().getRoot()}, !ComparePreferencePage.getSaveAllEditors());
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.team.ui

/**
 * This method will save all dirty editors. It will prompt the user if the Compare preference to save
 * dirty editors before viewing a patch is <code>false</code>. Clients can use this or provide their own
 * implementation.
 */
protected void saveAllEditors(){
  saveAllEditors = IDE.saveAllEditors(new IResource[]{ResourcesPlugin.getWorkspace().getRoot()}, !ComparePreferencePage.getSaveAllEditors());
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.compare

/**
 * This method will save all dirty editors. It will prompt the user if the Compare preference to save
 * dirty editors before viewing a patch is <code>false</code>. Clients can use this or provide their own
 * implementation.
 */
protected void saveAllEditors(){
  saveAllEditors = IDE.saveAllEditors(new IResource[]{ResourcesPlugin.getWorkspace().getRoot()}, !ComparePreferencePage.getSaveAllEditors());
}

代码示例来源:origin: org.eclipse/org.eclipse.team.ui

/**
   * Save all dirty editors in the workbench that are open on files that may
   * be affected by this operation. Opens a dialog to prompt the user if
   * <code>confirm</code> is true. Return true if successful. Return false
   * if the user has canceled the command. Must be called from the UI thread.
   * 
   * @param confirm prompt the user if true
   * @return boolean false if the operation was canceled.
   */
  public final boolean saveAllEditors(boolean confirm) {
    return IDE.saveAllEditors(Utils.getResources(getFilteredDiffElements()), confirm);
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.team.ui

/**
   * Save all dirty editors in the workbench that are open on files that may
   * be affected by this operation. Opens a dialog to prompt the user if
   * <code>confirm</code> is true. Return true if successful. Return false
   * if the user has canceled the command. Must be called from the UI thread.
   *
   * @param confirm prompt the user if true
   * @return boolean false if the operation was canceled.
   */
  public final boolean saveAllEditors(boolean confirm) {
    return IDE.saveAllEditors(Utils.getResources(getFilteredDiffElements()), confirm);
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

if (!IDE.saveAllEditors(projectArray, true)) {
  return;

相关文章