VersionableLibraryDescriptorOldUIProposal

Old UI proposal for Versionable Library Descriptor

David Šimonek is advisor.

(Current UI is minimal but seems to work enough for now, can be improved later.)

  • In Library Manager you can Load Definitions and either select an existing .properties file or type in the name of a new one. The new storage area will be added to the list of available areas for the IDE session at least.
  • The list of areas also includes any which are already in use from open projects.
  • You can create new libraries and select an area to put them in. You can edit their contents like any other libraries.
  • You can add project libraries to a project just like any other. References are maintained for you automatically.

File:OutOfBoxVersionability/project-libraries-main-window.png File:OutOfBoxVersionability/project-libraries-library-manager-dialog.png File:OutOfBoxVersionability/project-libraries-load-definitions-dialog.png File:OutOfBoxVersionability/project-libraries-new-library-dialog.png File:OutOfBoxVersionability/project-libraries-j2seproject-libraries-panel.png File:OutOfBoxVersionability/library-chooser.png File:OutOfBoxVersionability/embedded-library-chooser.png File:OutOfBoxVersionability/palette-library-chooser.png

To play with the example shown in the above screenshots: OutOfBoxVersionability/uses-random.zip

It is also possible to use project libraries from a freeform project: OutOfBoxVersionability/freeform.zip (In this example the library definitions file is not used by Ant, but it could be.) There is a separate issue for making a decent GUI for this: Issue #47498

Problems noted in current UI:

  • New Library dialog - should be able to load new defs area here.
  • Add Library dialog - should be able to load new defs area here.
  • Feature to convert JAR CP entry to local library was rejected.
 Instead directly associate source & Javadoc - Tomáš will work on it (IZ #?).
  • Create/Load Definitions label needs to be changed.
  • Should have some default definitions location e.g. per project.
 So you could either pick a project and have the IDE use e.g. libs.properties,
 or pick a specific file by name.
  • Probably requires SPI addition to supply suggested defs location for project dir.

UI requests from Jano:

  • It should be possible to specify a new storage location in the New Library dialog.
  • The Load Definitions button should only permit to "load", not "create" a definition. The title of the file chooser should be Load and the buttons should be Load and Cancel. The Files of Type combo should say something like *.properties (Library Definition File).
  • The Add Library dialog can show an inline warning if the user selects a global library to add it to a versioned project. Something like: "Global library definitions cannot be shared by projects shared in version control system." Or something similar. Please fix the spacing in this dialog.
  • If a shared project contains a global library, we can indicate the problem with a warning badge in project window. But we need the improved indication in Properties dialog to point the user to correct category where the user can fix the problem. Potentially also propose a fix for it (convert global to shared?).


Comments on Out-of-the-Box Versionability

Current OutOfBoxVersionability proposal addresses just one of the aspects of the problem - shared libraries. There is several other problems which are more important:


  • The biggest problem is that user customizing their project and adding jar/library/project dependency has no idea and no control what's gonna happen. Simple amendment could be to always ask how to reference artifact being added to project. Below is rough UI which purpose is to list all possible options (in no particular order) just to facilitate discussion:

(Picture illustrates the case when C:\repo\libs\jakarta\commons-lang.jar is being added to project C:\dev\trunk\myjava)

Image:add-reference_OutOfBoxVersionabilityComments.png

This UI would be used to add any artifact to project, that is jar/library/project/J2SE platform/J2EE Server/... Not all options are always available, e.g. for platform it will be only environment variable; but user should have control over what is the name of variable at least as they will need to document it for their colleagues - after fresh checkout you need to set variable JDK_5 to something.

I would also argue that in most of the case the default recommended option should be to simply copy everything to project folder. Even the libraries including their javadoc/sources.


  • Current inability to attach sources/javadoc with regular jar is another problem. Java Library is IDE concept which you need to be aware of and understand it. I believe that first time users will just ignore it, put jars on classpath and later when they debug project or wanna see javadoc they would expect (in worst case) that IDE asks them where are the sources/javadoc once and from then it just work. Btw. associating javadoc/sources with the project would use the customizer described in first paragraph - user has control how javadoc/sources will be referenced.


  • Project UI should indicate or just show where relative/sharable paths are used, where env variables are used and where fully qualified paths are used.


  • Fresh build checkout should not fail with javac compilation error, but stating which environment properties are not set
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo