Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove uses of deprectated Eclipse API and warnings #7

Open
basti1302 opened this issue Feb 27, 2012 · 2 comments
Open

Remove uses of deprectated Eclipse API and warnings #7

basti1302 opened this issue Feb 27, 2012 · 2 comments

Comments

@basti1302
Copy link
Collaborator

  • /de.bastiankrol.startexplorer/META-INF/MANIFEST.MF: No required execution environment has been set
  • /de.bastiankrol.startexplorer/META-INF/MANIFEST.MF: The 'Eclipse-LazyStart' header is deprecated, use 'Bundle-ActivationPolicy'
  • /de.bastiankrol.startexplorer/src/de/bastiankrol/startexplorer/preferences/AbstractStartExplorerPreferencePage.java: The method savePluginPreferences() from the type Plugin is deprecated
@genodeftest
Copy link
Contributor

Hi
for the first one:
startexplorer is developed for Java SE 6. If you set the Java Runtime in 'de.bastiankrol.startexplorer → Properties → Build path → Libraries' to JavaSE-1.6, startexplorer will compile without warnings. Setting it to J2SE-1.5 generates compile errors since some code uses features introduced in Java 6.
Btw: I recommend setting the Java Runtime in Build path to prevent bugs caused by accidential use of Java 7/8 specific features.

For the second one: the fix is simple, just replace one line with another.

The diff:

diff --git a/plugin/META-INF/MANIFEST.MF b/plugin/META-INF/MANIFEST.MF
index c2a6c54..7c25563 100644
--- a/plugin/META-INF/MANIFEST.MF
+++ b/plugin/META-INF/MANIFEST.MF
@@ -1,5 +1,6 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Name: Startexplorer Plug-in
 Bundle-SymbolicName: de.bastiankrol.startexplorer; singleton:=true
 Bundle-Version: 1.4.1.qualifier
@@ -12,6 +13,6 @@ Require-Bundle: org.eclipse.ui,
  org.eclipse.core.expressions,
  org.eclipse.ui.ide,
  org.eclipse.core.variables
-Eclipse-LazyStart: true
+Bundle-ActivationPolicy: lazy
 Bundle-ClassPath: lib/json-simple-1.1.1.jar,
  .

@basti1302
Copy link
Collaborator Author

Changed MANIFEST.MF according to your suggestions in branch master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants