public void reconcile(IRegion partition)
{
if (currentDocument != null)
{
@SuppressWarnings("rawtypes")
ParserWrapper parser = getParser();
FileUtility.deleteMarker(currentDocument.getFile(), IMarker.PROBLEM, IDestecsCoreConstants.PLUGIN_ID);
try
{
parser.parse(currentDocument.getFile().getLocation().toFile(), currentDocument.get());
if (parser.hasErrors())
{
for (Object err : parser.getErrors())
{
IError e = (IError) err;
FileUtility.addMarker(currentDocument.getFile(), e.getMessage(), e.getLine() == 0 ? currentDocument.getNumberOfLines() : e.getLine()+1, IMarker.SEVERITY_ERROR);
}
}