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 189123 - Refactoring values of annotation elements not allowed
Summary: Refactoring values of annotation elements not allowed
Status: RESOLVED INVALID
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-02 12:14 UTC by Erno Mononen
Modified: 2010-09-24 07:52 UTC (History)
0 users

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 Erno Mononen 2010-08-02 12:14:07 UTC
I'm trying to provide rename refactoring for managed bean names. Managed bean names are typically defined via annotations, e.g.:

import javax.faces.bean.ManagedBean;

@ManagedBean(name = "foo")
public class FooBean { ...}

Now if you have the caret within "foo" in the above and invoke Refactor->Rename, an error saying "Cannot refactor library class javax.faces.bean" is displayed. The error comes from the org.netbeans.modules.refactoring.java.plugins.RenameRefactoringPlugin#preCheck() method. Due to this my refactoring implementation, which would handle renaming references to the bean name, doesn't get a chance to handle the refactoring at all. I suppose there may be a way to somehow workaround this already, but I don't know how to achieve that - any advice is appreciated. 

(Filing as a P2 as this is blocking a feature planned for M1.)
Comment 1 Jan Becicka 2010-09-24 07:52:24 UTC
This is not bug.

Refactoring of values is not supported, but you can write your own support and plug it in: implement your own ActionsImplementationProvider, but please carefully, you can significantly slow down the whole refactoring infrastructure, if the impl. is slow even for file you don't care.