Code example for Node

Methods: getOwnerDocument

0
	 * {@inheritDoc} 
	 */ 
	@Override 
	protected IType calculateType(String name, String target, Node node, Node parentNode,
			IDocument document) {
		if (BeansEditorUtils.hasAttribute(node, "ref")) {
			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; 
	}