From 25ea0c993497755aad1378f8f068ec8cb5e7b05c Mon Sep 17 00:00:00 2001 From: jsurfer Date: Sat, 4 Sep 2004 06:24:33 +0000 Subject: [PATCH 1/1] Missing addSaveParticipant for JavaModelManager --- .../sourceforge/phpeclipse/PHPeclipsePlugin.java | 81 ++++++++++---------- 1 files changed, 40 insertions(+), 41 deletions(-) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java index 1e54b0e..75709ed 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java @@ -1137,47 +1137,46 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements // manager.loadVariablesAndContainers(); final IWorkspace workspace = ResourcesPlugin.getWorkspace(); - workspace.addResourceChangeListener(manager.deltaState, - IResourceChangeEvent.PRE_BUILD | IResourceChangeEvent.POST_BUILD - | IResourceChangeEvent.POST_CHANGE - | IResourceChangeEvent.PRE_DELETE - | IResourceChangeEvent.PRE_CLOSE); - - // startIndexing(); - - // process deltas since last activated in indexer thread so that indexes - // are up-to-date. - // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=38658 -// Job processSavedState = new Job(Util.bind("savedState.jobName")) { //$NON-NLS-1$ -// protected IStatus run(IProgressMonitor monitor) { -// try { -// // add save participant and process delta atomically -// // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=59937 -// workspace.run(new IWorkspaceRunnable() { -// public void run(IProgressMonitor progress) throws CoreException { -// ISavedState savedState = workspace.addSaveParticipant( -// PHPeclipsePlugin.this, manager); -// if (savedState != null) { -// // the event type coming from the saved state is always -// // POST_AUTO_BUILD -// // force it to be POST_CHANGE so that the delta processor -// // can -// // handle it -// manager.deltaState.getDeltaProcessor().overridenEventType = IResourceChangeEvent.POST_CHANGE; -// savedState.processResourceChangeEvents(manager.deltaState); -// } -// } -// }, monitor); -// } catch (CoreException e) { -// return e.getStatus(); -// } -// return Status.OK_STATUS; -// } -// }; -// processSavedState.setSystem(true); -// processSavedState.setPriority(Job.SHORT); // process asap -// processSavedState.schedule(); -// } + workspace.addResourceChangeListener( + manager.deltaState, + IResourceChangeEvent.PRE_BUILD + | IResourceChangeEvent.POST_BUILD + | IResourceChangeEvent.POST_CHANGE + | IResourceChangeEvent.PRE_DELETE + | IResourceChangeEvent.PRE_CLOSE); + +// startIndexing(); + ISavedState savedState = workspace.addSaveParticipant(PHPeclipsePlugin.this, manager); + + // process deltas since last activated in indexer thread so that indexes are up-to-date. + // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=38658 +// Job processSavedState = new Job(Util.bind("savedState.jobName")) { //$NON-NLS-1$ +// protected IStatus run(IProgressMonitor monitor) { +// try { +// // add save participant and process delta atomically +// // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=59937 +// workspace.run( +// new IWorkspaceRunnable() { +// public void run(IProgressMonitor progress) throws CoreException { +// ISavedState savedState = workspace.addSaveParticipant(PHPeclipsePlugin.this, manager); +// if (savedState != null) { +// // the event type coming from the saved state is always POST_AUTO_BUILD +// // force it to be POST_CHANGE so that the delta processor can handle it +// manager.deltaState.getDeltaProcessor().overridenEventType = IResourceChangeEvent.POST_CHANGE; +// savedState.processResourceChangeEvents(manager.deltaState); +// } +// } +// }, +// monitor); +// } catch (CoreException e) { +// return e.getStatus(); +// } +// return Status.OK_STATUS; +// } +// }; +// processSavedState.setSystem(true); +// processSavedState.setPriority(Job.SHORT); // process asap +// processSavedState.schedule(); } catch (RuntimeException e) { manager.shutdown(); throw e; -- 1.7.1