Bug 71277 - Changing code name base through GUI
Changing code name base through GUI
Status: NEW
Product: apisupport
Classification: Unclassified
Component: Project
5.x
All All
: P2 (vote)
: TBD
Assigned To: Martin Kozeny
issues@apisupport
:
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


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...


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo