]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.browsing.ui.platform/src/org/simantics/browsing/ui/platform/debug/BrowseDebuggerView.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.browsing.ui.platform / src / org / simantics / browsing / ui / platform / debug / BrowseDebuggerView.java
index 34af4c2938072487a8450109e2db9743d4b6671b..a78ce0097fc7a65b346f3d7abc7075a5421da72e 100644 (file)
@@ -1,94 +1,94 @@
-/*******************************************************************************\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.browsing.ui.platform.debug;\r
-\r
-import java.util.Collections;\r
-import java.util.Map;\r
-import java.util.Set;\r
-\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.ui.IViewPart;\r
-import org.eclipse.ui.IWorkbenchPart;\r
-import org.simantics.browsing.ui.GraphExplorer;\r
-import org.simantics.browsing.ui.common.EvaluatorData;\r
-import org.simantics.browsing.ui.graph.impl.Evaluators;\r
-import org.simantics.browsing.ui.graph.impl.SessionContextInputSource;\r
-import org.simantics.browsing.ui.platform.GraphExplorerView;\r
-import org.simantics.browsing.ui.swt.DefaultSelectionDataResolver;\r
-import org.simantics.browsing.ui.swt.GraphExplorerFactory;\r
-import org.simantics.db.Session;\r
-import org.simantics.db.management.ISessionContext;\r
-import org.simantics.db.management.ISessionContextProvider;\r
-import org.simantics.utils.ui.workbench.WorkbenchUtils;\r
-\r
-public class BrowseDebuggerView extends GraphExplorerView {\r
-\r
-    final private Set<String> browseContexts = Collections.singleton("browseDebuggerView");\r
-\r
-    @Override\r
-    protected GraphExplorer createExplorerControl(Composite parent) {\r
-        return GraphExplorerFactory.getInstance()\r
-        .selectionDataResolver(new DefaultSelectionDataResolver())\r
-        .create(parent);\r
-    }\r
-\r
-    public BrowseDebuggerView() {\r
-\r
-        setInputSource(new SessionContextInputSource() {\r
-\r
-            @Override\r
-            public Object get(ISessionContext ctx) {\r
-\r
-                Map<String, String> args = getViewArguments();\r
-                System.out.println("args=" + args);\r
-\r
-                IViewPart view = WorkbenchUtils.findView(args.get("view"));\r
-                System.out.println("view=" + view);\r
-\r
-                return view;\r
-\r
-            }\r
-            \r
-            @Override\r
-            public IWorkbenchPart getProvider() {\r
-                Map<String, String> args = getViewArguments();\r
-                IViewPart view = WorkbenchUtils.findView(args.get("view"));\r
-               return view;\r
-            }\r
-\r
-        });\r
-\r
-    }\r
-\r
-    @Override\r
-    protected EvaluatorData createEvaluatorData(Session session) {\r
-\r
-        return Evaluators.load(session, browseContexts, resourceManager);\r
-\r
-    }\r
-\r
-    @SuppressWarnings({ "rawtypes" })\r
-    @Override\r
-    public Object getAdapter(Class adapter) {\r
-\r
-//        if(adapter == IPropertyPage.class) {\r
-//            return new UserPropertyPage(getSite(), this);\r
-//        }\r
-        if(adapter == ISessionContextProvider.class) {\r
-            return getSessionContextProvider();\r
-        }\r
-\r
-        return super.getAdapter(adapter);\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.browsing.ui.platform.debug;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.simantics.browsing.ui.GraphExplorer;
+import org.simantics.browsing.ui.common.EvaluatorData;
+import org.simantics.browsing.ui.graph.impl.Evaluators;
+import org.simantics.browsing.ui.graph.impl.SessionContextInputSource;
+import org.simantics.browsing.ui.platform.GraphExplorerView;
+import org.simantics.browsing.ui.swt.DefaultSelectionDataResolver;
+import org.simantics.browsing.ui.swt.GraphExplorerFactory;
+import org.simantics.db.Session;
+import org.simantics.db.management.ISessionContext;
+import org.simantics.db.management.ISessionContextProvider;
+import org.simantics.utils.ui.workbench.WorkbenchUtils;
+
+public class BrowseDebuggerView extends GraphExplorerView {
+
+    final private Set<String> browseContexts = Collections.singleton("browseDebuggerView");
+
+    @Override
+    protected GraphExplorer createExplorerControl(Composite parent) {
+        return GraphExplorerFactory.getInstance()
+        .selectionDataResolver(new DefaultSelectionDataResolver())
+        .create(parent);
+    }
+
+    public BrowseDebuggerView() {
+
+        setInputSource(new SessionContextInputSource() {
+
+            @Override
+            public Object get(ISessionContext ctx) {
+
+                Map<String, String> args = getViewArguments();
+                System.out.println("args=" + args);
+
+                IViewPart view = WorkbenchUtils.findView(args.get("view"));
+                System.out.println("view=" + view);
+
+                return view;
+
+            }
+            
+            @Override
+            public IWorkbenchPart getProvider() {
+                Map<String, String> args = getViewArguments();
+                IViewPart view = WorkbenchUtils.findView(args.get("view"));
+               return view;
+            }
+
+        });
+
+    }
+
+    @Override
+    protected EvaluatorData createEvaluatorData(Session session) {
+
+        return Evaluators.load(session, browseContexts, resourceManager);
+
+    }
+
+    @SuppressWarnings({ "rawtypes" })
+    @Override
+    public Object getAdapter(Class adapter) {
+
+//        if(adapter == IPropertyPage.class) {
+//            return new UserPropertyPage(getSite(), this);
+//        }
+        if(adapter == ISessionContextProvider.class) {
+            return getSessionContextProvider();
+        }
+
+        return super.getAdapter(adapter);
+
+    }
+
+}