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 115431 Details for
Bug 251253
FacetProjectWorkingCopy creating many threads.....
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
possible patch
251253.txt (text/plain), 4.11 KB, created by
Chuck Bridgham
on 2008-10-17 13:27:45 EDT
(
hide
)
Description:
possible patch
Filename:
MIME Type:
Creator:
Chuck Bridgham
Created:
2008-10-17 13:27:45 EDT
Size:
4.11 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.common.project.facet.core >Index: src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectWorkingCopy.java >=================================================================== >RCS file: /cvsroot/webtools/common/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectWorkingCopy.java,v >retrieving revision 1.12.2.3 >diff -u -r1.12.2.3 FacetedProjectWorkingCopy.java >--- src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectWorkingCopy.java 7 Oct 2008 16:40:05 -0000 1.12.2.3 >+++ src/org/eclipse/wst/common/project/facet/core/internal/FacetedProjectWorkingCopy.java 17 Oct 2008 17:27:25 -0000 >@@ -37,6 +37,7 @@ > import org.eclipse.core.runtime.Platform; > import org.eclipse.core.runtime.Status; > import org.eclipse.core.runtime.SubMonitor; >+import org.eclipse.core.runtime.jobs.Job; > import org.eclipse.osgi.util.NLS; > import org.eclipse.wst.common.project.facet.core.ActionConfig; > import org.eclipse.wst.common.project.facet.core.DefaultConfigurationPresetFactory; >@@ -103,6 +104,33 @@ > * project that doesn't exist yet, <code>null</code> otherwise. > */ > >+ private Job runtimesRefreshJob = new Job("runtimesRefreshJob") //$NON-NLS-1$ >+ { >+ >+ protected IStatus run(IProgressMonitor monitor) { >+ // Suspending event notification to make sure that the internal list of >+ // targetable runtimes is updated before the AVAILABLE_RUNTIMES_CHANGED >+ // event is received by listeners. >+ >+ suspendEventNotification(); >+ >+ try >+ { >+ final IFacetedProjectEvent event >+ = new FacetedProjectEvent( FacetedProjectWorkingCopy.this, >+ IFacetedProjectEvent.Type.AVAILABLE_RUNTIMES_CHANGED ); >+ >+ notifyListeners( event ); >+ >+ refreshTargetableRuntimes(); >+ } >+ finally >+ { >+ resumeEventNotification(); >+ } >+ return Status.OK_STATUS; >+ } >+ }; > private IPath projectLocation; > private IFacetedProject project; > private Set<IProjectFacet> fixedFacets; >@@ -198,34 +226,7 @@ > { > public void handle() > { >- final Thread runtimesRefreshThread = new Thread() >- { >- public void run() >- { >- // Suspending event notification to make sure that the internal list of >- // targetable runtimes is updated before the AVAILABLE_RUNTIMES_CHANGED >- // event is received by listeners. >- >- suspendEventNotification(); >- >- try >- { >- final IFacetedProjectEvent event >- = new FacetedProjectEvent( FacetedProjectWorkingCopy.this, >- IFacetedProjectEvent.Type.AVAILABLE_RUNTIMES_CHANGED ); >- >- notifyListeners( event ); >- >- refreshTargetableRuntimes(); >- } >- finally >- { >- resumeEventNotification(); >- } >- } >- }; >- >- runtimesRefreshThread.start(); >+ getRuntimesRefreshJob().schedule(); > } > }; > >@@ -281,7 +282,11 @@ > IFacetedProjectEvent.Type.TARGETED_RUNTIMES_CHANGED ); > } > >- public String getProjectName() >+ protected Job getRuntimesRefreshJob() { >+ return this.runtimesRefreshJob; >+ } >+ >+ public String getProjectName() > { > synchronized( this.lock ) > {
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 251253
: 115431 |
115592