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 56549 - Move class refactoring breaks Design UI
Summary: Move class refactoring breaks Design UI
Status: RESOLVED DUPLICATE of bug 48288
Alias: None
Product: java
Classification: Unclassified
Component: I18N (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-16 15:57 UTC by _ pkuzel
Modified: 2008-03-25 18:57 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 _ pkuzel 2005-03-16 15:57:15 UTC
Problem: I have I18N-ed form with NbBundle.getMessage(My.class, <key>) access
format. I used move class refactoring moving the form to another package, Then I
manually edited Bundle.properties file moving relevant entries.

Final code runs but form does not display in design view anymore. Problem is:  
     

<Property name="text" type="java.lang.String"
editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
          <ResourceString
bundle="org/netbeans/modules/versioning/system/cvss/ui/wizards/Bundle.properties"
key="BK1001"
replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class,
&quot;{key}&quot;)"/>
        </Property>

property bundle attribute still references old bundle.


Expected behaviour: after move refactoring form fully works. 
Acceptable behaviour: .form format use relative path to bundle (so almost always
"Bundle.properties") that is invariant to move refactoring (but user still needs
to move relevant entries).


Workaround: open .form file in *external* editor then search and replace.
Comment 1 Marian Petras 2005-03-22 14:19:52 UTC
Confirmed, accepted.
Comment 2 Tomas Pavek 2008-03-25 18:57:13 UTC
I think the suggested behavior is a bit tricky. Actually if you move the form and keep entries in the original file then
it will work. You moved the properties entries manually - but I'm not sure we should expect people knowing and doing
this. IMO there is no good way to fix this - other than making the GUI builder automatically manage the properties
entries and move them together with the form. This works best with the Swing Application Framework where the location is
defined always relative; the automatic internationalization feature from NB 6.0 also assures the entries are moved with
the form (integrated with refactoring).

*** This issue has been marked as a duplicate of 48288 ***