import java.util.List;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+import net.sourceforge.phpeclipse.phpeditor.phpparser.PHPParser;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
return;
}
IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore();
- if (store.getBoolean(PHPeclipsePlugin.PHP_PARSER_DEFAULT)) {
+ if (store.getString(PHPeclipsePlugin.PHP_PARSER_DEFAULT).equals(PHPeclipsePlugin.PHP_INTERNAL_PARSER)) {
// first delete all the previous markers
fileToParse.deleteMarkers(IMarker.PROBLEM, false, 0);
protected void parse(InputStream iStream) {
- StringBuffer buf = new StringBuffer();
+ StringBuffer buf = new StringBuffer();
int c0;
- try {
+ try {
while ((c0 = iStream.read()) != (-1)) {
buf.append((char) c0);
}
String input = buf.toString();
PHPParser parser = new PHPParser(fileToParse);
- parser.htmlParse(input);
+ try {
+ parser.parse(input);
+ } catch (CoreException e) {
+ }
}
}
\ No newline at end of file