]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.debug.browser/src/org/simantics/debug/browser/internal/rewriters/ResourceLookupCreator.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.debug.browser / src / org / simantics / debug / browser / internal / rewriters / ResourceLookupCreator.java
1 /*******************************************************************************
2  * Copyright (c) 2016 Association for Decentralized Information Management
3  * in Industry THTH ry.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  *     THTH ry - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.debug.browser.internal.rewriters;
13
14 import org.simantics.db.ReadGraph;
15 import org.simantics.db.exception.DatabaseException;
16 import org.simantics.debug.browser.content.ResourceBrowserContent;
17 import org.simantics.debug.browser.content.ResourceBrowserRewriter;
18 import org.simantics.debug.browser.sections.ResourceLookupSection;
19
20 /**
21  * @author Jani Simomaa / Semantum Oy
22  * @since 1.22
23  */
24 public enum ResourceLookupCreator implements ResourceBrowserRewriter {
25     INSTANCE;
26
27     private ResourceLookupSection lookupSection;
28     
29     ResourceLookupCreator() {
30         lookupSection = new ResourceLookupSection();
31     }
32     
33     @Override
34     public double getPriority() {
35         return lookupSection.getPriority();
36     }
37
38     @Override
39     public void rewrite(ReadGraph graph, ResourceBrowserContent content) throws DatabaseException {
40         content.putSection(ResourceLookupSection.class, lookupSection);
41     }
42 }