Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2011-02-23 19:50:07 -0500
committerAlena Laskavaia2011-02-23 19:50:07 -0500
commit598b6fc042eacfacc007746e3e507889c3ac1c02 (patch)
treea992a31bcb7fb9aef9af9a4521bbf47a640d9c6d /codan/org.eclipse.cdt.codan.examples
parent9164b9a75618a13e6c09bcc8fe16d5a96db9faa1 (diff)
downloadorg.eclipse.cdt-598b6fc042eacfacc007746e3e507889c3ac1c02.tar.gz
org.eclipse.cdt-598b6fc042eacfacc007746e3e507889c3ac1c02.tar.xz
org.eclipse.cdt-598b6fc042eacfacc007746e3e507889c3ac1c02.zip
auto-format code using project formatter
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 77d0645118..b49e385fdc 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 5829ce0da2..44e55695d2 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 f99d01a101..3105617b63 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 f37dabdbf9..4c8b5d3af7 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