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%2FResourceInfoSection.java;h=2d4b33485db6de01039f6974190a183fb71b89b1;hp=54f531237f3a132dd330544f89157ed514c2fe28;hb=refs%2Fchanges%2F38%2F238%2F2;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.debug.browser/src/org/simantics/debug/browser/sections/ResourceInfoSection.java b/bundles/org.simantics.debug.browser/src/org/simantics/debug/browser/sections/ResourceInfoSection.java index 54f531237..2d4b33485 100644 --- a/bundles/org.simantics.debug.browser/src/org/simantics/debug/browser/sections/ResourceInfoSection.java +++ b/bundles/org.simantics.debug.browser/src/org/simantics/debug/browser/sections/ResourceInfoSection.java @@ -1,60 +1,60 @@ -/******************************************************************************* - * 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; -import org.simantics.debug.browser.utils.ValueInfo; - -public class ResourceInfoSection implements ResourceBrowserSection { - - ValueInfo valueInfo; - boolean immutable; - - public ResourceInfoSection(ValueInfo valueInfo, boolean immutable) { - this.valueInfo = valueInfo; - this.immutable = immutable; - } - - @Override - public double getPriority() { - return 2; - } - - @Override - public void toHtml(ReadGraph graph, PrintWriter out) throws DatabaseException { - out.println("
"); - out.println(""); - if (immutable) { - out.println(""); - } - if (valueInfo != null) { - if (valueInfo.datatype != null) { - out.print(""); - out.print(""); - out.print(""); - } - out.print(""); - out.print(""); - } - out.println("
IMMUTABLE
Attached value data type"); - out.print(Escapes.html(valueInfo.datatype)); - out.println("
Attached value"); - out.print(Escapes.html(valueInfo.value)); - out.println("
"); - 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; +import org.simantics.debug.browser.utils.ValueInfo; + +public class ResourceInfoSection implements ResourceBrowserSection { + + ValueInfo valueInfo; + boolean immutable; + + public ResourceInfoSection(ValueInfo valueInfo, boolean immutable) { + this.valueInfo = valueInfo; + this.immutable = immutable; + } + + @Override + public double getPriority() { + return 2; + } + + @Override + public void toHtml(ReadGraph graph, PrintWriter out) throws DatabaseException { + out.println("
"); + out.println(""); + if (immutable) { + out.println(""); + } + if (valueInfo != null) { + if (valueInfo.datatype != null) { + out.print(""); + out.print(""); + out.print(""); + } + out.print(""); + out.print(""); + } + out.println("
IMMUTABLE
Attached value data type"); + out.print(Escapes.html(valueInfo.datatype)); + out.println("
Attached value"); + out.print(Escapes.html(valueInfo.value)); + out.println("
"); + out.println("
"); + } + +}