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

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

本文整理了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

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

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

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

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

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

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

  1. /**
  2. * Performs the save of the editor parts returned by getScopedResources
  3. */
  4. protected void doSave() {
  5. if(fSaves != null) {
  6. IDE.saveAllEditors(fSaves, false);
  7. }
  8. }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

相关文章