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 71277 - Changing code name base through GUI
Summary: Changing code name base through GUI
Status: NEW
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Kozeny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-11 18:00 UTC by Martin Krauskopf
Modified: 2013-02-14 13:17 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Krauskopf 2006-01-11 18:00:07 UTC
Just to track this somewhere. Probably one of the most important feature?
Do you think this would be hard to do? Probably it would work similarly like
copying project? Question is just what would mean "renaming CNB". Maybe just:

1) Closing project (removing from suite for components)
2) Adjusting build.xml, manifest.mf, nbproject/project.xml
3) Appending it to the suite for components
4) Open

Too naive I feel :) Refactoring of packages would be nice to have, but probably
very hard to implement. And also something what the user can do later.

Also I forgot about e.g. TopComponent setting and wstcref files. And there is
probably more. But if we know them it should be hard to adjust those files as well.
Comment 1 Martin Krauskopf 2006-01-11 19:37:27 UTC
> But if we know them it should be hard to adjust those files as well.

Yup, I meant "... it should *not* be hard...". However I'm not quite sure :)
Comment 2 Jesse Glick 2006-01-11 23:14:54 UTC
Replacing all occurrences of the CNB in and of itself should not be hard, even
if you go into .settings files and so on. But doing this with the IDE open -
well, I don't know. Probably difficult to get everything to update cleanly.
There are dozens of listeners that would need to get notified of everything,
just a mess.
Comment 3 Jesse Glick 2006-01-11 23:15:53 UTC
BTW Honza - this falls into the category of "things that don't sound hard but
that may be impractical because of usage of the listener pattern".
Comment 4 Martin Krauskopf 2006-01-12 04:52:16 UTC
> Probably difficult to get everything to update cleanly. There are dozens of
> listeners that would need to get notified of everything, just a mess.

I thought that when you:

1) properly close a project (with ProjectState.notifyDeleted) plus detaching
   needed listeners - there is now method NbModuleProject.notifyDeleting which
   tries to do something similar, so might need to be enhanced.
   
   Or ideally all listener should be detached automatically when some other
   listener noticed that a project going to be deleted, i.e. no need to call
   NbModuleProject.notifyDeleting(). (but this is rather implementation detail)

2) then do the "replace"
3) Do the open (ProjectManager.find(), OpenedHook, ...)

that it could work, or not? What else listen after the step1? Might be that
dependen projects would be confused for a while - hmm, that could be problem.

Just curious :)
Comment 5 Jesse Glick 2006-01-12 06:08:13 UTC
Don't know in detail, just suspect it will be hard. If you have ideas, don't let
me stop you...