]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.equation/src/org/simantics/equation/Activator.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.equation / src / org / simantics / equation / Activator.java
index 7f5671335182dcf55ee1bea924101844d40b2403..3b5d4799712cf3e64aae29a226562af71a7bdc8f 100644 (file)
@@ -1,97 +1,97 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.equation;\r
-\r
-import org.eclipse.ui.plugin.AbstractUIPlugin;\r
-import org.osgi.framework.BundleContext;\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.common.request.ReadRequest;\r
-import org.simantics.db.management.ISessionContext;\r
-import org.simantics.db.management.ISessionContextChangedListener;\r
-import org.simantics.db.management.SessionContextChangedEvent;\r
-import org.simantics.ui.SimanticsUI;\r
-\r
-/**\r
- * The activator class controls the plug-in life cycle\r
- */\r
-public class Activator extends AbstractUIPlugin {\r
-\r
-       // The plug-in ID\r
-       public static final String PLUGIN_ID = "org.simantics.equation";\r
-\r
-       // The shared instance\r
-       private static Activator plugin;\r
-       \r
-       /**\r
-        * The constructor\r
-        */\r
-       public Activator() {\r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)\r
-        */\r
-       public void start(BundleContext context) throws Exception {\r
-               super.start(context);\r
-               plugin = this;\r
-               \r
-               SimanticsUI.getSessionContextProvider().addContextChangedListener(new ISessionContextChangedListener() {\r
-                       @Override\r
-                       public void sessionContextChanged(SessionContextChangedEvent event) {\r
-                               ISessionContext ctx = event.getNewValue();\r
-                               if (ctx != null) {\r
-                                       ctx.getSession().asyncRequest(new ReadRequest() {\r
-                                           @Override\r
-                                           public void run(ReadGraph g) {\r
-                                               EquationResources.initialize(g);\r
-                                           };\r
-                                       });\r
-                               } else {\r
-                                       EquationResources.deinitialize();\r
-                               }\r
-                       }\r
-               });\r
-               \r
-               try {\r
-                       SimanticsUI.getSession().syncRequest(new ReadRequest() {\r
-                           @Override\r
-                           public void run(ReadGraph g) {\r
-                               EquationResources.initialize(g);\r
-                           }\r
-                       });\r
-               } catch (Exception e) {\r
-\r
-               }\r
-               \r
-               \r
-       }\r
-\r
-       /*\r
-        * (non-Javadoc)\r
-        * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)\r
-        */\r
-       public void stop(BundleContext context) throws Exception {\r
-               plugin = null;\r
-               super.stop(context);\r
-       }\r
-\r
-       /**\r
-        * Returns the shared instance\r
-        *\r
-        * @return the shared instance\r
-        */\r
-       public static Activator getDefault() {\r
-               return plugin;\r
-       }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.equation;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.common.request.ReadRequest;
+import org.simantics.db.management.ISessionContext;
+import org.simantics.db.management.ISessionContextChangedListener;
+import org.simantics.db.management.SessionContextChangedEvent;
+import org.simantics.ui.SimanticsUI;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+       // The plug-in ID
+       public static final String PLUGIN_ID = "org.simantics.equation";
+
+       // The shared instance
+       private static Activator plugin;
+       
+       /**
+        * The constructor
+        */
+       public Activator() {
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+        */
+       public void start(BundleContext context) throws Exception {
+               super.start(context);
+               plugin = this;
+               
+               SimanticsUI.getSessionContextProvider().addContextChangedListener(new ISessionContextChangedListener() {
+                       @Override
+                       public void sessionContextChanged(SessionContextChangedEvent event) {
+                               ISessionContext ctx = event.getNewValue();
+                               if (ctx != null) {
+                                       ctx.getSession().asyncRequest(new ReadRequest() {
+                                           @Override
+                                           public void run(ReadGraph g) {
+                                               EquationResources.initialize(g);
+                                           };
+                                       });
+                               } else {
+                                       EquationResources.deinitialize();
+                               }
+                       }
+               });
+               
+               try {
+                       SimanticsUI.getSession().syncRequest(new ReadRequest() {
+                           @Override
+                           public void run(ReadGraph g) {
+                               EquationResources.initialize(g);
+                           }
+                       });
+               } catch (Exception e) {
+
+               }
+               
+               
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+        */
+       public void stop(BundleContext context) throws Exception {
+               plugin = null;
+               super.stop(context);
+       }
+
+       /**
+        * Returns the shared instance
+        *
+        * @return the shared instance
+        */
+       public static Activator getDefault() {
+               return plugin;
+       }
+
+}