本文整理了Java中org.eclipse.jdt.internal.compiler.Compiler.addCompilationUnit()
方法的一些代码示例,展示了Compiler.addCompilationUnit()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Compiler.addCompilationUnit()
方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.Compiler
类名称:Compiler
方法名:addCompilationUnit
暂无
代码示例来源:origin: io.takari.maven.plugins/takari-lifecycle-plugin
@Override
protected synchronized void addCompilationUnit(ICompilationUnit sourceUnit, CompilationUnitDeclaration parsedUnit) {
if (sourceUnit instanceof SourcepathDirectory.ClasspathCompilationUnit) {
// this compilation unit represents dependency .java file
// it is used to resolve type references and must not be processed otherwise
return;
}
// growth of the internal unitsToProcess array is handled via multiplication of it's current size,
// so if size is 0, we should just go ahead and handle it here.
if (this.unitsToProcess.length == 0) {
// start out with a size other than 0, so that it can be doubled safely by the super method.
// starting with 4 to prevent the first couple of doublings and corresponding copying.
this.unitsToProcess = new CompilationUnitDeclaration[4];
this.unitsToProcess[0] = parsedUnit;
// this tracks the units added, it must be incremented ever time a new type is added.
this.totalUnits = 1;
} else {
super.addCompilationUnit(sourceUnit, parsedUnit);
}
}
代码示例来源:origin: takari/takari-lifecycle
@Override
protected synchronized void addCompilationUnit(ICompilationUnit sourceUnit, CompilationUnitDeclaration parsedUnit) {
if (sourceUnit instanceof SourcepathDirectory.ClasspathCompilationUnit) {
// this compilation unit represents dependency .java file
// it is used to resolve type references and must not be processed otherwise
return;
}
// growth of the internal unitsToProcess array is handled via multiplication of it's current size,
// so if size is 0, we should just go ahead and handle it here.
if (this.unitsToProcess.length == 0) {
// start out with a size other than 0, so that it can be doubled safely by the super method.
// starting with 4 to prevent the first couple of doublings and corresponding copying.
this.unitsToProcess = new CompilationUnitDeclaration[4];
this.unitsToProcess[0] = parsedUnit;
// this tracks the units added, it must be incremented ever time a new type is added.
this.totalUnits = 1;
} else {
super.addCompilationUnit(sourceUnit, parsedUnit);
}
}
代码示例来源:origin: com.android.tools.lint/lint
@Override
protected synchronized void addCompilationUnit(ICompilationUnit sourceUnit,
CompilationUnitDeclaration parsedUnit) {
super.addCompilationUnit(sourceUnit, parsedUnit);
mUnits.put((EcjSourceFile)sourceUnit, parsedUnit);
}
代码示例来源:origin: org.eclipse.scout.sdk/org.eclipse.scout.sdk.core
@Override
protected synchronized void addCompilationUnit(org.eclipse.jdt.internal.compiler.env.ICompilationUnit sourceUnit, CompilationUnitDeclaration parsedUnit) {
super.addCompilationUnit(sourceUnit, parsedUnit);
m_sources.put(parsedUnit, sourceUnit);
}
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
addCompilationUnit(sourceUnits[i], parsedUnit);
ImportReference currentPackage = parsedUnit.currentPackage;
if (currentPackage != null) {
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
addCompilationUnit(sourceUnits[i], parsedUnit);
ImportReference currentPackage = parsedUnit.currentPackage;
if (currentPackage != null) {
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
addCompilationUnit(sourceUnits[i], parsedUnit);
ImportReference currentPackage = parsedUnit.currentPackage;
if (currentPackage != null) {
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
addCompilationUnit(sourceUnits[i], parsedUnit);
ImportReference currentPackage = parsedUnit.currentPackage;
if (currentPackage != null) {
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
addCompilationUnit(sourceUnit, parsedUnit);
代码示例来源:origin: org.eclipse.scout.sdk.deps/ecj
addCompilationUnit(sourceUnit, parsedUnit);
代码示例来源:origin: org.eclipse.jetty.orbit/org.eclipse.jdt.core
addCompilationUnit(sourceUnit, parsedUnit);
代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core
addCompilationUnit(sourceUnit, parsedUnit);
代码示例来源:origin: windup/windup
addCompilationUnit(sourceUnit, parsedUnit);
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
addCompilationUnit(sourceUnit, parsedUnit);
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
addCompilationUnit(sourceUnit, parsedUnit);
代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj
addCompilationUnit(sourceUnit, parsedUnit);
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
addCompilationUnit(sourceUnit, parsedUnit);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
addCompilationUnit(sourceUnit, parsedUnit);
代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion
addCompilationUnit(sourceUnit, parsedUnit);
代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps
addCompilationUnit(sourceUnit, parsedUnit);
内容来源于网络,如有侵权,请联系作者删除!