Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318607 - [ltk] RefactoringParticipant methods declare throws OperationCanceledExeption: exception gets logged
Summary: [ltk] RefactoringParticipant methods declare throws OperationCanceledExeption...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M1   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-01 10:26 EDT by Karen Butzke CLA
Modified: 2010-07-02 09:56 EDT (History)
3 users (show)

See Also:


Attachments
Fix (1.38 KB, patch)
2010-07-02 08:48 EDT, Markus Keller CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Butzke CLA 2010-07-01 10:26:55 EDT
org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant.checkConditions() has a throws clause of OperationCanceledException. In my implementation of checkConditions() I check progressMonitor.isCanceled() and then throw the OperationCanceledException. ProcessorBasedRefactoring catches it and logs it, which just seems wrong to me.

Of course the workaround is just to return null instead of throwing the OperationCanceledException.

RefactoringParticipant.createChange() has the same problem but worse. In this case my participant gets removed from the framework as a result of throwing the OperationCanceledException.

I assume createPreChange() has the same issue.
Comment 1 Markus Keller CLA 2010-07-01 11:22:25 EDT
That's bad. Has been like this forever though (bug 116223, bug 63155), so I'm just going to fix it for 3.7, given that you already have a workaround.
Comment 2 Markus Keller CLA 2010-07-02 08:48:11 EDT
Created attachment 173299 [details]
Fix
Comment 3 Markus Keller CLA 2010-07-02 08:49:00 EDT
Fixed in HEAD.
Comment 4 Karen Butzke CLA 2010-07-02 09:56:11 EDT
Thanks for fixing this so quickly, Markus! Looks good to me, checked it out from head