Re: A question about the New Java Project wizard
Petr Jiricka <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.projects.devel |
|---|---|
| Message-ID | <[email protected]> |
Ann Sunhachawee wrote: > Chris - > Did you mean to drop the "sample files" from the new unified wizard? > > Petr - > I think we can work with what you described for web module projects with > a few changes. > > Petr Jiricka wrote: > >> Ann, >> >> I agree with your goal that the wizards, and especially the Basic >> wizard, should have as few steps as possible. That is a good goal and >> we should not be adding arbitrary panels that only clutter the wizard UI. >> >> I believe the above goal can be achieved even if we combine the Basic >> project and the Project from existing sources into one template. >> >> This is how such a combined wizard would look for the case of Java >> projects - for Web projects it would be analogous: >> >> 1. Specify Project name and Project File Location >> Also, this panel will have a checkbox "Add existing sources to this >> project" (or similar). This is the only piece of UI that is added >> compared to the current Basic project wizard. > > >> >> >> Now there are two branches of the wizard. If the "Add existing >> sources" checkbox is unchecked, then the next panels are: > > >> >> >> 2a. Specify Java source locations >> -default: <prj_path>/src >> -user can add more Java source directories >> -Finish is enabled starting on this panel > > > Does adding more "source directories" make sense for creating a web app > without existing sources? I think only one is fine in this case. They > can add more Java source directories after they start with the project. > You are right, just one Java source dir will typically be sufficient. On the other hand, having more of them will make this more consistent with Java projects. >> >> >> 3a. Specify resources >> .... >> >> .... >> etc. >> >> >> If on the other hand the "Add existing sources" checkbox is checked, >> then the wizard proceeds as follows: >> >> 2b. Specify (general) source directories >> -user can add arbitrary directories containing files in general >> -at least one directory must be specified > > > Before this, I think we should ask for an existing doc root. From there > we might be able to guess and present a list of source directories for > user to add to or remove (i.e. if it's Jakarta structure, "src" and > "doc" will be peer directories, if it's an expanded WAR structure, > source classes are under WEB-INF/classes, etc) From the general source directory we can guess both the docbase and the Java source directories. Also the "general" directory is an important place (especially in the scenario of importing existing sources), because it contains the build scripts, documentation, tests and other important stuff that should be a part of the project. So the concept of general sources must be present, and when the wizard finishes, this directory should be added to the project - the same way as if you added it to It is also not quite true that we can infer the Java source dirs from the docroot. We would have to go one or more levels up in the source hierarchy - but how many levels up ? Will one be always enough ? On the other hand, the truth is that typically it will be the case that Project Home will be the same as (the only) general source directory. So what we could do is after the first panel, look at Project Home to see whether it contains reasonable sources (a web module docroot and possibly some Java source dirs), and if it does, skip panel 2b. I also feel that regarding the "general sources directory", all project templates should behave the same way. Petr > > In step 2b, I think that Finished can be enabled since it shouldn't be > necessary to add Java source location (and i expect the wizard should > try to autodetect the java files and place accordingly, just as chris > had proposed). If the uses specified the docbase in 2b as you suggest, then yes, this would make sense. But if the user specifies a general dir as I suggest, then I think we should force > Ann > >> >> >> 3b. Specify Java source locations >> -the wizard scans the directories added in panel 2b for Java source >> directories and puts them to the list by default >> -user can add more Java source directories or remove the ones >> added by the wizard >> -Finish is enabled starting on this panel > > >> >> >> 4b. Specify resources >> .... >> >> .... >> etc. >> >> >> So if the checkbox on panel 1 is unchecked (which is the default), the >> wizard is no more complicated than the current Basic wizard (except >> for the checkbox itself). The advantage is obviously that we cut down >> the number of wizards to one half. >> >> Comments ? >> Petr >> >> Ann Sunhachawee wrote: >> >>> To get my 2c in before rework happens .. I disagree with >>> consolidating the basic/empty with the project from existing sources. >>> We would like our users to get through wizards as quickly as >>> possible, and I think this distinction in templates is helpful up front. >>> >>> This allows the user interested in starting a fresh project to start >>> up quickly, without having to pause and understand the concept of >>> "Java roots" or consider adding source or resource directories. If >>> the user creates a empty/basic project and picks a project home that >>> contains files, then perhaps we launch into Project from Existing >>> Sources at that point if they confirm they indeed are trying to >>> create a new project with those sources. The situation I'd like to >>> avoid is that a user ends up with a hybrid project - part of their >>> sources, with sample app files. >>> >>> -ann >>> >>> cL wrote: >>> >>>> sure, this sound fine. the spec will get a major update after the >>>> usability test results are compiled and analyzed and i will add this >>>> to the bits that need to be re-worked. >>>> >>>> thanks, >>>> cL >>>> >>>> Petr Jiricka wrote: >>>> >>>>> Team, >>>>> >>>>> I have one question about creating new Java projects. According to >>>>> the UI spec, there will be two wizards: one for new empty/basic >>>>> project, and one for project from existing sources. Well, is this >>>>> really necessary ? Couldn't it work if there was just one wizard, >>>>> which would decide which root to take, based on whether the home >>>>> directory entered by the user already contains sources or not ? >>>>> The way it is now, the user needs to make the choice, when in fact >>>>> the machine could make the choice for her. Another advantage would >>>>> be that this would decrease the amount of clutter in the project >>>>> selector UI. >>>>> >>>>> Thanks >>>>> Petr >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: [email protected] >>>>> For additional commands, e-mail: [email protected] >>>>> >>>> >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >