3m9 compatible;
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / IJavaElement.java
index 0f4693a..07f17f3 100644 (file)
@@ -13,6 +13,7 @@ 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.
@@ -245,7 +246,18 @@ public interface IJavaElement extends IAdaptable {
         * @since 2.0
         */
        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, 
@@ -260,7 +272,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 <code>null</code> if this element is not contained