*******************************************************************************/
package org.simantics.browsing.ui.graph.impl.contributor.labeler;
+import java.util.HashMap;
import java.util.Map;
import org.simantics.browsing.ui.BuiltinKeys;
this.clazz = clazz;
}
- public boolean shouldCreateToolTip(Object event, T input) {
+ public boolean shouldCreateToolTip(Object event, T input, Map<Object, Object> auxiliary) {
return false;
}
- public Object createToolTipContentArea(Object event, Object parent, T input) {
+ public Object createToolTipContentArea(Object event, Object parent, T input, Map<Object, Object> auxiliary) {
return null;
}
public String toString() {
return ColumnLabelerContributorImpl.this.toString();
}
+
+ private Map<Object, Object> auxiliary = new HashMap<>();
@Override
public boolean createToolTip(Object event, NodeContext nodeContext) {
T input = (T)context.getConstant(BuiltinKeys.INPUT);
- return ColumnLabelerContributorImpl.this.shouldCreateToolTip(event, input);
+ return ColumnLabelerContributorImpl.this.shouldCreateToolTip(event, input, auxiliary);
}
@Override
public Object createToolTipContent(Object event, Object parent, NodeContext nodeContext) {
T input = (T)context.getConstant(BuiltinKeys.INPUT);
- return ColumnLabelerContributorImpl.this.createToolTipContentArea(event, parent, input);
+ try {
+ return ColumnLabelerContributorImpl.this.createToolTipContentArea(event, parent, input, auxiliary);
+ } finally {
+ auxiliary.clear();
+ }
}
};