|
What this is
Other links
The source code
/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
* Microsystems, Inc. All Rights Reserved.
*/
package org.netbeans.modules.javadoc.comments;
import java.lang.reflect.InvocationTargetException;
import java.beans.PropertyEditor;
import org.openide.nodes.*;
import org.openide.ErrorManager;
import org.openide.src.JavaDoc;
import org.netbeans.modules.javacore.internalapi.JMIElementCookie;
import org.netbeans.modules.javacore.internalapi.JavaMetamodel;
import org.netbeans.modules.java.ui.nodes.FilterSourceNodeFactory;
import org.netbeans.jmi.javamodel.*;
import javax.jmi.reflect.JmiException;
/** This FilterFactory descendant adds the JavaDoc property to every Method, Constructor, Field and
* class node create for JavaDataObjects
*
* @author Petr Hrebejk
*/
public class JavaDocPropertySupportFactory extends FilterSourceNodeFactory {
private static final String PROP_JAVADOCCOMMENT = "javadocComment"; // NOI18N
public Node createMethodNode(Method element) {
Node node = super.createMethodNode( element );
JavaDocPropertySupportFactory.addJavaDocProperty( node );
return node;
}
public Node createConstructorNode(Constructor element) {
Node node = super.createConstructorNode( element );
JavaDocPropertySupportFactory.addJavaDocProperty( node );
return node;
}
public Node createFieldNode(Field element) {
Node node = super.createFieldNode( element );
JavaDocPropertySupportFactory.addJavaDocProperty( node );
return node;
}
public Node createClassNode(final JavaClass element) {
Node node = super.createClassNode( element );
JavaDocPropertySupportFactory.addJavaDocProperty( node );
return node;
}
public Node createAnnotationTypeMethodNode(Attribute element) {
Node node = super.createAnnotationTypeMethodNode(element);
JavaDocPropertySupportFactory.addJavaDocProperty( node );
return node;
}
public Node createAnnotationTypeNode(AnnotationType element) {
Node node = super.createAnnotationTypeNode(element);
JavaDocPropertySupportFactory.addJavaDocProperty( node );
return node;
}
public Node createEnumConstantNode(EnumConstant element) {
Node node = super.createEnumConstantNode(element);
JavaDocPropertySupportFactory.addJavaDocProperty( node );
return node;
}
public Node createEnumNode(JavaEnum element) {
Node node = super.createEnumNode(element);
JavaDocPropertySupportFactory.addJavaDocProperty( node );
return node;
}
// UTILITY FUNCTIONS ------------------------------------------------------------------------------
/** Create a node property for javadoc comment for class element
* @param canW if
|
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.