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 72859 - Add an option to 'clone' an existing environment
Summary: Add an option to 'clone' an existing environment
Status: CLOSED WONTFIX
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: UI
Depends on:
Blocks:
 
Reported: 2006-02-20 19:00 UTC by felipeal
Modified: 2006-03-07 09:27 UTC (History)
0 users

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 felipeal 2006-02-20 19:00:37 UTC
The NetBeans Platform Manager dialog has an option do 'Add platform', but the
platform must exist in the file system, i.e, the user must somehow copy a
NetBeans installation (typically the current one) on another directory and there
is no way to do it inside the IDE (currently, the user must copy the directory
from outsite the IDE, what's not intuitive).

So, a nice feature would have a button to 'clone' an existing NetBeans platform:
this feature would do the external copy and the internatl 'Add Platform...' at
the same time...

-- Felipe

PS: not sure if this RFE belongs here or on the platform component...
Comment 1 Jesse Glick 2006-02-20 19:10:33 UTC
This is the correct component.

I'm not sure this is common enough to deserve special GUI support, though. (You
do not need to leave the IDE necessarily: you could copy platforms via the
Favorites window, for example.) What are the scenarios in which you feel you
need to clone a platform? After all, the suite properties dialog includes the
option to include/exclude particular clusters/modules, for the purpose of making
just one platform serve for very different needs.
Comment 2 felipeal 2006-02-20 21:22:55 UTC
> you could copy platforms via the Favorites window, for example.)

Where is that window?


>What are the scenarios in which you feel you need to clone a platform?

When developing/debugging a NetBeans module. Say I've just installed NetBeans
and want to develop a new module (or debug an existing one like mevenide). I
should be able to set the target platform for my module from the IDE, in an
intuitive way. Does it makes sense?

-- Felipe





Comment 3 Jesse Glick 2006-02-20 21:35:14 UTC
Window | Favorites

"I [...] want to develop a new module [...]. I should be able to set the target
platform for my module from the IDE, in an intuitive way. Does it makes sense?"
- sure but I'm asking about use cases for *cloning* an existing platform. Unless
you are making some kind of modification to the clone, there's not much reason
to do so that I can see.
Comment 4 felipeal 2006-02-20 23:21:45 UTC
> Window | Favorites

Sorry, but somehow I could not find that option at work, but I found it here at
home...


>- sure but I'm asking about use cases for *cloning* an existing platform. Unless
>you are making some kind of modification to the clone, there's not much reason
>to do so that I can see.

Hmm, maybe the term 'clone' was not a good option. What I meant was the ability
to copy the netbeans directory  (which is what the 'Add platform'  buttons look
for) from an existing platform (i.e., one listed on the Platform Manager) and
add it at the same time (instead of having to do the copy before adding).

Comment 5 Martin Krauskopf 2006-02-21 01:05:25 UTC
I do not see any usecase for this. Maybe it's a wontfix. I tried to help on the
feedback list but I lost the beginning of the thread since I was added later and
I'm not on the list. Here is potentially helpful piece of conversation:

====
Felipe Leme wrote:
> I agree with you, this situation is useful and it must be handled outside the
> IDE. But if you are developing a module to be tested in the current platform,
> you should be able to do without leaving the IDE - a simple way would be to
> add an option on the platform manager to "clone" an existing platform (it
> would be just a right click or a new button...). BTW, it seems so easy to
> implement such feature that I could create a RFE and submit a patch myself...

My answer (without further response):
...but by default your module is tested in the current platform. New instance of
the IDE you are running is started and your plugin is deployed there. There is
also an option (context menu of a module) to deploy the plugin in the IDE you
are just running - but not recommended for obvious reason (you will get
warning).
====

+ you may configure what should be part of the testing target platform in the
suite's libraries panel.... thus what is the real usecase? To me it seems it
would be just confusing to add such a feature to the GUI. One case I could
imagine is GUI support for suite chaining (harness/README), but it is not the
same. IMHO more info is needed.
Comment 6 felipeal 2006-02-21 01:31:28 UTC
Hi Martin,

Thanks for 'stopping by'. Let me try to explain the situation again.

Say that I just installed NetBeans and want to create a new module. First think I will do is to create a 
new standalone module project, using the template. In the second dialog, it asks me to choose a 
NetBeans platform. As you already mentioned, it's recommended to select another platform other than 
the one where I'm developing the module. But as I just installed NetBeans, there is no other platform 
available, so  I click on the Manage button, which offers the 'Add platform' button. Intuitivelly, I click on 
that button, which offers me a JFileChooser like dialog where I must select an existing directory for the 
new plarform...

In my opinion, there are 2 flaws in the current scenario:

- the user must realize that he has to select an existing directory
- even when he realize it, he must manually create that directory, typically copying (or cloning :-) its 
current NetBeans installation

Does it makes sense now or I am missing something? Unless it's ok to select the existing NetBeans 
platform (and if that's the case, I think that's not intuitive neither, as my module could mess it), I think 
this is a valid scenario...

-- Felipe



Comment 7 Martin Krauskopf 2006-02-21 01:54:22 UTC
> In the second dialog, it asks me to choose a NetBeans platform. As you already
> mentioned, it's recommended to select another platform other than the one
> where I'm developing the module.

This is misunderstanding. You may (and probably should in a majority of cases)
use the default platform *directory* offered in the IDE. Since you are probably
running NetBeans 5.0, so it is ok for you to select NetBeans 5.0 as a target
platform. What you are *not* recommended to do is to call "Install/Reload in
Development IDE" - since this will deploy the module in the running *instance*,
i.e. the one you are just working in -> and if your module is unstable (quite
normal during development phase), it can damage the running instance - the one
you are just working in.
On the other hand if you "normally" select "Install/Reload in Target Platform"
(the same as Running the module) the new *second instance* of the selected
target platform is run and the module is deployed there. Hope its clearer, sorry
for confusion.
Comment 8 felipeal 2006-02-21 02:19:52 UTC
Ah ok, I see it now...

So, it means that whatever my module does in the target platform, it won't mess up my current IDE? In 
other words, it won't damage the content of the chosen directory, right?

If that's the case, then you're right, it's a WONTFIX  - although it's not that clear to me , I mean, I think the 
normal reaction the user has (at least I had :-) is that the module would be physically installed on the 
chosen platform, hence permanently affecting it (maybe a note in the dialog would help; but it might be 
even more confusing...)  
Comment 9 Martin Krauskopf 2006-02-21 02:34:53 UTC
> So, it means that whatever my module does in the target platform, it won't
> mess up my current IDE? In other words, it won't damage the content of the
> chosen directory, right?

Exactly. Since every started instance of the IDE has its own so called
"userdir" (something like Eclipse workspace). So the instance you are running
has a different userdir than the instance where you deploy your plugin -> so
your working environment will not be touched.

> If that's the case, then you're right, it's a WONTFIX  - although it's not
> that clear to me...

It's even a little more compilated since module is part of cluster... ;). But
you do not need to care about this at all in the beginning. Good places to
start with developing NB plugins are e.g. http://platform.netbeans.org/ and
http://wiki.java.net/bin/view/Netbeans/NetBeansDeveloperFAQ where all such
answers are (should be) already answered.
Comment 10 Jesse Glick 2006-03-03 17:49:06 UTC
Don't see anything that needs to be changed here at the moment. Default setup
should work fine for most people; if you want to use a different platform you
need to get it from somewhere (cloning an existing one is useless).
Comment 11 Tomas Danek 2006-03-07 09:27:10 UTC
agreed. No real usecase. Can be closed now.