From: incastrix Date: Mon, 5 Oct 2009 21:16:12 +0000 (+0000) Subject: Replace deprecated org.eclipse.core.runtime.Platform.Run with org.eclipse.core.runtim... X-Git-Url: http://secure.phpeclipse.com?hp=9f6a54f380ad21849ed4c3fc5022092139eefca6 Replace deprecated org.eclipse.core.runtime.Platform.Run with org.eclipse.core.runtime.SafeRunner.Run --- diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/filters/FilterDescriptor.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/filters/FilterDescriptor.java index 4e36a48..e25508d 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/filters/FilterDescriptor.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpdt/internal/ui/filters/FilterDescriptor.java @@ -25,6 +25,7 @@ import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtensionRegistry; import org.eclipse.core.runtime.ISafeRunnable; import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.SafeRunner; //incastrix //import org.eclipse.jface.text.Assert; import org.eclipse.core.runtime.Assert; @@ -148,7 +149,7 @@ public class FilterDescriptor implements Comparable, IPluginContribution { } }; - Platform.run(code); + SafeRunner.run(code); return result[0]; } @@ -279,7 +280,7 @@ public class FilterDescriptor implements Comparable, IPluginContribution { if (FILTER_TAG.equals(element.getName())) { final FilterDescriptor[] desc = new FilterDescriptor[1]; - Platform + SafeRunner .run(new SafeRunnable( FilterMessages .getString("FilterDescriptor.filterDescriptionCreationError.message")) { //$NON-NLS-1$ diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/Buffer.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/Buffer.java index f10bdf0..832144f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/Buffer.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/Buffer.java @@ -27,7 +27,8 @@ import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.ISafeRunnable; -import org.eclipse.core.runtime.Platform; +//import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.SafeRunner; /** * @see IBuffer @@ -292,7 +293,7 @@ public class Buffer implements IBuffer { for (int i = 0, size = this.changeListeners.size(); i < size; ++i) { final IBufferChangedListener listener = (IBufferChangedListener) this.changeListeners .get(i); - Platform.run(new ISafeRunnable() { + SafeRunner.run(new ISafeRunnable() { public void handleException(Throwable exception) { Util .log(exception, diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/DeltaProcessingState.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/DeltaProcessingState.java index 89b0477..869b40b 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/DeltaProcessingState.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/DeltaProcessingState.java @@ -31,7 +31,8 @@ import org.eclipse.core.resources.IResourceChangeListener; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.ISafeRunnable; -import org.eclipse.core.runtime.Platform; +//import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.SafeRunner; /** * Keep the global states used during Java element delta processing. @@ -500,7 +501,7 @@ public class DeltaProcessingState implements IResourceChangeListener { // wrap callbacks with Safe runnable for subsequent listeners to // be called when some are causing grief final IResourceChangeListener listener = this.preResourceChangeListeners[i]; - Platform.run(new ISafeRunnable() { + SafeRunner.run(new ISafeRunnable() { public void handleException(Throwable exception) { Util .log(exception, diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/DeltaProcessor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/DeltaProcessor.java index 22615e9..911476e 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/DeltaProcessor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/DeltaProcessor.java @@ -44,8 +44,9 @@ import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.ISafeRunnable; -import org.eclipse.core.runtime.Platform; +//import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.QualifiedName; +import org.eclipse.core.runtime.SafeRunner; /** * This class is used by JavaModelManager to convert @@ -2245,7 +2246,7 @@ public class DeltaProcessor implements IResourceChangeListener { } // wrap callbacks with Safe runnable for subsequent listeners to // be called when some are causing grief - Platform.run(new ISafeRunnable() { + SafeRunner.run(new ISafeRunnable() { public void handleException(Throwable exception) { Util .log(exception, diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/JavaModelManager.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/JavaModelManager.java index a131065..d2ffed9 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/JavaModelManager.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/core/JavaModelManager.java @@ -71,6 +71,7 @@ import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Plugin; import org.eclipse.core.runtime.Preferences; +import org.eclipse.core.runtime.SafeRunner; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.Preferences.PropertyChangeEvent; @@ -1190,7 +1191,8 @@ public class JavaModelManager implements ISaveParticipant { } // wrap callbacks with Safe runnable for subsequent listeners to // be called when some are causing grief - Platform.run(new ISafeRunnable() { + + SafeRunner.run(new ISafeRunnable() { public void handleException(Throwable exception) { Util .log(exception,