Community
Participate
Working Groups
Created attachment 250163 [details] Test sequence for Customized DSML UI for models with separate Profile Applications As demo'ed at EclipseCon :), in Papyrus we can have multiple integrated DSML's in this "grand" system model (also with plain UML), each having their own and DSML-customized UI automatically enabled when opening a particular DSML model. The customized UI is of course based on the DSML profile(s), so when we open a particular DSML model, Papyrus automatically adapts itself, displaying a customized UI designed for the opened DSML model. :) PROBLEM: The DSML-customized-UI must also be automatically enabled when loading separate Profile Applications into a DSML model, which not is the case today, hence this bugzilla report. Attaching the test sequence here so that it can be tried out by other DSML developers, who hopefully can contribute additional test cases. :)
Created attachment 250164 [details] PW protected test case This is a 7-zip password protected test case. (PW provided earlier)
Indeed. Nothing is telling the palette service that a profile has been loaded and that it needs to refresh the palette. I have an idea how to fix this. This won't be the first component that needs notification when profile applications come and go that are externalized.
The same problem is reproducible in a non-externalization scenario. It happens also if I delete the profile application and then undo. When I delete the profile application, the palette is properly updated. On undo, the profile application and all stereotypes are restored, but the palette does not show the profile-specific drawers and tools.
This is a Marking Model / Profile Application and DSL UI customization issue that simply must work, just like issues related to Bug 457712. Customized UI refresh is an issue also reported earlier (like F5 issues), mostly about automatic refreshes related to stylesheet rendering of diagrams. In this particular case, AFTER loading the profile application, you can manually enable the UI palettes again by: 1) right-click in the palette 2) select "customize" 3) uncheck and check the check-box for the palette ...and the palette gets available again. :) ...without clicking "OK" or anything. This test can be repeated again right after unloading-and-loading the profile application.
(In reply to Toni Siljamäki from comment #4) > This is a Marking Model / Profile Application and DSL UI customization > issue that simply must work, just like issues related to Bug 457712. That is why this was assigned for resolution within the Mars M5 milestone. I have pushed a patch to Gerrit for review: https://git.eclipse.org/r/40518 This adds a new Profile Application Service that detects when profiles are applied to and unapplied from packages and notifies interested listeners of those changes. So, the Palette Service now adds itself as a listener on the Profile Application Service to refresh itself when profile applications come and go. This replaces the previous IPapyrusListener-based refresh trigger. The Profile Application Service also allows clients to inject application/unapplication events that it otherwise could not detect on its own. The DecoratorModel that handles loading of profile-application models makes use of this capability to let clients of the Profile Application Service know when externalized profiles have been loaded (unloads take care of themselves via the usual notification mechanism). The Gerrit patch also contains a bunch of unit tests covering profile-application change scenarios of various complexity to verify the unfortunately complex analysis of notifications from the editing domain, owing to the fact that changes in either or both of the profile-applications list of a package and applied-profile reference of an application constitute application/unapplication of a profile on a package. These tests are in a new test fragment, as there previously were no tests for the oep.uml.profile plug-in that defines the new service.
Great! Additional bugzilla coming soon, on a related "refresh" issue.
> I have pushed a patch to Gerrit for review: > > https://git.eclipse.org/r/40518 The contribution has been merged into master
Can it be tested today? /Toni
> Can it be tested today? The Mars Nightly build including the patch is published. So I guess it can
(In reply to Camille Letavernier from comment #7) > > I have pushed a patch to Gerrit for review: > > > > https://git.eclipse.org/r/40518 > > The contribution has been merged into master Thanks, Camille! That should resolve this bug (I'll double-check later, as it has been a while and the landscape may have changed).
Yes, this one works now, thanx, that is, enabling the DSL palette. I got some other strange errors though when ceating the profile application and loading/unloading it several times. I'm having also the test model attached to Bug 459488 in my workspace, and at one point some error was detected in that model (but I did not have it open), and then the created profile application was lost. Maybe the error happened when scanning the workspace for profile application models? I'm not able to easily reproduce that error, but the pop-up window complaned a href being null, or something.
(In reply to Toni Siljamäki from comment #11) > > Maybe the error happened when scanning the workspace for > profile application models? Yes, we're having some issues with concurrent initialization of EPackages in that scan (bug 456934) which I'm looking into now, together with Camille. > I'm not able to easily reproduce that error, but the pop-up window > complaned a href being null, or something. I'll want to look into it when you do reproduce it again, so keep your eyes peeled! :-)
Created attachment 250682 [details] Small error log Attached are some errors that happened, but not every time. ...for instance reerences to missing classes etc.
These errors in the log happens every time I restart Eclipse/Papyrus.
(In reply to Toni Siljamäki from comment #13) > Created attachment 250682 [details] > Small error log > > Attached are some errors that happened, but not every time. > ...for instance reerences to missing classes etc. Thanks, Toni. These exceptions are related to the new modelled element types framework that was merged to master over the week-end. Nothing to do with separate profile applications or the palette. And also not the problem I was thinking of in concurrent EPackage registration. I've raised bug 459573 for these exceptions.