Bug 271639 - [extract local] can't extract temp from assignment inside another expression
Summary: [extract local] can't extract temp from assignment inside another expression
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on: 287701
Blocks:
  Show dependency tree
 
Reported: 2009-04-08 10:39 EDT by Brian Miller CLA
Modified: 2019-05-14 05:33 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Miller CLA 2009-04-08 10:39:45 EDT
Build ID: I20090313-0100   (3.5M6)

Please try to extract a local variable from the entire expression on LINE 5.  A popup dialog complains:  "An expression must be selected to activate this refactoring."

----------------- Bug.java -----------------
class Bug {
	{
		String[]both={"",""};
		System.out.print(
	both[hashCode()%2]=new String() //LINE 5
			);
	}
}
Comment 1 Markus Keller CLA 2009-08-26 10:56:35 EDT
Bug 287701 causes the "An expression must be selected" message.

Without whitespace after the assignment this has just not been implemented (but gives a proper error message). Simple example:

            int x;
            System.out.println(x=1);
Comment 2 Eclipse Genie CLA 2019-05-14 05:33:11 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.