If you want to "copy to/switch to" a branch sometimes the Library folder is selected in the dialog popup instead of the
We are using the shared library functionality introduced with Netbeans 6.1. We find out that it must have something to
do with the nblibraries.properties file.
As a workaround we change the folder where nblibraries.properties is stored from the project properties window. Finally
if you retry to copy to/switch to a branch the actual project is selected. Unfortunately this does not always work.
> If you want to "copy to/switch to" a branch sometimes the Library folder is selected in the dialog
> popup instead of the project.
unfortunately, it's not fully clear to me what your problem is, however, i guess you meant the "Repository Folder" field
in the copy/switch dialogs, am i right?
the way, the folder gets preselected, is that it always takes the last used location. If there were recently used more
locations, they all are available from the fields combo list. It's hard or even impossible to find out from the
selections context what should be the destination/source for the copy/switch operation and I'm afraid there is nothing
we could do about it.
could you please elaborate in case this isn't your problem?
what exactly is your project setup?
what exactly is the lib folder? is it under your project root or is located somewhere else on your disk?
in what field of the copy dialog is the lib folder selected? in the "local folder" field or the repository location, ...?
Created attachment 72573 [details]
Screenshot where you can see that project Controls is selected in the explorer but Switch Libraries is shown in the dialog
No I do not mean the Repository Folder. This could be handled very easily just by selecting the right project.
The attached pic shows it: In the project explorer Controls is selected. The user right-clicked on the project and chose
Subversion/Switch To. Then the dialog pops up and - surprisingly - titles "Switch Libraries". If you oversee it the
effect is that all the libs stored in Libraries get deleted and your Controls project is checked out into that folder!!
The nblibraries.properties file is set relative to the project. All projects are stored under the usual Netbeans
Projects folder. The Libraries folder is also in there. To make it clear the structure is
Of course Libraries is not a project itself but just a folder where all libs are placed.
ok then, i could reproduce with 6.5 on macos:
1.) created a project - .../NetBeansProjects/JavaApplication1
2.) set "Use dedicated Folder..." to "../libraries" -> .../NetBeansProjects/libraries
3.) added a lib from libraries to JavaApp1
4.) imported the project into a svn repo
5.) imported the libs forlder into a svn repo
6.) copied the project
7.) switching between the copy and trunk seemed to work fine
8.) nb restard
9.) invoked the switch dialog and libraries was the context given for switch!
caused by the fact that the project node returns two folders - the project folder and libraries. Switch then takes the
first of them, which sometimes happens to be libraries.
suggested workarround would be to mount the netbeans projects folder in the favorites view and to switch and copy from
there. The described behaviour is related only to the projects view.
lowering to p2 - no data loss, the lib can be switched back, simple workaround exist
however, we should fix asap - in the patch 1 - if all agree.
unfortunately, it looks like we won't be to provide the fix already for 65 patch1 ...
- need a way how to get the info from projects which file is the library and which a project root.
- the problem probably also applies for other actions - need to be evaluated
bad news that this issue will not be in patch 1...
at least the problem occurs for the "copy to" and "switch to" commands. Although you can use the "favourite" folder for
these actions one has to recognize this... so it is currently "dangerous" to use these commands from the project pane -
resulting in a real mess in your workspace folder...
under this impression I do not think that P2 is appropriate.
some project nodes may return more then one folder, we let the user decide which one he wants to use for the action
changeset : 110043:7d65968f7dc2
author : Tomas Stupka <firstname.lastname@example.org>
date : Tue Dec 02 15:21:53 CET 2008
summary : #151220 - Subversion CopyTo/Switch selects Library folder
Integrated into 'main-golden', will be available in build *200812050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Tomas Stupka <email@example.com>
Log: #151220 - Subversion CopyTo/Switch selects Library folder
great news. i will give it a try. thanks for your work.
Integrated into 'main-golden', will be available in build *200812101401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Tomas Stupka <firstname.lastname@example.org>
Log: #151220 - Subversion CopyTo/Switch selects Library folder - added help context for the new FileSelector dialog
Verified in trunk.
The changesets have been backported into release65_fixes repository in following way
http://hg.netbeans.org/main/rev/7d65968f7dc2 as http://hg.netbeans.org/release65_fixes/rev/c5841a997309
http://hg.netbeans.org/main/rev/fc1e3102b590 as http://hg.netbeans.org/release65_fixes/rev/58e8fb5f7568