-/*******************************************************************************\r
- * Copyright (c) 2016 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
- * THTH ry - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.debug.browser.sections;\r
-\r
-import java.io.PrintWriter;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.debug.browser.utils.Escapes;\r
-\r
-public class BreadcrumbSection implements ResourceBrowserSection {\r
-\r
- public final Node[] breadcrumb;\r
- \r
- public BreadcrumbSection(Node[] breadcrumb) {\r
- this.breadcrumb = breadcrumb;\r
- }\r
-\r
- public static class Node {\r
- public final String separator;\r
- public final String name;\r
- public final long resourceId;\r
- \r
- public Node(String separator, String name, long resourceId) {\r
- this.separator = separator;\r
- this.name = name;\r
- this.resourceId = resourceId;\r
- }\r
- }\r
- \r
- @Override\r
- public double getPriority() {\r
- return 0;\r
- }\r
-\r
- @Override\r
- public void toHtml(ReadGraph graph, PrintWriter out)\r
- throws DatabaseException {\r
- \r
- if (breadcrumb.length > 0) {\r
- out.println("<div class=\"breadcrumbSection\">");\r
- for(Node node : breadcrumb) {\r
- out.print(node.separator);\r
- out.print("<a href=\"");\r
- out.print(node.resourceId);\r
- out.print("\">");\r
- out.print(Escapes.html(node.name));\r
- out.print("</a>");\r
- }\r
- out.println("</div>");\r
- }\r
- }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2016 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:
+ * THTH ry - initial API and implementation
+ *******************************************************************************/
+package org.simantics.debug.browser.sections;
+
+import java.io.PrintWriter;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.debug.browser.utils.Escapes;
+
+public class BreadcrumbSection implements ResourceBrowserSection {
+
+ public final Node[] breadcrumb;
+
+ public BreadcrumbSection(Node[] breadcrumb) {
+ this.breadcrumb = breadcrumb;
+ }
+
+ public static class Node {
+ public final String separator;
+ public final String name;
+ public final long resourceId;
+
+ public Node(String separator, String name, long resourceId) {
+ this.separator = separator;
+ this.name = name;
+ this.resourceId = resourceId;
+ }
+ }
+
+ @Override
+ public double getPriority() {
+ return 0;
+ }
+
+ @Override
+ public void toHtml(ReadGraph graph, PrintWriter out)
+ throws DatabaseException {
+
+ if (breadcrumb.length > 0) {
+ out.println("<div class=\"breadcrumbSection\">");
+ for(Node node : breadcrumb) {
+ out.print(node.separator);
+ out.print("<a href=\"");
+ out.print(node.resourceId);
+ out.print("\">");
+ out.print(Escapes.html(node.name));
+ out.print("</a>");
+ }
+ out.println("</div>");
+ }
+ }
+
+}