Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2005, 2009 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM - rewrote spec /
 
 
 package org.eclipse.jdt.internal.core.builder;
 
 import  org.eclipse.core.resources.IFile;
 
 public class CompilationParticipantResult extends BuildContext {
 	protected SourceFile sourceFile;
 	protected boolean hasAnnotations// only set during processAnnotations
 	protected IFile[] addedFiles// added/changed generated source files that need to be compiled
 	protected IFile[] deletedFiles// previously generated source files that should be deleted
 	protected CategorizedProblem[] problems// new problems to report against this compilationUnit
 	protected String[] dependencies// fully-qualified type names of any new dependencies, each name is of the form 'p1.p2.A.B'
 
 protected CompilationParticipantResult(SourceFile sourceFile) {
 	this. = sourceFile;
 	this. = false;
 	this. = null;
 	this. = null;
 	this. = null;
 	this. = null;
 }

Returns the contents of the compilation unit.

Returns:
the contents of the compilation unit
 
 public char[] getContents() {
 	return this..getContents();
 }

Returns the IFile representing the compilation unit.

Returns:
the IFile representing the compilation unit
 
 public IFile getFile() {
 	return this..;
 }

Returns whether the compilation unit contained any annotations when it was compiled. NOTE: This is only valid during CompilationParticipant.processAnnotations(BuildContext[]).

Returns:
whether the compilation unit contained any annotations when it was compiled
 
 public boolean hasAnnotations() {
 	return this.// only set during processAnnotations
 }

Record the added/changed generated files that need to be compiled.

Parameters:
addedGeneratedFiles the added/changed files
 
 public void recordAddedGeneratedFiles(IFile[] addedGeneratedFiles) {
 	int length2 = addedGeneratedFiles.length;
 	if (length2 == 0) return;
 
 	int length1 = this. == null ? 0 : this..length;
 	IFile[] merged = new IFile[length1 + length2];
 	if (length1 > 0) // always make a copy even if currently empty
 		System.arraycopy(this., 0, merged, 0, length1);
 	System.arraycopy(addedGeneratedFiles, 0, mergedlength1length2);
 	this. = merged;
 }

Record the generated files that need to be deleted.

Parameters:
deletedGeneratedFiles the files that need to be deleted
 
 public void recordDeletedGeneratedFiles(IFile[] deletedGeneratedFiles) {
 	int length2 = deletedGeneratedFiles.length;
 	if (length2 == 0) return;
 
 	int length1 = this. == null ? 0 : this..length;
 	IFile[] merged = new IFile[length1 + length2];
 	if (length1 > 0) // always make a copy even if currently empty
 		System.arraycopy(this., 0, merged, 0, length1);
 	System.arraycopy(deletedGeneratedFiles, 0, mergedlength1length2);
 	this. = merged;
 }

Record the fully-qualified type names of any new dependencies, each name is of the form "p1.p2.A.B".

Parameters:
typeNameDependencies the fully-qualified type names of new dependencies
public void recordDependencies(String[] typeNameDependencies) {
	int length2 = typeNameDependencies.length;
	if (length2 == 0) return;
	int length1 = this. == null ? 0 : this..length;
	String[] merged = new String[length1 + length2];
	if (length1 > 0) // always make a copy even if currently empty
		System.arraycopy(this., 0, merged, 0, length1);
	System.arraycopy(typeNameDependencies, 0, mergedlength1length2);
	this. = merged;
Record new problems to report against this compilationUnit. Markers are persisted for these problems only for the declared managed marker type (see the 'compilationParticipant' extension point).

Parameters:
newProblems the problems to report
public void recordNewProblems(CategorizedProblem[] newProblems) {
	int length2 = newProblems.length;
	if (length2 == 0) return;
	int length1 = this. == null ? 0 : this..length;
	CategorizedProblem[] merged = new CategorizedProblem[length1 + length2];
	if (length1 > 0) // always make a copy even if currently empty
		System.arraycopy(this., 0, merged, 0, length1);
	System.arraycopy(newProblems, 0, mergedlength1length2);
	this. = merged;
void reset(boolean detectedAnnotations) {
	// called prior to processAnnotations
	this. = detectedAnnotations;
	this. = null;
	this. = null;
	this. = null;
	this. = null;
public String toString() {
	return this..toString();
New to GrepCode? Check out our FAQ X