- ModelingResources MOD = ModelingResources.getInstance(graph);
- Resource component = graph.getPossibleObject(element, MOD.ElementToComponent);
- if (component != null)
- return graph.getPossibleRelatedValue2(component, MOD.contextualHelpId, Bindings.STRING);
-
- Variable var = WorkbenchSelectionUtils.getPossibleVariable(event);
- if (var != null)
- return var.getPossiblePropertyValue(graph, MOD.contextualHelpId, Bindings.STRING);
-
- ISelection sel = HandlerUtil.getCurrentSelection(event);
- if (sel != null) {
- PropertyVariables vars = AdaptionUtils.adaptToSingle(sel, PropertyVariables.class);
- if (vars != null) {
- var = vars.getConfiguration();
- if (var != null)
- var.getPossiblePropertyValue(graph, MOD.contextualHelpId, Bindings.STRING);
- }
- }
- return null;
+ return HelpContexts.getPossibleId(graph, resource, variable, sel);