Community
Participate
Working Groups
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.]
Contributions are more than welcome.
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
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.
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...
(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...
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.
(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.
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.
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.
Attachment needs updating to reflect abandoning support for global registry only usage.
(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.
(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.
(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.)
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
Remove the "helpwanted" keyword.
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.
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.
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...)
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.
(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.