Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322786

Summary: CommonEditorUtility.promptToSaveDirtyEditors(List dirtyEditors) needs to be addressed
Product: [WebTools] WTP Java EE Tools Reporter: Carl Anderson <ccc>
Component: jst.j2eeAssignee: jst.j2ee <jst.j2ee-inbox>
Status: NEW --- QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: david_williams
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 322295    
Bug Blocks:    

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());