Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvladt2011-02-14 17:06:06 -0500
committervladt2011-02-14 17:07:09 -0500
commit17cfd9de9883b2195c053f019ae4a651cefd2d42 (patch)
tree04ab9091ebcc8f7950b6c729aea040e1f359365e /org.eclipse.m2e.logback.configuration/src
parente1b337780bb9b98c9f368d18dc3efd242cf37cc9 (diff)
downloadm2e-core-17cfd9de9883b2195c053f019ae4a651cefd2d42.tar.gz
m2e-core-17cfd9de9883b2195c053f019ae4a651cefd2d42.tar.xz
m2e-core-17cfd9de9883b2195c053f019ae4a651cefd2d42.zip
337167 - workspace chooser dialog never shows if org.eclipse.m2e.logback.configuration is installed
Diffstat (limited to 'org.eclipse.m2e.logback.configuration/src')
-rw-r--r--org.eclipse.m2e.logback.configuration/src/org/eclipse/m2e/internal/logging/LogPlugin.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/org.eclipse.m2e.logback.configuration/src/org/eclipse/m2e/internal/logging/LogPlugin.java b/org.eclipse.m2e.logback.configuration/src/org/eclipse/m2e/internal/logging/LogPlugin.java
index e70f1724..1be9a145 100644
--- a/org.eclipse.m2e.logback.configuration/src/org/eclipse/m2e/internal/logging/LogPlugin.java
+++ b/org.eclipse.m2e.logback.configuration/src/org/eclipse/m2e/internal/logging/LogPlugin.java
@@ -26,8 +26,10 @@ import ch.qos.logback.core.joran.spi.JoranException;
import ch.qos.logback.core.util.StatusPrinter;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.service.datalocation.Location;
public class LogPlugin extends Plugin {
private static final String PLUGIN_ID = "org.eclipse.m2e.logback.configuration"; //$NON-NLS-1$
@@ -54,7 +56,11 @@ public class LogPlugin extends Plugin {
+ System.getProperty(ContextInitializer.CONFIG_FILE_PROPERTY));
return;
}
-
+ Location instanceLocation = Platform.getInstanceLocation();
+ if(!instanceLocation.isSet()) {
+ new Exception("The " + PLUGIN_ID + " bundle was activated before the platform instance location was initialized.");
+ return;
+ }
File stateDir = getStateLocation().toFile();
File configFile = new File(stateDir, "logback." + context.getBundle().getVersion().toString() + ".xml");

Back to the top