[jbosstools-issues] [JBoss JIRA] (JBIDE-10264) Wizard-ify the project examples

Snjezana Peco (JIRA) jira-events at lists.jboss.org
Tue Feb 7 16:06:48 EST 2012


    [ https://issues.jboss.org/browse/JBIDE-10264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664899#comment-12664899 ] 

Snjezana Peco commented on JBIDE-10264:
---------------------------------------


> I guess - you loose the info on wether this example will easily work. Maybe just add a single line warning/info label
> that additional requirements are needed?

We will have a separate page related to requirements.

>>>> 3) Why wouldn't we set the QuickFix/Readme checkboxes to the first page and remove the last page?

>>> Because the project aren't imported yet so no way for you ask/know the details for this.

>>I don't think that is important.

> Huh ?

> Where else will you have the output directory ?

I am talking about the page that only contains the QuickFix/Readme checkboxes. That is the page on the up-right corner of your mockup.
If you are talking about JBIDE-10421, it is fixed.

>>There is also a problem when adding this as a separate wizard page.
>>Let's say we start a project example that is not of the mavenArchetype type from JBoss Central (the problem exists in any other case, but this is the easiest one to explain).
>>We have two pages (or three when including Quick Fix as a wizard page):

>>Page 1 - Requirements
>>Page 2 - a page with these two checkboxes

>>On the Page 1, before downloading we don't know if the Page 2 (or 3) will appear at all.

>You do - since they always will be there.

Yes, they are there, but shouldn't show up if there aren't either errors (Quick Fix) or readme/cheatsheet.
We have previously agreed that the page doesn't need to show up in this case.

>>Would we enable the Next button on this page? Would the Next/Previous buttons exist at all?
>>If we enable Next, it could happen the following:

>>the user clicks it
>>the project example is downloaded and we see that there aren't any errors or readme/cheatcheet files

> Yes, so what is left is just the instructions that the projects have finished downloading and ready to use.

Does this mean that you still want the page to be shown although there is no any quickfix/readme/cheatsheet?
We will have a separate wizard page having 0, 1 or 2 checkboxes?
If you think so - OK, I will do it, but I still do not see any reason why not to set that on the first page if we want to make the UI easier.

>>We should finish the wizard although the user hasn't clicked Finish.
>>If we disable Next
>>the user clicks Finish
>>the project example has been downloaded and we see that there are errors or readme/cheatcheet files
>>We need to show a new page although the user clicked Finish.

> Thus don't enable Finish

The user will finish the wizard with Next or he will get an empty page at the end, saying  "This wizard has been finished". 
On this page, the user would need to click Finish that wouldn't do anything, but close the wizard. 
Is that what you want?

>> In my opinion, it is better to move these two checkboxes to the first page.

> How do you ensure that the project is fully imported, the user knows what happened and he isn't
> doing something else that will trip the import or confuse the user when the "selection" of the
> project is implemented to make Run As work ?

If the user doesn't get any error or Quick Fix dialog, everything is fully imported. Re Run As (https://issues.jboss.org/browse/JBIDE-10218), we could add yet another checkbox
"Select imported projects in Package Explorer" (true by default)

> The problem now is that there is ~3 or 4 dialogs shown with different styling, layout, content
> dependening on what example you are using. Trying to align that.

We can remove the Project Example dialog for those project examples that have the wizard tag (mavenArchetype) so that the mavenArchetype wizard can be independent.
Archetype wizards work this way when calling from the Create Projects section (JBIDE-9776).

