Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 405320 | Differences between
and this patch

Collapse All | Expand All

(-)a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/AbstractJpaProject.java (-1 / +10 lines)
Lines 30-35 Link Here
30
import org.eclipse.core.runtime.IPath;
30
import org.eclipse.core.runtime.IPath;
31
import org.eclipse.core.runtime.IProgressMonitor;
31
import org.eclipse.core.runtime.IProgressMonitor;
32
import org.eclipse.core.runtime.IStatus;
32
import org.eclipse.core.runtime.IStatus;
33
import org.eclipse.core.runtime.Platform;
33
import org.eclipse.core.runtime.Status;
34
import org.eclipse.core.runtime.Status;
34
import org.eclipse.core.runtime.content.IContentType;
35
import org.eclipse.core.runtime.content.IContentType;
35
import org.eclipse.core.runtime.jobs.ISchedulingRule;
36
import org.eclipse.core.runtime.jobs.ISchedulingRule;
Lines 609-617 Link Here
609
	}
610
	}
610
611
611
	protected ProjectResourceLocator getProjectResourceLocator() {
612
	protected ProjectResourceLocator getProjectResourceLocator() {
612
		return (ProjectResourceLocator) this.project.getAdapter(ProjectResourceLocator.class);
613
		Object resourceLocator =  this.project.getAdapter(ProjectResourceLocator.class);
614
		//Hack fix to ensure the adatper can be successfully loaded as there are currently problems in the platform
615
		//in this area.  See bugs 405320 and 408506.  This fix is essentially a delay mechanism but appears to
616
		//fully resolve the issue.  This temp fix should be removed when bug 408506 is fixed in the platform.
617
		if (resourceLocator == null) {
618
			resourceLocator = Platform.getAdapterManager().loadAdapter(this.project, ProjectResourceLocator.class.getName());
619
		}
620
		return (ProjectResourceLocator) resourceLocator;
613
	}
621
	}
614
	
622
	
623
	
615
	/**
624
	/**
616
	 * Log any developer exceptions and don't build a JPA file rather
625
	 * Log any developer exceptions and don't build a JPA file rather
617
	 * than completely failing to build the JPA Project.
626
	 * than completely failing to build the JPA Project.

Return to bug 405320