Bug 322786 - CommonEditorUtility.promptToSaveDirtyEditors(List dirtyEditors) needs to be addressed
Summary: CommonEditorUtility.promptToSaveDirtyEditors(List dirtyEditors) needs to be a...
Status: NEW
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: jst.j2ee CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on: 322295
Blocks:
  Show dependency tree
 
Reported: 2010-08-16 09:24 EDT by Carl Anderson CLA
Modified: 2010-08-16 09:24 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Anderson CLA 2010-08-16 09:24:51 EDT
During the work for bug 322295 , I was unable to find an easy way to fix up the promptToSaveDirtyEditors(List dirtyEditors) method- the API that it calls no longer exists.  Instead, I fixed promptToSaveAllDirtyEditors(), and made it so that promptToSaveDirtyEditors(List dirtyEditors) calls promptToSaveAllDirtyEditors().  I also updated the JavaDoc to inform adopters.  However, we need to go back and address this method/decision.


+++ This bug was initially created as a clone of Bug #322295 +++

In e4, the EditorManager class was removed.  The static method that we use, saveAll(), needs to be replaced/updated with code that will work with e4.  If at all possible, this code should also work with Eclipse 3.7.  Here are the errors from the build:

Source File: org/eclipse/jst/j2ee/internal/plugin/CommonEditorUtility.java 
1. ERROR: ImportNotFound
The import org.eclipse.ui.internal.EditorManager cannot be resolved 

CommonEditorUtility.java : 

28 : import org.eclipse.ui.internal.EditorManager;

2. ERROR: UndefinedName
EditorManager cannot be resolved 

CommonEditorUtility.java : 

102 : return EditorManager.saveAll(dirtyEditors, true, true,false, J2EEUIPlugin.getActiveWorkbenchWindow());