From 7c1cccc945ab5fe9eb06d1614d28004b4de7d398 Mon Sep 17 00:00:00 2001
From: dgelessus <dgelessus@users.noreply.github.com>
Date: Mon, 3 Jul 2023 18:47:32 +0200
Subject: [PATCH] Remove static Activator.plugin fields where not used

---
 .../src/de/prob/core/tests/Activator.java     | 24 -----------------
 .../disprover/ui/DisproverActivator.java      | 26 -------------------
 .../src/de/prob/symbolic/Activator.java       | 17 ------------
 3 files changed, 67 deletions(-)

diff --git a/de.prob.core.tests/src/de/prob/core/tests/Activator.java b/de.prob.core.tests/src/de/prob/core/tests/Activator.java
index 72168c60..e7933ec2 100644
--- a/de.prob.core.tests/src/de/prob/core/tests/Activator.java
+++ b/de.prob.core.tests/src/de/prob/core/tests/Activator.java
@@ -1,7 +1,6 @@
 package de.prob.core.tests;
 
 import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
 
 /**
  * The activator class controls the plug-in life cycle
@@ -11,32 +10,9 @@ public class Activator extends Plugin {
 	// The plug-in ID
 	public static final String PLUGIN_ID = "de.prob.core.tests"; //$NON-NLS-1$
 
-	// The shared instance
-	private static Activator plugin;
-	
 	/**
 	 * The constructor
 	 */
 	public Activator() {
 	}
-
-	public void start(BundleContext context) throws Exception {
-		super.start(context);
-		plugin = this;
-	}
-
-	public void stop(BundleContext context) throws Exception {
-		plugin = null;
-		super.stop(context);
-	}
-
-	/**
-	 * Returns the shared instance
-	 *
-	 * @return the shared instance
-	 */
-	public static Activator getDefault() {
-		return plugin;
-	}
-
 }
diff --git a/de.prob.eventb.disprover.ui/src/de/prob/eventb/disprover/ui/DisproverActivator.java b/de.prob.eventb.disprover.ui/src/de/prob/eventb/disprover/ui/DisproverActivator.java
index 63f081a8..62ec5d4f 100644
--- a/de.prob.eventb.disprover.ui/src/de/prob/eventb/disprover/ui/DisproverActivator.java
+++ b/de.prob.eventb.disprover.ui/src/de/prob/eventb/disprover/ui/DisproverActivator.java
@@ -1,41 +1,15 @@
 package de.prob.eventb.disprover.ui;
 
 import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
 
 public class DisproverActivator extends AbstractUIPlugin {
 
 	// The plug-in ID
 	public static final String PLUGIN_ID = "de.prob.eventb.disprover.ui";
 
-	// The shared instance
-	private static DisproverActivator plugin;
-
 	/**
 	 * The constructor
 	 */
 	public DisproverActivator() {
 	}
-
-	@Override
-	public void start(BundleContext context) throws Exception {
-		super.start(context);
-		plugin = this;
-	}
-
-	@Override
-	public void stop(BundleContext context) throws Exception {
-		plugin = null;
-		super.stop(context);
-	}
-
-	/**
-	 * Returns the shared instance
-	 * 
-	 * @return the shared instance
-	 */
-	public static DisproverActivator getDefault() {
-		return plugin;
-	}
-
 }
diff --git a/de.prob.symbolic/src/de/prob/symbolic/Activator.java b/de.prob.symbolic/src/de/prob/symbolic/Activator.java
index 3ea45104..fd9fb518 100644
--- a/de.prob.symbolic/src/de/prob/symbolic/Activator.java
+++ b/de.prob.symbolic/src/de/prob/symbolic/Activator.java
@@ -19,7 +19,6 @@ public class Activator extends AbstractUIPlugin {
 	public static final String PLUGIN_ID = "de.prob.symbolic"; //$NON-NLS-1$
 
 	// The shared instance
-	private static Activator plugin;
 
 	/**
 	 * The constructor
@@ -30,27 +29,11 @@ public class Activator extends AbstractUIPlugin {
 	@Override
 	public void start(BundleContext context) throws Exception {
 		super.start(context);
-		plugin = this;
 
 		setConfig();
 
 	}
 
-	@Override
-	public void stop(BundleContext context) throws Exception {
-		plugin = null;
-		super.stop(context);
-	}
-
-	/**
-	 * Returns the shared instance
-	 * 
-	 * @return the shared instance
-	 */
-	public static Activator getDefault() {
-		return plugin;
-	}
-
 	/**
 	 * Registers a file configuration setter for our plugin.
 	 */
-- 
GitLab