Re: Some comments on the latest projects build

Tim Boudreau <[email protected]> Tue, 23 Sep 2003 12:06:36 +0200
Newsgroups gmane.comp.java.netbeans.modules.projects.devel
Message-ID <[email protected]>
Jan Becicka wrote:
> Tim, thanks for your valuable feedback
> 
> Tim Boudreau wrote:
> 
>> Creating a new project:
>> Set home directory
>>  - Use a different dir name than $HOME/Projects - it's not terribly 
>> unusual for a person to organize their own work in a directory called 
>> Projects in their home dir - I know I've done that in the past.  So to 
>> simply avoid such collisions, maybe something less likely, like 
>> "nbprojects" or such.
> 
> 
> Please file a bug.

http://projects.netbeans.org/issues/show_bug.cgi?id=36241

>>  - When I created a new Basic Java App project, the home directory
>> field was empty, and the chooser opened on
>> Filesystems\This Computer\C:\downloaded\netbeans\bin.  Probably
>> not the right place, and it would be good to provide a reasonable
>> default (this may be a bug, it did provide a reasonable default
>> the first time).
> 
> This is a bug. http://www.netbeans.org/issues/show_bug.cgi?id=35482

http://projects.netbeans.org/issues/show_bug.cgi?id=36242

>  > Add source directories, Add dialog:
> 
>> - 0 pixel margin on various labels in the the Add... dialog.  Needs a 
>> bit of UI tuning to align the Create button over the Cancel button, 
>> things like that.

http://projects.netbeans.org/issues/show_bug.cgi?id=36246

>> - What is "Places" and will it ever contain anything more than This 
>> Computer?  Seems like two semi-artificial abstractions here and I'm 
>> not sure either one helps.

http://projects.netbeans.org/issues/show_bug.cgi?id=36244

>> - Very poor performance expanding a folder with lots of subfolders. 
>> Probably a result of DataSystems, definitely something that should be 
>> looked at wrt FS Extension.
>> - The New Directory field and label should probably be a button or 
>> something, more like a file chooser.  Most of the time this will not 
>> be the option used (particularly since the task is to add *existing* 
>> sources at this point in the wizard).  Also it is not clear where the 
>> directory will be created

http://projects.netbeans.org/issues/show_bug.cgi?id=36245

>> - The Add dialog forgets the last place I added sources from - I have 
>> to drill through Places/This Computer/etc. again.  Two suggestions here:
>>   1. Open on the parent of the last added dir if there is one
>>   2. Provide a drop-down of previously used "recent folders" - this is
>>   fantastically useful in other applications, we should do it to (for
>>   file choosers as well, really)
>>
>> I end up with paths in the wizard like:
>> "This ComputerC:/space/nb_all/openide/src"
>> Surely the "This Computer" part shouldn't be there, or at least it
>> should have a trailing /.

http://projects.netbeans.org/issues/show_bug.cgi?id=36243

> 
> "Places", "This Computer" and mixture of "/" and "\" is defintely a bug. 
> Terms like "This Computer" and "Places" are not mentioned in UI spec 
> AFAIK. Please file a bug.
>> Add resources:
>> Why the word "resource"?  It sounds like an implementation detail here 
>> - at least for Java, are there any resources that are not class 
>> libraries?
>> Either allow the project nature (if I understand the nomenclature 
>> here) to provide the description here, or just call it libraries.
> 
> 
> See 
> http://projects.netbeans.org/uispecs/java/JavaProjectsUISpec.html#Resources 
> :
> "There are three main types of resources in the Java Project: Classpath 
> resources that are made up of JAR archives, and filesystems; JavaDoc 
> resources that typically provide support for Classpath resources; 
> Supporting Sources that provide source files in support of JAR archives 
> (used for debugging)."

Ok.  Personally I'd be ok with adding these various types of things
from one panel (less work for the user), with instructions making it
crystal clear what types of things are resources for this sort of project.

>> Using the project...
>> Too many nesting levels!
>>  - Sources/Packages - does the Sources node really need to be here?
>>  - Output/Compiled Classes - when is the output *not* compiled classes?
>> Am I really ever going to have more than one output directory in a 
>> project?
>>
>> Though not wildly scalable, you could do something like allowing the
>> nodes for Output/Sources/etc to check if they only have one child, and 
>> if so, provide the children of the one child, hiding the intervening 
>> node.  This might allow you to make some improvement in a fairly generic
>> way.
> 
> 
> This part of UI is not implemented according to UI spec. See 
> http://projects.netbeans.org/uispecs/java/JavaProjectsUISpec.html#Sources_and_Files. 

