improved PHP parser
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / JavaCore.java
index 5dd77a1..b340b76 100644 (file)
@@ -15,6 +15,7 @@ import net.sourceforge.phpdt.internal.core.ClasspathEntry;
 import net.sourceforge.phpdt.internal.core.JavaModel;
 import net.sourceforge.phpdt.internal.core.JavaModelManager;
 import net.sourceforge.phpdt.internal.core.Region;
+import net.sourceforge.phpdt.internal.core.util.MementoTokenizer;
 import net.sourceforge.phpdt.internal.corext.Assert;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
 
@@ -1652,6 +1653,29 @@ public class JavaCore {
        }
 
        /**
+        * Returns the Java model element corresponding to the given handle identifier
+        * generated by <code>IJavaElement.getHandleIdentifier()</code>, or
+        * <code>null</code> if unable to create the associated element.
+        * If the returned Java element is an <code>ICompilationUnit</code>, its owner
+        * is the given owner if such a working copy exists, otherwise the compilation unit 
+        * is a primary compilation unit.
+        * 
+        * @param handleIdentifier the given handle identifier
+        * @param owner the owner of the returned compilation unit, ignored if the returned
+        *   element is not a compilation unit
+        * @return the Java element corresponding to the handle identifier
+        * @since 3.0
+        */
+       public static IJavaElement create(String handleIdentifier, WorkingCopyOwner owner) {
+               if (handleIdentifier == null) {
+                       return null;
+               }
+               MementoTokenizer memento = new MementoTokenizer(handleIdentifier);
+               JavaModel model = JavaModelManager.getJavaModelManager().getJavaModel();
+               return model.getHandleFromMemento(memento, owner);
+       } 
+       
+       /**
         * Returns the Java element corresponding to the given file, or
         * <code>null</code> if unable to associate the given file with a Java
         * element.
@@ -1827,7 +1851,7 @@ public class JavaCore {
         * (using <code>setClasspathContainer</code>, then a
         * <code>ClasspathContainerInitializer</code> will be activated if any was
         * registered for this container ID onto the extension point
-        * "org.eclipse.jdt.core.classpathContainerInitializer".
+        * "net.sourceforge.phpdt.core.classpathContainerInitializer".
         * <p>
         * There is no assumption that the returned container must answer the exact
         * same containerPath when requested
@@ -1838,7 +1862,7 @@ public class JavaCore {
         * are not preserved from a session to another. It is thus highly
         * recommended to register a <code>ClasspathContainerInitializer</code>
         * for each referenced container (through the extension point
-        * "org.eclipse.jdt.core.ClasspathContainerInitializer").
+        * "net.sourceforge.phpdt.core.ClasspathContainerInitializer").
         * <p>
         * 
         * @param containerPath
@@ -1938,7 +1962,7 @@ public class JavaCore {
         * Helper method finding the classpath container initializer registered for
         * a given classpath container ID or <code>null</code> if none was found
         * while iterating over the contributions to extension point to the
-        * extension point "org.eclipse.jdt.core.classpathContainerInitializer".
+        * extension point "net.sourceforge.phpdt.core.classpathContainerInitializer".
         * <p>
         * A containerID is the first segment of any container path, used to
         * identify the registered container initializer.
@@ -1995,7 +2019,7 @@ public class JavaCore {
         * <p>
         * Note that classpath variables can be contributed registered initializers
         * for, using the extension point
-        * "org.eclipse.jdt.core.classpathVariableInitializer". If an initializer is
+        * "net.sourceforge.phpdt.core.classpathVariableInitializer". If an initializer is
         * registered for a variable, its persisted value will be ignored: its
         * initializer will thus get the opportunity to rebind the variable
         * differently on each session.
@@ -2072,7 +2096,7 @@ public class JavaCore {
         * Helper method finding the classpath variable initializer registered for a
         * given classpath variable name or <code>null</code> if none was found
         * while iterating over the contributions to extension point to the
-        * extension point "org.eclipse.jdt.core.classpathVariableInitializer".
+        * extension point "net.sourceforge.phpdt.core.classpathVariableInitializer".
         * <p>
         * 
         * @param the
@@ -2150,49 +2174,49 @@ public class JavaCore {
         *     When generated, this attribute will enable local variable names 
         *     to be displayed in debugger, only in place where variables are 
         *     definitely assigned (.class file is then bigger)
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.debug.localVariable&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.debug.localVariable&quot;
         *      - possible values:   { &quot;generate&quot;, &quot;do not generate&quot; }
         *      - default:           &quot;generate&quot;
         * 
         *  COMPILER / Generating Line Number Debug Attribute 
         *     When generated, this attribute will enable source code highlighting in debugger 
         *     (.class file is then bigger).
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.debug.lineNumber&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.debug.lineNumber&quot;
         *      - possible values:   { &quot;generate&quot;, &quot;do not generate&quot; }
         *      - default:           &quot;generate&quot;
         *     
         *  COMPILER / Generating Source Debug Attribute 
         *     When generated, this attribute will enable the debugger to present the 
         *     corresponding source code.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.debug.sourceFile&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.debug.sourceFile&quot;
         *      - possible values:   { &quot;generate&quot;, &quot;do not generate&quot; }
         *      - default:           &quot;generate&quot;
         *     
         *  COMPILER / Preserving Unused Local Variables
         *     Unless requested to preserve unused local variables (that is, never read), the 
         *     compiler will optimize them out, potentially altering debugging
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.codegen.unusedLocal&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.codegen.unusedLocal&quot;
         *      - possible values:   { &quot;preserve&quot;, &quot;optimize out&quot; }
         *      - default:           &quot;preserve&quot;
         *  
         *  COMPILER / Defining Target Java Platform
         *     For binary compatibility reason, .class files can be tagged to with certain VM versions and later.
         *     Note that &quot;1.4&quot; target require to toggle compliance mode to &quot;1.4&quot; too.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.codegen.targetPlatform&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.codegen.targetPlatform&quot;
         *      - possible values:   { &quot;1.1&quot;, &quot;1.2&quot;, &quot;1.3&quot;, &quot;1.4&quot; }
         *      - default:           &quot;1.1&quot;
         * 
         *  COMPILER / Reporting Unreachable Code
         *     Unreachable code can optionally be reported as an error, warning or simply 
         *     ignored. The bytecode generation will always optimized it out.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.unreachableCode&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.unreachableCode&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;error&quot;
         * 
         *  COMPILER / Reporting Invalid Import
         *     An import statement that cannot be resolved might optionally be reported 
         *     as an error, as a warning or ignored.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.invalidImport&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.invalidImport&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;error&quot;
         * 
@@ -2200,7 +2224,7 @@ public class JavaCore {
         *     A package default method is not visible in a different package, and thus 
         *     cannot be overridden. When enabling this option, the compiler will signal 
         *     such scenarii either as an error or a warning.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.overridingPackageDefaultMethod&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;warning&quot;
         * 
@@ -2208,21 +2232,21 @@ public class JavaCore {
         *     Naming a method with a constructor name is generally considered poor 
         *     style programming. When enabling this option, the compiler will signal such 
         *     scenarii either as an error or a warning.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.methodWithConstructorName&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.methodWithConstructorName&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;warning&quot;
         * 
         *  COMPILER / Reporting Deprecation
         *     When enabled, the compiler will signal use of deprecated API either as an 
         *     error or a warning.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.deprecation&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.deprecation&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;warning&quot;
         * 
         *  COMPILER / Reporting Deprecation Inside Deprecated Code
         *     When enabled, the compiler will signal use of deprecated API inside deprecated code.
-        *     The severity of the problem is controlled with option &quot;org.eclipse.jdt.core.compiler.problem.deprecation&quot;.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode&quot;
+        *     The severity of the problem is controlled with option &quot;net.sourceforge.phpdt.core.compiler.problem.deprecation&quot;.
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.deprecationInDeprecatedCode&quot;
         *      - possible values:   { &quot;enabled&quot;, &quot;disabled&quot; }
         *      - default:           &quot;disabled&quot;
         * 
@@ -2233,49 +2257,49 @@ public class JavaCore {
         *       } catch (java.io.IOException e) {}. 
         *     When enabling this option, the compiler will issue an error or a warning for hidden 
         *     catch blocks corresponding to checked exceptions
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.hiddenCatchBlock&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;warning&quot;
         * 
         *  COMPILER / Reporting Unused Local
         *     When enabled, the compiler will issue an error or a warning for unused local 
         *     variables (that is, variables never read from)
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.unusedLocal&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.unusedLocal&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;ignore&quot;
         * 
         *  COMPILER / Reporting Unused Parameter
         *     When enabled, the compiler will issue an error or a warning for unused method 
         *     parameters (that is, parameters never read from)
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.unusedParameter&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.unusedParameter&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;ignore&quot;
         * 
         *  COMPILER / Reporting Unused Parameter if Implementing Abstract Method
         *     When enabled, the compiler will signal unused parameters in abstract method implementations.
-        *     The severity of the problem is controlled with option &quot;org.eclipse.jdt.core.compiler.problem.unusedParameter&quot;.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract&quot;
+        *     The severity of the problem is controlled with option &quot;net.sourceforge.phpdt.core.compiler.problem.unusedParameter&quot;.
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.unusedParameterWhenImplementingAbstract&quot;
         *      - possible values:   { &quot;enabled&quot;, &quot;disabled&quot; }
         *      - default:           &quot;disabled&quot;
         * 
         *  COMPILER / Reporting Unused Parameter if Overriding Concrete Method
         *     When enabled, the compiler will signal unused parameters in methods overriding concrete ones.
-        *     The severity of the problem is controlled with option &quot;org.eclipse.jdt.core.compiler.problem.unusedParameter&quot;.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete&quot;
+        *     The severity of the problem is controlled with option &quot;net.sourceforge.phpdt.core.compiler.problem.unusedParameter&quot;.
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.unusedParameterWhenOverridingConcrete&quot;
         *      - possible values:   { &quot;enabled&quot;, &quot;disabled&quot; }
         *      - default:           &quot;disabled&quot;
         * 
         *  COMPILER / Reporting Unused Import
         *     When enabled, the compiler will issue an error or a warning for unused import 
         *     reference 
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.unusedImport&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.unusedImport&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;warning&quot;
         * 
         *  COMPILER / Reporting Unused Private Members
         *     When enabled, the compiler will issue an error or a warning whenever a private 
         *     method or field is declared but never used within the same unit.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.unusedPrivateMember&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.unusedPrivateMember&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;ignore&quot;
         * 
@@ -2283,21 +2307,21 @@ public class JavaCore {
         *     When enabled, the compiler will issue an error or a warning whenever it emulates 
         *     access to a non-accessible member of an enclosing type. Such access can have
         *     performance implications.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.syntheticAccessEmulation&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;ignore&quot;
         * 
         *  COMPILER / Reporting Non-Externalized String Literal
         *     When enabled, the compiler will issue an error or a warning for non externalized 
         *     String literal (that is, not tagged with //$NON-NLS-&lt;n&gt;$). 
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.nonExternalizedStringLiteral&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;ignore&quot;
         *  
         *  COMPILER / Reporting Usage of 'assert' Identifier
         *     When enabled, the compiler will issue an error or a warning whenever 'assert' is 
         *     used as an identifier (reserved keyword in 1.4)
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.assertIdentifier&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.assertIdentifier&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;ignore&quot;
         *  
@@ -2305,14 +2329,14 @@ public class JavaCore {
         *     When enabled, the compiler will issue an error or a warning whenever a static field
         *     or method is accessed with an expression receiver. A reference to a static member should
         *     be qualified with a type name.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.staticAccessReceiver&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.staticAccessReceiver&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;warning&quot;
         *  
         *  COMPILER / Reporting Assignment with no Effect
         *     When enabled, the compiler will issue an error or a warning whenever an assignment
         *     has no effect (e.g 'x = x').
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.noEffectAssignment&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.noEffectAssignment&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;warning&quot;
         *  
@@ -2323,14 +2347,14 @@ public class JavaCore {
         *       interface I { 
         *          int clone();
         *       } 
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;warning&quot;
         *  
         *  COMPILER / Reporting Usage of char[] Expressions in String Concatenations
         *     When enabled, the compiler will issue an error or a warning whenever a char[] expression
         *     is used in String concatenations (for example, &quot;hello&quot; + new char[]{'w','o','r','l','d'}).
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.problem.noImplicitStringConversion&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;, &quot;ignore&quot; }
         *      - default:           &quot;warning&quot;
         * 
@@ -2338,20 +2362,20 @@ public class JavaCore {
         *     Specify whether source is 1.3 or 1.4 compatible. From 1.4 on, 'assert' is a keyword
         *     reserved for assertion support. Also note, than when toggling to 1.4 mode, the target VM
         *    level should be set to &quot;1.4&quot; and the compliance mode should be &quot;1.4&quot;.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.source&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.source&quot;
         *      - possible values:   { &quot;1.3&quot;, &quot;1.4&quot; }
         *      - default:           &quot;1.3&quot;
         *  
         *  COMPILER / Setting Compliance Level
         *     Select the compliance level for the compiler. In &quot;1.3&quot; mode, source and target settings
         *     should not go beyond &quot;1.3&quot; level.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.compliance&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.compliance&quot;
         *      - possible values:   { &quot;1.3&quot;, &quot;1.4&quot; }
         *      - default:           &quot;1.3&quot;
         *  
         *  COMPILER / Maximum number of problems reported per compilation unit
         *     Specify the maximum number of problems reported on each compilation unit.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.maxProblemPerUnit&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.maxProblemPerUnit&quot;
         *      - possible values:      &quot;&lt;n&gt;&quot; where &lt;n&gt; is zero or a positive integer (if zero then all problems are reported).
         *      - default:           &quot;100&quot;
         *  
@@ -2360,7 +2384,7 @@ public class JavaCore {
         *     one of the corresponding tag inside any comment in Java source code.
         *     Generated task messages will include the tag, and range until the next line separator or comment ending.
         *     Note that tasks messages are trimmed.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.taskTags&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.taskTags&quot;
         *      - possible values:   { &quot;&lt;tag&gt;[,&lt;tag&gt;]*&quot; } where &lt;tag&gt; is a String without any wild-card or leading/trailing spaces 
         *      - default:           &quot;&quot;
         *  
@@ -2368,34 +2392,34 @@ public class JavaCore {
         *     In parallel with the Automatic Task Tags, this list defines the priorities (high, normal or low)
         *     of the task markers issued by the compiler.
         *     If the default is specified, the priority of each task marker is &quot;NORMAL&quot;.
-        *      - option id:         &quot;org.eclipse.jdt.core.compiler.taskPriorities&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.compiler.taskPriorities&quot;
         *      - possible values:   { &quot;&lt;priority&gt;[,&lt;priority&gt;]*&quot; } where &lt;priority&gt; is one of &quot;HIGH&quot;, &quot;NORMAL&quot; or &quot;LOW&quot;
         *      - default:           &quot;&quot;
         * 
         *  BUILDER / Specifying Filters for Resource Copying Control
         *     Allow to specify some filters to control the resource copy process.
-        *      - option id:         &quot;org.eclipse.jdt.core.builder.resourceCopyExclusionFilter&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.builder.resourceCopyExclusionFilter&quot;
         *      - possible values:   { &quot;&lt;name&gt;[,&lt;name&gt;]* } where &lt;name&gt; is a file name pattern (* and ? wild-cards allowed)
         *        or the name of a folder which ends with '/'
         *      - default:           &quot;&quot;
         *  
         *  BUILDER / Abort if Invalid Classpath
         *     Allow to toggle the builder to abort if the classpath is invalid
-        *      - option id:         &quot;org.eclipse.jdt.core.builder.invalidClasspath&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.builder.invalidClasspath&quot;
         *      - possible values:   { &quot;abort&quot;, &quot;ignore&quot; }
         *      - default:           &quot;abort&quot;
         *  
         *  BUILDER / Cleaning Output Folder(s)
         *     Indicate whether the JavaBuilder is allowed to clean the output folders
         *     when performing full build operations.
-        *      - option id:         &quot;org.eclipse.jdt.core.builder.cleanOutputFolder&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.builder.cleanOutputFolder&quot;
         *      - possible values:   { &quot;clean&quot;, &quot;ignore&quot; }
         *      - default:           &quot;clean&quot;
         *  
         *  BUILDER / Reporting Duplicate Resources
         *     Indicate the severity of the problem reported when more than one occurrence
         *     of a resource is to be copied into the output location.
-        *      - option id:         &quot;org.eclipse.jdt.core.builder.duplicateResourceTask&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.builder.duplicateResourceTask&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot; }
         *      - default:           &quot;warning&quot;
         *  
@@ -2403,61 +2427,61 @@ public class JavaCore {
         *     Indicate whether JavaCore should enforce the project build order to be based on
         *     the classpath prerequisite chain. When requesting to compute, this takes over
         *     the platform default order (based on project references).
-        *      - option id:         &quot;org.eclipse.jdt.core.computeJavaBuildOrder&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.computeJavaBuildOrder&quot;
         *      - possible values:   { &quot;compute&quot;, &quot;ignore&quot; }
         *      - default:           &quot;ignore&quot;  
         *  
         *  JAVACORE / Specify Default Source Encoding Format
         *     Get the encoding format for compiled sources. This setting is read-only, it is equivalent
         *     to 'ResourcesPlugin.getEncoding()'.
-        *      - option id:         &quot;org.eclipse.jdt.core.encoding&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.encoding&quot;
         *      - possible values:   { any of the supported encoding name}.
         *      - default:           &lt;platform default&gt;
         *  
         *  JAVACORE / Reporting Incomplete Classpath
         *     Indicate the severity of the problem reported when an entry on the classpath does not exist, 
         *     is not legite or is not visible (for example, a referenced project is closed).
-        *      - option id:         &quot;org.eclipse.jdt.core.incompleteClasspath&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.incompleteClasspath&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot;}
         *      - default:           &quot;error&quot;
         *  
         *  JAVACORE / Reporting Classpath Cycle
         *     Indicate the severity of the problem reported when a project is involved in a cycle.
-        *      - option id:         &quot;org.eclipse.jdt.core.circularClasspath&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.circularClasspath&quot;
         *      - possible values:   { &quot;error&quot;, &quot;warning&quot; }
         *      - default:           &quot;error&quot;
         *  
         *  JAVACORE / Enabling Usage of Classpath Exclusion Patterns
         *     When disabled, no entry on a project classpath can be associated with
         *     an exclusion pattern.
-        *      - option id:         &quot;org.eclipse.jdt.core.classpath.exclusionPatterns&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.classpath.exclusionPatterns&quot;
         *      - possible values:   { &quot;enabled&quot;, &quot;disabled&quot; }
         *      - default:           &quot;enabled&quot;
         *  
         *  JAVACORE / Enabling Usage of Classpath Multiple Output Locations
         *     When disabled, no entry on a project classpath can be associated with
         *     a specific output location, preventing thus usage of multiple output locations.
-        *      - option id:         &quot;org.eclipse.jdt.core.classpath.multipleOutputLocations&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.classpath.multipleOutputLocations&quot;
         *      - possible values:   { &quot;enabled&quot;, &quot;disabled&quot; }
         *      - default:           &quot;enabled&quot;
         *  
         *      FORMATTER / Inserting New Line Before Opening Brace
         *     When Insert, a new line is inserted before an opening brace, otherwise nothing
         *     is inserted
-        *      - option id:         &quot;org.eclipse.jdt.core.formatter.newline.openingBrace&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.formatter.newline.openingBrace&quot;
         *      - possible values:   { &quot;insert&quot;, &quot;do not insert&quot; }
         *      - default:           &quot;do not insert&quot;
         *  
         *      FORMATTER / Inserting New Line Inside Control Statement
         *     When Insert, a new line is inserted between } and following else, catch, finally
-        *      - option id:         &quot;org.eclipse.jdt.core.formatter.newline.controlStatement&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.formatter.newline.controlStatement&quot;
         *      - possible values:   { &quot;insert&quot;, &quot;do not insert&quot; }
         *      - default:           &quot;do not insert&quot;
         *  
         *      FORMATTER / Clearing Blank Lines
         *     When Clear all, all blank lines are removed. When Preserve one, only one is kept
         *     and all others removed.
-        *      - option id:         &quot;org.eclipse.jdt.core.formatter.newline.clearAll&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.formatter.newline.clearAll&quot;
         *      - possible values:   { &quot;clear all&quot;, &quot;preserve one&quot; }
         *      - default:           &quot;preserve one&quot;
         *  
@@ -2465,117 +2489,117 @@ public class JavaCore {
         *     When Insert, a blank line is inserted between an else and an if when they are 
         *     contiguous. When choosing to not insert, else-if will be kept on the same
         *     line when possible.
-        *      - option id:         &quot;org.eclipse.jdt.core.formatter.newline.elseIf&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.formatter.newline.elseIf&quot;
         *      - possible values:   { &quot;insert&quot;, &quot;do not insert&quot; }
         *      - default:           &quot;do not insert&quot;
         *  
         *      FORMATTER / Inserting New Line In Empty Block
         *     When insert, a line break is inserted between contiguous { and }, if } is not followed
         *     by a keyword.
-        *      - option id:         &quot;org.eclipse.jdt.core.formatter.newline.emptyBlock&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.formatter.newline.emptyBlock&quot;
         *      - possible values:   { &quot;insert&quot;, &quot;do not insert&quot; }
         *      - default:           &quot;insert&quot;
         *  
         *      FORMATTER / Splitting Lines Exceeding Length
         *     Enable splitting of long lines (exceeding the configurable length). Length of 0 will
         *     disable line splitting
-        *      - option id:         &quot;org.eclipse.jdt.core.formatter.lineSplit&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.formatter.lineSplit&quot;
         *      - possible values:      &quot;&lt;n&gt;&quot;, where n is zero or a positive integer
         *      - default:           &quot;80&quot;
         *  
         *      FORMATTER / Compacting Assignment
         *     Assignments can be formatted asymmetrically, for example 'int x= 2;', when Normal, a space
         *     is inserted before the assignment operator
-        *      - option id:         &quot;org.eclipse.jdt.core.formatter.style.assignment&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.formatter.style.assignment&quot;
         *      - possible values:   { &quot;compact&quot;, &quot;normal&quot; }
         *      - default:           &quot;normal&quot;
         *  
         *      FORMATTER / Defining Indentation Character
         *     Either choose to indent with tab characters or spaces
-        *      - option id:         &quot;org.eclipse.jdt.core.formatter.tabulation.char&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.formatter.tabulation.char&quot;
         *      - possible values:   { &quot;tab&quot;, &quot;space&quot; }
         *      - default:           &quot;tab&quot;
         *  
         *      FORMATTER / Defining Space Indentation Length
         *     When using spaces, set the amount of space characters to use for each 
         *     indentation mark.
-        *      - option id:         &quot;org.eclipse.jdt.core.formatter.tabulation.size&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.formatter.tabulation.size&quot;
         *      - possible values:      &quot;&lt;n&gt;&quot;, where n is a positive integer
         *      - default:           &quot;4&quot;
         *  
         *      FORMATTER / Inserting space in cast expression
         *     When Insert, a space is added between the type and the expression in a cast expression.
-        *      - option id:         &quot;org.eclipse.jdt.core.formatter.space.castexpression&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.formatter.space.castexpression&quot;
         *      - possible values:   { &quot;insert&quot;, &quot;do not insert&quot; }
         *      - default:           &quot;insert&quot;
         *  
         *      CODEASSIST / Activate Visibility Sensitive Completion
         *     When active, completion doesn't show that you can not see
         *     (for example, you can not see private methods of a super class).
-        *      - option id:         &quot;org.eclipse.jdt.core.codeComplete.visibilityCheck&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.codeComplete.visibilityCheck&quot;
         *      - possible values:   { &quot;enabled&quot;, &quot;disabled&quot; }
         *      - default:           &quot;disabled&quot;
         *  
         *      CODEASSIST / Automatic Qualification of Implicit Members
         *     When active, completion automatically qualifies completion on implicit
         *     field references and message expressions.
-        *      - option id:         &quot;org.eclipse.jdt.core.codeComplete.forceImplicitQualification&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.codeComplete.forceImplicitQualification&quot;
         *      - possible values:   { &quot;enabled&quot;, &quot;disabled&quot; }
         *      - default:           &quot;disabled&quot;
         *  
         *   CODEASSIST / Define the Prefixes for Field Name
         *     When the prefixes is non empty, completion for field name will begin with
         *     one of the proposed prefixes.
-        *      - option id:         &quot;org.eclipse.jdt.core.codeComplete.fieldPrefixes&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.codeComplete.fieldPrefixes&quot;
         *      - possible values:   { &quot;&lt;prefix&gt;[,&lt;prefix&gt;]*&quot; } where &lt;prefix&gt; is a String without any wild-card 
         *      - default:           &quot;&quot;
         *  
         *   CODEASSIST / Define the Prefixes for Static Field Name
         *     When the prefixes is non empty, completion for static field name will begin with
         *     one of the proposed prefixes.
-        *      - option id:         &quot;org.eclipse.jdt.core.codeComplete.staticFieldPrefixes&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.codeComplete.staticFieldPrefixes&quot;
         *      - possible values:   { &quot;&lt;prefix&gt;[,&lt;prefix&gt;]*&quot; } where &lt;prefix&gt; is a String without any wild-card 
         *      - default:           &quot;&quot;
         *  
         *   CODEASSIST / Define the Prefixes for Local Variable Name
         *     When the prefixes is non empty, completion for local variable name will begin with
         *     one of the proposed prefixes.
-        *      - option id:         &quot;org.eclipse.jdt.core.codeComplete.localPrefixes&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.codeComplete.localPrefixes&quot;
         *      - possible values:   { &quot;&lt;prefix&gt;[,&lt;prefix&gt;]*&quot; } where &lt;prefix&gt; is a String without any wild-card 
         *      - default:           &quot;&quot;
         *  
         *   CODEASSIST / Define the Prefixes for Argument Name
         *     When the prefixes is non empty, completion for argument name will begin with
         *     one of the proposed prefixes.
-        *      - option id:         &quot;org.eclipse.jdt.core.codeComplete.argumentPrefixes&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.codeComplete.argumentPrefixes&quot;
         *      - possible values:   { &quot;&lt;prefix&gt;[,&lt;prefix&gt;]*&quot; } where &lt;prefix&gt; is a String without any wild-card 
         *      - default:           &quot;&quot;
         *  
         *   CODEASSIST / Define the Suffixes for Field Name
         *     When the suffixes is non empty, completion for field name will end with
         *     one of the proposed suffixes.
-        *      - option id:         &quot;org.eclipse.jdt.core.codeComplete.fieldSuffixes&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.codeComplete.fieldSuffixes&quot;
         *      - possible values:   { &quot;&lt;suffix&gt;[,&lt;suffix&gt;]*&quot; } where &lt;suffix&gt; is a String without any wild-card 
         *      - default:           &quot;&quot;
         *  
         *   CODEASSIST / Define the Suffixes for Static Field Name
         *     When the suffixes is non empty, completion for static field name will end with
         *     one of the proposed suffixes.
-        *      - option id:         &quot;org.eclipse.jdt.core.codeComplete.staticFieldSuffixes&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.codeComplete.staticFieldSuffixes&quot;
         *      - possible values:   { &quot;&lt;suffix&gt;[,&lt;suffix&gt;]*&quot; } where &lt;suffix&gt; is a String without any wild-card 
         *      - default:           &quot;&quot;
         *  
         *   CODEASSIST / Define the Suffixes for Local Variable Name
         *     When the suffixes is non empty, completion for local variable name will end with
         *     one of the proposed suffixes.
-        *      - option id:         &quot;org.eclipse.jdt.core.codeComplete.localSuffixes&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.codeComplete.localSuffixes&quot;
         *      - possible values:   { &quot;&lt;suffix&gt;[,&lt;suffix&gt;]*&quot; } where &lt;suffix&gt; is a String without any wild-card 
         *      - default:           &quot;&quot;
         *  
         *   CODEASSIST / Define the Suffixes for Argument Name
         *     When the suffixes is non empty, completion for argument name will end with
         *     one of the proposed suffixes.
-        *      - option id:         &quot;org.eclipse.jdt.core.codeComplete.argumentSuffixes&quot;
+        *      - option id:         &quot;net.sourceforge.phpdt.core.codeComplete.argumentSuffixes&quot;
         *      - possible values:   { &quot;&lt;suffix&gt;[,&lt;suffix&gt;]*&quot; } where &lt;prefix&gt; is a String without any wild-card 
         *      - default:           &quot;&quot;
         *  &lt;/pre&gt;
@@ -3221,13 +3245,13 @@ public class JavaCore {
         * <p>
         * A container is exclusively resolved by a
         * <code>ClasspathContainerInitializer</code> registered onto the
-        * extension point "org.eclipse.jdt.core.classpathContainerInitializer".
+        * extension point "net.sourceforge.phpdt.core.classpathContainerInitializer".
         * <p>
         * A container path must be formed of at least one segment, where:
         * <ul>
         * <li>the first segment is a unique ID identifying the target container,
         * there must be a container initializer registered onto this ID through the
-        * extension point "org.eclipse.jdt.core.classpathContainerInitializer".
+        * extension point "net.sourceforge.phpdt.core.classpathContainerInitializer".
         * </li>
         * <li>the remaining segments will be passed onto the initializer, and can
         * be used as additional hints during the initialization phase.</li>
@@ -3239,7 +3263,7 @@ public class JavaCore {
         * containerEntry = JavaCore.newContainerEntry(new
         * Path("MyProvidedJDK/default"));
         * 
-        * <extension point="org.eclipse.jdt.core.classpathContainerInitializer">
+        * <extension point="net.sourceforge.phpdt.core.classpathContainerInitializer">
         * <containerInitializer id="MyProvidedJDK"
         * class="com.example.MyInitializer"/>
         * <p>
@@ -3279,13 +3303,13 @@ public class JavaCore {
    * <p>
    * A container is exclusively resolved by a
    * <code>ClasspathContainerInitializer</code> registered onto the
-   * extension point "org.eclipse.jdt.core.classpathContainerInitializer".
+   * extension point "net.sourceforge.phpdt.core.classpathContainerInitializer".
    * <p>
    * A container path must be formed of at least one segment, where:
    * <ul>
    * <li>the first segment is a unique ID identifying the target container,
    * there must be a container initializer registered onto this ID through the
-   * extension point "org.eclipse.jdt.core.classpathContainerInitializer".
+   * extension point "net.sourceforge.phpdt.core.classpathContainerInitializer".
    * </li>
    * <li>the remaining segments will be passed onto the initializer, and can
    * be used as additional hints during the initialization phase.</li>
@@ -3297,7 +3321,7 @@ public class JavaCore {
    * containerEntry = JavaCore.newContainerEntry(new
    * Path("MyProvidedJDK/default"));
    * 
-   * <extension point="org.eclipse.jdt.core.classpathContainerInitializer">
+   * <extension point="net.sourceforge.phpdt.core.classpathContainerInitializer">
    * <containerInitializer id="MyProvidedJDK"
    * class="com.example.MyInitializer"/>
    * <p>
@@ -3319,22 +3343,26 @@ public class JavaCore {
    * @see JavaCore#newContainerEntry(IPath, boolean)
    * @since 2.0
    */
