• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java LineComment类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.jdt.core.dom.LineComment的典型用法代码示例。如果您正苦于以下问题:Java LineComment类的具体用法?Java LineComment怎么用?Java LineComment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LineComment类属于org.eclipse.jdt.core.dom包,在下文中一共展示了LineComment类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: visit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
public boolean visit(LineComment node) {
	int start = node.getStartPosition();
	int line = cunit.getLineNumber(start);
	String comment = parser.getSourceFragment(start, node.getLength());
	comment = comment.substring(comment.indexOf('/')+2).trim();
	String[] tags = comment.split("\\s+");

	for (VariableTags t : variables) {
		if(t.declarationLine == line)
			for(String tag : tags)
				if(validTags.contains(tag))
					t.addTag(tag);
	}

	return true;
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:17,代码来源:TagParser.java


示例2: visit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
public boolean visit(LineComment node) {

        int startLineNumber = compilationUnit.getLineNumber(node.getStartPosition());
        int endLineNumber = compilationUnit.getLineNumber(node.getStartPosition() + node.getLength());

        if (startLineNumber >= startLine && endLineNumber <= endLine) {
            // Build the comment char by char
            StringBuilder comment = new StringBuilder();
            for (int i = node.getStartPosition(); i < node.getStartPosition() + node.getLength(); i++) {
                comment.append(source[i]);
            }

            if (comment.capacity() > 0) {
                String str = comment.toString();

                if (str != null) {
                    CommentMap cMap = new CommentMap(str, startLineNumber, endLineNumber, 1);
                    cMapList.add(cMap);
                }
            }
        }
        return true;
    }
 
开发者ID:e32wong,项目名称:clocom,代码行数:24,代码来源:CommentVisitor.java


示例3: visit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
@Override
public boolean visit(LineComment node) {
	//System.out.println("Found: " + node.getClass());
	/* TODO comments in the form:
		something(); // foo
		are put in the incorrect place.
	 */ 
	String comment = new String(Arrays.copyOfRange(sourceCode,
			node.getStartPosition(),
			node.getStartPosition() + node.getLength()));
	println(comment);
	return false;
}
 
开发者ID:mrmonday,项目名称:j2d,代码行数:14,代码来源:J2dVisitor.java


示例4: visit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
@Override
public boolean visit(LineComment node) {
	int lineNumber = ((CompilationUnit)node.getRoot()).getLineNumber(node.getStartPosition());
	System.out.println(lineNumber + ":" + node);
	return super.visit(node);
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:7,代码来源:Visitor.java


示例5: endVisit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void endVisit(LineComment node) {
	logger.warn("Method endVisitLineComment for " + node + " for " + node + " not implemented!");
	super.endVisit(node);
}
 
开发者ID:EvoSuite,项目名称:evosuite,代码行数:7,代码来源:LoggingVisitor.java


示例6: visit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public boolean visit(LineComment node) {
	logger.warn("Method visitLineComment for " + node + " not implemented!");
	return super.visit(node);
}
 
开发者ID:EvoSuite,项目名称:evosuite,代码行数:7,代码来源:LoggingVisitor.java


示例7: visit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
@Override
public boolean visit(LineComment node) {
   commentMap.put(routeCU.getLineNumber(node.getStartPosition()), getCommentContent(node));
   return true;
}
 
开发者ID:lbroudoux,项目名称:eip-designer,代码行数:6,代码来源:CamelJavaFileParser.java


示例8: visit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
@Override
public boolean visit(final LineComment node) {
	return false;
}
 
开发者ID:Beagle-PSE,项目名称:Beagle,代码行数:5,代码来源:NotRecursingAstVisitor.java


示例9: visit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
@Override
public boolean visit(final LineComment node) {
	// not instrumentable, contains no instrumentable nodes
	return false;
}
 
开发者ID:Beagle-PSE,项目名称:Beagle,代码行数:6,代码来源:InstrumentableAstNodeLister.java


示例10: visit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
@Override
public boolean visit(LineComment node) {
	if (node.subtreeMatch(fMatcher, fNodeToMatch))
		return matches(node);
	return super.visit(node);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:7,代码来源:AstMatchingNodeFinder.java


示例11: endVisit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
@Override
public void endVisit(LineComment node) {
	endVisitNode(node);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:GenericVisitor.java


示例12: visit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
@Override
public boolean visit(LineComment node) {
	return visitNode(node);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:5,代码来源:GenericVisitor.java


示例13: visit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
@Override
public boolean visit(LineComment node) {
	return visit((Comment)node);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:5,代码来源:HierarchicalASTVisitor.java


示例14: endVisit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
@Override
public void endVisit(LineComment node) {
	endVisit((Comment)node);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:5,代码来源:HierarchicalASTVisitor.java


示例15: visit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
@Override
public boolean visit(LineComment node) {
	this.fBuffer.append("//\n");//$NON-NLS-1$
	return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:6,代码来源:ASTFlattener.java


示例16: visit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
public boolean visit(LineComment node) {
	this.buffer.append("//\n");//$NON-NLS-1$
	return false;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion-Juno38,代码行数:5,代码来源:NaiveASTFlattener.java


示例17: visit

import org.eclipse.jdt.core.dom.LineComment; //导入依赖的package包/类
@Override
public boolean visit(final LineComment node) {
	return this.internalVisit(node);
}
 
开发者ID:awltech,项目名称:eclipse-i18ntools,代码行数:5,代码来源:ASTNodeFinder.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EtcdClient类代码示例发布时间:2022-05-22
下一篇:
Java Task类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap