private void scheduleNewSelection(final JavaSelectionEvent selection) { try { schedulerLock.lock(); scheduler = new ProviderExecutionScheduler(providers, subscriptionManager, contentPart, extdocBus); scheduler.scheduleOnSelection(selection); } finally { schedulerLock.unlock(); } }
// it might be necessary to add a lock here... a synchronized method is not // possible as this method would block the "syncScheduling" method private void disposeScheduler() { if (scheduler != null) { scheduler.dispose(); scheduler = null; } }