NetBeans - Refactor killed my custom components.

NetBeans - Refactor killed my custom components.

Post by ImLurkingH » Sat, 30 Jun 2007 10:08:49


I'm working on a program in the NetBeans IDE. I have a few components
that I've created, and added to the design pallet.

Today, I decided to reorganize my code a bit, and renamed the default
package where most of my source is kept. After re-naming and
refactoring the code, I opened up one of my forms, to discover that
all of my compontents were "invalid". In some forms it gives me errors
about loading the properties of the various components. The components
were added from the project, not from a JAR, if that makes any
difference.

I tried "reload form" in the source browser, but it doesn't work :(.

Any suggestions? I really don't feel like starting over. I'm using
NetBeans 5.5.

Thanks.
 
 
 

NetBeans - Refactor killed my custom components.

Post by Andrew Tho » Sat, 30 Jun 2007 12:23:11


Note this is an IDE/java problem (but mostly IDE).
It is not so much a 'GUI' question.


Stop using NetBeans until you can code both
basic Java, and are relatively proficient in writing
GUI code.

The basic problem here, I guess, is that the NetBeans
form definition is still expecting the old packge names
(or lack of them). But that is between you, and your
IDE.

--
Andrew Thompson
http://www.yqcomputer.com/

Message posted via http://www.yqcomputer.com/

 
 
 

NetBeans - Refactor killed my custom components.

Post by ImLurkingH » Sat, 30 Jun 2007 12:53:25


Sorry, I'll keep that in mind.


Well, that prompted me to try and open up the .form file used by
NetBeans, and I'm in luck. It's an XML document, so I can change the
class references in the form to point to the new packages.

Thanks for the (slightly indirect) help!
 
 
 

NetBeans - Refactor killed my custom components.

Post by Andrew Tho » Sat, 30 Jun 2007 14:52:26


.

Aha! Well, if you are going to add that level of common
sense to the use of the IDE while learning Java, it might
be possible to circumvent or work around the hazards I
expected would hinder the project!


Yeah. NB is relatively sensible that way. The project
files are either ant based build.xml's, or NB's own (AFAIR)
internal project files are also XML based.

If something goes wrong with a build or run
(it will) those are the the most common files to
look into.


Glad you sorted it.


Your ability to sort the problem from the hint,
and willingness to report back, was more than
enough thanks.

--
Andrew Thompson
http://www.yqcomputer.com/

Message posted via http://www.yqcomputer.com/