-  public static IClasspathEntry newContainerEntry(IPath containerPath,
-      boolean isExported) {
-
-    if (containerPath == null || containerPath.segmentCount() < 1) {
-      Assert
-          .isTrue(
-              false,
-              "Illegal classpath container path: \'" + containerPath.makeRelative().toString() + "\', must have at least one segment (containerID+hints)"); //$NON-NLS-1$//$NON-NLS-2$
-    }
-    return new ClasspathEntry(IPackageFragmentRoot.K_SOURCE,
-        IClasspathEntry.CPE_CONTAINER, containerPath,
-        ClasspathEntry.NO_EXCLUSION_PATTERNS, null, // source attachment
-        null, // source attachment root
-        null, // specific output folder
-        isExported);
-  }
+       
+       public static IClasspathEntry newContainerEntry(IPath containerPath, boolean isExported) {
+               
+       if (containerPath == null) Assert.isTrue(false, "Container path cannot be null"); //$NON-NLS-1$
+       if (containerPath.segmentCount() < 1) {
+               Assert.isTrue(
+                       false,
+                       "Illegal classpath container path: \'" + containerPath.makeRelative().toString() + "\', must have at least one segment (containerID+hints)"); //$NON-NLS-1$//$NON-NLS-2$
+       }
+       return new ClasspathEntry(
+               IPackageFragmentRoot.K_SOURCE,
+               IClasspathEntry.CPE_CONTAINER,
+               containerPath,
+               ClasspathEntry.INCLUDE_ALL,
+               ClasspathEntry.EXCLUDE_NONE, 
+               null, // source attachment
+               null, // source attachment root
+               null, // specific output folder
+               isExported);
+}
 
   /**
    * Creates and returns a new non-exported classpath entry of kind
@@ -3498,17 +3526,21 @@ public class JavaCore {
    * @since 2.0
    */
   public static IClasspathEntry newProjectEntry(IPath path, boolean isExported) {
-
-    if (!path.isAbsolute())
-      Assert.isTrue(false, "Path for IClasspathEntry must be absolute"); //$NON-NLS-1$
-
-    return new ClasspathEntry(IPackageFragmentRoot.K_SOURCE,
-        IClasspathEntry.CPE_PROJECT, path,
-        ClasspathEntry.NO_EXCLUSION_PATTERNS, null, // source attachment
-        null, // source attachment root
-        null, // specific output folder
-        isExported);
-  }
+       
+       if (!path.isAbsolute()) Assert.isTrue(false, "Path for IClasspathEntry must be absolute"); //$NON-NLS-1$
+       
+       return new ClasspathEntry(
+               IPackageFragmentRoot.K_SOURCE,
+               IClasspathEntry.CPE_PROJECT,
+               path,
+               ClasspathEntry.INCLUDE_ALL, 
+               ClasspathEntry.EXCLUDE_NONE, 
+               null, // source attachment
+               null, // source attachment root
+               null, // specific output folder
+               isExported);
+}
+  
 
   /**
    * Returns a new empty region.
@@ -3520,184 +3552,164 @@ public class JavaCore {
   }
 
   /**
-   * Creates and returns a new classpath entry of kind <code>CPE_SOURCE</code>
-   * for the project's source folder identified by the given absolute
-   * workspace-relative path. This specifies that all package fragments within
-   * the root will have children of type <code>ICompilationUnit</code>.
-   * <p>
-   * The source folder is referred to using an absolute path relative to the
-   * workspace root, e.g. <code>/Project/src</code>. A project's source
-   * folders are located with that project. That is, a source classpath entry
-   * specifying the path <code>/P1/src</code> is only usable for project
-   * <code>P1</code>.
-   * </p>
-   * <p>
-   * The source classpath entry created by this method includes all source
-   * files below the given workspace-relative path. To selectively exclude
-   * some of these source files, use the factory method
-   * <code>JavaCore.newSourceEntry(IPath,IPath[])</code> instead.
-   * </p>
-   * <p>
-   * Note that all sources/binaries inside a project are contributed as a
-   * whole through a project entry (see <code>JavaCore.newProjectEntry</code>).
-   * Particular source entries cannot be selectively exported.
-   * </p>
-   * 
-   * @param path
-   *            the absolute workspace-relative path of a source folder
-   * @return a new source classpath entry with not exclusion patterns
-   * 
-   * @see #newSourceEntry(org.eclipse.core.runtime.IPath,org.eclipse.core.runtime.IPath[])
-   */
-  public static IClasspathEntry newSourceEntry(IPath path) {
+        * Creates and returns a new classpath entry of kind <code>CPE_SOURCE</code>
+        * for all files in the project's source folder identified by the given
+        * absolute workspace-relative path.
+        * <p>
+        * The convenience method is fully equivalent to:
+        * <pre>
+        * newSourceEntry(path, new IPath[] {}, new IPath[] {}, null);
+        * </pre>
+        * </p>
+        * 
+        * @param path the absolute workspace-relative path of a source folder
+        * @return a new source classpath entry
+        * @see #newSourceEntry(IPath, IPath[], IPath[], IPath)
+        */
+       public static IClasspathEntry newSourceEntry(IPath path) {
 
-    return newSourceEntry(path, ClasspathEntry.NO_EXCLUSION_PATTERNS, null /*
-     * output
-     * location
-     */);
-  }
+               return newSourceEntry(path, ClasspathEntry.INCLUDE_ALL, ClasspathEntry.EXCLUDE_NONE, null /*output location*/);
+       }
+       
+       /**
+        * Creates and returns a new classpath entry of kind <code>CPE_SOURCE</code>
+        * for the project's source folder identified by the given absolute 
+        * workspace-relative path but excluding all source files with paths
+        * matching any of the given patterns.
+        * <p>
+        * The convenience method is fully equivalent to:
+        * <pre>
+        * newSourceEntry(path, new IPath[] {}, exclusionPatterns, null);
+        * </pre>
+        * </p>
+        *
+        * @param path the absolute workspace-relative path of a source folder
+        * @param exclusionPatterns the possibly empty list of exclusion patterns
+        *    represented as relative paths
+        * @return a new source classpath entry
+        * @see #newSourceEntry(IPath, IPath[], IPath[], IPath)
+        * @since 2.1
+        */
+       public static IClasspathEntry newSourceEntry(IPath path, IPath[] exclusionPatterns) {
 
-  /**
-   * Creates and returns a new classpath entry of kind <code>CPE_SOURCE</code>
-   * for the project's source folder identified by the given absolute
-   * workspace-relative path but excluding all source files with paths
-   * matching any of the given patterns. This specifies that all package
-   * fragments within the root will have children of type
-   * <code>ICompilationUnit</code>.
-   * <p>
-   * The source folder is referred to using an absolute path relative to the
-   * workspace root, e.g. <code>/Project/src</code>. A project's source
-   * folders are located with that project. That is, a source classpath entry
-   * specifying the path <code>/P1/src</code> is only usable for project
-   * <code>P1</code>.
-   * </p>
-   * <p>
-   * The source classpath entry created by this method includes all source
-   * files below the given workspace-relative path except for those matched by
-   * one (or more) of the given exclusion patterns. Each exclusion pattern is
-   * represented by a relative path, which is interpreted as relative to the
-   * source folder. For example, if the source folder path is
-   * <code>/Project/src</code> and the exclusion pattern is
-   * <code>com/xyz/tests/&#42;&#42;</code>, then source files like
-   * <code>/Project/src/com/xyz/Foo.java</code> and
-   * <code>/Project/src/com/xyz/utils/Bar.java</code> would be included,
-   * whereas <code>/Project/src/com/xyz/tests/T1.java</code> and
-   * <code>/Project/src/com/xyz/tests/quick/T2.java</code> would be
-   * excluded. Exclusion patterns can contain can contain '**', '*' or '?'
-   * wildcards; see <code>IClasspathEntry.getExclusionPatterns</code> for
-   * the full description of the syntax and semantics of exclusion patterns.
-   * </p>
-   * If the empty list of exclusion patterns is specified, the source folder
-   * will automatically include all resources located inside the source
-   * folder. In that case, the result is entirely equivalent to using the
-   * factory method <code>JavaCore.newSourceEntry(IPath)</code>.
-   * </p>
-   * <p>
-   * Note that all sources/binaries inside a project are contributed as a
-   * whole through a project entry (see <code>JavaCore.newProjectEntry</code>).
-   * Particular source entries cannot be selectively exported.
-   * </p>
-   * 
-   * @param path
-   *            the absolute workspace-relative path of a source folder
-   * @param exclusionPatterns
-   *            the possibly empty list of exclusion patterns represented as
-   *            relative paths
-   * @return a new source classpath entry with the given exclusion patterns
-   * @see #newSourceEntry(org.eclipse.core.runtime.IPath)
-   * @see IClasspathEntry#getExclusionPatterns
-   * 
-   * @since 2.1
-   */
-  public static IClasspathEntry newSourceEntry(IPath path,
-      IPath[] exclusionPatterns) {
+               return newSourceEntry(path, ClasspathEntry.INCLUDE_ALL, exclusionPatterns, null /*output location*/); 
+       }
 
-    return newSourceEntry(path, exclusionPatterns, null /* output location */);
-  }
+       /**
+        * Creates and returns a new classpath entry of kind <code>CPE_SOURCE</code>
+        * for the project's source folder identified by the given absolute 
+        * workspace-relative path but excluding all source files with paths
+        * matching any of the given patterns, and associated with a specific output location
+        * (that is, ".class" files are not going to the project default output location). 
+        * <p>
+        * The convenience method is fully equivalent to:
+        * <pre>
+        * newSourceEntry(path, new IPath[] {}, exclusionPatterns, specificOutputLocation);
+        * </pre>
+        * </p>
+        *
+        * @param path the absolute workspace-relative path of a source folder
+        * @param exclusionPatterns the possibly empty list of exclusion patterns
+        *    represented as relative paths
+        * @param specificOutputLocation the specific output location for this source entry (<code>null</code> if using project default ouput location)
+        * @return a new source classpath entry
+        * @see #newSourceEntry(IPath, IPath[], IPath[], IPath)
+        * @since 2.1
+        */
+       public static IClasspathEntry newSourceEntry(IPath path, IPath[] exclusionPatterns, IPath specificOutputLocation) {
 
-  /**
-   * Creates and returns a new classpath entry of kind <code>CPE_SOURCE</code>
-   * for the project's source folder identified by the given absolute
-   * workspace-relative path but excluding all source files with paths
-   * matching any of the given patterns, and associated with a specific output
-   * location (that is, ".class" files are not going to the project default
-   * output location). All package fragments within the root will have
-   * children of type <code>ICompilationUnit</code>.
-   * <p>
-   * The source folder is referred to using an absolute path relative to the
-   * workspace root, e.g. <code>/Project/src</code>. A project's source
-   * folders are located with that project. That is, a source classpath entry
-   * specifying the path <code>/P1/src</code> is only usable for project
-   * <code>P1</code>.
-   * </p>
-   * <p>
-   * The source classpath entry created by this method includes all source
-   * files below the given workspace-relative path except for those matched by
-   * one (or more) of the given exclusion patterns. Each exclusion pattern is
-   * represented by a relative path, which is interpreted as relative to the
-   * source folder. For example, if the source folder path is
-   * <code>/Project/src</code> and the exclusion pattern is
-   * <code>com/xyz/tests/&#42;&#42;</code>, then source files like
-   * <code>/Project/src/com/xyz/Foo.java</code> and
-   * <code>/Project/src/com/xyz/utils/Bar.java</code> would be included,
-   * whereas <code>/Project/src/com/xyz/tests/T1.java</code> and
-   * <code>/Project/src/com/xyz/tests/quick/T2.java</code> would be
-   * excluded. Exclusion patterns can contain can contain '**', '*' or '?'
-   * wildcards; see <code>IClasspathEntry.getExclusionPatterns</code> for
-   * the full description of the syntax and semantics of exclusion patterns.
-   * </p>
-   * If the empty list of exclusion patterns is specified, the source folder
-   * will automatically include all resources located inside the source
-   * folder. In that case, the result is entirely equivalent to using the
-   * factory method <code>JavaCore.newSourceEntry(IPath)</code>.
-   * </p>
-   * <p>
-   * Additionally, a source entry can be associated with a specific output
-   * location. By doing so, the Java builder will ensure that the generated
-   * ".class" files will be issued inside this output location, as opposed to
-   * be generated into the project default output location (when output
-   * location is <code>null</code>). Note that multiple source entries may
-   * target the same output location. The output location is referred to using
-   * an absolute path relative to the workspace root, e.g.
-   * <code>"/Project/bin"</code>, it must be located inside the same
-   * project as the source folder.
-   * </p>
-   * <p>
-   * Also note that all sources/binaries inside a project are contributed as a
-   * whole through a project entry (see <code>JavaCore.newProjectEntry</code>).
-   * Particular source entries cannot be selectively exported.
-   * </p>
-   * 
-   * @param path
-   *            the absolute workspace-relative path of a source folder
-   * @param exclusionPatterns
-   *            the possibly empty list of exclusion patterns represented as
-   *            relative paths
-   * @param outputLocation
-   *            the specific output location for this source entry (
-   *            <code>null</code> if using project default ouput location)
-   * @return a new source classpath entry with the given exclusion patterns
-   * @see #newSourceEntry(org.eclipse.core.runtime.IPath)
-   * @see IClasspathEntry#getExclusionPatterns
-   * @see IClasspathEntry#getOutputLocation()
-   * 
-   * @since 2.1
-   */
-  public static IClasspathEntry newSourceEntry(IPath path,
-      IPath[] exclusionPatterns, IPath specificOutputLocation) {
-
-    if (!path.isAbsolute())
-      Assert.isTrue(false, "Path for IClasspathEntry must be absolute"); //$NON-NLS-1$
-    if (exclusionPatterns == null)
-      Assert.isTrue(false, "Exclusion pattern set cannot be null"); //$NON-NLS-1$
-
-    return new ClasspathEntry(IPackageFragmentRoot.K_SOURCE,
-        IClasspathEntry.CPE_SOURCE, path, exclusionPatterns, null, // source
-        // attachment
-        null, // source attachment root
-        specificOutputLocation, // custom output location
-        false);
-  }
+           return newSourceEntry(path, ClasspathEntry.INCLUDE_ALL, exclusionPatterns, specificOutputLocation);
+       }
+               
+       /**
+        * Creates and returns a new classpath entry of kind <code>CPE_SOURCE</code>
+        * for the project's source folder identified by the given absolute 
+        * workspace-relative path using the given inclusion and exclusion patterns
+        * to determine which source files are included, and the given output path
+        * to control the output location of generated files.
+        * <p>
+        * The source folder is referred to using an absolute path relative to the
+        * workspace root, e.g. <code>/Project/src</code>. A project's source 
+        * folders are located with that project. That is, a source classpath
+        * entry specifying the path <code>/P1/src</code> is only usable for
+        * project <code>P1</code>.
+        * </p>
+        * <p>
+        * The inclusion patterns determines the initial set of source files that
+        * are to be included; the exclusion patterns are then used to reduce this
+        * set. When no inclusion patterns are specified, the initial file set
+        * includes all relevent files in the resource tree rooted at the source
+        * entry's path. On the other hand, specifying one or more inclusion
+        * patterns means that all <b>and only</b> files matching at least one of
+        * the specified patterns are to be included. If exclusion patterns are 
+        * specified, the initial set of files is then reduced by eliminating files
+        * matched by at least one of the exclusion patterns. Inclusion and
+        * exclusion patterns look like relative file paths with wildcards and are
+        * interpreted relative to the source entry's path. File patterns are 
+        * case-sensitive can contain '**', '*' or '?' wildcards (see
+        * {@link IClasspathEntry#getExclusionPatterns()} for the full description
+        * of their syntax and semantics). The resulting set of files are included
+        * in the corresponding package fragment root; all package fragments within
+        * the root will have children of type <code>ICompilationUnit</code>.
+        * </p>
+        * <p>
+        * For example, if the source folder path is 
+        * <code>/Project/src</code>, there are no inclusion filters, and the
+        * exclusion pattern is 
+        * <code>com/xyz/tests/&#42;&#42;</code>, then source files
+        * like <code>/Project/src/com/xyz/Foo.java</code>
+        * and <code>/Project/src/com/xyz/utils/Bar.java</code> would be included,
+        * whereas <code>/Project/src/com/xyz/tests/T1.java</code>
+        * and <code>/Project/src/com/xyz/tests/quick/T2.java</code> would be
+        * excluded. 
+        * </p>
+        * <p>
+        * Additionally, a source entry can be associated with a specific output location. 
+        * By doing so, the Java builder will ensure that the generated ".class" files will 
+        * be issued inside this output location, as opposed to be generated into the 
+        * project default output location (when output location is <code>null</code>). 
+        * Note that multiple source entries may target the same output location.
+        * The output location is referred to using an absolute path relative to the 
+        * workspace root, e.g. <code>"/Project/bin"</code>, it must be located inside 
+        * the same project as the source folder.
+        * </p>
+        * <p>
+        * Also note that all sources/binaries inside a project are contributed as
+        * a whole through a project entry
+        * (see <code>JavaCore.newProjectEntry</code>). Particular source entries
+        * cannot be selectively exported.
+        * </p>
+        *
+        * @param path the absolute workspace-relative path of a source folder
+        * @param inclusionPatterns the possibly empty list of inclusion patterns
+        *    represented as relative paths
+        * @param exclusionPatterns the possibly empty list of exclusion patterns
+        *    represented as relative paths
+        * @param specificOutputLocation the specific output location for this source entry (<code>null</code> if using project default ouput location)
+        * @return a new source classpath entry with the given exclusion patterns
+        * @see IClasspathEntry#getInclusionPatterns()
+        * @see IClasspathEntry#getExclusionPatterns()
+        * @see IClasspathEntry#getOutputLocation()
+        * @since 3.0
+        */
+       public static IClasspathEntry newSourceEntry(IPath path, IPath[] inclusionPatterns, IPath[] exclusionPatterns, IPath specificOutputLocation) {
+
+               if (path == null) Assert.isTrue(false, "Source path cannot be null"); //$NON-NLS-1$
+               if (!path.isAbsolute()) Assert.isTrue(false, "Path for IClasspathEntry must be absolute"); //$NON-NLS-1$
+               if (exclusionPatterns == null) Assert.isTrue(false, "Exclusion pattern set cannot be null"); //$NON-NLS-1$
+               if (inclusionPatterns == null) Assert.isTrue(false, "Inclusion pattern set cannot be null"); //$NON-NLS-1$
+
+               return new ClasspathEntry(
+                       IPackageFragmentRoot.K_SOURCE,
+                       IClasspathEntry.CPE_SOURCE,
+                       path,
+                       inclusionPatterns,
+                       exclusionPatterns,
+                       null, // source attachment
+                       null, // source attachment root
+                       specificOutputLocation, // custom output location
+                       false);
+       }
 
   /**
    * Creates and returns a new non-exported classpath entry of kind
@@ -3712,7 +3724,7 @@ public class JavaCore {
    * It is possible to register an automatic initializer (
    * <code>ClasspathVariableInitializer</code>), which will be invoked
    * through the extension point
-   * "org.eclipse.jdt.core.classpathVariableInitializer". After resolution, a
+   * "net.sourceforge.phpdt.core.classpathVariableInitializer". After resolution, a
    * classpath variable entry may either correspond to a project or a library
    * entry.</li>
    * <p>
@@ -3773,7 +3785,7 @@ public class JavaCore {
    * It is possible to register an automatic initializer (
    * <code>ClasspathVariableInitializer</code>), which will be invoked
    * through the extension point
-   * "org.eclipse.jdt.core.classpathVariableInitializer". After resolution, a
+   * "net.sourceforge.phpdt.core.classpathVariableInitializer". After resolution, a
    * classpath variable entry may either correspond to a project or a library
    * entry.</li>
    * <p>
@@ -3907,7 +3919,7 @@ public class JavaCore {
    * formed by a first ID segment followed with extra segments, which can be
    * used as additional hints for the resolution. The container ID is used to
    * identify a <code>ClasspathContainerInitializer</code> registered on the
-   * extension point "org.eclipse.jdt.core.classpathContainerInitializer".
+   * extension point "net.sourceforge.phpdt.core.classpathContainerInitializer".
    * <p>
    * There is no assumption that each individual container value passed in
    * argument (<code>respectiveContainers</code>) must answer the exact
@@ -3916,7 +3928,7 @@ public class JavaCore {
    * actual container object. It can be delegated to a
    * <code>ClasspathContainerInitializer</code>, which can be activated
    * through the extension point
-   * "org.eclipse.jdt.core.ClasspathContainerInitializer").
+   * "net.sourceforge.phpdt.core.ClasspathContainerInitializer").
    * <p>
    * In reaction to changing container values, the JavaModel will be updated
    * to reflect the new state of the updated container.
@@ -3927,7 +3939,7 @@ public class JavaCore {
    * are not preserved from a session to another. It is thus highly
    * recommended to register a <code>ClasspathContainerInitializer</code>
    * for each referenced container (through the extension point
-   * "org.eclipse.jdt.core.ClasspathContainerInitializer").
+   * "net.sourceforge.phpdt.core.ClasspathContainerInitializer").
    * <p>
    * Note: setting a container to <code>null</code> will cause it to be
    * lazily resolved again whenever its value is required. In particular, this