Summary: | Smart Save behaviour of a CU is problematic (1.0 fix candidate) | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Erich Gamma <erich_gamma> |
Component: | UI | Assignee: | Erich Gamma <erich_gamma> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P1 | CC: | John_Wiegand |
Version: | 1.0 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Erich Gamma
2001-10-29 17:13:55 EST
This would be the fix The fix is even simpler: In CompilationUnitEditor's default constructor: /** * Default constructor. */ public CompilationUnitEditor() { super(); setDocumentProvider(JavaPlugin.getDefault ().getCompilationUnitDocumentProvider()); setEditorContextMenuId("#CompilationUnitEditorContext"); //$NON- NLS-1$ setRulerContextMenuId("#CompilationUnitRulerContext"); //$NON- NLS-1$ setOutlinerContextMenuId("#CompilationUnitOutlinerContext"); // $NON-NLS-1$ fSavePolicy= new CUSavePolicy(); } set the fSavePolicy to null. fixed in 1.0 stream One case to consider (for 2.0 not the 1.0 rollup) is 1) Edit a .java file to change the class name, save (you get problems) 2) Select the class in its outline and rename back to the old name You are not able to do this since it detects that the file exists, but since it is the file you are changing, this case should not fail. fixed in rollup1 |