Bug 3921 - Improve wording of extract method error message (1GF5Y0G)
Summary: Improve wording of extract method error message (1GF5Y0G)
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All Windows 2000
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Dirk Baeumer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 23:03 EDT by Dirk Baeumer CLA
Modified: 2002-03-11 10:36 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Baeumer CLA 2001-10-10 23:03:03 EDT
If a selection can't be extracted because only a part of a statement is selected the errors message says:

	"Cannot extract new method from selection. Only statements from a method body can be extracted."

	Should be improved to say

	"Cannot extract new method from selection. Only >>whole<< statements from a method body can be extracted."


NOTES:
Comment 1 Martin Aeschlimann CLA 2001-10-16 11:14:11 EDT
moved to 'active'
Comment 2 DJ Houghton CLA 2001-10-24 07:24:51 EDT
PRODUCT VERSION:
	122

Comment 3 Erich Gamma CLA 2001-11-10 11:07:09 EST
It is possible to extract expressions from a statement and
not only entire statements, e.g.,
int a= >>f()+g()+1<<

Therefore the error message isn't correct.
Options:
*   readjust the selection so that it covers the largest legal 
    extraction range.
*   improve the error message and give a hint what the user
    should do.
Comment 4 Dirk Baeumer CLA 2001-11-12 04:26:45 EST
This should be solved by using the new context definable in a refactoring error
Comment 5 Dani Megert CLA 2002-02-27 10:51:27 EST
Still same old message in I20020226. Leaving P2
Comment 6 Dirk Baeumer CLA 2002-03-11 10:36:40 EST
Improved wording of existing error messages plus added a context to the error 
message when possible.

Fixed in build > 20020307