>The Quick Fix is a wizard too. We could move its wizard page to our new wizard.
>The problem is that the wizard wouldn't finish the project build and we wouldn't be able to determine the state of the Next button on the previous page (as previously descr>ibed.

> So you are saying you now in the code are waiting for the project build to finish before showing the quickfix dialog?

Yes, we can't show errors until the project is built.

> That's ok for me - that mechanism works for both type of project examples.

That works for all project examples no matter if they are started from JBoss Central or using Help>Project Examples.
The user can disable showing this dialog.

>>Now, the Page 3 exists only for the project examples of the mavenArchetype type. As to all other project examples, the Page 3 doesn't exist and we can't start download on that page.
>>It would start on the Page 1 (for JBoss Central) or Page 2 (Help>Project Examples).

> I'm not following you at all - 

See https://issues.jboss.org/browse/JBIDE-10264?focusedCommentId=12663905&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12663905

The Pages 3 and 4 are contributed pages and exist for Maven archetype only.

> I deliberatly did not show the selection of the example since that is outside this wizard flow.

Yes, the mockup describes special cases of the project examples - the project examples of the mavenArchetype type that are started from JBoss Central.

>> As to project examples that contribute a wizard page(s), the download would have to be d>elegated to the contributed wizard page.

> No, the download have to happen before those pages since these pages depend on the content/choice of this afaics.

The mavenArchetype wizard (or the contributed page in our new wizard) will download the project example content. Project examples don't depend on m2e so they can't know what this wizard (or the wizard page) will do. They, maybe, don't need anything to download (if the archetype has already been downloaded), but to create a project according to it.

>>There are, at least, 4 cases:

> A project examples that don't contribute some page and start from JBoss Central
> B project examples that don't contribute some page and start using Help>Project Examples
> C project examples that contribute some page (mavenArchetype) and start from JBoss Central
> D project examples that contribute some page (mavenArchetype) and start using Help>Project Examples

> Why do you see any need for a different workflow when starting from project examples or central ?!

> The only difference is the starting point (which I claim should have no impact on the flow) and then
> wether it is a maven archetype or not - and the suggestion here just relate to having one more page shown or not.

Yes, that is the difference. I think we agreed about the first page (selecting project examples starting the wizard using Help>Project Examples).
However, the maven archetypes are different. They require adding a contribution page to the wizard that will import project examples.

>>>Each of these cases would have to have different pages. There would also exist wizard pages depending on whether requirements/readme/cheatsheets/quickfixes exist.
>>>That is OK if we treat this mockup as a simplified mockup for special case.

> The only optional page is the wizard archetype - the rest is there no matter which flow you suggest.

The mockup doesn't show that. It shows only the flow when importing a project example of the mavenArchetype type.
For instance, the mockup requires the Project Examples to download mavenArchetypes which is not possible. The Project examples doesn't depend on m2e and can't download any archetype.

>>IMO, creating this wizard would have some advantage for project examples of the mavenArchetype type, but that is already solved by adding the wizard tag to the project examples file (JBIDE-9776).

>The suggestion here is actually to make the "old" project examples behave more sane.

I agree that we improve the project examples.
However all the issues you have mentioned are related to the mavenArchetype project examples.

> The maven archetype is way less confusing than the old project examples (i.e. it provides options to how 
> the project is named and where it is stored, project examples shows it up front on top of all 
> the content - ugly and non-intuitive).

Other project examples don't allow changing of the project name. They contain the project name in the .project file (an Eclipse project) or in the pom.xml (an ordinary maven project). They are based on the Eclipse and Maven import action that doesn't allow changing the project name.
The project description specifies what projects will be created.
What would you change here which isn't related to the mavenArchetype?

Could you please explain me what is "ugly and non-intuitive" using the kitchensink quickstart as an example and I will correct that?

> The "old" project examples shows just as many dialogs as i'm suggesting pages (see previous discussion).

Could you tell me what problematic dialogs are for some project example that is not of the mavenArchetype type.

> If you don't like this suggestion please suggest how to fix the current weird old example workflow ?

I suggest the following:
- the Project Example wizard when starting using Help>Project Examples to have an additional page - Requirements instead of the Details panel
- to replace the Project Example dialog with the Requirements page in JBoss Central

The page wouldn't be shown in the case of those project examples that have the wizard tag when starting from JBoss Central. These project examples would have their own wizard as it is mavenArchetype (JBIDE-9776) now.

> And I understand my suggestion has problems too with the download part - but i'm then fine to just remove the "move to background" download, then the flow has no "gaps". What would be good 
> then is to actually cache these examples...maybe we should simply just release them as bits to mvn repo and use aether to get them for built-in caching ? Then there would be no delays the 
> second time you use the wizard.

Agree to add caching. We can do this without adding new dependencies. We already have the downloading/caching procedure that we could apply to cache the project example archive.
However, that wouldn't reduce the delay when starting a project example the first time.

                
> Wizard-ify the project examples
> -------------------------------
>
>                 Key: JBIDE-10264
>                 URL: https://issues.jboss.org/browse/JBIDE-10264
>             Project: Tools (JBoss Tools)
>          Issue Type: Feature Request
>          Components: project-examples
>    Affects Versions: 3.3.0.M4
>            Reporter: Fred Bricon
>            Assignee: Snjezana Peco
>            Priority: Blocker
>             Fix For: 3.3.0.Beta1
>
>         Attachments: wizardsuggestion.bmml, wizardsuggestion.bmml, wizardsuggestion.png
>
>
> In the wake of JBIDE-9776 and JBIDE-10140, it turns out that, in order for us to contribute 5 new wizards to the "New " menu under the Jboss perspective and in the "New project" section of JBoss central, "project examples" based projects should be created via a Wizard implementation from the get go. 
> Current project examples workflow involves :
> - displaying a form dialog : to display missing runtimes and let the user install/download the required runtimes
> - launching a workspace job, which in turn : 
>   * downloads the example
>   * does the actual project import (launches a wizard for maven archetypes)
>   * resolve quickfixes
> Ideally, all these steps would be part of a single wizard, spanning one to N pages (depending on the complexity/requirements of the examples). Everything contributed by the form dialog would be replaced by a wizard page, which would bring consistency to the UI.
> In other words, that means the project example dialog needs to be refactored into a Wizard, providing an API so that client plugins can contribute wizard pages. 
> I'm aware this is not a simple task to refactor the existing workflow to such an infrastructure but ultimately, that would allow us to easily contribute new project wizards to the IDE in a standard way.
> Current target is 3.3.0.Beta1. Snjeza, WDYT?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list