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.
Summary: | [50cat] user.home ignored for Platform Manager Sources default | ||
---|---|---|---|
Product: | apisupport | Reporter: | rrochat <rrochat> |
Component: | Project | Assignee: | Jesse Glick <jglick> |
Status: | RESOLVED DUPLICATE | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 5.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
rrochat
2005-10-11 23:19:19 UTC
Issue #47737 tracks the general lack of an API suitable for this purpose. Re. "another unrelated bug" - as you say, it's unrelated, so if you can reproduce it, please file it separately with details. *** This issue has been marked as a duplicate of 47737 *** Issue 47737 is about saving the last file selection, which is a noble cause, but I don't want that. I just want a defined default starting point that can easily solved by using user.home. Yes, it can be nice when the dialog is really smart and can guess what I want, but I don't see how you could infer the location of netbeans sources from any other file selection that I make. Just as often as not (i.e. the New Module Project's Project Location), these intelligent guesses are not at all what I want. (Its choice is still better than "My Documents," but I'd still rather have it use my specified user.home). We just make a new JFileChooser(). Whatever its default behavior is, that is what you get. FileSystemView.getDefaultDirectory() calls into some vendor-specific code; feel free to file an RFE for the JDK that this should honor ${user.home} as a system property rather than Windows' notion of the default directory. In the meantime, issue #47737 would at least make the initial value less arbitrary; but ultimately the IDE cannot really guess where you might have downloaded sources (your Desktop? a temp folder somewhere? a lib area of your project dir?) so you are going to have to pick it. BTW the Quick File Chooser module installs a file chooser which keeps a folder history, which is another approach. *** This issue has been marked as a duplicate of 47737 *** In particular, the platform-independent default behavior *is* to use ${user.home} (so this should work on Linux, e.g.). However for Windows this is overridden in j2se/src/windows/classes/sun/awt/shell/Win32ShellFolderManager2.java, to pick the W32 location 'PERSONAL' and, failing that, 'DESKTOP'. So you may be able to regedit32 your way to perfection: Windows is configured to think of "C:\Documents and Settings\rrochat\My Documents" as the default location for everything. > A "D:\D" is also added somehow to Platform sources list.
filed/fixed (issue 66548)
I understand that you're using the default JFileChooser behavior, but I don't see why we're stuck with that. I also don't want to "regedit32 my way to perfection" and modify variables that are used by other programs in other ways. I just want it to use the netbeans user.home directory I have already specified. I can easily modify my own sources, but thought this enhancement would save others time and frustration too. Also see the issue 67834. Probably shared for all platform related choosers - sources, javadoc, plaf itself. I hope I'll implement it for 5.0, since 47737 doesn't seem to be fixed soon (and should be simplefix for 67834 as well) |