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.
See attached screen shot. I already have checked out the first two projects, Diff and SimpleValidation. Yet the UI does not show any link to the checked-out projects. It does offer to get me another copy (not necessarily bad that it can work, but not the first option the user should see). Strangely, Simple Validation has a button "other..." which mysteriously opens a file chooser (for opening projects, I guess?). I'd expect the IDE to remember where I've got one or more existing copies of the project, and show those, giving them priority in the UI over getting another copy of the repository. And the Other button is quite mysterious.
Created attachment 82001 [details] screen shot
First of all 'Other ...' button was renamed to 'Open Local Project ...' so it's probably understandable now. But there is really usability problem: After user get sources from Kenai and didn't open any project there is no indication that sources are already locally checked out. Moreover the button 'Open Local Project ...' shows up only after opening a project. Honzo, please evaluate.
If the IDE checks out the sources, it probably wouldn't be that hard for the UI to remember (in NbPreferences or similar) the location and display that if it still exists. It probably should have multiple entries as there could be multiple projects checked out, and, for example, I've currently got two checkouts of one project on different branches. At any rate, just opening a random Open Project dialog do anything a user is likely to expect - since the IDE knows where it checked things out last, it should remember that.
after b8c8c795a79e if you do checkout, there will be link to Open local project, which will open project dialog with your local versioning root. It is too late for some deeper changes. We are thinking about link to Favorites or something like that.
Integrated into 'main-golden', will be available in build *200905220201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/b8c8c795a79e User: Jan Becicka <jbecicka@netbeans.org> Log: #164996: Kenai integration offers to get source code when I already have it
When the source is already checked out, the (get) link should be changed to (browse...) or something like that and clicking on it should go to Favorites tab.
I think 'get' should always be there, you may want another checkout, or re-checkout the existing sources. After sources are checked-out, two new options should appear (perhaps on new line): * one for showing the versioned root in Favorites (browse?) * one for opening project chooser on the root (open local project) Then individual projects appear listed as you opened them (just like it is already now)...
Milane, please help. Please add some API for adding items into favorites tab and selecting in favorites tab. Thanks
Reassigning to Richard, the new owner of Platform/Favorites.
Created attachment 83929 [details] AI change
Created attachment 83930 [details] API change
Attaching proposed API change, Honzo, Milane, please review if it suits your needs. Especially files must exist if they are to be added/removed, much more would have to change to support non-existent files, I don't know if it limits you. Tests, apichanges.xml and arch.xml will follow. I've decided to expose only friend api to o.n.m.kenai.ui for now, since there are 2 possible future changes that may affect the API considerably in the future: 1) If I understand correctly you need more of project-free file explorer than actual Favorites. This may be later provided by Files window rather than Favorites, name of the singleton may change in such case. 2) Favorites may support more than files/folders in future, method parameters would then be something more general than FileObjects.
I'm sorry, but I'm not able to apply the patch beci@vajicko:~/source/cdev> hg import ~/downloads/patch2.diff applying /home/beci/downloads/patch2.diff abort: bad hunk #1 @@ -257,7 +257,11 @@ (8 7 11 11)
Created attachment 83939 [details] API change (fixed)
Sorry, my mistake. Fixed version is now applicable to newest sources.
thanks, this one is better.
Richarde, maybe separate add and select methods: Because now I have add(FileObject[] f, boolean select), which is really what I want, if the FileObject(s) is not in Favorites. But if the FileObject already exist in Favorites, there is no easy way, how to select it (add method throws java.lang.IllegalArgumentException: File /home/beci/NetBeansProjects/anagram-game~anagramgame already in Favorites.) Of course I can do remove/add(true) - but it is strange. Thanks
Created attachment 83988 [details] API change v.2
> maybe separate add and select methods: I thought so, since you've said selection can be done via Explorer & Nodes API, I didn't care about it in first version. I can add separate method add and select, but I guess that typical use-case would be: FileObject fo = ....; Favorites fav = Favorites.getDefault(); if (! fav.isInFavorites(fo)) { fav.add(fo); } fav.select(fo); It might be more convenient to have selectWithAddition(FileObject) method which selects the file if it already is in Favorites and adds and selects otherwise. Previous use-case would translate into: FileObject fo = ....; Favorites.getDefault().selectWithAddition(fo); See patch v.2. I also separated add(FileObject) and addAll(FileObject[]) and similarily remove and removeAll. Also add/addAll now ignore already present files instead of throwing IAE.
selectWithAddition is exactly what I want. Thanks maybe you can replace add(FileObject) and addAll(FileObject[]) with just add (FileObject... f), the same with replace/replaceAll. But it is up to you. I'm happy with selectWithAddition.
> maybe you can replace add(FileObject) and addAll(FileObject[]) with just add (FileObject... f) Will do, thanks for review. I'll add tests and if there are no further comments, I'll integrate tomorrow.
core-main #a783964438e8
Integrated into 'main-golden', will be available in build *200906300200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/a783964438e8 User: Richard Michalsky <rmichalsky@netbeans.org> Log: #164996: Favorites friend API for kenai.ui
Browse link added. (cdev repository)
Integrated into 'main-golden', will be available in build *200906301400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6b01df4e9cbf User: Jan Becicka <jbecicka@netbeans.org> Log: #164996: Browse link added