X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.reflection%2Fsrc%2Forg%2Fsimantics%2Fscl%2Freflection%2Finternal%2FActivator.java;fp=bundles%2Forg.simantics.scl.reflection%2Fsrc%2Forg%2Fsimantics%2Fscl%2Freflection%2Finternal%2FActivator.java;h=8bfea3dbea9fb3291b4716b408a5f0921375d590;hp=9836dfe191956eeb2b2671ab03ad8dfe26a2ba91;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/internal/Activator.java b/bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/internal/Activator.java old mode 100755 new mode 100644 index 9836dfe19..8bfea3dbe --- a/bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/internal/Activator.java +++ b/bundles/org.simantics.scl.reflection/src/org/simantics/scl/reflection/internal/Activator.java @@ -1,49 +1,49 @@ -package org.simantics.scl.reflection.internal; - -import org.eclipse.core.runtime.ILog; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Status; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -public class Activator implements BundleActivator { - - private BundleContext context; - - private static Activator instance; - - @Override - public void start(BundleContext context) throws Exception { - this.context = context; - instance = this; - } - - @Override - public void stop(BundleContext context) throws Exception { - instance = null; - this.context = null; - } - - public BundleContext getContext() { - return context; - } - - public static Activator getInstance() { - return instance; - } - - public static void logError(String description, Exception e) { - System.err.println(description); - if(e != null) - e.printStackTrace(); - Bundle bundle = getInstance().getContext().getBundle(); - ILog log = Platform.getLog(bundle); - log.log(new Status(Status.ERROR, bundle.getSymbolicName(), description, e)); - } - - public static void logError(String description) { - logError(description, null); - } - -} +package org.simantics.scl.reflection.internal; + +import org.eclipse.core.runtime.ILog; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.osgi.framework.Bundle; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + private BundleContext context; + + private static Activator instance; + + @Override + public void start(BundleContext context) throws Exception { + this.context = context; + instance = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + instance = null; + this.context = null; + } + + public BundleContext getContext() { + return context; + } + + public static Activator getInstance() { + return instance; + } + + public static void logError(String description, Exception e) { + System.err.println(description); + if(e != null) + e.printStackTrace(); + Bundle bundle = getInstance().getContext().getBundle(); + ILog log = Platform.getLog(bundle); + log.log(new Status(Status.ERROR, bundle.getSymbolicName(), description, e)); + } + + public static void logError(String description) { + logError(description, null); + } + +}