Set errormarks in File given by filename [message #1016446] |
Wed, 06 March 2013 13:30 |
Maximilian Girlich Messages: 17 Registered: March 2013 |
Junior Member |
|
|
Hi,
I'm using the veditor-plugin (it is on sourceforge but I cannot link to there as I have to few messages...) and as it doesn't work as wished. When the make.exe and the source is in the same projects everthing works fine. When using different projects, i.e. one project which contains the make.exe and links to the project with the source, the filename of the sourcefile with wrong code is correctly given out but the errormarks cannot be set (the veditor says: "... is not found in the project. MS Windows users, check filename case!!!").
Now I try to solve the problem but I am not that experienced yet.
The crucial part seems to be in builder.ErrorParser the methods getFile() and getFileRecursive():
private IFile getFileRecursive(IContainer cont, IPath path) {
try {
for(IResource res: cont.members()) {
if(res instanceof IContainer) {
IFile result = getFileRecursive((IContainer)res,path);
if(result!=null) return result;
} else if(res instanceof IFile) {
IPath res_path = ((IFile)res).getLocation();
if(res_path.equals(path))
return (IFile)res;
}
}
} catch (CoreException e) {
}
return null;
}
/*
private IResource getFile(String filename)
{
IPath projectPath = project.getLocation().append(buildConfig.getWorkFolder());
projectPath = projectPath.append(filename);
IResource test = getFileRecursive(project,projectPath);
return test;
}
and getFile returns zero which is of course not what it should... Can someone help me?
Regards,
Max
|
|
|
Powered by
FUDForum. Page generated in 0.01753 seconds