Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » adding a stereotype/owned property into the MARTE profile
adding a stereotype/owned property into the MARTE profile [message #989057] Tue, 04 December 2012 08:29 Go to next message
Kostas Triantafyllidis is currently offline Kostas Triantafyllidis
Messages: 15
Registered: November 2012
Junior Member
Hello all,

I have downloaded the MARTE source code model from this repository (http://dev.eclipse.org/svnroot/modeling/org.eclipse.mdt.papyrus/tags/0.9.1_SR1/extraplugins/marte/org.eclipse.papyrus.marte.static.profile )

I am trying to add a property (l2_cache_miss) into the ResourceUsage attribute of the GRM package. So i add a child owned attribute and i am editing the properties of this new element. I am saving the new profile and export the new plugin. After i copy this plugin into the plugins folder of the eclipse distribution. I restart eclipse and apply the new profile. When i am opening the "ResourceUsage" stereotype in order to edit it, i am receiving the following error:

java.lang.IllegalArgumentException: l2_cache_miss
at org.eclipse.uml2.uml.internal.operations.ElementOperations.getValue(ElementOperations.java:566)
at org.eclipse.uml2.uml.internal.impl.ElementImpl.getValue(ElementImpl.java:296)
at org.eclipse.papyrus.uml.profile.tree.objects.AppliedStereotypePropertyTreeObject.getValue(AppliedStereotypePropertyTreeObject.java:120)
at org.eclipse.papyrus.uml.profile.tree.objects.AppliedStereotypePropertyTreeObject.createChildren(AppliedStereotypePropertyTreeObject.java:88)
at org.eclipse.papyrus.uml.profile.tree.objects.ParentTreeObject.getChildren(ParentTreeObject.java:114)
at org.eclipse.papyrus.uml.profile.tree.ProfileElementContentProvider.hasChildren(ProfileElementContentProvider.java:121)
at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:2146)
at org.eclipse.jface.viewers.TreeViewer.isExpandable(TreeViewer.java:588)
at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:2176)
at org.eclipse.jface.viewers.AbstractTreeViewer.updatePlus(AbstractTreeViewer.java:2858)
at org.eclipse.jface.viewers.TreeViewer.updatePlus(TreeViewer.java:852)
at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:849)
at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:823)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:797)
at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:644)
at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:768)
at org.eclipse.jface.viewers.AbstractTreeViewer.handleTreeExpand(AbstractTreeViewer.java:1500)
at org.eclipse.jface.viewers.TreeViewer.handleTreeExpand(TreeViewer.java:952)
at org.eclipse.jface.viewers.AbstractTreeViewer$4.treeExpanded(AbstractTreeViewer.java:1511)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:132)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Tree.wmNotifyChild(Tree.java:7565)
at org.eclipse.swt.widgets.Control.wmNotify(Control.java:5534)
at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1896)
at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:5086)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4584)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4976)
at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2440)
at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1534)
at org.eclipse.swt.widgets.Tree.WM_LBUTTONDOWN(Tree.java:6435)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4564)
at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5958)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4976)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2546)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3756)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)


What i am thinking is that it is not possible to add a property into the stereotype with my way. Am i right? What is the most rational way to add a property into the stereotype and save it into the current MARTE profile?

Thanks for your time.

Best regards,
Kostas

[Updated on: Tue, 04 December 2012 08:49]

Report message to a moderator

