1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2010 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
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.browsing.ui.common.extension.internal;
\r
14 import org.simantics.browsing.ui.content.ComparableContextFactory;
\r
15 import org.simantics.browsing.ui.content.Contributor;
\r
17 public class ComparableContextContributorExtensionManager extends ContributorExtensionManager<ComparableContextFactory> {
\r
19 public String getExtensionPointName() {
\r
20 return "comparableContext";
\r
23 private static ComparableContextContributorExtensionManager INSTANCE;
\r
25 public static synchronized ComparableContextContributorExtensionManager getInstance() {
\r
26 if (INSTANCE == null)
\r
27 INSTANCE = new ComparableContextContributorExtensionManager();
\r
32 public static synchronized void dispose() {
\r
33 if (INSTANCE != null) {
\r
39 public static Contributor<ComparableContextFactory> getFactory(String id) {
\r
40 for(ContributorExtension<ComparableContextFactory> ext : getInstance().extensions) {
\r
41 if(ext.getFactory().getClass().getCanonicalName().equals(id)) return ext.getFactory();
\r