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 267762 Details for
Bug 511793
Deadlock DependencyGraphImpl and ComponentCore
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Use the same locking scheme as 508685 here, too (try 2)
511793a.patch.txt (text/plain), 1.88 KB, created by
Carl Anderson
on 2017-04-11 16:18:45 EDT
(
hide
)
Description:
Use the same locking scheme as 508685 here, too (try 2)
Filename:
MIME Type:
Creator:
Carl Anderson
Created:
2017-04-11 16:18:45 EDT
Size:
1.88 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.common.modulecore >diff --git modulecore-src/org/eclipse/wst/common/componentcore/ComponentCore.java modulecore-src/org/eclipse/wst/common/componentcore/ComponentCore.java >index 36e4a5c..5734c84 100644 >--- modulecore-src/org/eclipse/wst/common/componentcore/ComponentCore.java >+++ modulecore-src/org/eclipse/wst/common/componentcore/ComponentCore.java >@@ -16,6 +16,7 @@ > import org.eclipse.core.resources.IProject; > import org.eclipse.core.resources.IResource; > import org.eclipse.core.runtime.IPath; >+import org.eclipse.core.runtime.jobs.ILock; > import org.eclipse.wst.common.componentcore.internal.ComponentResource; > import org.eclipse.wst.common.componentcore.internal.ModulecorePlugin; > import org.eclipse.wst.common.componentcore.internal.StructureEdit; >@@ -29,6 +30,7 @@ > import org.eclipse.wst.common.componentcore.resources.IVirtualFolder; > import org.eclipse.wst.common.componentcore.resources.IVirtualReference; > import org.eclipse.wst.common.componentcore.resources.IVirtualResource; >+import org.eclipse.wst.common.internal.emfworkbench.edit.EMFWorkbenchEditContextFactory; > > /** > * Provides a handle creation factory for the Virtual Path API. Clients may use >@@ -81,7 +83,20 @@ > if (aProject == null || !aProject.isAccessible()){ > return null; > } >- return ComponentImplManager.instance().createComponent(aProject, checkForComponentFile); >+ 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(aProject); >+ try{ >+ if(null != lock){ >+ lock.acquire(); >+ } >+ retVal = ComponentImplManager.instance().createComponent(aProject, checkForComponentFile); >+ } finally{ >+ if(null != lock){ >+ lock.release(); >+ } >+ } >+ return retVal; > } > > /**
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 511793
:
267682
|
267697
|
267761
|
267762
|
267776
|
267792