| Summary: | Labeled connection (transition) freezes the diagram | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] GMF-Tooling | Reporter: | Jens Hildebrand <Jens.Hildebrand> | ||||
| Component: | Core | Assignee: | Dmitry Stadnik <dimzzy> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | critical | ||||||
| Priority: | P3 | CC: | tikhomirov.artem | ||||
| Version: | 2.0 | Flags: | richard.gronback:
pmc_approved+
|
||||
| Target Milestone: | 2.0 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 2000 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Jens Hildebrand
So could you please attach them them to this request? Created attachment 70453 [details]
Eclipse Project with EMF/GMF files that show the misbehabior
There are two gmf folders. One without the labeled transition and one where the label is added to the transition. The second one causes the error. Don't know why. If you do the same steps under GMF2.0M7 everything works fine.
So I got the following exception in error log right after creation of transition link: 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:388) at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:400) at org.eclipse.gmf.runtime.diagram.ui.tools.ConnectionCreationTool.handleCreateConnection(ConnectionCreationTool.java:346) at org.eclipse.gmf.runtime.diagram.ui.tools.ConnectionCreationTool.handleButtonUp(ConnectionCreationTool.java:183) at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1053) at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:259) 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:206) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1495) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1519) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1504) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1295) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3335) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2941) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) at org.eclipse.equinox.launcher.Main.run(Main.java:1169) at org.eclipse.equinox.launcher.Main.main(Main.java:1144) Caused by: java.lang.NullPointerException at org.eclipse.draw2d.Figure.add(Figure.java:146) at org.eclipse.draw2d.Figure.add(Figure.java:179) at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addChildVisual(AbstractGraphicalEditPart.java:198) at org.eclipse.gef.editparts.AbstractEditPart.addChild(AbstractEditPart.java:197) at org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart.addChild(ConnectionEditPart.java:206) 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:564) at org.eclipse.gef.editparts.AbstractConnectionEditPart.refresh(AbstractConnectionEditPart.java:221) at org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart.access$1(ConnectionEditPart.java:1) at org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart$5.run(ConnectionEditPart.java:1113) at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:262) at org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionEditPart.refresh(ConnectionEditPart.java:1110) at org.eclipse.gef.editparts.AbstractConnectionEditPart.setTarget(AbstractConnectionEditPart.java:295) at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addTargetConnection(AbstractGraphicalEditPart.java:271) at org.eclipse.gef.editparts.AbstractGraphicalEditPart.refreshTargetConnections(AbstractGraphicalEditPart.java:667) at org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart.handleNotificationEvent(ShapeNodeEditPart.java:223) at org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart.notifyChanged(GraphicalEditPart.java:1411) at org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker.fireNotification(DiagramEventBroker.java:492) at org.eclipse.gmf.runtime.diagram.core.listener.DiagramEventBroker.resourceSetChanged(DiagramEventBroker.java:393) 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:475) at org.eclipse.emf.transaction.impl.TransactionImpl.close(TransactionImpl.java:531) at org.eclipse.emf.transaction.impl.TransactionImpl.commit(TransactionImpl.java:372) at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:138) at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:406) at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134) at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:406) at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134) at org.eclipse.gmf.runtime.common.core.command.CompositeCommand.doExecuteWithResult(CompositeCommand.java:406) at org.eclipse.gmf.runtime.common.core.command.AbstractCommand.execute(AbstractCommand.java:134) at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:511) ... 40 more So label edit part expects that it's parent edit part (transition) will set figure but somehow it does not happen. I guess it's related to recent changes in gmfgraph generator. The problem is LinkEditPart does not assign figures to its labels even if these labels are specified as child elements of the link figure (NodeEditPart does). Looks like we had a bug in old version, which was hidden with the processing order of LinkLabels (label viewmaps were created prior to link's viewmap, hence they were not recognized as ParentAssignedViewmap, @see DGMT 1.21 lines 537 and 550 resp.) In fact, figure codegen doesn't process labels of connections (no child figure gets generated), so this is the first place to fix. Related bug #191437 I've added codegeneration of connection's child figures Fixed; many thanks for posting and investigating the issue! - Hello again, i currently downloaded GMF2.0RC3 (Thu, 14 Jun 2007, and also RC3s from EMF, GEF) and regenerated my attached project. The Transition now don't freezes my diagram, so i think the bugfix might be in RC3. Am I right?. The problem now is that I don't see the label of the transition and haven't the opportunity to edit the label in the diagram like it was in older versions. And there are no Exceptions in the logfile. Am I so stupid or is this still a bug? Hi there, I also changed to GMF2.0RC3 and and my labels for my transition (yes I have also states and transitions ;) ) are lost. In nightly build from Tue, 12 Jun 2007 everything was okay. I changed code from this build with the RC3 build and get out, that the ???ViewProvider was changed. There is a method getNodeViewClass. In this method there are two switch cases. The first one makes trouble, because there is a default statement which returns null. So the second switch (where the correct class will be returned) cannot be reached from my EditParts of the labels. If I comment the default statement everything works fine. Is this a help for you all to fix it? Or is it a problem of my own that labels are not created? Regards, Jens Hello, sorry that doesn't work. And even if i set the transition label text in the property editor manually nothing is displayed. I must confess, that i currently only use gmf code generation and don't edit the gmf classes manually. But i could not understand how such obvious bug isn't detected by some simple testing, though that feature worked fine in older releases. I currently haven't that time to get into the GMF-Classes. But I will not complain about GMF. The concept is great and the final GMF2.0 has some month to prosper. Best Regards, Jens Hildebrand I've submitted https://bugs.eclipse.org/bugs/show_bug.cgi?id=192844 since it's a separate issue. Sorry for all these problems... Nonetheless original problem was actually fixed. [target cleanup] 2.0 RC was the original target milestone for this bug [GMF Restructure] Bug 319140 : product GMF and component Models - Mapping was the original product and component for this bug |