StringBuffer buf) {
char[] ident;
String identifier;
- int counter = 0;
boolean hasModifiers = false;
int phpdocOffset = -1;
int phpdocLength = -1;
*
*/
public void addFile(IFile fileToParse) {
- // InputStream iStream;
LineCreator lineCreator = createLineCreator();
try {
addInputStream(new BufferedInputStream(fileToParse.getContents()),
fileToParse.getProjectRelativePath().toString(),
- lineCreator);
+ lineCreator, fileToParse.getCharset());
} catch (CoreException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
* @throws CoreException
*/
public void addInputStream(InputStream stream, String filePath,
- LineCreator lineCreator) throws CoreException {
+ LineCreator lineCreator , String charset) throws CoreException {
try {
StringBuffer lineBuffer = new StringBuffer();
lineBuffer.append(filePath);
- int lineLength = lineBuffer.length();
lineCreator.parseIdentifiers(Util.getInputStreamAsCharArray(stream,
- -1, null), lineBuffer);
- // if (lineLength != lineBuffer.length()) {
- // always add the file for Open Include Action
+ -1, charset), lineBuffer);
addLine(lineBuffer.toString());
- // }
} catch (IOException e) {
e.printStackTrace();
} finally {
stream.close();
}
} catch (IOException e) {
+ //do nothing
}
}
}