use of com.intellij.struts2.dom.struts.strutspackage.DefaultClassRef in project intellij-plugins by JetBrains.
the class ActionImpl method searchActionClass.
@Nullable
public PsiClass searchActionClass() {
final GenericAttributeValue<PsiClass> actionClassAttribute = getActionClass();
if (DomUtil.hasXml(actionClassAttribute)) {
return actionClassAttribute.getValue();
}
// resolve parent package <default-class-ref> (walk upwards)
final DefaultClassRef ref = getStrutsPackage().searchDefaultClassRef();
if (ref != null) {
return ref.getDefaultClass().getValue();
}
// nothing found in parents --> error highlighting
return null;
}
use of com.intellij.struts2.dom.struts.strutspackage.DefaultClassRef in project intellij-plugins by JetBrains.
the class StrutsPackageImpl method searchDefaultClassRef.
@Nullable
public DefaultClassRef searchDefaultClassRef() {
final Ref<DefaultClassRef> result = new Ref<>();
final StrutsPackageHierarchyWalker walker = new StrutsPackageHierarchyWalker(this, strutsPackage -> {
if (DomUtil.hasXml(strutsPackage.getDefaultClassRef())) {
result.set(strutsPackage.getDefaultClassRef());
return false;
}
return true;
});
walker.walkUp();
return result.get();
}
Aggregations