Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361380 - profiling.ext: Profile application for Package is not supported
Summary: profiling.ext: Profile application for Package is not supported
Status: CLOSED FIXED
Alias: None
Product: M2T
Classification: Modeling
Component: Xpand (show other bugs)
Version: 1.1.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: M3   Edit
Assignee: Karsten Thoms CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-19 08:00 EDT by Tatiana Fesenko CLA
Modified: 2013-02-21 08:14 EST (History)
1 user (show)

See Also:
karsten.thoms: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tatiana Fesenko CLA 2011-10-19 08:00:01 EDT
profiling.ext and org.eclipse.xtend.typesystem.uml2.profile.ProfilingExtensions#applyProfile() takes UML model only as a source of Profile Application. It's not possible ti use this utility to apply a profile to a package, while in UML Packages are also allowed to have profile applications.

The fix is trivial - replacing 
	public static Profile applyProfile (Model model, String uri) 
by
	public static Profile applyProfile (Package model, String uri) 

I am using Indigo and Xpand 1.1.1
Comment 1 Karsten Thoms CLA 2011-10-19 08:18:36 EDT
Right, this is a reasonable use case. Thanks for reporting!
Comment 2 Tatiana Fesenko CLA 2011-10-19 09:43:52 EDT
Thanks for the quick fix, Karsten!

It seams that we also have to change the helper signature in profiling.ext to use uml::Package:

Profile applyProfile (Package pck, String uri)

Otherwise it's not recognized even for uml::Model. E.g., try using the sample transformation from Bug 361382.
Comment 3 Karsten Thoms CLA 2011-10-19 09:53:47 EDT
Yes, this was already done.
Comment 4 Tatiana Fesenko CLA 2011-10-19 09:57:13 EDT
(In reply to comment #3)
> Yes, this was already done.

Maybe it wasn't pushed to Git. In the http://git.eclipse.org/c/m2t/org.eclipse.xpand.git/tree/plugins/org.eclipse.xtend.typesystem.uml2/src/org/eclipse/xtend/typesystem/uml2/profile/profiling.ext?id=20403e9f00e8993ce99b76299ecb52948a9f331a

only line 8 is changes, while the line 7 with helper signature is still the same:

Profile applyProfile (Model model, String uri) :
- JAVA org.eclipse.xtend.typesystem.uml2.profile.ProfilingExtensions.applyProfile(org.eclipse.uml2.uml.Model, java.lang.String);
+ JAVA org.eclipse.xtend.typesystem.uml2.profile.ProfilingExtensions.applyProfile(org.eclipse.uml2.uml.Package, java.lang.String);
Comment 5 Karsten Thoms CLA 2011-10-19 10:20:20 EDT
My mistake. Fixed now with 45fae56604e0e7ced51b1bc9a316d86ccb586b23
Comment 6 Karsten Thoms CLA 2013-02-21 08:14:01 EST
Bug resolved before Xpand 1.2 release date => Closing