- Resource component = graph.getPossibleObject(element, MOD.ElementToComponent);
- if (component != null)
- return graph.getPossibleRelatedValue2(component, MOD.contextualHelpId, Bindings.STRING);
+ if (resource != null) {
+ Resource component = graph.getPossibleObject(resource, MOD.ElementToComponent);
+ String id = component != null ? graph.getPossibleRelatedValue2(component, MOD.contextualHelpId, Bindings.STRING) : null;
+ if (id != null)
+ return id;
+ id = graph.getPossibleRelatedValue2(resource, MOD.contextualHelpId, Bindings.STRING);
+ if (id != null)
+ return id;
+ }