X-Git-Url: http://secure.phpeclipse.com
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IJavaElement.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IJavaElement.java
index 318061a..cea7b63 100644
--- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IJavaElement.java
+++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/IJavaElement.java
@@ -12,6 +12,8 @@ package net.sourceforge.phpdt.core;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
/**
* Common protocol for all elements provided by the Java model.
@@ -110,6 +112,12 @@ public interface IJavaElement extends IAdaptable {
int IMPORT_DECLARATION = 13;
/**
+ * Constant representing a local variable declaration.
+ * A Java element with this type can be safely cast to ILocalVariable
.
+ * @since 3.0
+ */
+ int LOCAL_VARIABLE = 14;
+ /**
* Returns whether this Java element exists in the model.
*
* Java elements are handle objects that may or may not be backed by an
@@ -129,7 +137,7 @@ public interface IJavaElement extends IAdaptable {
* @return true
if this element exists in the Java model, and
* false
if this element does not exist
*/
-// boolean exists();
+ boolean exists();
/**
* Returns the first ancestor of this Java element that has the given type.
@@ -160,7 +168,7 @@ public interface IJavaElement extends IAdaptable {
* @exception JavaModelException if this element does not exist or if an
* exception occurs while accessing its corresponding resource
*/
-// IResource getCorrespondingResource() throws JavaModelException;
+ IResource getCorrespondingResource() throws JavaModelException;
/**
* Returns the name of this element. This is a handle-only method.
@@ -208,7 +216,7 @@ public interface IJavaElement extends IAdaptable {
* @return the containing Java project, or null
if this element is
* not contained in a Java project
*/
-// IJavaProject getJavaProject();
+ IJavaProject getJavaProject();
/**
* Returns the first openable parent. If this element is openable, the element
@@ -243,8 +251,19 @@ public interface IJavaElement extends IAdaptable {
* @return the path to the innermost resource enclosing this element
* @since 2.0
*/
-// IPath getPath();
-
+ IPath getPath();
+ /**
+ * Returns the primary element (whose compilation unit is the primary compilation unit)
+ * this working copy element was created from, or this element if it is a descendant of a
+ * primary compilation unit or if it is not a descendant of a working copy (e.g. it is a
+ * binary member).
+ * The returned element may or may not exist.
+ *
+ * @return the primary element this working copy element was created from, or this
+ * element.
+ * @since 3.0
+ */
+ IJavaElement getPrimaryElement();
/**
* Returns the innermost resource enclosing this element.
* If this element is included in an archive and this archive is not external,
@@ -259,7 +278,14 @@ public interface IJavaElement extends IAdaptable {
* @since 2.0
*/
IResource getResource();
-
+ /**
+ * Returns the scheduling rule associated with this Java element.
+ * This is a handle-only method.
+ *
+ * @return the scheduling rule associated with this Java element
+ * @since 3.0
+ */
+ ISchedulingRule getSchedulingRule();
/**
* Returns the smallest underlying resource that contains
* this element, or null
if this element is not contained
@@ -299,5 +325,5 @@ public interface IJavaElement extends IAdaptable {
* @exception JavaModelException if this element does not exist or if an
* exception occurs while accessing its corresponding resource
*/
-// boolean isStructureKnown() throws JavaModelException;
+ boolean isStructureKnown() throws JavaModelException;
}