Re: adding a stereotype/owned property into the MARTE profile [message #989112 is a reply to message #989057] Tue, 04 December 2012 11:28 Go to previous messageGo to next message
Christian W. Damus is currently offline Christian W. Damus
Messages: 701
Registered: July 2009
Senior Member
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1187.34">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 12.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #011892}
p.p4 {margin: 0.0px 0.0px 0.0px 12.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #011892; min-height: 14.0px}
p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica}
p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #011892; min-height: 14.0px}
span.Apple-tab-span {white-space:pre}
</style>
</head>
<body>
<p class="p1">Hi, Kostas,</p>
<p class="p2"><br></p>
<p class="p1">The UML2 implementation of profiles includes an "Ecore definition".<span class="Apple-converted-space">  </span>For dynamic profile definitions, such as used by the MARTE profile, this means that there is an extra step required when adding elements to the profile.<span class="Apple-converted-space">  </span>You need to define it using the "Profile -&gt; Define" action in the "UML Editor" menu on the main menu bar.<span class="Apple-converted-space">  </span>Then save the profile resource.</p>
<p class="p2"><br></p>
<p class="p1">Of course, by adding the attribute directly into the MARTE profile, you are modifying the Papyrus plug-in that deploys it.<span class="Apple-converted-space">  </span>Are you intending to contribute this as a patch?<span class="Apple-converted-space">  </span>Are you adding a property defined by the OMG MARTE specification, that is missing from the Papyrus implementation?<span class="Apple-converted-space">  </span>If so, then perhaps the Papyrus team already has plans to update the MARTE profile ...</p>
<p class="p2"><br></p>
<p class="p1">Otherwise, if it's not a standard property that you're adding, then you might consider defining your own profile that extends the MARTE profile by specializing the ResourceUsage stereotype and adding the property into your substereotype.</p>
<p class="p2"><br></p>
<p class="p1">HTH,</p>
<p class="p2"><br></p>
<p class="p1">Christian</p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1">On 2012-12-04 13:29:34 +0000, Kostas Triantafyllidis said:</p>
<p class="p2"><br></p>
<p class="p3">Hello all,</p>
<p class="p4"><br></p>
<p class="p3">I have downloaded the MARTE source code model from this repository (http://dev.eclipse.org/svnroot/modeling/org.eclipse.mdt.papyrus/tags/0.9.1_SR1/extraplugins/marte/org.eclipse.papyrus.marte.static.profile )</p>
<p class="p4"><br></p>
<p class="p3">I am trying to add a property into the ResourceUsage attribute of the GRM package. So i add a child owned attribute and i am editing the properties of this new element. I am saving the new profile and export the new plugin. After i copy this plugin into the plugins folder of the eclipse distribution. I restart eclipse and apply the new profile. When i am opening the "ResourceUsage" stereotype in order to edit it, i am receiving the following error:<span class="Apple-converted-space"> </span></p>
<p class="p3">java.lang.IllegalArgumentException: l2_cache_miss</p>
<p class="p3"><span class="Apple-tab-span"> </span>at org.eclipse.uml2.uml.internal.operations.ElementOperations.getValue(ElementOperations.java:566)</p>
<p class="p3"><span class="Apple-tab-span"> </span>at org.eclipse.uml2.uml.internal.impl.ElementImpl.getValue(ElementImpl.java:296)</p>
<p class="p3"><span class="Apple-tab-span"> </span>at org.eclipse.papyrus.uml.profile.tree.objects.AppliedStereotypePropertyTreeObject.getValue(AppliedStereotypePropertyTreeObject.java:120)</p>
<p class="p3"><span class="Apple-tab-span"> </span>at org.eclipse.papyrus.uml.profile.tree.objects.AppliedStereotypePropertyTreeObject.createChildren(AppliedStereotypePropertyTreeObject.java:88)</p>
<p class="p3"><span class="Apple-tab-span"> </span>at org.eclipse.papyrus.uml.profile.tree.objects.ParentTreeObject.getChildren(ParentTreeObject.java:114)</p>
<p class="p3"><span class="Apple-tab-span"> </span>at org.eclipse.papyrus.uml.profile.tree.ProfileElementContentProvider.hasChildren(ProfileElementContentProvider.java:121)</p>
<p class="p5"><br></p>
<p class="p6">-------- 8&lt; --------</p>
<p class="p7"><br></p>
<p class="p3">What i thing is that it is not possible to add a property into the stereotype with my way. Am i right? What is the more right way to add a property into the stereotype and save it into the current MARTE profile?</p>
<p class="p4"><br></p>
<p class="p3">Thanks for your time.</p>
<p class="p4"><br></p>
<p class="p3">Best regards,</p>
<p class="p3">Kostas</p>
<p class="p5"><br></p>
</body>
</html>
Re: adding a stereotype/owned property into the MARTE profile [message #989249 is a reply to message #989112] Wed, 05 December 2012 06:00 Go to previous messageGo to next message
Kostas Triantafyllidis is currently offline Kostas Triantafyllidis
Messages: 15
Registered: November 2012
Junior Member
Christian thank you for your reply.
I have followed your instructions: UML Editor-> Profile->Define to the UML MARTE profile. After i have saved the profile and exported it as a profile plugin. I have loaded the new profile after a restart of the eclipse, but the problem still exists and i get the same message in the error-log output. The thing is that i am trying to integrate into MARTE some properties that are not included into the OMG MARTE specification. These properties of course comply with the MARTE' s Library types . My intention was to integrate this new profile into my tool and this is the reason why i have not yet invested in a profile that extends MARTE. I would prefer just to integrate some new properties in specific stereotypes rather than extending the stereotypes of MARTE.
Do you have any idea why am i receiving an error like this? For this i will try to describe all the steps i am following for adding a new property into the MARTE profile.
1>Go to the resources folder of the MARTE's source code
2>Open the marte.profile.uml with the UML tool
3>Go to the GRM package (MARTE FOUNDATION) and to the stereotype ResurceUsage
4>Add a new child -> owned attribute -> property
5>Give the new name to the property and add as type the NFP_DataSize
6>Click on the profile MARTE into the UML editor and after go to UML editor -> Profile ->Define.
7>save the profile (ctrl+s)
8>Open the plugin.xml and export the new profile as plugin
9>Close eclipse
10>Copy the new plugin jar file into the plugins folder of the eclipse
11>Start eclipse
12>Apply the new profile to a test_model
13>load the stereotype ResourceUsage
14>receive error for the property i have introduced. And actually what i have understood is that i receive the error and the papyrus has loaded all the properties of the ResourceUsage except the one i have introduced.

Am i missing something about the procedure that i should follow in order to add a new property in a MARTE's stereotype?

Thanks in advance for your time.
Re: adding a stereotype/owned property into the MARTE profile [message #989817 is a reply to message #989249] Fri, 07 December 2012 19:49 Go to previous messageGo to next message
Christian W. Damus is currently offline Christian W. Damus
Messages: 701
Registered: July 2009
Senior Member
Hi, Kostas,

MARTE comprises numerous nested profiles, I think. You have to define
each of them individually.

If the (sub)profile that you changed is GRM, then that is the one that
you need to "define".

HTH,

Christian


On 2012-12-05 11:00:38 +0000, Kostas Triantafyllidis said:

> Christian thank you for your reply. I have followed your instructions:
> UML Editor-> Profile->Define to the UML MARTE profile. After i have
> saved the profile and exported it as a profile plugin. I have loaded
> the new profile after a restart of the eclipse, but the problem still
> exists and i get the same message in the error-log output. The thing is
> that i am trying to integrate into MARTE some properties that are not
> included into the OMG MARTE specification. These properties of course
> comply with the MARTE' s Library types . My intention was to integrate
> this new profile into my tool and this is the reason why i have not yet
> invested in a profile that extends MARTE. I would prefer just to
> integrate some new properties in specific stereotypes rather than
> extending the stereotypes of MARTE. Do you have any idea why am i
> receiving an error like this? For this i will try to describe all the
> steps i am following for adding a new property into the MARTE profile.
> 1>Go to the resources folder of the MARTE's source code
> 2>Open the marte.profile.uml with the UML tool
> 3>Go to the GRM package (MARTE FOUNDATION) and to the stereotype ResurceUsage
> 4>Add a new child -> owned attribute -> property
> 5>Give the new name to the property and add as type the NFP_DataSize
> 6>Click on the profile MARTE into the UML editor and after go to UML
> editor -> Profile ->Define.
> 7>save the profile (ctrl+s)
> 8>Open the plugin.xml and export the new profile as plugin
> 9>Close eclipse
> 10>Copy the new plugin jar file into the plugins folder of the eclipse
> 11>Start eclipse
> 12>Apply the new profile to a test_model
> 13>load the stereotype ResourceUsage
> 14>receive error for the property i have introduced. And actually what
> i have understood is that i receive the error and the papyrus has
> loaded all the properties of the ResourceUsage except the one i have
> introduced.
>
> Am i missing something about the procedure that i should follow in
> order to add a new property in a MARTE's stereotype?
>
> Thanks in advance for your time.
Re: adding a stereotype/owned property into the MARTE profile [message #990657 is a reply to message #989817] Thu, 13 December 2012 11:06 Go to previous message
Kostas Triantafyllidis is currently offline Kostas Triantafyllidis
Messages: 15
Registered: November 2012
Junior Member
Hello Christian,


I have followed your instructions about defining the corresponding updated sub-profiles. Although the problem still exists while I receive an "Unhandled event loop exception" as i described in a previous post. The procedure i am following is:
1.update the Foundations package and especially the GRM profile
2.click on GRM
3.click "define" and it is produced as child of GRM, an ecore sub-tree including the new properties that have been integrated into the ResourceUsage Stereotype
4.i use the produced MARTE plugin
5.i am receiving the error i have described before.
Do you have any idea what could be the problem? I have spent several days trying different combinations like defining again even the packages that are not updated, with no outcome. Should i also make any change in the java code that is included into the src folder? In this folder there exist java classes referred to Marte profile.

Thanks for your help in advance.

Cheers,
Kostas

[Updated on: Mon, 17 December 2012 05:05]

Report message to a moderator

Previous Topic:Diagram Template Launcher
Next Topic:ModelBus Installation/Integration with Papyrus
Goto Forum:
  


Current Time: Sun Apr 20 04:29:14 EDT 2014

Powered by FUDForum. Page generated in 0.01685 seconds