Code example for Node

Methods: getLocalNamegetOwnerDocument

0
	 * {@inheritDoc} 
	 */ 
	@Override 
	protected IType calculateType(String name, String target, Node node, Node parentNode,
			IDocument document) {
		if (node != null && "registration-listener".equals(node.getLocalName())) {
			String ref = BeansEditorUtils.getAttribute(node, "ref");
			if (ref != null) {
				IFile file = BeansEditorUtils.getFile(document);
				String className = BeansEditorUtils.getClassNameForBean(file, node
						.getOwnerDocument(), ref);
				if (file != null && file.exists()) {
					return JdtUtils.getJavaType(file.getProject(), className);
				} 
			} 
		} 
		return null; 
	} 
 
} 
Experience pair programming with AI  Get Codota for Java