]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.browsing.ui.common/src/org/simantics/browsing/ui/common/processors/LabelDecoratorFactoryResolver.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.browsing.ui.common / src / org / simantics / browsing / ui / common / processors / LabelDecoratorFactoryResolver.java
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
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.browsing.ui.common.processors;\r
13 \r
14 import org.simantics.browsing.ui.BuiltinKeys;\r
15 import org.simantics.browsing.ui.NodeContext;\r
16 import org.simantics.browsing.ui.common.EvaluatorData;\r
17 import org.simantics.browsing.ui.common.EvaluatorData.Evaluator;\r
18 import org.simantics.browsing.ui.common.EvaluatorData.EvaluatorTree;\r
19 import org.simantics.browsing.ui.content.LabelDecoratorFactory;\r
20 \r
21 /**\r
22  * A query processor for resolving available {@link LabelDecoratorFactory}\r
23  * instances for a {@link NodeContext}.\r
24  * \r
25  * <p>\r
26  * This implementation works completely based on the generic\r
27  * {@link AbstractFactoryResolverQueryProcessor} and an {@link EvaluatorData}\r
28  * which is used to guide the resolution. See\r
29  * {@link AbstractFactoryResolverQueryProcessor} for an explanation of the\r
30  * generic logic.\r
31  * </p>\r
32  * \r
33  * @author Tuukka Lehtonen\r
34  */\r
35 public class LabelDecoratorFactoryResolver extends AbstractFactoryResolverQueryProcessor<LabelDecoratorFactory> {\r
36 \r
37     public LabelDecoratorFactoryResolver(EvaluatorData data) {\r
38         super(data, BuiltinKeys.LABEL_DECORATOR_FACTORIES);\r
39     }\r
40 \r
41     @Override\r
42     protected EvaluatorTree<LabelDecoratorFactory> getEvaluatorTree(Evaluator evaluator) {\r
43         return evaluator.getLabelDecoratorTree();\r
44     }\r
45 \r
46 }\r