Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Niefer2009-04-08 09:36:55 -0400
committerAndrew Niefer2009-04-08 09:36:55 -0400
commit7692b0223e72c0f932290a4a956ee87127df55f4 (patch)
tree61264d07f85342dd77dcc7206054767789a7a86e
parent2cfe1fc4b2da4dabaac6a1fd5270cc8293ff2e10 (diff)
downloadrt.equinox.framework-7692b0223e72c0f932290a4a956ee87127df55f4.tar.gz
rt.equinox.framework-7692b0223e72c0f932290a4a956ee87127df55f4.tar.xz
rt.equinox.framework-7692b0223e72c0f932290a4a956ee87127df55f4.zip
bug 270984 - api tooling for launcher
-rw-r--r--bundles/org.eclipse.equinox.launcher/.classpath4
-rw-r--r--bundles/org.eclipse.equinox.launcher/.project8
-rw-r--r--bundles/org.eclipse.equinox.launcher/.settings/.api_filters21
-rw-r--r--bundles/org.eclipse.equinox.launcher/.settings/org.eclipse.jdt.core.prefs4
-rw-r--r--bundles/org.eclipse.equinox.launcher/src/org/eclipse/core/launcher/Main.java6
-rw-r--r--bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java61
-rw-r--r--bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java3
-rw-r--r--bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/WebStartMain.java6
8 files changed, 91 insertions, 22 deletions
diff --git a/bundles/org.eclipse.equinox.launcher/.classpath b/bundles/org.eclipse.equinox.launcher/.classpath
index 751c8f2e5..2fbb7a23e 100644
--- a/bundles/org.eclipse.equinox.launcher/.classpath
+++ b/bundles/org.eclipse.equinox.launcher/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/bundles/org.eclipse.equinox.launcher/.project b/bundles/org.eclipse.equinox.launcher/.project
index 29d4e4c85..4e544632a 100644
--- a/bundles/org.eclipse.equinox.launcher/.project
+++ b/bundles/org.eclipse.equinox.launcher/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.equinox.startup</name>
+ <name>org.eclipse.equinox.launcher</name>
<comment></comment>
<projects>
</projects>
@@ -20,9 +20,15 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
</natures>
</projectDescription>
diff --git a/bundles/org.eclipse.equinox.launcher/.settings/.api_filters b/bundles/org.eclipse.equinox.launcher/.settings/.api_filters
new file mode 100644
index 000000000..2281b22af
--- /dev/null
+++ b/bundles/org.eclipse.equinox.launcher/.settings/.api_filters
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.equinox.launcher" version="2">
+ <resource path="src/org/eclipse/equinox/launcher/Main.java" type="org.eclipse.equinox.launcher.Main$EclipsePolicy">
+ <filter id="647004193">
+ <message_arguments>
+ <message_argument value="org.eclipse.equinox.launcher.Main.EclipsePolicy.implies(ProtectionDomain, Permission)"/>
+ <message_argument value="Policy"/>
+ <message_argument value="implies(ProtectionDomain, Permission)"/>
+ <message_argument value="J2SE-1.3"/>
+ </message_arguments>
+ </filter>
+ <filter id="647004193">
+ <message_arguments>
+ <message_argument value="org.eclipse.equinox.launcher.Main.EclipsePolicy.getPermissions(ProtectionDomain)"/>
+ <message_argument value="Policy"/>
+ <message_argument value="getPermissions(ProtectionDomain)"/>
+ <message_argument value="J2SE-1.3"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/bundles/org.eclipse.equinox.launcher/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.launcher/.settings/org.eclipse.jdt.core.prefs
index f31f25003..739d2b26c 100644
--- a/bundles/org.eclipse.equinox.launcher/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.launcher/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Tue Aug 21 11:27:47 CDT 2007
+#Wed Apr 08 09:36:05 EDT 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -62,7 +62,6 @@ org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
org.eclipse.jdt.core.compiler.problem.unusedImport=error
@@ -144,7 +143,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
diff --git a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/core/launcher/Main.java b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/core/launcher/Main.java
index eb3e600fc..c98f7ef36 100644
--- a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/core/launcher/Main.java
+++ b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/core/launcher/Main.java
@@ -19,12 +19,16 @@ package org.eclipse.core.launcher;
* from the command line. To launch Eclipse programmatically, use
* org.eclipse.core.runtime.adaptor.EclipseStarter. The fields and methods
* on this class are not API.
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
*/
public class Main {
/**
* Pass our args along to the real Main class.
- * @param args
+ *
+ * @param args the given arguments
+ * @noreference This method is not intended to be referenced by clients.
*/
public static void main(String[] args) {
org.eclipse.equinox.launcher.Main.main(args);
diff --git a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java
index 4f389da6d..72c919260 100644
--- a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java
+++ b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java
@@ -10,30 +10,43 @@
*******************************************************************************/
package org.eclipse.equinox.launcher;
-
/**
* <b>Note:</b> This class should not be referenced programmatically by
* other Java code. This class exists only for the purpose of interacting with
* a native launcher. To launch Eclipse programmatically, use
* org.eclipse.core.runtime.adaptor.EclipseStarter. This class is not API.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
*/
public class JNIBridge {
//TODO: This class should not be public
private native void _set_exit_data(String sharedId, String data);
+
private native void _update_splash();
- private native long _get_splash_handle();
+
+ private native long _get_splash_handle();
+
private native void _show_splash(String bitmap);
+
private native void _takedown_splash();
-
+
private native int OleInitialize(int reserved);
+
private native void OleUninitialize();
-
+
private String library;
private boolean libraryLoaded = false;
+
+ /**
+ * @noreference This constructor is not intended to be referenced by clients.
+ *
+ * @param library the given library
+ */
public JNIBridge(String library) {
this.library = library;
}
-
+
private void loadLibrary() {
if (library != null) {
try {
@@ -54,12 +67,15 @@ public class JNIBridge {
libraryLoaded = true;
}
+ /**
+ * @noreference This method is not intended to be referenced by clients.
+ */
public boolean setExitData(String sharedId, String data) {
try {
_set_exit_data(sharedId, data);
return true;
} catch (UnsatisfiedLinkError e) {
- if(!libraryLoaded){
+ if (!libraryLoaded) {
loadLibrary();
return setExitData(sharedId, data);
}
@@ -67,25 +83,31 @@ public class JNIBridge {
}
}
+ /**
+ * @noreference This method is not intended to be referenced by clients.
+ */
public boolean showSplash(String bitmap) {
try {
_show_splash(bitmap);
return true;
} catch (UnsatisfiedLinkError e) {
- if(!libraryLoaded){
+ if (!libraryLoaded) {
loadLibrary();
return showSplash(bitmap);
}
return false;
}
}
-
+
+ /**
+ * @noreference This method is not intended to be referenced by clients.
+ */
public boolean updateSplash() {
try {
_update_splash();
return true;
} catch (UnsatisfiedLinkError e) {
- if(!libraryLoaded){
+ if (!libraryLoaded) {
loadLibrary();
return updateSplash();
}
@@ -93,34 +115,43 @@ public class JNIBridge {
}
}
+ /**
+ * @noreference This method is not intended to be referenced by clients.
+ */
public long getSplashHandle() {
- try {
+ try {
return _get_splash_handle();
} catch (UnsatisfiedLinkError e) {
- if(!libraryLoaded){
+ if (!libraryLoaded) {
loadLibrary();
return getSplashHandle();
}
return -1;
}
}
-
+
+ /**
+ * @noreference This method is not intended to be referenced by clients.
+ */
public boolean takeDownSplash() {
try {
_takedown_splash();
return true;
} catch (UnsatisfiedLinkError e) {
- if(!libraryLoaded){
+ if (!libraryLoaded) {
loadLibrary();
return takeDownSplash();
}
return false;
}
}
-
+
+ /**
+ * @noreference This method is not intended to be referenced by clients.
+ */
public boolean uninitialize() {
if (libraryLoaded && library != null) {
- if (library.indexOf("wpf") != -1) { //$NON-NLS-1$
+ if (library.indexOf("wpf") != -1) { //$NON-NLS-1$
try {
OleUninitialize();
} catch (UnsatisfiedLinkError e) {
diff --git a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java
index 7d92b498d..4426d6266 100644
--- a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java
+++ b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java
@@ -28,6 +28,9 @@ import org.eclipse.equinox.internal.launcher.Constants;
* from the command line. To launch Eclipse programmatically, use
* org.eclipse.core.runtime.adaptor.EclipseStarter. The fields and methods
* on this class are not API.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
*/
public class Main {
/**
diff --git a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/WebStartMain.java b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/WebStartMain.java
index 83b59b0e2..067e2b6fa 100644
--- a/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/WebStartMain.java
+++ b/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/WebStartMain.java
@@ -28,6 +28,9 @@ import java.util.zip.ZipFile;
* using Java webstart. To launch Eclipse programmatically, use
* org.eclipse.core.runtime.adaptor.EclipseStarter. The fields and methods
* on this class are not API.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
*/
//The bundles are discovered by finding all the jars on the classpath. Then they are added with their full path to the osgi.bundles list.
public class WebStartMain extends Main {
@@ -46,6 +49,9 @@ public class WebStartMain extends Main {
String location;
}
+ /**
+ * @noreference This method is not intended to be referenced by clients.
+ */
public static void main(String[] args) {
System.setSecurityManager(null); //TODO Hack so that when the classloader loading the fwk is created we don't have funny permissions. This should be revisited.
int result = new WebStartMain().run(args);

Back to the top