Author: koen.aers(a)jboss.com
Date: 2010-12-17 10:05:26 -0500 (Fri, 17 Dec 2010)
New Revision: 27589
Modified:
trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/StartupClass.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/Jbpm3PreferencesManager.java
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java
Log:
try to fix classpath init when converting from old workspace
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml 2010-12-17 14:20:17 UTC (rev 27588)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/plugin.xml 2010-12-17 15:05:26 UTC (rev 27589)
@@ -1574,9 +1574,9 @@
</editorContribution>
</extension>
- <extension point="org.eclipse.ui.startup">
+<!-- <extension point="org.eclipse.ui.startup">
<startup class="org.jbpm.gd.jpdl.StartupClass"/>
- </extension>
+ </extension> -->
<extension
point="org.eclipse.core.runtime.preferences">
Modified: trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/StartupClass.java
===================================================================
--- trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/StartupClass.java 2010-12-17
14:20:17 UTC (rev 27588)
+++ trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/StartupClass.java 2010-12-17
15:05:26 UTC (rev 27589)
@@ -7,7 +7,7 @@
public void earlyStartup() {
// Reference the Jbpm3PreferencesManager to trigger the initialization.
- Jbpm3PreferencesManager.INSTANCE.toString();
+// Jbpm3PreferencesManager.INSTANCE.toString();
}
}
Modified:
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/Jbpm3PreferencesManager.java
===================================================================
---
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/Jbpm3PreferencesManager.java 2010-12-17
14:20:17 UTC (rev 27588)
+++
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/prefs/Jbpm3PreferencesManager.java 2010-12-17
15:05:26 UTC (rev 27589)
@@ -29,8 +29,15 @@
public class Jbpm3PreferencesManager extends PreferencesManager {
- public static final Jbpm3PreferencesManager INSTANCE = new Jbpm3PreferencesManager();
-
+ private static Jbpm3PreferencesManager INSTANCE = new Jbpm3PreferencesManager();
+
+ public static PreferencesManager getInstance() {
+ if (INSTANCE == null) {
+ INSTANCE = new Jbpm3PreferencesManager();
+ }
+ return INSTANCE;
+ }
+
protected void initialize() {
File installationsFile =
Plugin.getDefault().getStateLocation().append("jbpm-installations.xml").toFile();
@@ -41,6 +48,7 @@
loadInstallations();
}
installationsFile.delete();
+ super.initialize();
}
@SuppressWarnings("deprecation")
Modified:
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java
===================================================================
---
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java 2010-12-17
14:20:17 UTC (rev 27588)
+++
trunk/jbpm/plugins/org.jbpm.gd.jpdl/src/org/jbpm/gd/jpdl/util/JbpmClasspathContainerInitializer.java 2010-12-17
15:05:26 UTC (rev 27589)
@@ -28,15 +28,15 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.jboss.tools.jbpm.preferences.JbpmInstallation;
-import org.jboss.tools.jbpm.preferences.PreferencesManager;
import org.jbpm.gd.jpdl.Logger;
+import org.jbpm.gd.jpdl.prefs.Jbpm3PreferencesManager;
public class JbpmClasspathContainerInitializer extends
ClasspathContainerInitializer {
private JbpmInstallation getJbpmInstallation(IPath containerPath) {
String jbpmInstallationName = containerPath.lastSegment();
- return PreferencesManager.getInstance().getJbpmInstallation(jbpmInstallationName);
+ return
Jbpm3PreferencesManager.getInstance().getJbpmInstallation(jbpmInstallationName);
}
public void initialize(IPath containerPath, IJavaProject project) throws CoreException
{