Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 265873 Details for
Bug 508685
Deadlock between DependencyGraph and StructureEdit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Better placement of the lock acquire
bug508685a.patch (text/plain), 2.03 KB, created by
Carl Anderson
on 2016-12-14 08:13:47 EST
(
hide
)
Description:
Better placement of the lock acquire
Filename:
MIME Type:
Creator:
Carl Anderson
Created:
2016-12-14 08:13:47 EST
Size:
2.03 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.common.modulecore >diff --git modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentImplManager.java modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentImplManager.java >index 58f80d4..422e468 100644 >--- modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentImplManager.java >+++ modulecore-src/org/eclipse/wst/common/componentcore/internal/util/ComponentImplManager.java >@@ -25,6 +25,7 @@ > import org.eclipse.core.runtime.ISafeRunnable; > import org.eclipse.core.runtime.Path; > import org.eclipse.core.runtime.SafeRunner; >+import org.eclipse.core.runtime.jobs.ILock; > import org.eclipse.jem.util.RegistryReader; > import org.eclipse.jem.util.emf.workbench.ISynchronizerExtender; > import org.eclipse.jem.util.emf.workbench.ProjectResourceSet; >@@ -37,6 +38,7 @@ > import org.eclipse.wst.common.componentcore.internal.resources.VirtualFolder; > import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; > import org.eclipse.wst.common.componentcore.resources.IVirtualFolder; >+import org.eclipse.wst.common.internal.emfworkbench.edit.EMFWorkbenchEditContextFactory; > import org.eclipse.wst.common.project.facet.core.IFacetedProject; > import org.eclipse.wst.common.project.facet.core.IProjectFacet; > import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion; >@@ -200,7 +202,20 @@ > } > > public IVirtualComponent createComponent(IProject project) { >- return createComponent(project, true); >+ IVirtualComponent retVal = null; >+ // acquire the lock that StructureEdit will need already, to prevent others from locking that before calling createComponent() - see bug 508685 >+ ILock lock = EMFWorkbenchEditContextFactory.getProjectLockObject(project); >+ try{ >+ if(null != lock){ >+ lock.acquire(); >+ } >+ retVal = createComponent(project, true); >+ } finally{ >+ if(null != lock){ >+ lock.release(); >+ } >+ } >+ return retVal; > } > > public synchronized IVirtualComponent createComponent(IProject project, boolean checkSettings) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 508685
:
265726
| 265873