1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
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
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.browsing.ui.common.node;
14 import org.simantics.browsing.ui.BuiltinKeys;
15 import org.simantics.browsing.ui.NodeContext;
16 import org.simantics.browsing.ui.NodeContext.ConstantKey;
17 import org.simantics.browsing.ui.common.NodeContextBuilder;
19 public class StandardNodes {
21 public static final ConstantKey<Object> CONTEXT = new ConstantKey<Object>() {
23 public String toString() {
28 public static final ConstantKey<Object> CONTEXT2 = new ConstantKey<Object>() {
30 public String toString() {
35 public static final ConstantKey<Object> FUNCTION = new ConstantKey<Object>() {
37 public String toString() {
42 private static ConstantKey<?>[] KEYS3 = { BuiltinKeys.INPUT, CONTEXT, FUNCTION };
43 private static ConstantKey<?>[] KEYS4 = { BuiltinKeys.INPUT, CONTEXT, CONTEXT2, FUNCTION };
45 public static <Input, Context, Function> NodeContext build(Input input, Context context, Function function) {
46 return NodeContextBuilder.buildWithData(KEYS3, new Object[] { input, context, function });
49 public static <Input, Context, Context2, Function> NodeContext build(Input input, Context context, Context2 context2, Function function) {
50 return NodeContextBuilder.buildWithData(KEYS4, new Object[] { input, context, context2, function });