]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.debug.browser/src/org/simantics/debug/browser/sections/ResourceLookupSection.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.debug.browser / src / org / simantics / debug / browser / sections / ResourceLookupSection.java
1 /*******************************************************************************\r
2  * Copyright (c) 2016 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     THTH ry - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.debug.browser.sections;\r
13 \r
14 import java.io.PrintWriter;\r
15 \r
16 import org.simantics.db.ReadGraph;\r
17 import org.simantics.db.exception.DatabaseException;\r
18 \r
19 /**\r
20  * @author Jani Simomaa / Semantum Oy\r
21  * @since 1.22\r
22  */\r
23 public class ResourceLookupSection implements ResourceBrowserSection {\r
24 \r
25     @Override\r
26     public double getPriority() {\r
27         return -1;\r
28     }\r
29 \r
30     @Override\r
31     public void toHtml(ReadGraph graph, PrintWriter out) throws DatabaseException {\r
32         out.println("<div class=\"resourceLookupSection\">");\r
33         out.println("<form class=\"resource-search\" method=\"POST\">");\r
34         out.println("<input type=\"text\" name=\"resource-input\" placeholder=\"Enter resource URI or ID\" />");\r
35         out.println("<button type=\"submit\">Search</button>");\r
36         out.println("</form>");\r
37         out.println("</div>");\r
38     }\r
39 \r
40 }\r