Bug 167084 - [CopyPaste] PasteCommand always returns OK command result
Summary: [CopyPaste] PasteCommand always returns OK command result
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: 1.0.1   Edit
Hardware: PC Windows XP
: P3 enhancement
Target Milestone: 2.1   Edit
Assignee: Anthony Hunter CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-07 08:31 EST by Christian Vogt CLA
Modified: 2010-07-19 12:29 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Vogt CLA 2006-12-07 08:31:29 EST
If I have a IClipboardSupport which overrides the paste operation and returns null for an object to be pasted, the PasteCommand will still return an OK command result even if no objects have been pasted. The command is then added to the operation history and is considered to be undoable. The command shouldn't be added to the operation history in this case.

Furthermore it doesn't seem possible to grey out the paste action in the above scenario because the PasteCommand returns true for canExecute.

Would it be possible to fix the PasteCommand so that clients have the opportunity to return false in canExecute() and if no objects are pasted have the PasteCommand return an error command result.
Comment 1 Eclipse Webmaster CLA 2010-07-19 12:29:30 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime Diagram was the original product and component for this bug