X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.debug.browser%2Fsrc%2Forg%2Fsimantics%2Fdebug%2Fbrowser%2Fsections%2FBreadcrumbSection.java;h=f350e48fd64164128e10d6d1e936c29c48fb4d41;hp=db0b7e90a5662698da952a75395a2c31c4e6359f;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.debug.browser/src/org/simantics/debug/browser/sections/BreadcrumbSection.java b/bundles/org.simantics.debug.browser/src/org/simantics/debug/browser/sections/BreadcrumbSection.java index db0b7e90a..f350e48fd 100644 --- a/bundles/org.simantics.debug.browser/src/org/simantics/debug/browser/sections/BreadcrumbSection.java +++ b/bundles/org.simantics.debug.browser/src/org/simantics/debug/browser/sections/BreadcrumbSection.java @@ -1,63 +1,63 @@ -/******************************************************************************* - * 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("
"); - for(Node node : breadcrumb) { - out.print(node.separator); - out.print(""); - out.print(Escapes.html(node.name)); - out.print(""); - } - out.println("
"); - } - } - -} +/******************************************************************************* + * 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("
"); + for(Node node : breadcrumb) { + out.print(node.separator); + out.print(""); + out.print(Escapes.html(node.name)); + out.print(""); + } + out.println("
"); + } + } + +}