public class PHPParserManager {
- private static PHPParserSuperclass parser;
public static PHPParserSuperclass getParser(IFile fileToParse) {
try {
if (PHPeclipsePlugin.PHPPARSER == PHPeclipsePlugin.PHPPARSER_ORIGINAL) {
actualParser = (PHPParserSuperclass) Class.forName(PHPeclipsePlugin.PHPPARSER).newInstance();
} else {
- if (parser == null) {
- parser = (PHPParserSuperclass) Class.forName(PHPeclipsePlugin.PHPPARSER).newInstance();
- }
- actualParser = parser;
+ actualParser = (PHPParserSuperclass) Class.forName(PHPeclipsePlugin.PHPPARSER).newInstance();
}
actualParser.setFileToParse(fileToParse);
return actualParser;
if (PHPeclipsePlugin.PHPPARSER == PHPeclipsePlugin.PHPPARSER_ORIGINAL) {
actualParser = (PHPParserSuperclass) Class.forName(PHPeclipsePlugin.PHPPARSER).newInstance();
} else {
- if (parser == null) {
- parser = (PHPParserSuperclass) Class.forName(PHPeclipsePlugin.PHPPARSER).newInstance();
- }
- actualParser = parser;
+ actualParser = (PHPParserSuperclass) Class.forName(PHPeclipsePlugin.PHPPARSER).newInstance();
}
return actualParser;
} catch (InstantiationException e) {