Bug 148683 - [DeleteFromSupport] PromptingDeleteAction casts selected editpart to View
Summary: [DeleteFromSupport] PromptingDeleteAction casts selected editpart to View
Status: NEW
Alias: None
Product: GMF-Runtime
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: 2.1   Edit
Assignee: Cherie Revells CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-26 13:02 EDT by Randy Hudson CLA
Modified: 2010-07-19 21:59 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Hudson CLA 2006-06-26 13:02:33 EDT
PromptingDeleteAction assumes that every editpart returns an instance of View for getModel(). I have a view that contains children that are not views.
Comment 1 Steven R. Shaw CLA 2006-06-26 13:54:33 EDT
Client had overridden base class behavior for getModel to return direct reference instead of the dummyView.  They have been advised instead to use the basicGetModel() method instead in their hierarchy to retrieve the direct reference.

Code in PromptingDeleteAction should still not blindly cast from getModel.  Best practice would be to call hasNotationView first...

If workaround is acceptable, we should downgrade severity to "normal"
Comment 2 Randy Hudson CLA 2006-06-26 15:01:57 EDT
It is working, but any client of getModel() needs to use workaround code to actually get to the real model. I created a public method on my editpart called get"Real"Model().
Comment 3 Steven R. Shaw CLA 2006-06-26 15:12:18 EDT
downgraded to normal severity
Comment 4 Steven R. Shaw CLA 2006-06-27 10:15:58 EDT
Targetting 2.0 since part of the proper fix is it not return a dummy view for getModel
Comment 5 Anthony Hunter CLA 2007-06-19 11:13:39 EDT
Moving to the next release, GMF 2.1.
Comment 6 Eclipse Webmaster CLA 2010-07-19 21:59:01 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime was the original product and component for this bug