I'd suggest a trivial improvement to the spec - get rid
of the root node "Projects" - the explorer title communicates
this information, this node does nothing but take up space.

>> What does "opening" a project mean?  It seems to just expand a tree node
>> in the Projects pane.   I happen to know that there can even multiple
>> projects opened at the same time.
> 
> 
> All projects that are visible in the Explorer are opened I hope.

Ok.  What confused me was that I tried to open a project
that was already open, so it looked like nothing happened.
Perhaps currently open projects should not be in the pick-list.

>> When I close a project (which one am I closing when I choose Close
>> Project from the menu, anyway?), its node disappears from the list.
>> Maybe I shouldn't be able to open a project that's already open - it
>> would be more discoverable what this means that way.
> 
> You are closing current project.
> I must write again: this part of UI is not implemented according to UI 
> spec. See 
> http://projects.netbeans.org/uispecs/infrastructure/ProjectsInfrastructureUISpec.html#Menubar_Menus. 

"The Java Project adds the Platform Repository item to the tools menu. 
See the Platform Repository section for more details."

Looking at the Platform Repository menu doesn't seem to
answer my question.  I presume there will be some way
to open/close a project from the File/Project menu - I don't
think I'd ever figure it out otherwise.

Having read that, I'd strongly suggest *hiding*
the platform repository.  Most people will never
need it.  Two alternatives:

  - Another project type: "Java project for a different JVM"
    (okay, the wording needs some work, but you get the
     idea)
  - A pane in the wizard: "Do you need to run or debug this
     project using a different JDK than the one the IDE is
     using? [ ]"

If it's not checked, hide the platform stuff in the menus.
For most use cases it's just going to be noise and confusion.

>> Creating a new class:
>> I right click Test/Sources/Packages and choose new File/Folder, use 
>> the Main template, and get to Target location.  Some issues here:
>>  - Project combo is pointing to the "openide" project I created earlier,
>> but I clicked on the Packages node for project Test.
> 
> 
> Strange. It works for me.

http://projects.netbeans.org/issues/show_bug.cgi?id=36247

Do a lot of starting to create files and cancelling the
wizard, starting to add files and cancelling the add
dialog.  It may be something that works right on first
invocation but remembers some state info it shouldn't
and fails the second time.

>>  - Project combo is very slow to open the first time
> 
> Please file a bug. Projects build is very slow as a whole. There are P1 
> performance issues in IZ. Please file another one.
> BTW see http://www.netbeans.org/issues/show_bug.cgi?id=36011
> http://www.netbeans.org/issues/show_bug.cgi?id=35481

http://projects.netbeans.org/issues/show_bug.cgi?id=36248

>>  - What is the "browse" button that is always disabled?
> 
> See section 5.1.4.1.1.2 in JavaProjectsUISpec.html. Browse button is 
> disabled because this feature is probaly not yet implemented.
> 
>>  - What is the difference between Package Folder and Package?  Why
>>    is the Package Folder drop-down enabled, but contains only one
>>    item? (maybe just change the text "Package Folder" to something
>>    more meaningful that distinguishes it from "Package").
> 
> A package folder is the project contents folder which has been 
> identified as the class path element. Drop-down contains only one item, 
> beacuse your project has only one package root.

This goes to my point about the UI being designed to
handle large numbers of things of which there seem
to often be only 1 or 2.  Maybe disable the combo
if there's only one thing to show?  Otherwise I
just clicks it and get annoyed.

>>  - It is not clear that I need to tab out of the Package field to
>>    trigger the "Folder does not exist - create?" dialog - it just
>>    looks like I must have forgotten something because Next is disabled.
>>    Then when I do tab out, I get the surprise of the dialog popping
>>    up.  Better solution:  Display some error text at the bottom of
>>    the wizard panel to describe what the situation is, and provide a
>>    "create" button that is enabled if the folder doesn't exist.
> 
> Please file an enhancement request.

http://projects.netbeans.org/issues/show_bug.cgi?id=36249

