Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362782 - [templates][preferences] No multi Undo action in EditTemplateDialog
Summary: [templates][preferences] No multi Undo action in EditTemplateDialog
Status: CLOSED DUPLICATE of bug 206111
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-03 07:54 EDT by Wojciech Trocki CLA
Modified: 2011-11-04 07:23 EDT (History)
1 user (show)

See Also:


Attachments
Proposed path (24.47 KB, text/plain)
2011-11-03 07:56 EDT, Wojciech Trocki CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wojciech Trocki CLA 2011-11-03 07:54:56 EDT
Build Identifier: Official Eclipse 3.7.1 

When using dialog from Java >> Editor >> Templates >> Edit. Undo seems to work improperly. We can revert to only one element from history. After that undo will be disabled in contex menu and shortcut.


Reproducible: Always
Comment 1 Wojciech Trocki CLA 2011-11-03 07:56:30 EDT
Created attachment 206401 [details]
Proposed path

Proposed workaround

See line 136:
if (fOperationCode == ITextOperationTarget.REDO || fOperationCode == ITextOperationTarget.UNDO){
  return;
}
Comment 2 Deepak Azad CLA 2011-11-03 08:21:30 EDT
Thanks Wojciech! 

(In reply to comment #1)
> Created attachment 206401 [details]
> Proposed path
> 
> Proposed workaround
> 
> See line 136:
> if (fOperationCode == ITextOperationTarget.REDO || fOperationCode ==
> ITextOperationTarget.UNDO){
>   return;
> }
That makes sense to me, and I verified that undo works multiple times after this change.

Dani, assigning to you as you will anyway have to commit the change in org.eclipse.ui.texteditor.templates.TemplatePreferencePage.EditTemplateDialog :)
Comment 3 Dani Megert CLA 2011-11-04 07:23:45 EDT
Fix also needs to go into org.eclipse.ui.texteditor.templates.TemplatePreferencePage.

*** This bug has been marked as a duplicate of bug 206111 ***