summaryrefslogtreecommitdiffstats
path: root/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IChecker.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IChecker.java')
-rw-r--r--org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IChecker.java37
1 files changed, 29 insertions, 8 deletions
diff --git a/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IChecker.java b/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IChecker.java
index 60f7cb2..f00fea0 100644
--- a/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IChecker.java
+++ b/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IChecker.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Alena Laskavaia
+ * Copyright (c) 2009, 2010 Alena Laskavaia
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -13,27 +13,48 @@ package org.eclipse.cdt.codan.core.model;
import org.eclipse.core.resources.IResource;
/**
- * Interface that checker must implement. CDT Checker must be able to process a resource.
+ * Interface that checker must implement (through extending directly or
+ * indirectly {@link AbstractChecker}.
+ *
+ * <p>
+ * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part
+ * of a work in progress. There is no guarantee that this API will work or that
+ * it will remain the same.
+ * </p>
+ *
+ * @noextend This interface is not intended to be extended by clients.
+ * @noimplement This interface is not intended to be implemented by clients.
+ * Extend {@link AbstractChecker} class instead.
*/
public interface IChecker {
/**
* Main method that checker should implement that actually detects errors
- * @param resource - resource to run on
- * @return true if need to traverse children
+ *
+ * @param resource
+ * - resource to run on
+ * @return true if framework should traverse children of the resource and
+ * run this checkers on them again
*/
boolean processResource(IResource resource);
/**
- * Implement this method to trim down type of resource you are interested in,
- * usually it will be c/c++ files only
+ * Implement this method to trim down type of resource you are interested
+ * in, usually it will be c/c++ files only. This method should be
+ * independent from current user preferences.
+ *
* @param resource
- * @return
+ * - resource to run on
+ * @return - true if checker should be run on this resource
*/
boolean enabledInContext(IResource resource);
/**
* Checker must implement this method to determine if it can run in editor
- * "as you type", checker must be really light weight to run in this mode
+ * "as you type". Checker must be really light weight to run in this mode.
+ * If it returns true, checker must also implement
+ * {@link IRunnableInEditorChecker}.
+ * Checker should return false if check is non-trivial and takes a long
+ * time.
*
* @return true if need to be run in editor as user types, and false
* otherwise