[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Problems with label referencing a derived attribute

Alex Shatalin wrote:

Hello Anthony,

mapping of actionName, when I run the .diagram and I create an Element
node the node is created in the top-left corner (this is the way to
GMF for indicating an error).
Is there any errors in .log/exceptions in the debugger?

-----------------
Alex Shatalin

I don't know what is .log/exceptions, but if this is the Log Error View then there are 3 errors (in the Problems view there are 0 errors).


I ran .diagram. When I say ?Error Log? I refer to the Error Log of diagram (instance launched).

When I create the new My files (default.my, default.my_diagram), Eclipse writes in Error Log (I exported the log):

!SESSION 2009-06-19 15:17:07.593 -----------------------------------------------
eclipse.buildId=M20080911-1700
java.version=1.6.0_12
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
Framework arguments: -product org.eclipse.sdk.ide
Command-line arguments: -product org.eclipse.sdk.ide -data C:\PFC_Pruebas/../runtime-EclipseApplication_WS2 -dev file:C:/PFC_Pruebas/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os win32 -ws win32 -arch x86


!ENTRY org.eclipse.gmf.runtime.emf.type.core 4 11 2009-06-19 15:18:07.828
!MESSAGE Error initializing element type "org.eclipse.gmf.tests.runtime.emf.type.core.employee": element type with same ID already exists. It will be ignored.


!ENTRY org.eclipse.gmf.runtime.emf.type.core 4 28 2009-06-19 15:18:07.906
!MESSAGE Error initializing specialization type "org.eclipse.gmf.tests.runtime.emf.type.core.SpecializesNoSuchType" because it specializes type "org.eclipse.gmf.tests.runtime.emf.type.core.noSuchType" which does not exist.


!ENTRY org.eclipse.gmf.runtime.emf.type.core 4 27 2009-06-19 15:18:07.906
!MESSAGE Error initializing specialization type "org.eclipse.gmf.tests.runtime.emf.type.core.multipleMetamodelTypes" because it specializes more than one metamodel type.





When I create a new element, Eclipse writes in Error Log (I exported the log):


eclipse.buildId=M20080911-1700
java.version=1.6.0_12
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
Framework arguments: -product org.eclipse.sdk.ide
Command-line arguments: -product org.eclipse.sdk.ide -data C:\PFC_Pruebas/../runtime-EclipseApplication_WS2 -dev file:C:/PFC_Pruebas/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os win32 -ws win32 -arch x86



Error Fri Jun 19 15:24:53 CEST 2009 execute

org.eclipse.core.commands.ExecutionException: While executing the operation, an exception occurred
at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:519)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:205)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:168)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:155)
at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:399)
at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:411)
at org.eclipse.gmf.runtime.diagram.ui.tools.CreationTool.performCreation(CreationTool.java:133)
at org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTool.java:178)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1064)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:263)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:374)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:538)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:207)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
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:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Caused by: java.lang.NullPointerException
at my.impl.ElementImpl.getActionName(ElementImpl.java:133)
at my.impl.ElementImpl.eGet(ElementImpl.java:197)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1012)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:1004)
at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eGet(BasicEObjectImpl.java:999)
at my.diagram.parsers.AbstractParser.getValue(AbstractParser.java:150)
at my.diagram.parsers.AbstractParser.getValues(AbstractParser.java:141)
at my.diagram.parsers.MessageFormatParser.getPrintString(MessageFormatParser.java:173)
at my.diagram.edit.parts.ElementActionNameEditPart.getLabelText(ElementActionNameEditPart.java:212)
at my.diagram.edit.parts.ElementActionNameEditPart.refreshLabel(ElementActionNameEditPart.java:413)
at my.diagram.edit.parts.ElementActionNameEditPart.refreshVisuals(ElementActionNameEditPart.java:402)
at my.diagram.edit.parts.ElementActionNameEditPart.setLabel(ElementActionNameEditPart.java:170)
at my.diagram.edit.parts.ElementEditPart.addFixedChild(ElementEditPart.java:116)
at my.diagram.edit.parts.ElementEditPart.addChildVisual(ElementEditPart.java:135)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:197)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.addChild(GraphicalEditPart.java:1295)
at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:727)
at org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractEditPart.java:677)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh(AbstractGraphicalEditPart.java:571)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.access$3(GraphicalEditPart.java:1)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart$3.run(GraphicalEditPart.java:839)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:289)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.refresh(GraphicalEditPart.java:829)
at org.eclipse.gef.editparts.AbstractEditPart.addNotify(AbstractEditPart.java:235)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotify(AbstractGraphicalEditPart.java:219)
at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:198)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.addChild(GraphicalEditPart.java:1295)
at org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(AbstractEditPart.java:727)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.handleNotificationEvent(GraphicalEditPart.java:1440)
at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.notifyChanged(GraphicalEditPart.java:1414)
at org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker.fireNotification(DiagramEventBroker.java:500)
at org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker.resourceSetChanged(DiagramEventBroker.java:395)
at org.eclipse.gmf.runtime.diagram.ui.internal.DiagramEventBrokerThreadSafe.resourceSetChanged(DiagramEventBrokerThreadSafe.java:72)
at org.eclipse.gmf.runtime.diagram.core.DiagramEditingDomainFactory$DiagramEditingDomain.postcommit(DiagramEditingDomainFactory.java:213)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.deactivate(TransactionalEditingDomainImpl.java:504)
at org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:623)
at org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:415)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:163)
at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:403)
at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:135)
at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:403)
at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:135)
at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:403)
at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:135)
at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:511)
... 37 more



If I have understood, this error is a nullPointer error because when I create an Element, the initial value of Action (reference) is in blank (initially Element have 0 references to Action). But the cardinality of this reference is 0..1. How can I resolve this?


                                                              Thanks.