Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328949

Summary: Error when creating associations
Product: [Technology] Tigerstripe Reporter: Navid Mehregani <nmehrega>
Component: UIAssignee: Navid Mehregani <nmehrega>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 0.5M0   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Navid Mehregani CLA 2010-10-28 13:38:12 EDT
Build Identifier: 

An error message is logged to Error Log whenever an association is created

Reproducible: Always

Steps to Reproduce:
1. Create a new model project
2. Create a class diagram file
3. Create two entity artifacts in class diagram
4. Open Error log view
5. Create an association between the two entities.  Notice the following error being logged to Error Log view:

org.eclipse.core.internal.resources.ResourceException: Resource '/ThirdProject/src/com/mycompany/Association0.java' already exists.
at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:305)
at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:292)
at org.eclipse.core.internal.resources.File.create(File.java:120)
at org.eclipse.core.internal.resources.File.create(File.java:196)
at org.eclipse.tigerstripe.workbench.internal.core.model.AbstractArtifact.doSave(AbstractArtifact.java:1489)
at org.eclipse.tigerstripe.workbench.internal.core.model.AbstractArtifact.doSave(AbstractArtifact.java:1402)
at org.eclipse.tigerstripe.workbench.internal.core.model.AssociationArtifact.doSave(AssociationArtifact.java:246)
at org.eclipse.tigerstripe.workbench.internal.api.patterns.ArtifactPattern.addToManager(ArtifactPattern.java:174)
at org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram.edit.policies.ManagedEntityArtifactItemSemanticEditPolicy$CreateIncomingCustomAssociation3001Command.doExecuteWithResult(ManagedEntityArtifactItemSemanticEditPolicy.java:792)
at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand.doExecute(AbstractTransactionalCommand.java:247)
at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
at org.eclipse.gmf.runtime.diagram.ui.commands.SemanticCreateCommand.doExecuteWithResult(SemanticCreateCommand.java:91)
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.diagram.ui.commands.ICommandProxy.execute(ICommandProxy.java:68)
at org.eclipse.gef.commands.CompoundCommand.execute(CompoundCommand.java:111)
at org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy$PromptAndCreateConnectionCommand.doExecuteWithResult(GraphicalNodeEditPolicy.java:157)
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)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:206)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:169)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramCommandStack.execute(DiagramCommandStack.java:156)
at org.eclipse.gef.tools.AbstractTool.executeCommand(AbstractTool.java:425)
at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:438)
at org.eclipse.gmf.runtime.diagram.ui.tools.ConnectionCreationTool.handleCreateConnection(ConnectionCreationTool.java:341)
at org.eclipse.gmf.runtime.diagram.ui.tools.ConnectionCreationTool.handleButtonUp(ConnectionCreationTool.java:181)
at org.eclipse.gmf.runtime.diagram.ui.internal.tools.ConnectionHandleTool.handleButtonUp(ConnectionHandleTool.java:132)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1201)
at org.eclipse.gef.tools.SelectionTool.mouseUp(SelectionTool.java:572)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:301)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:380)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:548)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:213)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1187)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3622)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3277)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
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:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Comment 1 Navid Mehregani CLA 2010-10-28 15:38:51 EDT
Fixed.  This was a race condition.  
Modified file: ArtifactLinkCreateRequest