[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Re: approveRequest returns false but still a command is created and executed
|
Hi Alex,
I found the error. I used a subclass of AbstractCommandRequest to access the
edited element and delivered true if a request of another type was passed to
the approveRequest-method. So it happended that every ConfigureRequest was
approved. The line
ICommand configureCommand =
elementType.getEditCommand(configureRequest);
returned another instance of the DTNControlFlowCreateCommand which was
executed again. I access the edited element now via getElementsToEdit() of
IEditCommandRequest and it runs without overflow.
But what puzzels me - the disapproval has absolutely no effect. I expected
that no control flow would be created now. But it runs as if no "false" has
been returned.
Cheers,
Alexander
"Alex Shatalin" <vano@xxxxxxxxxxx> schrieb im Newsbeitrag
news:3c3172e617d458c9c1f183b5335b@xxxxxxxxxxxxxxxxxxx
> Hello Alexander,
>
> You can see the "tail" of StackTrace below. AFAIKSee you can put a
> breakpoint into DTNControlFlowCreateCommand.doExecuteWithResult() and see
> the reason of the loop in a debugger. BTW, are you using GMF 2.0?
>
> DTNControlFlowCreateCommand(AbstractEMFOperation).execute(IProgressMonitor,IAdaptable)
> line: 137
> AbstractEditHelper$1(CompositeEMFOperation).doExecute(IProgressMonitor,IAdaptable)
> line: 212
> AbstractEditHelper$1(AbstractEMFOperation).execute(IProgressMonitor,IAdaptable)
> line: 137
> DTNControlFlowCreateCommand(CreateElementCommand).doExecuteWithResult(IProgressMonitor,
> IAdaptable) line: 84
> DTNControlFlowCreateCommand.doExecuteWithResult(IProgressMonitor,IAdaptable)
> line: 119
> DTNControlFlowCreateCommand(AbstractTransactionalCommand).doExecute(IProgressMonitor,
> IAdaptable) line: 246
> DTNControlFlowCreateCommand(AbstractEMFOperation).execute(IProgressMonitor,IAdaptable)
> line: 137
> AbstractEditHelper$1(CompositeEMFOperation).doExecute(IProgressMonitor,IAdaptable)
> line: 212
> AbstractEditHelper$1(AbstractEMFOperation).execute(IProgressMonitor,IAdaptable)
> line: 137
> DTNControlFlowCreateCommand(CreateElementCommand).doExecuteWithResult(IProgressMonitor,
> IAdaptable) line: 84
> DTNControlFlowCreateCommand.doExecuteWithResult(IProgressMonitor,IAdaptable)
> line: 119
> DTNControlFlowCreateCommand(AbstractTransactionalCommand).doExecute(IProgressMonitor,
> IAdaptable) line: 246
> DTNControlFlowCreateCommand(AbstractEMFOperation).execute(IProgressMonitor,IAdaptable)
> line: 137 SemanticCreateCommand.doExecuteWithResult(IProgressMonitor,
> IAdaptable)line: 70
> SemanticCreateCommand(AbstractCommand).execute(IProgressMonitor,IAdaptable)
> line: 134 CompositeCommand.doExecuteWithResult(IProgressMonitor,
> IAdaptable) line:406
> CompositeCommand(AbstractCommand).execute(IProgressMonitor,
> IAdaptable)line: 134
> CompositeCommand.doExecuteWithResult(IProgressMonitor, IAdaptable)
> line:406 CompositeCommand(AbstractCommand).execute(IProgressMonitor,
> IAdaptable)line: 134 DefaultOperationHistory.execute(IUndoableOperation,
> IProgressMonitor,IAdaptable) line: 511
> DiagramCommandStack.execute(ICommand, IProgressMonitor) line: 205
> DiagramCommandStack.execute(Command, IProgressMonitor) line: 168
> DiagramCommandStack.execute(Command) line: 155
> UnspecifiedTypeConnectionTool(AbstractTool).executeCommand(Command)
> line:388
> UnspecifiedTypeConnectionTool(AbstractTool).executeCurrentCommand()
> line:400
> UnspecifiedTypeConnectionTool(ConnectionCreationTool).handleCreateConnection()
> line: 346
> UnspecifiedTypeConnectionTool(ConnectionCreationTool).handleButtonUp(int)line:
> 183
> UnspecifiedTypeConnectionTool(AbstractTool).mouseUp(MouseEvent,EditPartViewer)
> line: 1053 DiagramEditDomain(EditDomain).mouseUp(MouseEvent,
> EditPartViewer) line: 259
> DomainEventDispatcher.dispatchMouseReleased(MouseEvent) line: 374
> LightweightSystem$EventHandler.mouseUp(MouseEvent) line: 538
> TypedListener.handleEvent(Event) line: 206 EventTable.sendEvent(Event)
> line: 66 FigureCanvas(Widget).sendEvent(Event) line: 938
> Display.runDeferredEvents() line: 3682 Display.readAndDispatch() line:
> 3293 Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2389
> Workbench.runUI() line: 2353 Workbench.access$4(Workbench) line: 2219
> Workbench$4.run() line: 466 Realm.runWithDefault(Realm, Runnable) line:
> 289 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 461
> PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149
> IDEApplication.start(IApplicationContext) line: 106
> EclipseAppHandle.run(Object) line: 153
> EclipseAppLauncher.runApplication(Object) line: 106
> EclipseAppLauncher.start(Object) line: 76 EclipseStarter.run(Object) line:
> 363 EclipseStarter.run(String[], Runnable) line: 176
> NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line:
> notavailable [native method] NativeMethodAccessorImpl.invoke(Object,
> Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[])
> line: 25 Method.invoke(Object, Object...) line: 597
> Main.invokeFramework(String[], URL[]) line: 504 Main.basicRun(String[])
> line: 443 Main.run(String[]) line: 1169 Main.main(String[]) line: 1144
>
> -----------------
> Alex Shatalin
>
>