package com.dubture.composer.core.build;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.dltk.core.IScriptProject;
import org.eclipse.dltk.core.builder.IBuildParticipant;
import org.eclipse.dltk.core.builder.IBuildParticipantFactory;

import com.dubture.composer.core.ComposerNature;

/**
 * This BuildParticipant  parses the autoload_namespaces.php files to store the namespace information
 * for providing psr-0 Autoloading information (for example in the PEX-Core Class/Interface wizards.)
 * 
 * Other than this, it does nothing.
 * 
 * @author Robert Gruendler <r.gruendler@gmail.com>
 */
public class BuildParticipantFactory implements IBuildParticipantFactory
{
    @Override
    public IBuildParticipant createBuildParticipant(IScriptProject project)
            throws CoreException
    {
        if (project.getProject().hasNature(ComposerNature.NATURE_ID) == false) {
            return null;
        }
        
        return new ComposerBuildParticipant();
    }

}

@@ -326,17 +326,16 @@
 icipant 
- 
 parses t
@@ -379,16 +379,19 @@
 tore the
+%0A *
  namespa
@@ -404,19 +404,16 @@
 ormation
-%0A *
  for pro
@@ -453,16 +453,19 @@
 ion (for
+%0A *
  example
@@ -684,15 +684,12 @@
 tory
-%0A%7B%0A    
+ %7B%0A%09
 @Ove
@@ -694,20 +694,17 @@
 verride%0A
-    
+%09
 public I
@@ -766,28 +766,16 @@
 project)
-%0A           
  throws 
@@ -791,23 +791,79 @@
 tion
-%0A    %7B%0A        
+ %7B%0A%09%09if (!project.getProject().isAccessible()) %7B%0A%09%09%09return null;%0A%09%09%7D%0A%09%09
 if (
@@ -935,20 +935,11 @@
 ) %7B%0A
-            
+%09%09%09
 retu
@@ -951,35 +951,15 @@
 ll;%0A
-        %7D%0A        %0A        
+%09%09%7D%0A%0A%09%09
 retu
@@ -997,12 +997,9 @@
 ();%0A
-    
+%09
 %7D%0A%0A%7D

Fix #130 - Error while opening external file