Bug 382342 - Make Getting Started Documentation more helpful
Summary: Make Getting Started Documentation more helpful
Status: VERIFIED FIXED
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: 4.0.0   Edit
Hardware: PC Windows Vista
: P2 enhancement (vote)
Target Milestone: M5   Edit
Assignee: Christian Damus CLA
QA Contact:
URL:
Whiteboard: Community Support
Keywords: plan
Depends on:
Blocks: 77413
  Show dependency tree
 
Reported: 2012-06-12 07:07 EDT by Ed Willink CLA
Modified: 2014-05-29 09:36 EDT (History)
2 users (show)

See Also:
Kenn.Hussey: documentation+
give.a.damus: luna+
Kenn.Hussey: review+


Attachments
Canned project (23.61 KB, application/octet-stream)
2012-06-13 13:43 EDT, Ed Willink CLA
no flags Details
Updated with Profiles example and JUnit tests (26.16 KB, application/octet-stream)
2012-06-15 06:53 EDT, Ed Willink CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2012-06-12 07:07:24 EDT
The Getting Started documentation takes the user through a rather long procedure to create an ExtendedPO2.uml, which I doubt few readers will read in detail since after a couple of steps the remainder is rather obvious.

It would be very helpful to provide an example project so that the impatient or finger-troubled may get an instant reference project that runs standalone and generates a couple of comforting console messages.

[Given the number of users encountering difficulties, this is a bug not an enhancement.]
Comment 1 Kenn Hussey CLA 2012-06-12 11:36:33 EDT
Contributions are more than welcome.
Comment 2 Ed Willink CLA 2012-06-13 12:57:03 EDT
The Getting Started example on the Wiki is evil.

a) there is a trivial operation name typo, which I've corrected
b) the final save procedure is totally broken
-- incorrect createURI
-- no package registrations ..., ..., ...
=> the  numerous news group messages
c) it's on the Wiki so has to be polymorphic; what about UMLResourcesUtil...
d) it provides no reference code
e) it has never been run
f) it cannot be re-run as part of a MDT/UML2 JUnit testing

Suggest
- re-useing Christian's unzip a canned project from org.eclipse.ocl.examples so that the code is in a project which is installable by users
- wrapping a JUnit test around most of the code
- moving the text to the UML Documentation
- referencing the UML documentation from the Wiki
Comment 3 Ed Willink CLA 2012-06-13 13:43:57 EDT
Created attachment 217303 [details]
Canned project

I think users would be grateful for an opportunity to install the attached project, which has a functional Getting Started Tutorial with a launch configuration.

It contains a UML300ResourcesUtil.java that can be improved by an expert.
Comment 4 Kenn Hussey CLA 2012-06-13 13:44:48 EDT
Increasing the severity of this bug is not going to magically increase the
amount of time I have to help rid the world of evil.

(In reply to comment #2)
> The Getting Started example on the Wiki is evil.

Thank you.

> a) there is a trivial operation name typo, which I've corrected

Thanks again.

> b) the final save procedure is totally broken
> -- incorrect createURI
> -- no package registrations ..., ..., ...
> => the  numerous news group messages

It used to work but times (and code) have changed.

> c) it's on the Wiki so has to be polymorphic; what about UMLResourcesUtil...

Now that the utility is available, that would make sense.

> d) it provides no reference code

It used to, but the code needs to be updated. See b.

> e) it has never been run

Again, see b.

> f) it cannot be re-run as part of a MDT/UML2 JUnit testing

Because it's not written as a JUnit test.

> Suggest
> - re-useing Christian's unzip a canned project from org.eclipse.ocl.examples so
> that the code is in a project which is installable by users

There used to be a download link in the article to obtain a ZIP archive of the
code.

> - wrapping a JUnit test around most of the code

Sounds good.

> - moving the text to the UML Documentation

There is a link from the documentation to the evil article.

> - referencing the UML documentation from the Wiki

