| author | Nick Sandonato | 2012-12-14 13:51:30 (EST) |
|---|---|---|
| committer | Nitin Dahyabhai | 2013-01-25 15:38:54 (EST) |
| commit | 2963635a6ed81612ae6334a556ac6cb8b92df63b (patch) (side-by-side diff) | |
| tree | d291cfc375a9ee373520935645127a5c1bc92710 | |
| parent | 3f3b8936cb9132801ff70fc3a9f91773710e9e54 (diff) | |
| download | webtools.common-2963635a6ed81612ae6334a556ac6cb8b92df63b.zip webtools.common-2963635a6ed81612ae6334a556ac6cb8b92df63b.tar.gz webtools.common-2963635a6ed81612ae6334a556ac6cb8b92df63b.tar.bz2 | |
ValidationPlugin#stop() should stop its jobs instead of join()ing themv201301252040
2 files changed, 11 insertions, 2 deletions
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/plugin/ValidationPlugin.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/plugin/ValidationPlugin.java index 4713fd2..6fd70ae 100644 --- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/plugin/ValidationPlugin.java +++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/plugin/ValidationPlugin.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2001, 2010 IBM Corporation and others. + * Copyright (c) 2001, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -111,7 +111,7 @@ public class ValidationPlugin extends Plugin { public void stop(BundleContext context) throws Exception { super.stop(context); ResourcesPlugin.getWorkspace().removeResourceChangeListener( EventManager.getManager() ); - ValidationFramework.getDefault().join(null); + ValidationFramework.getDefault().cancel(); // ResourcesPlugin.getWorkspace().removeResourceChangeListener( ValOperationManager.getDefault() ); EventManager.getManager().shutdown(); } diff --git a/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/ValidationFramework.java b/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/ValidationFramework.java index 7159a25..7547aea 100644 --- a/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/ValidationFramework.java +++ b/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/ValidationFramework.java @@ -502,6 +502,15 @@ public final class ValidationFramework { } /** + * Cancels all of the validation jobs. Any executing jobs will be asked to + * cancel, but there is no guarantee that they will do so. Jobs in other states will + * either be dequeued or discarded. + */ + public void cancel() { + Job.getJobManager().cancel(ValidationBuilder.FAMILY_VALIDATION_JOB); + } + + /** * Suspends, or undoes the suspension of, validation on the current project. * If <b>suspend</b> is true then validation is suspended and if it's false * then validation is not suspended on the project. The value of this |

