Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbvosburgh2012-03-23 11:32:58 -0400
committerbvosburgh2012-03-23 11:32:58 -0400
commit943a6ef6487578a4698c8dee4cac27ce9b6ed131 (patch)
tree9e0ae9374aaacd87299b62cd7799f4ac8be0616e
parentf00df180d55a5a27e8b773747bb5109fc5946e4d (diff)
downloadwebtools.dali-943a6ef6487578a4698c8dee4cac27ce9b6ed131.tar.gz
webtools.dali-943a6ef6487578a4698c8dee4cac27ce9b6ed131.tar.xz
webtools.dali-943a6ef6487578a4698c8dee4cac27ce9b6ed131.zip
improve interface comment
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/ProjectResourceLocator.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFile.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProject.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProjectManager.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaXmlResource.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/JpaPlatformUi.java6
6 files changed, 30 insertions, 0 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/ProjectResourceLocator.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/ProjectResourceLocator.java
index 00f72fdbae..e8c05d6045 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/ProjectResourceLocator.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/resource/ProjectResourceLocator.java
@@ -14,6 +14,12 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
/**
+ * Implementations of this interface can be retrieved via the Adapter framework:
+ * <pre>
+ * IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("Foo Project");
+ * ProjectResourceLocator locator = (ProjectResourceLocator) project.getAdapter(ProjectResourceLocator.class);
+ * </pre>
+ * <p>
* See <code>org.eclipse.jpt.common.core/plugin.xml</code>.
* <p>
* Provisional API: This interface is part of an interim API that is still
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFile.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFile.java
index d92623ff71..e077166050 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFile.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaFile.java
@@ -28,6 +28,8 @@ import org.eclipse.jpt.common.core.JptResourceModel;
* fashion that will return a JPA file once it and its JPA project have been
* constructed.
* <p>
+ * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
+ * <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
@@ -120,6 +122,7 @@ public interface JpaFile
* JpaFile.Reference jpaFileRef = (JpaFile.Reference) file.getAdapter(JpaFile.Reference.class);
* JpaFile jpaFile = jpaFileRef.getValue();
* </pre>
+ * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
* @see org.eclipse.jpt.jpa.core.internal.FileAdapterFactory
*/
interface Reference {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProject.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProject.java
index 04ce847d22..6b2297c8dc 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProject.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProject.java
@@ -52,6 +52,8 @@ import org.eclipse.wst.validation.internal.provisional.core.IReporter;
* Reference JPA project reference} to retrieve a JPA project in a blocking
* fashion that will return a JPA project once it has been constructed.
* <p>
+ * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
+ * <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
@@ -549,6 +551,7 @@ public interface JpaProject
* JpaProject.Reference jpaProjectRef = (JpaProject.Reference) project.getAdapter(JpaProject.Reference.class);
* JpaProject jpaProject = jpaProjectRef.getValue();
* </pre>
+ * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
* @see org.eclipse.jpt.jpa.core.internal.ProjectAdapterFactory
*/
interface Reference {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProjectManager.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProjectManager.java
index 96cb7cd567..7928a87b2d 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProjectManager.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/JpaProjectManager.java
@@ -26,6 +26,8 @@ import org.eclipse.jpt.common.utility.model.Model;
* JpaProjectManager jpaProjectManager = (JpaProjectManager) workspace.getAdapter(JpaProjectManager.class);
* </pre>
* <p>
+ * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
+ * <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
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaXmlResource.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaXmlResource.java
index 99eec44c56..d8f2af4944 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaXmlResource.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/resource/xml/JpaXmlResource.java
@@ -36,6 +36,16 @@ import org.eclipse.wst.common.internal.emf.resource.TranslatorResourceImpl;
import org.xml.sax.EntityResolver;
/**
+ * To retrieve the JPA XML resource corresponding to an Eclipse file:
+ * <pre>
+ * IFile file = (IFile) ResourcesPlugin.getWorkspace().getRoot().findMember("Foo.java");
+ * JpaXmlResource jpaXmlResource = (JpaXmlResource) file.getAdapter(JpaXmlResource.class);
+ * </pre>
+ * This is a non-blocking call; and as a result it will return <code>null</code>
+ * if the JPA XML resource or its JPA project is currently under construction.
+ * <p>
+ * See <code>org.eclipse.jpt.jpa.core/plugin.xml</code>.
+ * <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
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/JpaPlatformUi.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/JpaPlatformUi.java
index 03bcacbf52..4cae15da39 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/JpaPlatformUi.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/JpaPlatformUi.java
@@ -41,6 +41,12 @@ import org.eclipse.swt.widgets.Composite;
* <p>
* See the extension point: <code>org.eclipse.jpt.jpa.ui.jpaPlatform</code>
* <p>
+ * To retrieve the JPA UI platform corresponding to a JPA platform:
+ * <pre>
+ * JpaProject jpaProject = ...;
+ * JpaPlatform jpaPlatform = jpaProject.getJpaPlatform();
+ * JpaPlatformUi jpaPlatformUi = (JpaPlatformUi) jpaPlatform.getAdapter(JpaPlatformUi.class);
+ * </pre>
* 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

Back to the top