Move from IPlatformRunnable to IApplication
diff --git a/org.eclipse.wtp.releng.versionchecker/.settings/org.eclipse.jdt.launching.prefs b/org.eclipse.wtp.releng.versionchecker/.settings/org.eclipse.jdt.launching.prefs
new file mode 100644
index 0000000..d211d32
--- /dev/null
+++ b/org.eclipse.wtp.releng.versionchecker/.settings/org.eclipse.jdt.launching.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/org.eclipse.wtp.releng.versionchecker/META-INF/MANIFEST.MF b/org.eclipse.wtp.releng.versionchecker/META-INF/MANIFEST.MF
index a7a5d52..e594af2 100644
--- a/org.eclipse.wtp.releng.versionchecker/META-INF/MANIFEST.MF
+++ b/org.eclipse.wtp.releng.versionchecker/META-INF/MANIFEST.MF
@@ -2,9 +2,9 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name.0
 Bundle-SymbolicName: org.eclipse.wtp.releng.versionchecker;singleton:=true
-Bundle-Version: 1.0.1.qualifier
+Bundle-Version: 1.0.2.qualifier
 Bundle-Localization: plugin
-Require-Bundle: org.eclipse.core.runtime,
+Require-Bundle: org.eclipse.core.runtime;bundle-version="(3.21.0, 4.0.0]",
  org.eclipse.update.configurator
 Export-Package: org.eclipse.wtp.releng.tools.versionchecker
 Bundle-Vendor: %Bundle-Vendor.0
diff --git a/org.eclipse.wtp.releng.versionchecker/pom.xml b/org.eclipse.wtp.releng.versionchecker/pom.xml
index 9a3c560..da1c00c 100644
--- a/org.eclipse.wtp.releng.versionchecker/pom.xml
+++ b/org.eclipse.wtp.releng.versionchecker/pom.xml
@@ -21,6 +21,6 @@
 

   <groupId>org.eclipse.webtools.releng</groupId>

   <artifactId>org.eclipse.wtp.releng.versionchecker</artifactId>

-  <version>1.0.1-SNAPSHOT</version>

+  <version>1.0.2-SNAPSHOT</version>

   <packaging>eclipse-plugin</packaging>

 </project>
\ No newline at end of file
diff --git a/org.eclipse.wtp.releng.versionchecker/src/org/eclipse/wtp/releng/tools/versionchecker/DependencyChecker.java b/org.eclipse.wtp.releng.versionchecker/src/org/eclipse/wtp/releng/tools/versionchecker/DependencyChecker.java
index 8102a64..fcdfa79 100644
--- a/org.eclipse.wtp.releng.versionchecker/src/org/eclipse/wtp/releng/tools/versionchecker/DependencyChecker.java
+++ b/org.eclipse.wtp.releng.versionchecker/src/org/eclipse/wtp/releng/tools/versionchecker/DependencyChecker.java
@@ -28,8 +28,9 @@
 import java.io.Writer;
 import java.util.ArrayList;
 
-import org.eclipse.core.runtime.IPlatformRunnable;
 import org.eclipse.core.runtime.Platform;
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.osgi.service.resolver.BundleSpecification;
 import org.eclipse.osgi.service.resolver.VersionRange;
@@ -136,7 +137,7 @@
  * 
  * </pre>
  */
-public class DependencyChecker implements IPlatformRunnable {
+public class DependencyChecker implements IApplication {
 
 	private static final String CONSERVATIVE_DIRECTIVE = "-conservative";
 	private static final String FILTER_DIRECTIVE = "-filter";
@@ -153,7 +154,13 @@
 	}
 
 	public Object run(Object o) throws Exception {
-		String args[] = Platform.getApplicationArgs();
+		String args[];
+        if (o instanceof String[]) {
+            args = (String[]) o;
+        }
+        else {
+        	args = Platform.getApplicationArgs();
+        }
 		String filter = null;
 		for (int nArgs = 0; nArgs < args.length; nArgs++) {
 			if (args[nArgs].equals(FILTER_DIRECTIVE) && (nArgs + 1 < args.length))
@@ -230,7 +237,7 @@
 			}
 		}
 
-		return IPlatformRunnable.EXIT_OK;
+		return IApplication.EXIT_OK;
 	}
 
 	private void rewriteManifest(String bundleName, StringBuffer sb) throws IOException {
@@ -295,4 +302,13 @@
 		return sb;
 
 	}
+
+	public Object start(IApplicationContext context) throws Exception {
+		return run(context.getArguments().get(IApplicationContext.APPLICATION_ARGS));
+	}
+
+	public void stop() {
+		// TODO Auto-generated method stub
+		
+	}
 }
diff --git a/org.eclipse.wtp.releng.versionchecker/src/org/eclipse/wtp/releng/tools/versionchecker/VersionLister.java b/org.eclipse.wtp.releng.versionchecker/src/org/eclipse/wtp/releng/tools/versionchecker/VersionLister.java
index f506bcd..05fc085 100644
--- a/org.eclipse.wtp.releng.versionchecker/src/org/eclipse/wtp/releng/tools/versionchecker/VersionLister.java
+++ b/org.eclipse.wtp.releng.versionchecker/src/org/eclipse/wtp/releng/tools/versionchecker/VersionLister.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * Copyright (c) 2006, 2021 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
  * which accompanies this distribution, and is available at
@@ -32,8 +32,9 @@
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.parsers.ParserConfigurationException;
 
-import org.eclipse.core.runtime.IPlatformRunnable;
 import org.eclipse.core.runtime.Platform;
+import org.eclipse.equinox.app.IApplication;
+import org.eclipse.equinox.app.IApplicationContext;
 import org.eclipse.osgi.service.datalocation.Location;
 import org.eclipse.osgi.service.resolver.BundleDescription;
 import org.eclipse.update.configurator.ConfiguratorUtils;
@@ -55,7 +56,7 @@
  * prepared by running this utility on some earlier installed stack.
  * 
  */
-public class VersionLister implements IPlatformRunnable {
+public class VersionLister implements IApplication {
 
     private static final String   REFERENCE_VERSIONING_DATA_XML      = "referenceVersioningData.xml";
 
@@ -101,7 +102,6 @@
     private static final int      ERROR_EXCEPTION_OCCURRED           = 0x0100;
     private static final int      ERROR_QUALIFIER_ONLY_INCREAASE     = 0x1000;
     private static final int      TEST_TO_REFERENCE_ID_NOT_FOUND     = 0x00010000;
-    private static final Object   OK_EXIT                            = IPlatformRunnable.EXIT_OK;
 
     private static final String   COUNT_QUALIFIER_ONLY_AS_ERROR      = "-countQualifierIncreaseOnlyAsError";
     private boolean               countQualifierOnlyAsError;
@@ -124,7 +124,7 @@
         }
         else {
             doPrintHelp();
-            return OK_EXIT;
+            return IApplication.EXIT_OK;
         }
 
         printArgs(args);
@@ -220,7 +220,7 @@
                 exitResult = exitResult | doPrintHelp();
             }
         }
-        Object result = IPlatformRunnable.EXIT_OK;
+        Object result = IApplication.EXIT_OK;
         if (exitResult > ERROR_BASE_CODE) {
             result = new Integer(exitResult);
         }
@@ -897,4 +897,13 @@
         String result = text.trim();
         return result;
     }
+
+	public Object start(IApplicationContext context) throws Exception {
+		return run(context.getArguments().get(IApplicationContext.APPLICATION_ARGS));
+	}
+
+	public void stop() {
+		// TODO Auto-generated method stub
+		
+	}
 }