mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
Bug 567220: CompileCommandsJsonParser error markers are not deleted from the problems view
Change-Id: Idb1f3fc3429c06a89550a9446c88c2181f3d8cdb Signed-off-by: Martin Weber <fifteenknots505@gmail.com>
This commit is contained in:
parent
e974d52aa4
commit
ae3159f809
1 changed files with 2 additions and 2 deletions
|
@ -146,6 +146,7 @@ public class CompileCommandsJsonParser {
|
||||||
final IProject project = configuration.getBuildConfiguration().getProject();
|
final IProject project = configuration.getBuildConfiguration().getProject();
|
||||||
java.nio.file.Path buildRoot = Paths.get(configuration.getBuildDirectoryURI());
|
java.nio.file.Path buildRoot = Paths.get(configuration.getBuildDirectoryURI());
|
||||||
|
|
||||||
|
project.deleteMarkers(MARKER_ID, false, IResource.DEPTH_INFINITE);
|
||||||
final java.nio.file.Path jsonFile = buildRoot.resolve("compile_commands.json"); //$NON-NLS-1$
|
final java.nio.file.Path jsonFile = buildRoot.resolve("compile_commands.json"); //$NON-NLS-1$
|
||||||
if (!Files.exists(jsonFile)) {
|
if (!Files.exists(jsonFile)) {
|
||||||
// no json file was produced in the build
|
// no json file was produced in the build
|
||||||
|
@ -159,7 +160,7 @@ public class CompileCommandsJsonParser {
|
||||||
try {
|
try {
|
||||||
tsJsonModified = Files.getLastModifiedTime(jsonFile).toMillis();
|
tsJsonModified = Files.getLastModifiedTime(jsonFile).toMillis();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
// tread as 'file does nor exist'
|
// treat as 'file is not modified'
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
IContainer buildContainer = configuration.getBuildContainer();
|
IContainer buildContainer = configuration.getBuildContainer();
|
||||||
|
@ -169,7 +170,6 @@ public class CompileCommandsJsonParser {
|
||||||
if (sessionLastModified == null || sessionLastModified.longValue() < tsJsonModified) {
|
if (sessionLastModified == null || sessionLastModified.longValue() < tsJsonModified) {
|
||||||
// must parse json file...
|
// must parse json file...
|
||||||
monitor.setTaskName(Messages.CompileCommandsJsonParser_msg_processing);
|
monitor.setTaskName(Messages.CompileCommandsJsonParser_msg_processing);
|
||||||
project.deleteMarkers(MARKER_ID, false, IResource.DEPTH_INFINITE);
|
|
||||||
|
|
||||||
try (Reader in = new FileReader(jsonFile.toFile())) {
|
try (Reader in = new FileReader(jsonFile.toFile())) {
|
||||||
// parse file...
|
// parse file...
|
||||||
|
|
Loading…
Add table
Reference in a new issue