Skip to main content
summaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorAlena Laskavaia2010-06-01 21:08:25 -0400
committerAlena Laskavaia2010-06-01 21:08:25 -0400
commitb16ac6b6034e22d5008b6edcd7b8e61c7fb930b3 (patch)
tree6d73d9f0d8de9afe1384fbb49e1c27ec7bdc3da3 /codan
parentfb8475e290ef10140555cfebca5bfe5d6f4aeb53 (diff)
downloadorg.eclipse.cdt-b16ac6b6034e22d5008b6edcd7b8e61c7fb930b3.tar.gz
org.eclipse.cdt-b16ac6b6034e22d5008b6edcd7b8e61c7fb930b3.tar.xz
org.eclipse.cdt-b16ac6b6034e22d5008b6edcd7b8e61c7fb930b3.zip
Javadoc
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java3
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java1
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanBuilder.java41
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodeAnlysisNature.java32
4 files changed, 38 insertions, 39 deletions
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java
index 2fea0104de..1b453cefcc 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java
@@ -37,6 +37,9 @@ import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.Platform;
import org.osgi.service.prefs.Preferences;
+/**
+ * Implementation of checker registry interface
+ */
public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
private static final String NAME_ATTR = "name"; //$NON-NLS-1$
private static final String ID_ATTR = "id"; //$NON-NLS-1$
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java
index c31eb9d35a..9de6a7d2c2 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java
@@ -16,7 +16,6 @@ import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.osgi.util.NLS;
/**
- *
* Application to support headless build
*
* @noextend This class is not intended to be extended by clients.
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanBuilder.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanBuilder.java
index ff44d90005..7d04ec806d 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanBuilder.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanBuilder.java
@@ -30,11 +30,17 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
+/**
+ * Implementation of {@link ICodanBuilder}
+ */
public class CodanBuilder extends IncrementalProjectBuilder implements
ICodanBuilder {
+ /**
+ * codan builder id
+ */
public static final String BUILDER_ID = "org.eclipse.cdt.codan.core.codanBuilder"; //$NON-NLS-1$
- public class CodanDeltaVisitor implements IResourceDeltaVisitor {
+ private class CodanDeltaVisitor implements IResourceDeltaVisitor {
private IProgressMonitor monitor;
/**
@@ -47,17 +53,17 @@ public class CodanBuilder extends IncrementalProjectBuilder implements
public boolean visit(IResourceDelta delta) throws CoreException {
IResource resource = delta.getResource();
switch (delta.getKind()) {
- case IResourceDelta.ADDED:
- // handle added resource
- processResource(resource, monitor);
- break;
- case IResourceDelta.REMOVED:
- // handle removed resource
- break;
- case IResourceDelta.CHANGED:
- // handle changed resource
- processResource(resource, monitor);
- break;
+ case IResourceDelta.ADDED:
+ // handle added resource
+ processResource(resource, monitor);
+ break;
+ case IResourceDelta.REMOVED:
+ // handle removed resource
+ break;
+ case IResourceDelta.CHANGED:
+ // handle changed resource
+ processResource(resource, monitor);
+ break;
}
// return true to continue visiting children.
return true;
@@ -106,8 +112,8 @@ public class CodanBuilder extends IncrementalProjectBuilder implements
}
int tick = 1000;
// System.err.println("processing " + resource);
- monitor.beginTask(Messages.CodanBuilder_Code_Analysis_On + resource, checkers + memsize
- * tick);
+ monitor.beginTask(Messages.CodanBuilder_Code_Analysis_On + resource,
+ checkers + memsize * tick);
try {
IProblemReporter problemReporter = CodanRuntime.getInstance()
.getProblemReporter();
@@ -172,6 +178,13 @@ public class CodanBuilder extends IncrementalProjectBuilder implements
delta.accept(new CodanDeltaVisitor(monitor));
}
+ /**
+ * Run all checkers that support "check as you type" mode
+ *
+ * @param model - model of given resource such as ast
+ * @param resource - resource to process
+ * @param monitor - progress monitor
+ */
public void runInEditor(Object model, IResource resource,
IProgressMonitor monitor) {
if (model == null)
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodeAnlysisNature.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodeAnlysisNature.java
index 214d760a5a..83fad6a1e9 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodeAnlysisNature.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodeAnlysisNature.java
@@ -16,6 +16,9 @@ import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IProjectNature;
import org.eclipse.core.runtime.CoreException;
+/**
+ * Code Analysis Nature for builder
+ */
public class CodeAnlysisNature implements IProjectNature {
/**
* ID of this project nature
@@ -23,16 +26,13 @@ public class CodeAnlysisNature implements IProjectNature {
public static final String NATURE_ID = "org.eclipse.cdt.codan.core.codanNature"; //$NON-NLS-1$
private IProject project;
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.resources.IProjectNature#configure()
- */
public void configure() throws CoreException {
IProjectDescription desc = project.getDescription();
ICommand[] commands = desc.getBuildSpec();
for (int i = 0; i < commands.length; ++i) {
- if (commands[i].getBuilderName().equals(CodanBuilder.BUILDER_ID)) { return; }
+ if (commands[i].getBuilderName().equals(CodanBuilder.BUILDER_ID)) {
+ return;
+ }
}
ICommand[] newCommands = new ICommand[commands.length + 1];
System.arraycopy(commands, 0, newCommands, 0, commands.length);
@@ -43,11 +43,6 @@ public class CodeAnlysisNature implements IProjectNature {
project.setDescription(desc, null);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.resources.IProjectNature#deconfigure()
- */
public void deconfigure() throws CoreException {
IProjectDescription description = getProject().getDescription();
ICommand[] commands = description.getBuildSpec();
@@ -55,7 +50,8 @@ public class CodeAnlysisNature implements IProjectNature {
if (commands[i].getBuilderName().equals(CodanBuilder.BUILDER_ID)) {
ICommand[] newCommands = new ICommand[commands.length - 1];
System.arraycopy(commands, 0, newCommands, 0, i);
- System.arraycopy(commands, i + 1, newCommands, i, commands.length - i - 1);
+ System.arraycopy(commands, i + 1, newCommands, i,
+ commands.length - i - 1);
description.setBuildSpec(newCommands);
project.setDescription(description, null);
return;
@@ -63,22 +59,10 @@ public class CodeAnlysisNature implements IProjectNature {
}
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.resources.IProjectNature#getProject()
- */
public IProject getProject() {
return project;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.core.resources.IProjectNature#setProject(org.eclipse.core
- * .resources.IProject)
- */
public void setProject(IProject project) {
this.project = project;
}

Back to the top