]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.application/src/org/simantics/application/template/TemplateDatabaseApplication.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.application / src / org / simantics / application / template / TemplateDatabaseApplication.java
index 44eab8a5ff86926f2f3141e48bf1a2041f3b5d55..c936e6787649f831f292085f85eb8b0267da3a7f 100644 (file)
@@ -1,50 +1,50 @@
-/*******************************************************************************\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.application.template;\r
-\r
-import org.eclipse.equinox.app.IApplicationContext;\r
-import org.simantics.application.db.HeadlessDatabaseApplication;\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Session;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.request.Read;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class TemplateDatabaseApplication extends HeadlessDatabaseApplication {\r
-\r
-    @Override\r
-    protected void beforeConnect(IApplicationContext context) {\r
-        // Do something..\r
-    }\r
-\r
-    @Override\r
-    protected void afterConnect() {\r
-        Session s = getSession();\r
-\r
-        String ret;\r
-        try {\r
-            ret = s.syncRequest(new Read<String>() {\r
-                @Override\r
-                public String perform(ReadGraph graph) throws DatabaseException {\r
-                    // read something...\r
-                    return "";\r
-                }\r
-            });\r
-            System.out.println("read: " + ret);\r
-        } catch (DatabaseException e) {\r
-            e.printStackTrace();\r
-        }\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.application.template;
+
+import org.eclipse.equinox.app.IApplicationContext;
+import org.simantics.application.db.HeadlessDatabaseApplication;
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Session;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.request.Read;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class TemplateDatabaseApplication extends HeadlessDatabaseApplication {
+
+    @Override
+    protected void beforeConnect(IApplicationContext context) {
+        // Do something..
+    }
+
+    @Override
+    protected void afterConnect() {
+        Session s = getSession();
+
+        String ret;
+        try {
+            ret = s.syncRequest(new Read<String>() {
+                @Override
+                public String perform(ReadGraph graph) throws DatabaseException {
+                    // read something...
+                    return "";
+                }
+            });
+            System.out.println("read: " + ret);
+        } catch (DatabaseException e) {
+            e.printStackTrace();
+        }
+    }
+
+}