The inverse is already true...
Comment 5 Kenn Hussey CLA 2012-06-13 13:46:25 EDT
(In reply to comment #3)
> I think users would be grateful for an opportunity to install the attached
> project, which has a functional Getting Started Tutorial with a launch
> configuration.

To do this right, the two introductory articles should be converted to tutorials/examples that can be installed (using the examples installer) and run...
Comment 6 Ed Willink CLA 2012-06-13 14:00:07 EDT
I've updated the Wiki to use UMLResourcesUtil for UML 4.0.0 with a link to this Bugzilla to get working pre-4.0.0 code.
Comment 7 Ed Willink CLA 2012-06-13 14:14:16 EDT
(In reply to comment #4)
> 
> > - moving the text to the UML Documentation
> 
> There is a link from the documentation to the evil article.
> 
> > - referencing the UML documentation from the Wiki
> 
> The inverse is already true...

The reversal of direction allows many version-specific variants of the tutorial with the Wiki cherry picking one, some or all.
Comment 8 Kenn Hussey CLA 2012-06-14 15:25:01 EDT
Marking this as an enhancement given that changes have been made to mitigate the immediate evil. With any luck, we'll have a chance to convert this to a proper example/tutorial for Keppler.
Comment 9 Ed Willink CLA 2012-06-15 06:53:33 EDT
Created attachment 217415 [details]
Updated with Profiles example and JUnit tests

The Introduction to UML Profiles is much worse:

It has a "save" that does no registration
It has a "load" that ditto and no mention of pathmap nightmares
It imports profiles without resolving pathmaps
It doesn't specify a profile nsURI, or package stereotype
- supplying an nsURI seems to be UML 4.0.0 only
It applies stereotypes to attributes that are association ends

I clearly don't understand sterotypes, but it seems that an applied stereotype goes in the containment list while the test looks in the cache adapter, so it fail.

Finishing this off requires someone who understands the MDT/UML2 evolution.
Comment 10 Ed Willink CLA 2012-11-16 10:46:38 EST
Attachment needs updating to reflect abandoning support for global registry only usage.
Comment 11 Ed Willink CLA 2013-02-26 10:23:24 EST
(In reply to comment #8)
> Marking this as an enhancement
(In reply to comment #9)
> The Introduction to UML Profiles is much worse:

No totally obsolete meriting a reversion to a bug.

It seems that at some point Profile versioning was introduced so that the outer UML profile has an inner suite of Ecore equivalents.

The example makes no mention of this and consequently fails since it makes no attempt to provide the inner Ecore. UMLUtil.getProfile has no fall-back for Ecore-less profiles.
Comment 12 Kenn Hussey CLA 2013-02-26 10:31:13 EST
(In reply to comment #11)
> No totally obsolete meriting a reversion to a bug.

Disagree.

> It seems that at some point Profile versioning was introduced so that the outer
> UML profile has an inner suite of Ecore equivalents.

Yes. It was introduced six or seven years ago when support for profiles was added.

> The example makes no mention of this and consequently fails since it makes no
> attempt to provide the inner Ecore. UMLUtil.getProfile has no fall-back for
> Ecore-less profiles.

Huh? The article and associated example *define* the profile, which results in the "inner Ecore" definition being produced... UMLUtil.getProfile(...) has a fallback for static profiles, which by their nature do not store their Ecore definitions in nested annotations.
Comment 13 Ed Willink CLA 2013-02-26 10:54:01 EST
(In reply to comment #12)
> Huh? The article and associated example *define* the profile, which results
> in the "inner Ecore" definition being produced... UMLUtil.getProfile(...)
> has a fallback for static profiles, which by their nature do not store their
> Ecore definitions in nested annotations.

Attempting to debug the attachment, I see no sign of a fallback, but it may be that I did a poor job of resurrecting the example code from the article.

Perhaps you'd like to download the attachment and run GettingStartedTestCase as a JUnit test. (Running as a JUnit Plugin test needs further work to avoid saving the profile to a plugin location.)
Comment 14 Christian Damus CLA 2014-01-21 15:27:46 EST
I have pushed a new branch bugs/382342 implementing new example projects for the two getting-started tutorials on the wiki.

Commit 420f24e:

Adds example plug-in projects

  * org.eclipse.uml2.examples.gettingstarted: implements a solution (complete model
    and source code, with a launch config for stand-alone execution of the main
    program) for the Getting Started with UML2 tutorial article on the Wiki.

  * org.eclipse.uml2.examples.introtoprofiles: implements a solution (complete profile
    and source code, with a launch config for stand-alone execution of the main
    program) for the Introduction to UML2 Profiles tutorial article on the Wiki.

The launch configs in these projects are set up to run each main program as a stand-alone Java launch (relying on the fabulous UMLResourceUtil API), creating output models in the root of the respective project.

Commit 2bab30f:

Integrates the two new example projects into the build.  The org.eclipse.uml2.examples.ui plug-in adds:

  * a Bucky-style Ant builder to ZIP up the example projects (above) for deployment
    in this plug-in
  * example wizards, re-using the EMF example-project-unzipper wizard, to let users
    install these examples as projects in their workspaces
  * a Bucky component extension to inform the Bucky build of an implicit dependency
    on the example projects, so that Bucky will materialize them in the workspace
    and the build can then find them to ZIP up their contents.  The SDK build
    doesn't actually contain those example projects, as such, so there is no other
    way for Bucky to know about them

I have tested an end-to-end build (in my local Hudson) of the UML2 SDK.  Installing it into a new Eclipse instance, I get the expected new example wizards and the projects that it creates look correct and their launch configs run correctly.

I have also updated the two getting-started articles on the Wiki in anticipation of these new examples, including:

  * instructions how to install the examples (once they become available)
  * updating other meta information for Luna release
  * updating the code snippets to match the new example projects (including more
    details of, for example, resource-set management that were missing)
  * other editorial updates
Comment 15 Christian Damus CLA 2014-01-21 15:28:15 EST
Remove the "helpwanted" keyword.
Comment 16 Kenn Hussey CLA 2014-01-22 10:30:08 EST
Thanks, Christian, all looks great. I've committed/pushed the changes to the 'master' branch in git and tested everything from a test build run at Hudson. I'll publish a new integration build (likely the last before M5 next week) shortly.
Comment 17 Kenn Hussey CLA 2014-01-22 10:55:33 EST
An integration build for UML2 5.0.0 has been published.

Ed, please take a look as let us know if you see any problems.
Comment 18 Ed Willink CLA 2014-01-22 11:06:01 EST
I'm snowed under at the moment.

Christian's comments looked very diligent and in line with my suggestions so I suspect we're at most only trivial tweaks away from perfect.

(I think my only semi-related isuue is partitioing UMLResourcesUtil to each of its constituent ResourceFactories so that it becomes extensible - as described in the advanced tutorial...)
Comment 19 Bill McLaren CLA 2014-05-29 02:32:38 EDT
Thanks for taking the time to add the examples.  Building the models from scratch is much quicker than using the editor and helps ensure consistency.

IntroductionToUMLProfiles does have one minor issue.  Using Luna RC1, on Windows the ExtendedPO2 model fails to load but it works fine on a Mac.  Changing URI.createURI to URI.createFileURI appears to work on both platforms.
Comment 20 Christian Damus CLA 2014-05-29 09:36:35 EDT
(In reply to Bill McLaren from comment #19)

Thanks, Bill, for pointing out the problem with the file URI.  I have fixed that in commit b90cb3e and updated the Wiki accordingly.