Bug 54980 - [quick fix] supporting cast to related types
Summary: [quick fix] supporting cast to related types
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-16 12:39 EST by Jens Odborg CLA
Modified: 2009-01-23 11:31 EST (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 Jens Odborg CLA 2004-03-16 12:39:37 EST
e.g.
class Ancestor {}
class Derivered1 extends Ancestor {}
class Derivered2 extends Ancestor {}
class Container {
  Ancestor ancestor;
}
void f(Container c){
  g( c.ancestor/* when pressing ctrl-space here the listbox shoul include 
    2 entries called "Cast to derivered type >" and "Cast to base type >"
    selecting one of these should bring up a sub list of classes containing
    either "Derivered1" and "Derivered2" or "Object"
    selecting e.g. "Cast to derivered type >"."Derivered1"
    should transform the line to

  g( ((Derivered1)c.ancestor)

  */
  ...
}
Comment 1 Martin Aeschlimann CLA 2004-03-17 10:03:28 EST
code assist is more doing completions that assisting. Quick assist could help.
Will keep in mind, probably not for 3.0
Comment 2 Dani Megert CLA 2006-07-11 05:23:30 EDT
Discussed at the JDT Summit 2006:
- agreed that it should not go into code assist
- quick assist/fix could be triggered by "(x" and "(x." pattern