### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/AbstractAnnotationProcessorManager.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/AbstractAnnotationProcessorManager.java,v retrieving revision 1.4 diff -u -r1.4 AbstractAnnotationProcessorManager.java --- compiler/org/eclipse/jdt/internal/compiler/AbstractAnnotationProcessorManager.java 17 Jan 2007 02:37:20 -0000 1.4 +++ compiler/org/eclipse/jdt/internal/compiler/AbstractAnnotationProcessorManager.java 2 Feb 2007 20:35:24 -0000 @@ -9,7 +9,7 @@ public abstract class AbstractAnnotationProcessorManager { public abstract void configure(Main batchCompiler, String[] options); - public abstract void configureFromPlatform(Compiler compiler, Object javaProject); + public abstract void configureFromPlatform(Compiler compiler, Object compilationUnitLocator, Object javaProject); public abstract void setOut(PrintWriter out); Index: model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java,v retrieving revision 1.106 diff -u -r1.106 AbstractImageBuilder.java --- model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java 31 Jan 2007 20:01:58 -0000 1.106 +++ model/org/eclipse/jdt/internal/core/builder/AbstractImageBuilder.java 2 Feb 2007 20:35:25 -0000 @@ -18,6 +18,7 @@ import org.eclipse.jdt.internal.compiler.*; import org.eclipse.jdt.internal.compiler.Compiler; import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; +import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; import org.eclipse.jdt.internal.compiler.problem.*; import org.eclipse.jdt.internal.compiler.util.SimpleSet; @@ -34,7 +35,7 @@ * Provides the building and compilation mechanism * in common with the batch and incremental builders. */ -public abstract class AbstractImageBuilder implements ICompilerRequestor { +public abstract class AbstractImageBuilder implements ICompilerRequestor, ICompilationUnitLocator { protected JavaBuilder javaBuilder; protected State newState; @@ -436,10 +437,19 @@ return folder; } + + +/* (non-Javadoc) + * @see org.eclipse.jdt.internal.core.builder.ICompilationUnitLocator#fromIFile(org.eclipse.core.resources.IFile) + */ +public ICompilationUnit fromIFile(IFile file) { + return findSourceFile(file); +} + protected void initializeAnnotationProcessorManager(Compiler newCompiler) { AbstractAnnotationProcessorManager annotationManager = JavaModelManager.getJavaModelManager().createAnnotationProcessorManager(); if (annotationManager != null) { - annotationManager.configureFromPlatform(newCompiler, javaBuilder.javaProject); + annotationManager.configureFromPlatform(newCompiler, this, javaBuilder.javaProject); annotationManager.setErr(new PrintWriter(System.err)); annotationManager.setOut(new PrintWriter(System.out)); } Index: model/org/eclipse/jdt/internal/core/builder/ICompilationUnitLocator.java =================================================================== RCS file: model/org/eclipse/jdt/internal/core/builder/ICompilationUnitLocator.java diff -N model/org/eclipse/jdt/internal/core/builder/ICompilationUnitLocator.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ model/org/eclipse/jdt/internal/core/builder/ICompilationUnitLocator.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2007 BEA Systems, Inc. + * 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: + * wharley@bea.com - initial API and implementation + * + *******************************************************************************/ + +package org.eclipse.jdt.internal.core.builder; + +import org.eclipse.core.resources.IFile; +import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; + +/** + * Used to convert an IFile into an ICompilationUnit, + * for clients outside of this package. + * @since 3.3 + */ +public interface ICompilationUnitLocator { + public ICompilationUnit fromIFile(IFile file); +}