]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.diagram/src/org/simantics/diagram/symbolcontribution/EmptySymbolProviderFactory.java
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / symbolcontribution / EmptySymbolProviderFactory.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 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  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.diagram.symbolcontribution;
13
14 import org.simantics.db.ReadGraph;
15 import org.simantics.db.exception.DatabaseException;
16
17 /**
18  * @author Tuukka Lehtonen
19  */
20 public class EmptySymbolProviderFactory implements SymbolProviderFactory {
21
22     public static final EmptySymbolProviderFactory INSTANCE = new EmptySymbolProviderFactory();
23
24     static class SymbolProvider extends AbstractSymbolProvider {
25         public SymbolProvider() {
26             super();
27             lockGroups();
28         }
29     }
30
31     SymbolProvider PROVIDER = new SymbolProvider();
32
33     @Override
34     public ISymbolProvider create(ReadGraph g) throws DatabaseException {
35         return PROVIDER;
36     }
37
38 }