adding a stereotype/owned property into the MARTE profile [message #989057] |
Tue, 04 December 2012 08:29  |
Eclipse User |
|
|
|
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] by 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   |
Eclipse User |
|
|
|
<!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 -> 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< --------</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 #990657 is a reply to message #989817] |
Thu, 13 December 2012 11:06  |
Eclipse User |
|
|
|
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] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.30656 seconds