diff options
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaModel.java')
-rw-r--r-- | jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaModel.java | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaModel.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaModel.java index 97d817d02c..09518e5a70 100644 --- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaModel.java +++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaModel.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2008 Oracle. All rights reserved. + * Copyright (c) 2006, 2009 Oracle. 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. @@ -9,15 +9,13 @@ ******************************************************************************/ package org.eclipse.jpt.core; -import java.util.Iterator; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; import org.eclipse.jpt.utility.model.Model; /** - * The JPA model holds all the JPA projects. - * + * The JPA model holds all the JPA projects in the workspace. + * <p> * Provisional API: This interface is part of an interim API that is still * under development and expected to change significantly before reaching * stability. It is available at this early stage to solicit feedback from @@ -27,34 +25,45 @@ import org.eclipse.jpt.utility.model.Model; public interface JpaModel extends Model { /** + * Return the JPA model's JPA projects. + */ + Iterable<JpaProject> getJpaProjects(); + public static final String JPA_PROJECTS_COLLECTION = "jpaProjects"; //$NON-NLS-1$ + + /** + * Return the size of the JPA model's list of JPA projects. + */ + int getJpaProjectsSize(); + + /** * Return the JPA project corresponding to the specified Eclipse project. * Return null if unable to associate the specified Eclipse project * with a JPA project. */ - JpaProject getJpaProject(IProject project) throws CoreException; + JpaProject getJpaProject(IProject project); /** - * Return whether the JPA model contains a JPA project corresponding - * to the specified Eclipse project. + * Return the JPA file corresponding to the specified Eclipse file, + * or null if unable to associate the specified file with a JPA file. */ - boolean containsJpaProject(IProject project); + JpaFile getJpaFile(IFile file); /** - * Return the JPA model's JPA projects. This has performance implications, - * it will build all the JPA projects. + * The JPA settings associated with the specified Eclipse project + * have changed in such a way as to require the associated + * JPA project to be completely rebuilt + * (e.g. when the user changes a project's JPA platform). */ - Iterator<JpaProject> jpaProjects() throws CoreException; - public static final String JPA_PROJECTS_COLLECTION = "jpaProjects"; //$NON-NLS-1$ + void rebuildJpaProject(IProject project); /** - * Return the size of the JPA model's list of JPA projects. + * Return whether the model's Java change listener is active. */ - int jpaProjectsSize(); - + boolean javaElementChangeListenerIsActive(); + /** - * Return the JPA file corresponding to the specified Eclipse file, - * or null if unable to associate the specified file with a JPA file. + * Set whether the model's Java change listener is active. */ - JpaFile getJpaFile(IFile file) throws CoreException; + void setJavaElementChangeListenerIsActive(boolean javaElementChangeListenerIsActive); } |