A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / JavaModelInfo.java
index 958a178..4dce222 100644 (file)
@@ -16,9 +16,8 @@ import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
 
 /**
- * Implementation of IJavaModel. A Java Model is specific to a
- * workspace.
- *
+ * Implementation of IJavaModel. A Java Model is specific to a workspace.
+ * 
  * @see IJavaModel
  */
 public class JavaModelInfo extends OpenableElementInfo {
@@ -28,45 +27,49 @@ public class JavaModelInfo extends OpenableElementInfo {
         */
        Object[] nonJavaResources;
 
-/**
- * Constructs a new Java Model Info 
- */
-protected JavaModelInfo() {
-}
-/**
- * Compute the non-java resources contained in this java project.
- */
-private Object[] computeNonJavaResources() {
-       IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
-       int length = projects.length;
-       Object[] nonJavaResources = null;
-       int index = 0;
-       for (int i = 0; i < length; i++) {
-               IProject project = projects[i];
-               if (!JavaProject.hasJavaNature(project)) {
-                       if (nonJavaResources == null) {
-                               nonJavaResources = new Object[length];
+       /**
+        * Constructs a new Java Model Info
+        */
+       protected JavaModelInfo() {
+       }
+
+       /**
+        * Compute the non-java resources contained in this java project.
+        */
+       private Object[] computeNonJavaResources() {
+               IProject[] projects = ResourcesPlugin.getWorkspace().getRoot()
+                               .getProjects();
+               int length = projects.length;
+               Object[] nonJavaResources = null;
+               int index = 0;
+               for (int i = 0; i < length; i++) {
+                       IProject project = projects[i];
+                       if (!JavaProject.hasJavaNature(project)) {
+                               if (nonJavaResources == null) {
+                                       nonJavaResources = new Object[length];
+                               }
+                               nonJavaResources[index++] = project;
                        }
-                       nonJavaResources[index++] = project;
                }
+               if (index == 0)
+                       return NO_NON_JAVA_RESOURCES;
+               if (index < length) {
+                       System.arraycopy(nonJavaResources, 0,
+                                       nonJavaResources = new Object[index], 0, index);
+               }
+               return nonJavaResources;
        }
-       if (index == 0) return NO_NON_JAVA_RESOURCES;
-       if (index < length) {
-               System.arraycopy(nonJavaResources, 0, nonJavaResources = new Object[index], 0, index);
-       }
-       return nonJavaResources;
-}
 
-/**
- * Returns an array of non-java resources contained in the receiver.
- */
-Object[] getNonJavaResources() {
+       /**
+        * Returns an array of non-java resources contained in the receiver.
+        */
+       Object[] getNonJavaResources() {
 
-       Object[] nonJavaResources = this.nonJavaResources;
-       if (nonJavaResources == null) {
-               nonJavaResources = computeNonJavaResources();
-               this.nonJavaResources = nonJavaResources;
+               Object[] nonJavaResources = this.nonJavaResources;
+               if (nonJavaResources == null) {
+                       nonJavaResources = computeNonJavaResources();
+                       this.nonJavaResources = nonJavaResources;
+               }
+               return nonJavaResources;
        }
-       return nonJavaResources;
-}
 }