Skip to main content
summaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorAlena Laskavaia2010-06-01 20:39:31 -0400
committerAlena Laskavaia2010-06-01 20:39:31 -0400
commit29b2cdb6679d7b9bcbc626d3467b08d3ad7f7ca3 (patch)
treebca25ce976bd40decd309d9cddfc07797e7610bf /codan
parent8def1f711a19acc5abfe4dd552fb55dd6f98a285 (diff)
downloadorg.eclipse.cdt-29b2cdb6679d7b9bcbc626d3467b08d3ad7f7ca3.tar.gz
org.eclipse.cdt-29b2cdb6679d7b9bcbc626d3467b08d3ad7f7ca3.tar.xz
org.eclipse.cdt-29b2cdb6679d7b9bcbc626d3467b08d3ad7f7ca3.zip
Updated javadoc, removed duplicate method
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java32
1 files changed, 21 insertions, 11 deletions
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java
index 8ec3b87020..bdb36f01c9 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java
@@ -30,15 +30,28 @@ import org.eclipse.core.runtime.Path;
* Custom preference for resource scope
*
* @noextend This class is not intended to be extended by clients.
+ * @since 1.0
*/
public class FileScopeProblemPreference extends AbstractProblemPreference {
+ /**
+ * Key for the scope preference
+ */
public static final String KEY = "fileScope"; //$NON-NLS-1$
+ /**
+ * Exclusion attribute
+ */
public static final String EXCLUSION = "exclusion"; //$NON-NLS-1$
+ /**
+ * Inclusion attribute
+ */
public static final String INCLUSION = "inclusion"; //$NON-NLS-1$
private IResource resource;
private IPath[] inclusion = new IPath[0];
private IPath[] exclusion = new IPath[0];
+ /**
+ * Default constructor
+ */
public FileScopeProblemPreference() {
setKey(KEY);
setLabel(Messages.FileScopeProblemPreference_Label);
@@ -233,6 +246,14 @@ public class FileScopeProblemPreference extends AbstractProblemPreference {
return true;
}
+ /**
+ * Checks that given path matches on the paths provided as second argument
+ *
+ * @param resourcePath - resource path
+ * @param paths - array of path patterns, for pattern see
+ * {@link CharOperation#pathMatch}
+ * @return true if matches with at least one pattern in the array
+ */
public boolean matchesFilter(IPath resourcePath, IPath[] paths) {
char[] path = resourcePath.toString().toCharArray();
for (int i = 0, length = paths.length; i < length; i++) {
@@ -243,15 +264,4 @@ public class FileScopeProblemPreference extends AbstractProblemPreference {
}
return false;
}
-
- public static boolean isExcludedPath(IPath resourcePath, IPath[] paths) {
- char[] path = resourcePath.toString().toCharArray();
- for (int i = 0, length = paths.length; i < length; i++) {
- char[] pattern = paths[i].toString().toCharArray();
- if (CharOperation.pathMatch(pattern, path, true, '/')) {
- return true;
- }
- }
- return false;
- }
}

Back to the top