mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Optimzed Qt codan checker not to lock the ask if not running
Change-Id: Iff6749ea46f9c6970b4e96e47d8554846feb0dfe Signed-off-by: Alena Laskavaia <elaskavaia.cdt@gmail.com> Reviewed-on: https://git.eclipse.org/r/37304
This commit is contained in:
parent
1e517e23e4
commit
b53246227a
1 changed files with 9 additions and 0 deletions
|
@ -24,6 +24,8 @@ import org.eclipse.cdt.internal.qt.core.QtMethodReference;
|
|||
import org.eclipse.cdt.qt.core.QtNature;
|
||||
import org.eclipse.cdt.qt.core.QtPlugin;
|
||||
import org.eclipse.cdt.qt.core.index.IQMethod;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.OperationCanceledException;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
||||
/**
|
||||
|
@ -48,6 +50,13 @@ public class QtSyntaxChecker extends AbstractIndexAstChecker implements IChecker
|
|||
CheckerLaunchMode.RUN_ON_DEMAND );
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized boolean processResource(IResource resource) throws OperationCanceledException {
|
||||
if (QtNature.hasNature(resource.getProject()))
|
||||
return super.processResource(resource);
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processAst(IASTTranslationUnit ast) {
|
||||
// Run the checker only on Qt-enabled projects.
|
||||
|
|
Loading…
Add table
Reference in a new issue