Re: [pdt-dev] API Change in PHPSourceParserFactory

2010-02-27 Thread Alex Panchenko
Hi Robert, 


Use 
parser.parse(context.getSourceModule()) 

Regards, 
Alex 

- Original Message - 
From: "Robert Gruendler"  
To: "PDT Developers"  
Sent: Saturday, February 27, 2010 3:41:40 PM GMT +06:00 Almaty, Novosibirsk 
Subject: [pdt-dev] API Change in PHPSourceParserFactory 

Hi all, 


i've updated an older PDT Development Project which runs on Eclipse 3.5, and 
after updating PDT from cvs i get an compile error in my IBuildParticipant: 




@Override 
public void build(IBuildContext context) throws CoreException { 



try { 
char [] fileName = context.getFile().getName().toCharArray(); 
PHPSourceParserFactory parser = new PHPSourceParserFactory(); 



ModuleDeclaration module = parser. parse (fileName, context.getContents(), new 
NullProblemReporter()); 
module.traverse( new CakeASTVisitor(context)); 
} catch (Exception e) { 
e.printStackTrace(); 
} 
} 







The method parse(IModuleSource, IProblemReporter) in the type 
PHPSourceParserFactory is not applicable for the arguments (char[], char[], 
NullProblemReporter) 


Does anyone know how i can get hands on the IModuleSource to pass to the parse 
method of the PHPSourceParserFactory ? 




thanks! 


-robert 




___ pdt-dev mailing list 
pdt-dev@eclipse.org https://dev.eclipse.org/mailman/listinfo/pdt-dev ___
pdt-dev mailing list
pdt-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/pdt-dev


[pdt-dev] API Change in PHPSourceParserFactory

2010-02-27 Thread Robert Gruendler
Hi all,

i've updated an older PDT Development Project which runs on Eclipse 3.5, and
after updating PDT from cvs i get an compile error in my IBuildParticipant:

@Override
public void build(IBuildContext context) throws CoreException {

try {
char[] fileName = 
context.getFile().getName().toCharArray();
PHPSourceParserFactory parser = new 
PHPSourceParserFactory();

ModuleDeclaration module = parser.parse(fileName, 
context.getContents(), new NullProblemReporter());
module.traverse(new CakeASTVisitor(context));
} catch (Exception e) {
e.printStackTrace();
}
}



The method parse(IModuleSource, IProblemReporter) in the type 
PHPSourceParserFactory is not applicable for the arguments (char[], char[], 
NullProblemReporter)

Does anyone know how i can get hands on the IModuleSource to pass to the parse 
method of the PHPSourceParserFactory ?


thanks!

-robert


___
pdt-dev mailing list
pdt-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/pdt-dev