Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2012-02-14 15:37:26 -0500
committerIgor Fedorenko2012-02-14 15:37:26 -0500
commit2cd9cf7f8e95469f30ebe04b028534715bc464d4 (patch)
treeabe3878d654b9722f05afe4af197b9f3fd360ec3 /org.eclipse.m2e.editor
parentd09242e6662026d19909a2a0cd02799edf3d5254 (diff)
downloadm2e-core-2cd9cf7f8e95469f30ebe04b028534715bc464d4.tar.gz
m2e-core-2cd9cf7f8e95469f30ebe04b028534715bc464d4.tar.xz
m2e-core-2cd9cf7f8e95469f30ebe04b028534715bc464d4.zip
371534 removed unnecessary UIJob from MavenPomEditor.dispose
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
Diffstat (limited to 'org.eclipse.m2e.editor')
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/Messages.java2
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/messages.properties1
-rw-r--r--org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java34
3 files changed, 14 insertions, 23 deletions
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/Messages.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/Messages.java
index d44bdb45..7d29a4f7 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/Messages.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/Messages.java
@@ -111,8 +111,6 @@ public class Messages extends NLS {
public static String MavenPomEditor_error_loading_effective_pom;
- public static String MavenPomEditor_job_disposing;
-
public static String MavenPomEditor_loading;
public static String MavenPomEditor_task_reading;
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/messages.properties b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/messages.properties
index 0476a12d..02f2b7c5 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/messages.properties
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/internal/messages.properties
@@ -46,7 +46,6 @@ MavenPomEditor_effective=\ [effective]
MavenPomEditor_effective_pom=Effective POM
MavenPomEditor_error_failed_effective=Failed to load Effective POM
MavenPomEditor_error_loading_effective_pom=Unable to load Effective POM. See console for errors.
-MavenPomEditor_job_disposing=Disposing
MavenPomEditor_loading=Loading Effective POM...
MavenPomEditor_task_reading=Reading project
MavenPomEditorPage_actio_refresh=Refresh
diff --git a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
index aec564e3..22480857 100644
--- a/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
+++ b/org.eclipse.m2e.editor/src/org/eclipse/m2e/editor/pom/MavenPomEditor.java
@@ -88,7 +88,6 @@ import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.IFormPage;
import org.eclipse.ui.ide.IGotoMarker;
import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
-import org.eclipse.ui.progress.UIJob;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.ui.texteditor.IDocumentProviderExtension3;
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
@@ -752,27 +751,22 @@ public class MavenPomEditor extends FormEditor implements IResourceChangeListene
public void dispose() {
disposed = true;
MavenPluginActivator.getDefault().getMavenProjectManager().removeMavenProjectChangedListener(this);
-
- new UIJob(Messages.MavenPomEditor_job_disposing) {
- @SuppressWarnings("synthetic-access")
- public IStatus runInUIThread(IProgressMonitor monitor) {
- if (structuredModel != null) { //#336331
- structuredModel.releaseFromEdit();
- }
- if (sseCommandStack != null)
- sseCommandStack.removeCommandStackListener(commandStackListener);
- if(activationListener != null) {
- activationListener.dispose();
- activationListener = null;
- }
+ if(structuredModel != null) { //#336331
+ structuredModel.releaseFromEdit();
+ }
+ if(sseCommandStack != null) {
+ sseCommandStack.removeCommandStackListener(commandStackListener);
+ }
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(MavenPomEditor.this);
-
- MavenPomEditor.super.dispose();
- return Status.OK_STATUS;
- }
- }.schedule();
+ if(activationListener != null) {
+ activationListener.dispose();
+ activationListener = null;
+ }
+
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(MavenPomEditor.this);
+
+ super.dispose();
}
/**

Back to the top