public void packageIsNotExpectedPackage(CompilationUnitDeclaration compUnitDecl) { String[] arguments = new String[] { CharOperation.toString(compUnitDecl.compilationResult.compilationUnit.getPackageName()), compUnitDecl.currentPackage == null ? "" : CharOperation.toString(compUnitDecl.currentPackage.tokens), //$NON-NLS-1$ }; this.handle( IProblem.PackageIsNotExpectedPackage, arguments, arguments, compUnitDecl.currentPackage == null ? 0 : compUnitDecl.currentPackage.sourceStart, compUnitDecl.currentPackage == null ? 0 : compUnitDecl.currentPackage.sourceEnd); } public void parameterAssignment(LocalVariableBinding local, ASTNode location) {
public void packageIsNotExpectedPackage(CompilationUnitDeclaration compUnitDecl) { String[] arguments = new String[] { CharOperation.toString(compUnitDecl.compilationResult.compilationUnit.getPackageName()), compUnitDecl.currentPackage == null ? "" : CharOperation.toString(compUnitDecl.currentPackage.tokens), //$NON-NLS-1$ }; this.handle( IProblem.PackageIsNotExpectedPackage, arguments, arguments, compUnitDecl.currentPackage == null ? 0 : compUnitDecl.currentPackage.sourceStart, compUnitDecl.currentPackage == null ? 0 : compUnitDecl.currentPackage.sourceEnd); } public void parameterAssignment(LocalVariableBinding local, ASTNode location) {
/** * adds a compilation unit override * * @param cu * The override * @return {@code true} if there was a previous mapping which has been updated with this call. {@code false} if this is * the first override for this compilation unit or there was no change. */ public boolean addCompilationUnit(final ICompilationUnit cu) { final char[][] packageName0 = cu.getPackageName(); final CharBuffer key = CharBuffer.wrap(CharOperation.concatWith(packageName0, cu.getMainTypeName(), SEPARATOR)); boolean updatedExistingEntry = false; final ICompilationUnit existingIcu = m_overrideCompilationUnits.put(key, cu); if (existingIcu != null) { updatedExistingEntry = !Arrays.equals(existingIcu.getContents(), cu.getContents()); } //register additional packages if (packageName0 != null && packageName0.length > 0) { for (int i = 1; i <= packageName0.length; i++) { m_additionalPackages.add(CharBuffer.wrap(CharOperation.concatWith(CharOperation.subarray(packageName0, 0, i), SEPARATOR))); } } return updatedExistingEntry; }
public void packageIsNotExpectedPackage(CompilationUnitDeclaration compUnitDecl) { boolean hasPackageDeclaration = compUnitDecl.currentPackage == null; String[] arguments = new String[] { CharOperation.toString(compUnitDecl.compilationResult.compilationUnit.getPackageName()), hasPackageDeclaration ? "" : CharOperation.toString(compUnitDecl.currentPackage.tokens), //$NON-NLS-1$ }; int end; if (compUnitDecl.sourceEnd <= 0) { end = -1; } else { end = hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceEnd; } this.handle( IProblem.PackageIsNotExpectedPackage, arguments, arguments, hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceStart, end); } public void parameterAssignment(LocalVariableBinding local, ASTNode location) {
public void packageIsNotExpectedPackage(CompilationUnitDeclaration compUnitDecl) { boolean hasPackageDeclaration = compUnitDecl.currentPackage == null; String[] arguments = new String[] { CharOperation.toString(compUnitDecl.compilationResult.compilationUnit.getPackageName()), hasPackageDeclaration ? "" : CharOperation.toString(compUnitDecl.currentPackage.tokens), //$NON-NLS-1$ }; int end; if (compUnitDecl.sourceEnd <= 0) { end = -1; } else { end = hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceEnd; } this.handle( IProblem.PackageIsNotExpectedPackage, arguments, arguments, hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceStart, end); } public void parameterAssignment(LocalVariableBinding local, ASTNode location) {
public void packageIsNotExpectedPackage(CompilationUnitDeclaration compUnitDecl) { boolean hasPackageDeclaration = compUnitDecl.currentPackage == null; String[] arguments = new String[] { CharOperation.toString(compUnitDecl.compilationResult.compilationUnit.getPackageName()), hasPackageDeclaration ? "" : CharOperation.toString(compUnitDecl.currentPackage.tokens), //$NON-NLS-1$ }; int end; if (compUnitDecl.sourceEnd <= 0) { end = -1; } else { end = hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceEnd; } this.handle( IProblem.PackageIsNotExpectedPackage, arguments, arguments, hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceStart, end); } public void parameterAssignment(LocalVariableBinding local, ASTNode location) {
public void packageIsNotExpectedPackage(CompilationUnitDeclaration compUnitDecl) { boolean hasPackageDeclaration = compUnitDecl.currentPackage == null; String[] arguments = new String[] { CharOperation.toString(compUnitDecl.compilationResult.compilationUnit.getPackageName()), hasPackageDeclaration ? "" : CharOperation.toString(compUnitDecl.currentPackage.tokens), //$NON-NLS-1$ }; int end; if (compUnitDecl.sourceEnd <= 0) { end = -1; } else { end = hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceEnd; } this.handle( IProblem.PackageIsNotExpectedPackage, arguments, arguments, hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceStart, end); } public void parameterAssignment(LocalVariableBinding local, ASTNode location) {
public void packageIsNotExpectedPackage(CompilationUnitDeclaration compUnitDecl) { boolean hasPackageDeclaration = compUnitDecl.currentPackage == null; String[] arguments = new String[] { CharOperation.toString(compUnitDecl.compilationResult.compilationUnit.getPackageName()), hasPackageDeclaration ? "" : CharOperation.toString(compUnitDecl.currentPackage.tokens), //$NON-NLS-1$ }; int end; if (compUnitDecl.sourceEnd <= 0) { end = -1; } else { end = hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceEnd; } this.handle( IProblem.PackageIsNotExpectedPackage, arguments, arguments, hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceStart, end); } public void parameterAssignment(LocalVariableBinding local, ASTNode location) {
public void packageIsNotExpectedPackage(CompilationUnitDeclaration compUnitDecl) { boolean hasPackageDeclaration = compUnitDecl.currentPackage == null; String[] arguments = new String[] { CharOperation.toString(compUnitDecl.compilationResult.compilationUnit.getPackageName()), hasPackageDeclaration ? "" : CharOperation.toString(compUnitDecl.currentPackage.tokens), //$NON-NLS-1$ }; int end; if (compUnitDecl.sourceEnd <= 0) { end = -1; } else { end = hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceEnd; } this.handle( IProblem.PackageIsNotExpectedPackage, arguments, arguments, hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceStart, end); } public void parameterAssignment(LocalVariableBinding local, ASTNode location) {
public boolean hasCompilationUnit(final char[][] qualifiedPackageName, final char[] moduleName, final boolean checkCUs) { for (final ICompilationUnit icu : overrideSupport().getCompilationUnits()) { if (CharOperation.equals(icu.getPackageName(), qualifiedPackageName)) { return true; } } return superHasCompilationUnit(qualifiedPackageName, moduleName, checkCUs); }
public void packageIsNotExpectedPackage(CompilationUnitDeclaration compUnitDecl) { boolean hasPackageDeclaration = compUnitDecl.currentPackage == null; String[] arguments = new String[] { CharOperation.toString(compUnitDecl.compilationResult.compilationUnit.getPackageName()), hasPackageDeclaration ? "" : CharOperation.toString(compUnitDecl.currentPackage.tokens), //$NON-NLS-1$ }; int end; if (compUnitDecl.sourceEnd <= 0) { end = -1; } else { end = hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceEnd; } this.handle( IProblem.PackageIsNotExpectedPackage, arguments, arguments, hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceStart, end); } public void parameterAssignment(LocalVariableBinding local, ASTNode location) {
public void packageIsNotExpectedPackage(CompilationUnitDeclaration compUnitDecl) { boolean hasPackageDeclaration = compUnitDecl.currentPackage == null; String[] arguments = new String[] { CharOperation.toString(compUnitDecl.compilationResult.compilationUnit.getPackageName()), hasPackageDeclaration ? "" : CharOperation.toString(compUnitDecl.currentPackage.tokens), //$NON-NLS-1$ }; int end; if (compUnitDecl.sourceEnd <= 0) { end = -1; } else { end = hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceEnd; } this.handle( IProblem.PackageIsNotExpectedPackage, arguments, arguments, hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceStart, end); } public void parameterAssignment(LocalVariableBinding local, ASTNode location) {
public void packageIsNotExpectedPackage(CompilationUnitDeclaration compUnitDecl) { boolean hasPackageDeclaration = compUnitDecl.currentPackage == null; String[] arguments = new String[] { CharOperation.toString(compUnitDecl.compilationResult.compilationUnit.getPackageName()), hasPackageDeclaration ? "" : CharOperation.toString(compUnitDecl.currentPackage.tokens), //$NON-NLS-1$ }; int end; if (compUnitDecl.sourceEnd <= 0) { end = -1; } else { end = hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceEnd; } this.handle( IProblem.PackageIsNotExpectedPackage, arguments, arguments, hasPackageDeclaration ? 0 : compUnitDecl.currentPackage.sourceStart, end); } public void parameterAssignment(LocalVariableBinding local, ASTNode location) {
protected static void copyCompilationUnitOverrides(final JavaEnvironmentWithJdt src, final JavaEnvironmentSpi dest) { for (final ICompilationUnit cu : src.m_nameEnv.overrideSupport().getCompilationUnits()) { dest.registerCompilationUnitOverride(CharOperation.toString(cu.getPackageName()), new String(cu.getFileName()), cu.getContents()); } }
char[][] caa = result.packageName; if (null == caa) { caa = result.compilationUnit.getPackageName();
char[][] caa = result.packageName; if (null == caa) { caa = result.compilationUnit.getPackageName();
boolean firstIsSynthetic = false; if (this.referenceContext.compilationResult.compilationUnit != null) { char[][] expectedPackageName = this.referenceContext.compilationResult.compilationUnit.getPackageName(); if (expectedPackageName != null && !CharOperation.equals(this.currentPackageName, expectedPackageName)) {
boolean firstIsSynthetic = false; if (this.referenceContext.compilationResult.compilationUnit != null) { char[][] expectedPackageName = this.referenceContext.compilationResult.compilationUnit.getPackageName(); if (expectedPackageName != null && !CharOperation.equals(this.currentPackageName, expectedPackageName)) {
boolean firstIsSynthetic = false; if (this.referenceContext.compilationResult.compilationUnit != null) { char[][] expectedPackageName = this.referenceContext.compilationResult.compilationUnit.getPackageName(); if (expectedPackageName != null && !CharOperation.equals(this.currentPackageName, expectedPackageName)) {
boolean firstIsSynthetic = false; if (this.referenceContext.compilationResult.compilationUnit != null) { char[][] expectedPackageName = this.referenceContext.compilationResult.compilationUnit.getPackageName(); if (expectedPackageName != null && !this.referenceContext.isModuleInfo() && !CharOperation.equals(this.currentPackageName, expectedPackageName)) {