Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 515579

Summary: [quick assist] Quick Assists to add a cast to a statement
Product: [Eclipse Project] JDT Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, Lars.Vogel, noopur_gupta
Version: 4.7   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Lars Vogel CLA 2017-04-21 08:57:58 EDT
I frequently use the shortcut to assign the variable of a method to a new local variable.

Assume the following result:

View view = findViewById(R.id.resultView);

Now I need to change the type of View to TextView. The process in Eclipse (as well as in IntelliJ) is relatively time consuming:

1.) Change View to TextView
2.) Navigate to the findViewById
3.) Use Ctrl+1 to add a cast

I would be great if we could have a "Change type" quick assists which would allow to do all three steps at the same time.

Related but not the same is Bug 363435.
Comment 1 Dani Megert CLA 2017-04-21 09:45:19 EDT
(In reply to Lars Vogel from comment #0)
> 2.) Navigate to the findViewById

This step is not required. You can simply invoke Ctrl+1 and it jumps to the error. I don't think this justifies the addition of a new quick assist. If you disagree and want to contribute this, please reopen with a Gerrit change attached.
Comment 2 Lars Vogel CLA 2017-04-21 09:51:52 EDT
(In reply to Dani Megert from comment #1)
> (In reply to Lars Vogel from comment #0)
> > 2.) Navigate to the findViewById
> 
> This step is not required. You can simply invoke Ctrl+1 and it jumps to the
> error. 

Nice.

> I don't think this justifies the addition of a new quick assist. 

I agree.
Comment 3 Noopur Gupta CLA 2017-04-21 10:52:11 EDT
*** Bug 511175 has been marked as a duplicate of this bug. ***