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 155681 - Refactoring File Type misses string in DataLoader constructor
Summary: Refactoring File Type misses string in DataLoader constructor
Status: RESOLVED WONTFIX
Alias: None
Product: apisupport
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: rmichalsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-17 16:07 UTC by tomwheeler
Modified: 2009-04-09 15:02 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 tomwheeler 2008-12-17 16:07:31 UTC
Steps to reproduce:

1.  Use the "New File Type" wizard to add support for a new file type.  Use a class name prefix of "Foo"

2.  Refactor the DataLoader class to change the name from FooDataLoader to BarDataLoader.  This step is probably
optional, but reflects what I had done when I encountered the defect so I have included it here.

3.  Refactor the DataObject class to change the name from FooDataObject to BarDataObject.

The DataLoader class' name is changed; however, the string passed in the constructor (fully-qualified name of the
DataObject class) was never changed.  The platform will throw a java.lang.ClassNotFoundException referencing the old
DataObject class' name until the String is manually changed to match the DataObject class' current name.
Comment 1 Jesse Glick 2008-12-17 16:43:00 UTC
Probably WONTFIX. For 7.0 there is a different default registration system (no DataLoader class in your module), and we
will likely want to use an annotation to do this. In such a case you would just write

@DataObject.Registration(mimeType="text/x-mine")
public class MyDataObject extends MultiDataObject {
  ...
}

and regular Java refactoring would work fine.
Comment 2 tomwheeler 2008-12-17 16:45:35 UTC
Fair enough.
Comment 3 rmichalsky 2009-04-09 15:02:47 UTC
Per Jesse's suggestion.