Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'codan/org.eclipse.cdt.codan.examples')
-rw-r--r--codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/Activator.java15
-rw-r--r--codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/checkers/GrepChecker.java15
-rw-r--r--codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/checkers/NamingConventionFunctionIIndexChecker.java9
-rw-r--r--codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/uicontrib/FlexlintHelpLink.java2
4 files changed, 16 insertions, 25 deletions
diff --git a/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/Activator.java b/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/Activator.java
index 77d06451184..b49e385fdc9 100644
--- a/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/Activator.java
+++ b/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/Activator.java
@@ -17,13 +17,11 @@ import org.osgi.framework.BundleContext;
* The activator class controls the plug-in life cycle
*/
public class Activator extends Plugin {
-
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.cdt.codan.examples"; //$NON-NLS-1$
-
// The shared instance
private static Activator plugin;
-
+
/**
* The constructor
*/
@@ -32,7 +30,9 @@ public class Activator extends Plugin {
/*
* (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ *
+ * @see
+ * org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
@@ -41,7 +41,9 @@ public class Activator extends Plugin {
/*
* (non-Javadoc)
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ *
+ * @see
+ * org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
@@ -50,11 +52,10 @@ public class Activator extends Plugin {
/**
* Returns the shared instance
- *
+ *
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}
-
}
diff --git a/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/checkers/GrepChecker.java b/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/checkers/GrepChecker.java
index 5829ce0da27..44e55695d25 100644
--- a/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/checkers/GrepChecker.java
+++ b/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/checkers/GrepChecker.java
@@ -46,16 +46,13 @@ public class GrepChecker extends AbstractCheckerWithProblemPreferences {
}
void processFile(IFile file) {
- Collection<IProblem> refProblems = getRuntime().getCheckersRegistry()
- .getRefProblems(this);
- for (Iterator<IProblem> iterator = refProblems.iterator(); iterator
- .hasNext();) {
+ Collection<IProblem> refProblems = getRuntime().getCheckersRegistry().getRefProblems(this);
+ for (Iterator<IProblem> iterator = refProblems.iterator(); iterator.hasNext();) {
IProblem checkerProblem = iterator.next();
IProblem problem = getProblemById(checkerProblem.getId(), file);
if (shouldProduceProblem(problem, file.getLocation())) {
// do something
- Object[] values = (Object[]) getPreference(problem,
- PARAM_STRING_LIST);
+ Object[] values = (Object[]) getPreference(problem, PARAM_STRING_LIST);
if (values.length == 0)
continue; // nothing to do
externalRun(file, values, problem);
@@ -81,8 +78,7 @@ public class GrepChecker extends AbstractCheckerWithProblemPreferences {
for (int i = 0; i < values.length; i++) {
String str = (String) values[i];
if (line.contains(str)) {
- reportProblem(problem.getId(), file, iline, "Found "
- + str);
+ reportProblem(problem.getId(), file, iline, "Found " + str);
}
}
}
@@ -104,7 +100,6 @@ public class GrepChecker extends AbstractCheckerWithProblemPreferences {
@Override
public void initPreferences(IProblemWorkingCopy problem) {
super.initPreferences(problem);
- addListPreference(problem, PARAM_STRING_LIST, "Search strings",
- "Search string");
+ addListPreference(problem, PARAM_STRING_LIST, "Search strings", "Search string");
}
}
diff --git a/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/checkers/NamingConventionFunctionIIndexChecker.java b/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/checkers/NamingConventionFunctionIIndexChecker.java
index f99d01a1013..3105617b63f 100644
--- a/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/checkers/NamingConventionFunctionIIndexChecker.java
+++ b/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/checkers/NamingConventionFunctionIIndexChecker.java
@@ -28,8 +28,7 @@ import org.eclipse.cdt.core.model.ITranslationUnit;
* @author Alena
*
*/
-public class NamingConventionFunctionIIndexChecker extends
- AbstractCIndexChecker implements ICheckerWithPreferences {
+public class NamingConventionFunctionIIndexChecker extends AbstractCIndexChecker implements ICheckerWithPreferences {
private static final String DEFAULT_PATTERN = "^[a-z]"; // name starts with english lowercase letter //$NON-NLS-1$
public static final String PARAM_KEY = "pattern"; //$NON-NLS-1$
private static final String ER_ID = "org.eclipse.cdt.codan.examples.checkers.NamingConventionFunctionProblem"; //$NON-NLS-1$
@@ -47,8 +46,7 @@ public class NamingConventionFunctionIIndexChecker extends
unit.accept(new ICElementVisitor() {
public boolean visit(ICElement element) {
if (element.getElementType() == ICElement.C_FUNCTION) {
- String parameter = (String) pt.getPreference()
- .getValue();
+ String parameter = (String) pt.getPreference().getValue();
Pattern pattern = Pattern.compile(parameter);
String name = element.getElementName();
if (!pattern.matcher(name).find()) {
@@ -74,8 +72,7 @@ public class NamingConventionFunctionIIndexChecker extends
*/
public void initPreferences(IProblemWorkingCopy problem) {
super.initPreferences(problem);
- IProblemPreference info = new BasicProblemPreference(PARAM_KEY,
- "Name Pattern");
+ IProblemPreference info = new BasicProblemPreference(PARAM_KEY, "Name Pattern");
addPreference(problem, info, DEFAULT_PATTERN);
}
diff --git a/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/uicontrib/FlexlintHelpLink.java b/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/uicontrib/FlexlintHelpLink.java
index f37dabdbf9d..4c8b5d3af71 100644
--- a/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/uicontrib/FlexlintHelpLink.java
+++ b/codan/org.eclipse.cdt.codan.examples/src/org/eclipse/cdt/codan/examples/uicontrib/FlexlintHelpLink.java
@@ -44,6 +44,4 @@ public class FlexlintHelpLink extends AbstractCodanProblemDetailsProvider {
String url = "http://www.gimpel-online.com/MsgRef.html#" + helpId;
return "<a href=\"" + url + "\">" + url + "</a>";
}
-
-
}

Back to the top