This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 51338 - Refactoring would add necessary imports
Summary: Refactoring would add necessary imports
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 4.x
Hardware: PC All
: P2 blocker with 1 vote (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-09 18:33 UTC by psuk
Modified: 2011-01-06 12:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description psuk 2004-11-09 18:33:04 UTC
If refactoring feature, such as Change Method
Parameters, adds the usage of type T, it needs to
check the source code and add import statement for
that type to avoid 'unresolved symbol' error and
manual steps for fixing that.

Comments from the NetBeans 4.0 Beta 2 feedback:
--------------------------------------------
I had this constructor:
    Position(Node node, int offset)

and I added a third parameter like this:
    Position(Node node, int offset, Bias bias)

'with a default value of Bias.FORWARD.

Bias is in the same package as this class (Position).

However, in all the references in other packages
to this constructor, it failed to import the Bias
class. Thus when I try to compile after the
refactoring, I get "cannot resolve symbol" on
Bias. Now I have to go and manually import it in
each of the referencing classes (there are many). 
--------------------------------------------
Comment 1 Jan Becicka 2011-01-06 12:09:24 UTC
already fixed.