>>  - If I create a package, then cancel the wizard, the package folders
>>    are still there.
> 
> Hmm, I don't think, that this is incorrect.

Well, we've just created some folders on the filesystem,
for the user, while doing an operation the user cancelled.
So why not delete the folders we created?  After all, the
wizard knows if it created folders - so why shouldn't it
un-create them if the user cancels?

>> Now I come to "Set Up Run Profile" - what is this?  I see a bunch
>> of disabled fields and one checkbox saying "create a new run profile
>> using TestMe class".  Issues:
>>  - Text should be "using *the* TestMe class"
>>  - What happens if I do nothing on this screen and click Finish? It
>>    seems very mysterious, and I feel like I should create a new
>>    run profile or my project won't run.
>>  - What does Make profile public via VCS do?  It sounds like it will
>>    publish something somewhere, which probably isn't really what it
>>    will do.
>>  - What is the scope of "Set as default run profile"?  The project?
>>    Global?
>>
>>
>> BTW, cancelling the add dialog a second time produces
>> java.lang.IllegalArgumentException: Called DataObject.find on null
>>     at org.openide.loaders.DataObject.find(DataObject.java:434)
>>     at org.openide.loaders.DataFolder.findFolder(DataFolder.java:510)
>>     at 
>> org.netbeans.modules.java.ui.wizard.TargetChooserPanel$TCPanel.storeSettings(TargetChooserPanel.java:572) 
>>
>>     at 
>> org.openide.WizardDescriptor.resetWizard(WizardDescriptor.java:821)
>>     at org.openide.WizardDescriptor.access$800(WizardDescriptor.java:55)
>>     at 
>> org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:1155) 
> 
> Running profiles are not implemented according to UI Specification.
> http://projects.netbeans.org/uispecs/java/JavaProjectsUISpec.html#Running_Profiles 

Well, some support for doing this needs to be part of
creating a class - forcing the user to go play with a
configuration dialog whenever they create a new executable
class is a step backward.  But it should be clearer than
what's there.

>> Okay, I have my class.  Let's try to run it.  I didn't create a new
>> "run profile" in the wizard.  I add System.out.println("Hello world");
>> to my main() method and press F6...
>>  - An output tab called "DefaultExecutor" appears
>>  - The execution window briefly appears
>>  - No output ever shows up in the output window - maybe it's not being
>>    run?
>>
>> Okay, so I look on Run|Edit Run Profiles.  I see there is something 
>> called DefaultExecutor.  It points to a class examples.Main.  I change
>> it to point to my test class.  Fine, it works.
>>
>> What is Execution Platform?  There is a drop-down with one item -
>> "default platform" - and no indication what this is or how (if?) I could
>> create another one.
> 
> Platform repository is not implemented according to UI spec.
> http://projects.netbeans.org/uispecs/java/JavaProjectsUISpec.html#Platform_Repository 

See my earlier comments re platform repository.  This is far more
complexity than a basic java project needs.

>> Platform tab - this tab is completely empty
>>
>>
>> Expanding folders in the source tree in explorer is extremely slow.
> 
> 
> Yes it is! As I mentioned above, performance of projects is really poor. 
> Please file a bug if you have some measurements.

I'm sort of assuming it's just layers upon layers of
FilterNodes causing the problem?

>> Project view submenu of context menu for a project:
>>  - Some of these views are non-orthagonal - they seem more like they
>>    should be checkbox options.
>>  - What I really want is packages directly under the project node,
>>    without the intervening "Packages" node.  That would be more useful
>>    than the current "Show Packages Only" view.
>>  - Couldn't the project views be named based on what they do rather
>>    than what they hide?  The current list makes it seem like we just
>>    couldn't decide what to do.
> 
> As I mentioned before, this part is not implemented according UI spec.

Okay, but there may be things you want to revisit.
One of the principal complaints I see repeatedly on
newsgroups wrt Eclipse is that configuring a project
is complex, confusing and time consuming.  The
combination of

  - platform profiles
  - active projects
  - profiles
  - active profiles

is at least as complex, if not more.  Some way to
hide some of the more advanced options and have it
simply do the thing you expect without you telling
it to will help - remember, even if setting up a
new project sets everything up right, many users
will think they have to manually configure all of
these options, settings, profiles, etc. anyway,
and end up breaking it instead.

-Tim