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 118587 - Provide a way to register known-locations
Summary: Provide a way to register known-locations
Status: CLOSED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: issues@platform
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-11 17:32 UTC by Karthikeyan Rajeswaran
Modified: 2009-01-09 17:17 UTC (History)
2 users (show)

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 Karthikeyan Rajeswaran 2007-10-11 17:32:27 UTC
The ide should provide a way for the user to define locations of files.

One use case for this is for defining libraries for a project. The project system now is well designed and separates
project-specific and user-specific information in different repositories. If we consider the case of a project that uses
a library (say regexp library from apache for regular exception handling): The physical location for the jar is of
course user-system specific but the fact that regexp library is used is really project-specific info. The ide should
provide a way for the user to define something like regexp.lib.dir which should be part of project-specific data and the
relative path of the actual jar with respective to regexp.lib.dir should go in user properties. This way when the
project is moved, there would be a broken reference that the ide can notify the user of. (In the current situation, the
user is required to manually figure this out).

I am creating this issue under core because i am not sure if this is something that can be handled by individual
sub-systems like project or ant plugins. The feature must be integrated in the core ide so that it is seamless to all
other sybsystems. Perhaps this belongs to openide category...
Comment 1 Karthikeyan Rajeswaran 2007-10-11 22:45:38 UTC
The specific usecase cited here is also being followed up at: issue 44035

I still think it would be a nice feature to support user-defined aliases for directories that is registered with the ide
and is 'understood' by ide and its modules. Perhaps issues like 44035 can then make use of this feature for their
implementation.
Comment 2 Karthikeyan Rajeswaran 2007-10-14 20:21:24 UTC
A similar request has been made and discussed at:
http://www.netbeans.org/nonav/issues/show_bug.cgi?id=109605

> A better solution is to reference jar files on classpath using an environment variable. Instead of 
> /home/viggo/.m2/repository/com/sun/faces/portlet/jsf-portlet/1.2/jsf-portlet-1.2.jar
> it should have been like this
> $M2_HOME/com/sun/faces/portlet/jsf-portlet/1.2/jsf-portlet-1.2.jar where M2_HOME is an environment variable referring to
> /home/viggo/.m2/repository

I am not closing this as a duplicate of issue 109605 because i am requesting for a feature that lets us arbitrarily
declare user-defined strings and somehow associate a meaning to it. One possible 'meaning' would be 'the parent dir for
one of my libraries'. I myself think it would be better to provide such a feature and then library and project
subsystems to use that feature, than to directly implement the feature in the subsystems.
Comment 3 Karthikeyan Rajeswaran 2008-04-03 18:02:59 UTC
An nbusers thread that makes a similar request:
http://www.nabble.com/Shared-libraries-in-6.1-td16467814.html
Comment 4 Karthikeyan Rajeswaran 2008-04-03 18:06:51 UTC
See also: issue 44035
Comment 5 David Konecny 2008-04-03 23:49:03 UTC
I just commented on that post with explanation how to do it. This enhancement seems to me fixed in NB6.1 - choose
libraries folder and in nblibraries.properties specify content. Do you agree? Thanks, -D
Comment 6 Karthikeyan Rajeswaran 2008-04-04 00:21:00 UTC
I agree the the solution provided does solve library-sharing issue very nicely.

- My request was for the ability to define a random string (like my.prj.folder) and associate it with a folder. Such a
string should then become usable everywhere in the ide that expects folder names. This will possibly indicate a custom
extension of FileChooser dialog. 
My request thus is not limited to library-sharing. Another usecase would be the location of jdk-platform used by
projects. It would be nice if the build-scripts etc used a variable to determine the jdk-platform-location. That way
when the project is moved to another machine, ide can easily check if the jdk-platform set for the project is still valid.

I realise that my above request should be fleshed out by me before I expect further evaluation. To that end, I am
marking this issue with the keyword 'INCOMPLETE' and will close this bug as LATER.

- Regarding library sharing, if users are not satisfied with the current implementation, we will request them to
continue the discussion at 44035.
Comment 7 Lukas Hasik 2008-04-04 10:42:18 UTC
CLOSED/LATER has no sense -> reopening to close again
Comment 8 Lukas Hasik 2008-04-04 10:42:41 UTC
v