当前位置: 首页>>代码示例>>Java>>正文


Java PackageDeclaration.getJavadoc方法代码示例

本文整理汇总了Java中org.eclipse.jdt.core.dom.PackageDeclaration.getJavadoc方法的典型用法代码示例。如果您正苦于以下问题:Java PackageDeclaration.getJavadoc方法的具体用法?Java PackageDeclaration.getJavadoc怎么用?Java PackageDeclaration.getJavadoc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jdt.core.dom.PackageDeclaration的用法示例。


在下文中一共展示了PackageDeclaration.getJavadoc方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: visit

import org.eclipse.jdt.core.dom.PackageDeclaration; //导入方法依赖的package包/类
@Override
public boolean visit(PackageDeclaration node) {
	if (node.getAST().apiLevel() >= JLS3) {
		if (node.getJavadoc() != null) {
			node.getJavadoc().accept(this);
		}
		for (Iterator<Annotation> it= node.annotations().iterator(); it.hasNext();) {
			Annotation p= it.next();
			p.accept(this);
			this.fBuffer.append(" ");//$NON-NLS-1$
		}
	}
	this.fBuffer.append("package ");//$NON-NLS-1$
	node.getName().accept(this);
	this.fBuffer.append(";");//$NON-NLS-1$
	return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:18,代码来源:ASTFlattener.java

示例2: visit

import org.eclipse.jdt.core.dom.PackageDeclaration; //导入方法依赖的package包/类
public boolean visit(PackageDeclaration node) {
	if (node.getAST().apiLevel() >= JLS3) {
		if (node.getJavadoc() != null) {
			node.getJavadoc().accept(this);
		}
		for (Iterator it = node.annotations().iterator(); it.hasNext(); ) {
			Annotation p = (Annotation) it.next();
			p.accept(this);
			this.buffer.append(" ");//$NON-NLS-1$
		}
	}
	printIndent();
	this.buffer.append("package ");//$NON-NLS-1$
	node.getName().accept(this);
	this.buffer.append(";\n");//$NON-NLS-1$
	return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:18,代码来源:NaiveASTFlattener.java

示例3: visit

import org.eclipse.jdt.core.dom.PackageDeclaration; //导入方法依赖的package包/类
@Override
public boolean visit(PackageDeclaration node) {
	//System.out.println("Found: " + node.getClass());

	if (node.getJavadoc() != null) {
		node.getJavadoc().accept(this);
	}
	print("module ");
	Writer w = new StringWriter();
	pushWriter(w);
	node.getName().accept(this);
	popWriter();
	
	packageName = w.toString();
	
	println(packageName + "." + moduleName + ";");
	return false;
}
 
开发者ID:mrmonday,项目名称:j2d,代码行数:19,代码来源:J2dVisitor.java

示例4: hasCopyrightsComment

import org.eclipse.jdt.core.dom.PackageDeclaration; //导入方法依赖的package包/类
/**
 * Checks whether {@link CompilationUnit} has copyright header
 *
 * @param compilationUnit
 *            checked compilation unit
 * @return true if {@link CompilationUnit} has copyright header
 */
public boolean hasCopyrightsComment(final CompilationUnit compilationUnit) {
	final List<Comment> comments = getCommentList(compilationUnit);
	boolean hasCopyrights = false;
	if (!comments.isEmpty()) {
		final PackageDeclaration packageNode = compilationUnit.getPackage();
		final boolean commentBeforePackage = comments.get(0).getStartPosition() <= packageNode.getStartPosition();
		final boolean hasJavaDoc = packageNode.getJavadoc() != null;
		hasCopyrights = commentBeforePackage || hasJavaDoc;
	}
	return hasCopyrights;
}
 
开发者ID:SAP,项目名称:hybris-commerce-eclipse-plugin,代码行数:19,代码来源:CopyrightManager.java

示例5: getPackageJavadocNode

import org.eclipse.jdt.core.dom.PackageDeclaration; //导入方法依赖的package包/类
private static Javadoc getPackageJavadocNode(IJavaElement element, String cuSource) {
	CompilationUnit cu= createAST(element, cuSource);
	if (cu != null) {
		PackageDeclaration packDecl= cu.getPackage();
		if (packDecl != null) {
			return packDecl.getJavadoc();
		}
	}
	return null;
}
 
开发者ID:eclipse,项目名称:eclipse.jdt.ls,代码行数:11,代码来源:JavadocContentAccess.java

示例6: getPackageJavadocNode

import org.eclipse.jdt.core.dom.PackageDeclaration; //导入方法依赖的package包/类
private static Javadoc getPackageJavadocNode(IJavaElement element, String cuSource) {
  CompilationUnit cu = createAST(element, cuSource);
  if (cu != null) {
    PackageDeclaration packDecl = cu.getPackage();
    if (packDecl != null) {
      return packDecl.getJavadoc();
    }
  }
  return null;
}
 
开发者ID:eclipse,项目名称:che,代码行数:11,代码来源:JavadocContentAccess2.java


注:本文中的org.eclipse.jdt.core.dom.PackageDeclaration.getJavadoc方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。