From f6ecdf5318c355e40a9e8ab9bf3bb44d2f704139 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Thu, 23 Feb 2012 15:05:20 -0800 Subject: [PATCH] Warning cleanup. --- .../.settings/.api_filters | 17 --- .../META-INF/MANIFEST.MF | 8 +- .../cdt/codan/core/model/AbstractChecker.java | 2 +- .../core/model/IProblemLocationFactory.java | 20 +-- .../IProblemReporterSessionPersistent.java | 11 +- .../param/FileScopeProblemPreference.java | 19 ++- .../codan/internal/core/CharOperation.java | 140 +++++++++--------- .../codan/internal/core/cfg/DecisionNode.java | 30 +--- .../core/model/ProblemLocationFactory.java | 24 +-- .../internal/core/model/ProblemProfile.java | 60 +------- codan/org.eclipse.cdt.codan.ui.cxx/.project | 2 +- .../AbstractCxxExternalToolBasedChecker.java | 2 + 12 files changed, 118 insertions(+), 217 deletions(-) delete mode 100644 codan/org.eclipse.cdt.codan.core/.settings/.api_filters diff --git a/codan/org.eclipse.cdt.codan.core/.settings/.api_filters b/codan/org.eclipse.cdt.codan.core/.settings/.api_filters deleted file mode 100644 index e6461f9c1df..00000000000 --- a/codan/org.eclipse.cdt.codan.core/.settings/.api_filters +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/codan/org.eclipse.cdt.codan.core/META-INF/MANIFEST.MF b/codan/org.eclipse.cdt.codan.core/META-INF/MANIFEST.MF index a49d2de3aa0..a5ff65742d6 100644 --- a/codan/org.eclipse.cdt.codan.core/META-INF/MANIFEST.MF +++ b/codan/org.eclipse.cdt.codan.core/META-INF/MANIFEST.MF @@ -10,7 +10,7 @@ Require-Bundle: org.eclipse.core.runtime, Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Export-Package: org.eclipse.cdt.codan.core, - org.eclipse.cdt.codan.core.externaltool;x-friends:="org.eclipse.cdt.codan.ui,org.eclipse.cdt.codan.core.test", + org.eclipse.cdt.codan.core.externaltool, org.eclipse.cdt.codan.core.model, org.eclipse.cdt.codan.core.model.cfg;x-friends:="org.eclipse.cdt.codan.core.cxx,org.eclipse.cdt.codan.checkers", org.eclipse.cdt.codan.core.param, @@ -21,4 +21,8 @@ Export-Package: org.eclipse.cdt.codan.core, org.eclipse.cdt.codan.ui", org.eclipse.cdt.codan.internal.core.cfg;x-friends:="org.eclipse.cdt.codan.core.cxx", org.eclipse.cdt.codan.internal.core.externaltool;x-friends:="org.eclipse.cdt.codan.core.test", - org.eclipse.cdt.codan.internal.core.model;x-friends:="org.eclipse.cdt.codan.core.cxx,org.eclipse.cdt.codan.core.test,org.eclipse.cdt.codan.ui" + org.eclipse.cdt.codan.internal.core.model; + x-friends:="org.eclipse.cdt.codan.core.cxx, + org.eclipse.cdt.codan.core.test, + org.eclipse.cdt.codan.ui, + org.eclipse.cdt.codan.ui.cxx" diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java index cd60472d620..3767d9005d8 100644 --- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java +++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java @@ -161,7 +161,7 @@ public abstract class AbstractChecker implements IChecker { * @return instance of IProblemLocation */ protected IProblemLocation createProblemLocation(IFile file, int startChar, int endChar) { - return getRuntime().getProblemLocationFactory().createProblemLocation(file, startChar, endChar); + return getRuntime().getProblemLocationFactory().createProblemLocation(file, startChar, endChar, -1); } /** diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocationFactory.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocationFactory.java index 76c6cc63fca..a60cab8c670 100644 --- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocationFactory.java +++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemLocationFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 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 @@ -14,7 +14,7 @@ import org.eclipse.core.resources.IFile; /** * Factory interface that allows to create problem locations. - * + * * Clients may implement and extend this interface. *

* EXPERIMENTAL. This class or interface has been added as part @@ -25,7 +25,7 @@ import org.eclipse.core.resources.IFile; public interface IProblemLocationFactory { /** * Create and return instance of IProblemLocation - * + * * @param file * - file where problem is found * @param line @@ -36,7 +36,7 @@ public interface IProblemLocationFactory { /** * Create and return instance of IProblemLocation - * + * * @param file * - file where problem is found * @param startChar @@ -45,21 +45,23 @@ public interface IProblemLocationFactory { * - end char of the problem in the file, is zero-relative and * exclusive. * @return instance of IProblemLocation + * + * @deprecated Use {@link #createProblemLocation(IFile, int, int, int)} instead. */ + @Deprecated public IProblemLocation createProblemLocation(IFile file, int startChar, int endChar); /** * Create and return instance of IProblemLocation - * + * * @param astFile - file where problem is found * @param startChar - start char of the problem in the file, is * zero-relative * @param endChar - end char of the problem in the file, is zero-relative - * and - * exclusive. - * + * and exclusive. + * * @param line - * - start line number (for visualisation purposes) + * - start line number (for visualization purposes) * @return instance of IProblemLocation */ public IProblemLocation createProblemLocation(IFile astFile, int startChar, int endChar, int line); diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemReporterSessionPersistent.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemReporterSessionPersistent.java index 2d1c420f716..be78ab5709f 100644 --- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemReporterSessionPersistent.java +++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/IProblemReporterSessionPersistent.java @@ -14,7 +14,7 @@ import org.eclipse.core.resources.IResource; /** * IProblemReporterPersistent - interface to report problems, which are - * persistent, ex. markers. Also this object has context of checker and + * persistent, e.g. markers. Also this object has context of checker and * current resource, which allows to manage markers better - i.e. instead of * deleting replace them when needed, and queue markers for insertion instead * of add right away. @@ -30,9 +30,9 @@ import org.eclipse.core.resources.IResource; public interface IProblemReporterSessionPersistent extends IProblemReporter { /** * Deletes all problems associated with session resource and session checker. - * If "all" is true also delete all problems associated with workspace (and - * session checker). * + * @param all If true the method also deletes all problems associated with + * workspace (and session checker). */ public void deleteProblems(boolean all); @@ -51,12 +51,11 @@ public interface IProblemReporterSessionPersistent extends IProblemReporter { IResource getResource(); /** - * Create an instance of the object. This is a bit ugly since implemented has - * to combine the object itself and factory to this object. + * Creates a problem reporter. * * @param resource * @param checker - * @return + * @return the created reporter * @since 2.0 */ public IProblemReporterSessionPersistent createReporter(IResource resource, IChecker checker); 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 9101860aa83..277b3aa4e93 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 @@ -10,12 +10,6 @@ *******************************************************************************/ package org.eclipse.cdt.codan.core.param; -import java.io.IOException; -import java.io.StreamTokenizer; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - import org.eclipse.cdt.codan.core.Messages; import org.eclipse.cdt.codan.internal.core.CharOperation; import org.eclipse.core.resources.IProject; @@ -26,6 +20,12 @@ import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; +import java.io.IOException; +import java.io.StreamTokenizer; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + /** * Custom preference for resource scope * @@ -174,14 +174,14 @@ public class FileScopeProblemPreference extends AbstractProblemPreference { checkChar(tokenizer, '>'); ArrayList list = new ArrayList(); int token; - int index = 0; try { checkChar(tokenizer, '('); token = tokenizer.nextToken(); - if (token != ')') + if (token != ')') { tokenizer.pushBack(); - else + } else { return Collections.emptyList(); + } while (true) { token = tokenizer.nextToken(); if (tokenizer.sval == null) @@ -192,7 +192,6 @@ public class FileScopeProblemPreference extends AbstractProblemPreference { break; tokenizer.pushBack(); checkChar(tokenizer, ','); - index++; } } catch (IOException e) { throw new IllegalArgumentException(e); diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CharOperation.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CharOperation.java index 3f18645a1c0..b1fb57a4d67 100644 --- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CharOperation.java +++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CharOperation.java @@ -12,7 +12,7 @@ package org.eclipse.cdt.codan.internal.core; /** * This class is a collection of helper methods to manipulate char arrays. - * + * * @since 2.1 */ public final class CharOperation { @@ -44,7 +44,7 @@ public final class CharOperation { * => result = { 'c' } * * - * + * * @param array * the array that is concanated with the suffix character * @param suffix @@ -95,7 +95,7 @@ public final class CharOperation { * => result = { 'a', 'd' , 'e', 'f', '0', '0', '0', '0' } (new array) * * - * + * * @param target * the given target * @param index @@ -106,7 +106,7 @@ public final class CharOperation { * the given start index * @param end * the given end index - * + * * @return the new array * @throws NullPointerException * if the target array is null @@ -156,7 +156,7 @@ public final class CharOperation { * * * - * + * * @param first * the first array to concatenate * @param second @@ -205,7 +205,7 @@ public final class CharOperation { * * * - * + * * @param first * the first array to concatenate * @param second @@ -276,7 +276,7 @@ public final class CharOperation { * * *

- * + * * @param array * the given array * @param prefix @@ -329,7 +329,7 @@ public final class CharOperation { * * * - * + * * @param first * the first array to concatenate * @param second @@ -396,14 +396,14 @@ public final class CharOperation { * * * - * + * * @param first * the first array to concatenate * @param second * the second array to concatenate * @param third * the third array to concatenate - * + * * @return the concatenation of the three arrays, or null if the three * arrays are null. */ @@ -456,7 +456,7 @@ public final class CharOperation { * * * - * + * * @param first * the first array to concatenate * @param second @@ -540,7 +540,7 @@ public final class CharOperation { * * * - * + * * @param first * the first array to concatenate * @param sep1 @@ -598,7 +598,7 @@ public final class CharOperation { * => result = { 'a', 'c' } * * - * + * * @param prefix * the prefix character * @param array @@ -647,7 +647,7 @@ public final class CharOperation { * => result = { 'c' } * * - * + * * @param name * the given name * @param array @@ -714,7 +714,7 @@ public final class CharOperation { * => result = { 'c' } * * - * + * * @param array * the given array * @param name @@ -772,7 +772,7 @@ public final class CharOperation { * => result = { } * * - * + * * @param array * the given array * @param separator @@ -812,7 +812,7 @@ public final class CharOperation { /** * Answers true if the array contains an occurrence of character, false * otherwise. - * + * *
*
* For example: @@ -830,7 +830,7 @@ public final class CharOperation { * * * - * + * * @param character * the character to search * @param array @@ -853,7 +853,7 @@ public final class CharOperation { /** * Answers true if the array contains an occurrence of character, false * otherwise. - * + * *
*
* For example: @@ -871,7 +871,7 @@ public final class CharOperation { * * * - * + * * @param character * the character to search * @param array @@ -890,7 +890,7 @@ public final class CharOperation { /** * Answers a deep copy of the toCopy array. - * + * * @param toCopy * the array to copy * @return a deep copy of the toCopy array. @@ -929,7 +929,7 @@ public final class CharOperation { * * * - * + * * @param array * the array to check * @param toBeFound @@ -984,7 +984,7 @@ public final class CharOperation { * * * - * + * * @param first * the first array * @param second @@ -1044,7 +1044,7 @@ public final class CharOperation { * * * - * + * * @param first * the first array * @param second @@ -1104,7 +1104,7 @@ public final class CharOperation { * * * - * + * * @param first * the first array * @param second @@ -1164,7 +1164,7 @@ public final class CharOperation { * * * - * + * * @param first * the first array * @param second @@ -1194,7 +1194,7 @@ public final class CharOperation { /** * If isCaseSensite is true, the equality is case sensitive, otherwise it is * case insensitive. - * + * * Answers true if the name contains the fragment at the starting index * startIndex, otherwise false. *
@@ -1234,7 +1234,7 @@ public final class CharOperation { * * * - * + * * @param fragment * the fragment to check * @param name @@ -1269,7 +1269,7 @@ public final class CharOperation { /** * Answers a hashcode for the array - * + * * @param array * the array for which a hashcode is required * @return the hashcode @@ -1310,7 +1310,7 @@ public final class CharOperation { * * * - * + * * @param c * the character to check * @return true if c is a whitespace according to the JLS, otherwise false. @@ -1350,7 +1350,7 @@ public final class CharOperation { * * * - * + * * @param toBeFound * the character to search * @param array @@ -1399,7 +1399,7 @@ public final class CharOperation { * * * - * + * * @param toBeFound * the character to search * @param array @@ -1443,7 +1443,7 @@ public final class CharOperation { * * * - * + * * @param toBeFound * the character to search * @param array @@ -1493,7 +1493,7 @@ public final class CharOperation { * * * - * + * * @param toBeFound * the character to search * @param array @@ -1549,7 +1549,7 @@ public final class CharOperation { * * * - * + * * @param toBeFound * the character to search * @param array @@ -1583,7 +1583,7 @@ public final class CharOperation { *
 	 * lastSegment("java.lang.Object".toCharArray(),'.') --> Object
 	 * 
- * + * * @param array * the array * @param separator @@ -1603,7 +1603,7 @@ public final class CharOperation { * Answers true if the pattern matches the given name, false otherwise. This * char[] pattern matching * accepts wild-cards '*' and '?'. - * + * * When not case sensitive, the pattern is assumed to already be lowercased, * the * name will be lowercased character per character as comparing. @@ -1635,7 +1635,7 @@ public final class CharOperation { * * * - * + * * @param pattern * the given pattern * @param name @@ -1690,7 +1690,7 @@ public final class CharOperation { * * * - * + * * @param pattern * the given pattern * @param patternStart @@ -1783,7 +1783,7 @@ public final class CharOperation { /** * Answers true if the pattern matches the filepath using the pathSepatator, * false otherwise. - * + * * Path char[] pattern matching, accepting wild-cards '**', '*' and '?' * (using Ant directory tasks * conventions, also see @@ -1797,7 +1797,7 @@ public final class CharOperation { * When not case sensitive, the pattern is assumed to already be lowercased, * the * name will be lowercased character per character as comparing. - * + * * @param pattern * the given pattern * @param filepath @@ -1852,7 +1852,7 @@ public final class CharOperation { if (!CharOperation.match(pattern, pSegmentStart, pSegmentEnd, filepath, fSegmentStart, fSegmentEnd, isCaseSensitive)) { return false; } - // jump to next segment + // jump to next segment pSegmentEnd = CharOperation.indexOf(pathSeparator, pattern, pSegmentStart = pSegmentEnd + 1); // skip separator if (pSegmentEnd < 0) @@ -1927,7 +1927,7 @@ public final class CharOperation { fSegmentEnd = fLength; continue checkSegment; } - // jump to next segment + // jump to next segment pSegmentEnd = CharOperation.indexOf(pathSeparator, pattern, pSegmentStart = pSegmentEnd + 1); // skip separator if (pSegmentEnd < 0) @@ -1945,7 +1945,7 @@ public final class CharOperation { /** * Answers the number of occurrences of the given character in the given * array, 0 if any. - * + * *
*
* For example: @@ -1963,7 +1963,7 @@ public final class CharOperation { * * * - * + * * @param toBeFound * the given character * @param array @@ -1975,17 +1975,17 @@ public final class CharOperation { */ public static final int occurencesOf(char toBeFound, char[] array) { int count = 0; - for (char element : array) + for (char element : array) { if (toBeFound == element) count++; + } return count; } /** - * Answers the number of occurrences of the given character in the given - * array starting + * Answers the number of occurrences of the given character in the given array starting * at the given index, 0 if any. - * + * *
*
* For example: @@ -2005,17 +2005,13 @@ public final class CharOperation { * * * - * - * @param toBeFound - * the given character - * @param array - * the given array - * @return the number of occurrences of the given character in the given - * array, 0 if any - * @exception NullPointerException - * if array is null - * @exception ArrayIndexOutOfBoundsException - * if start is lower than 0 + * + * @param toBeFound the given character + * @param array the given array + * @param start the start position for the search + * @return the number of occurrences of the given character in the given array, or 0 if any + * @exception NullPointerException if array is null + * @exception ArrayIndexOutOfBoundsException if start is lower than 0 */ public static final int occurencesOf(char toBeFound, char[] array, int start) { int count = 0; @@ -2046,7 +2042,7 @@ public final class CharOperation { * * * - * + * * @param prefix * the given prefix * @param name @@ -2091,7 +2087,7 @@ public final class CharOperation { * * * - * + * * @param prefix * the given prefix * @param name @@ -2147,7 +2143,7 @@ public final class CharOperation { * * * - * + * * @param array * the given array * @param toBeReplaced @@ -2191,7 +2187,7 @@ public final class CharOperation { * * * - * + * * @param array * the given array * @param toBeReplaced @@ -2274,7 +2270,7 @@ public final class CharOperation { * * * - * + * * @param divider * the given divider * @param array @@ -2343,7 +2339,7 @@ public final class CharOperation { * * * - * + * * @param divider * the given divider * @param array @@ -2392,7 +2388,7 @@ public final class CharOperation { * * * - * + * * @param divider * the given divider * @param array @@ -2459,7 +2455,7 @@ public final class CharOperation { * * * - * + * * @param array * the given array * @param start @@ -2514,7 +2510,7 @@ public final class CharOperation { * * * - * + * * @param array * the given array * @param start @@ -2561,7 +2557,7 @@ public final class CharOperation { * * * - * + * * @param chars * the chars to convert * @return the result of a char[] conversion to lowercase @@ -2603,7 +2599,7 @@ public final class CharOperation { * * * - * + * * @param chars * the given array * @return a new array removing leading and trailing spaces (' ') @@ -2642,7 +2638,7 @@ public final class CharOperation { * * * - * + * * @param array * the given array * @return a string which is the concatenation of the given array using the diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/DecisionNode.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/DecisionNode.java index 14b81f8ef4f..96539ce53ec 100644 --- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/DecisionNode.java +++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/DecisionNode.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 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 @@ -10,24 +10,21 @@ *******************************************************************************/ package org.eclipse.cdt.codan.internal.core.cfg; -import java.util.ArrayList; -import java.util.List; - import org.eclipse.cdt.codan.core.model.cfg.IBasicBlock; import org.eclipse.cdt.codan.core.model.cfg.IBranchNode; import org.eclipse.cdt.codan.core.model.cfg.IConnectorNode; import org.eclipse.cdt.codan.core.model.cfg.IDecisionNode; +import java.util.ArrayList; +import java.util.List; + /** - * @see {@link IDecisionNode} + * @see IDecisionNode */ public class DecisionNode extends AbstractSingleIncomingNode implements IDecisionNode { private List next = new ArrayList(2); private IConnectorNode conn; - /** - * @param prev - */ protected DecisionNode() { super(); } @@ -38,33 +35,16 @@ public class DecisionNode extends AbstractSingleIncomingNode implements IDecisio next.add(cnode); } - /* - * (non-Javadoc) - * - * @seeorg.eclipse.cdt.codan.provisional.core.model.cfg.IBasicBlock# - * getOutgoingIterator() - */ @Override public IBasicBlock[] getOutgoingNodes() { return next.toArray(new IBasicBlock[next.size()]); } - /* - * (non-Javadoc) - * - * @see org.eclipse.cdt.codan.core.model.cfg.IBasicBlock#getOutgoingSize () - */ @Override public int getOutgoingSize() { return next.size(); } - /* - * (non-Javadoc) - * - * @seeorg.eclipse.cdt.codan.provisional.core.model.cfg.IDecisionNode# - * getConnectionNode() - */ @Override public IConnectorNode getMergeNode() { return conn; diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java index 1207610ae76..85177f2b795 100644 --- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java +++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemLocationFactory.java @@ -1,12 +1,12 @@ /******************************************************************************* - * Copyright (c) 2009, 2010 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 * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Alena Laskavaia - initial API and implementation + * Alena Laskavaia - initial API and implementation *******************************************************************************/ package org.eclipse.cdt.codan.internal.core.model; @@ -16,37 +16,19 @@ import org.eclipse.core.resources.IFile; /** * Factory class that allows to create problem locations - * */ public class ProblemLocationFactory implements IProblemLocationFactory { - /* - * (non-Javadoc) - * - * @seeorg.eclipse.cdt.codan.core.model.IProblemLocationFactory# - * createProblemLocation(org.eclipse.core.resources.IFile, int) - */ @Override public IProblemLocation createProblemLocation(IFile file, int line) { return new CodanProblemLocation(file, line); } - /* - * (non-Javadoc) - * - * @seeorg.eclipse.cdt.codan.core.model.IProblemLocationFactory# - * createProblemLocation(org.eclipse.core.resources.IFile, int, int) - */ @Override + @Deprecated public IProblemLocation createProblemLocation(IFile file, int startChar, int endChar) { return new CodanProblemLocation(file, startChar, endChar); } - /* - * (non-Javadoc) - * - * @seeorg.eclipse.cdt.codan.core.model.IProblemLocationFactory# - * createProblemLocation(org.eclipse.core.resources.IFile, int, int, int) - */ @Override public IProblemLocation createProblemLocation(IFile file, int startChar, int endChar, int line) { return new CodanProblemLocation(file, startChar, endChar, line); diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemProfile.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemProfile.java index eaa0d524140..e1e63830d69 100644 --- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemProfile.java +++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemProfile.java @@ -6,13 +6,10 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Alena Laskavaia - initial API and implementation + * Alena Laskavaia - initial API and implementation *******************************************************************************/ package org.eclipse.cdt.codan.internal.core.model; -import java.util.ArrayList; -import java.util.Collection; - import org.eclipse.cdt.codan.core.model.IProblem; import org.eclipse.cdt.codan.core.model.IProblemCategory; import org.eclipse.cdt.codan.core.model.IProblemProfile; @@ -22,9 +19,11 @@ import org.eclipse.core.runtime.ISafeRunnable; import org.eclipse.core.runtime.ListenerList; import org.eclipse.core.runtime.SafeRunner; +import java.util.ArrayList; +import java.util.Collection; + /** * @author Alena - * */ public class ProblemProfile implements IProblemProfile, Cloneable { private CodanProblemCategory rootCategory; @@ -38,23 +37,11 @@ public class ProblemProfile implements IProblemProfile, Cloneable { rootCategory.setProfile(this); } - /* - * (non-Javadoc) - * - * @see - * org.eclipse.cdt.codan.core.model.IProblemProfile#getProblem(java.lang - * .String) - */ @Override public IProblem findProblem(String id) { return CodanProblemCategory.findProblem(getRoot(), id); } - /* - * (non-Javadoc) - * - * @see org.eclipse.cdt.codan.core.model.IProblemProfile#getProblems() - */ @Override public IProblem[] getProblems() { Collection problems = new ArrayList(); @@ -62,10 +49,6 @@ public class ProblemProfile implements IProblemProfile, Cloneable { return problems.toArray(new IProblem[problems.size()]); } - /** - * @param root - * @param problems - */ protected void collectProblems(IProblemCategory parent, Collection problems) { Object[] children = parent.getChildren(); for (Object object : children) { @@ -94,11 +77,6 @@ public class ProblemProfile implements IProblemProfile, Cloneable { return CodanProblemCategory.findCategory(getRoot(), id); } - /* - * (non-Javadoc) - * - * @see java.lang.Object#clone() - */ @Override public Object clone() { try { @@ -115,38 +93,21 @@ public class ProblemProfile implements IProblemProfile, Cloneable { } } - /** - * @param p - * @param cat - */ public void addCategory(IProblemCategory category, IProblemCategory parent) { ((CodanProblemCategory) parent).addChild(category); } - /* - * (non-Javadoc) - * - * @see org.eclipse.cdt.codan.core.model.IProblemElement#getProfile() - */ @Override public IProblemProfile getProfile() { return this; } - /* - * (non-Javadoc) - * - * @see org.eclipse.cdt.codan.core.model.IProblemElement#getParentCategory() - */ @Override public IProblemCategory getParentCategory() { return getRoot(); } private ListenerList preferenceChangeListeners; - /** - * @param listener - */ @Override public void addProfileChangeListener(IProblemProfileChangeListener listener) { if (preferenceChangeListeners == null) @@ -154,9 +115,6 @@ public class ProblemProfile implements IProblemProfile, Cloneable { preferenceChangeListeners.add(listener); } - /** - * @param listener - */ @Override public void removeProfileChangeListener(IProblemProfileChangeListener listener) { if (preferenceChangeListeners == null) @@ -166,14 +124,15 @@ public class ProblemProfile implements IProblemProfile, Cloneable { preferenceChangeListeners = null; } - /* + /** * Convenience method for notifying preference change listeners. */ protected void fireProfileChangeEvent(String key, Object oldValue, Object newValue) { if (preferenceChangeListeners == null) return; Object[] listeners = preferenceChangeListeners.getListeners(); - final ProblemProfileChangeEvent event = new ProblemProfileChangeEvent(this, this.resource, key, oldValue, newValue); + final ProblemProfileChangeEvent event = + new ProblemProfileChangeEvent(this, this.resource, key, oldValue, newValue); for (int i = 0; i < listeners.length; i++) { final IProblemProfileChangeListener listener = (IProblemProfileChangeListener) listeners[i]; ISafeRunnable job = new ISafeRunnable() { @@ -191,11 +150,6 @@ public class ProblemProfile implements IProblemProfile, Cloneable { } } - /* - * (non-Javadoc) - * - * @see org.eclipse.cdt.codan.core.model.IProblemProfile#getResource() - */ @Override public Object getResource() { return resource; diff --git a/codan/org.eclipse.cdt.codan.ui.cxx/.project b/codan/org.eclipse.cdt.codan.ui.cxx/.project index 26bef111065..a7271a07e66 100644 --- a/codan/org.eclipse.cdt.codan.ui.cxx/.project +++ b/codan/org.eclipse.cdt.codan.ui.cxx/.project @@ -1,6 +1,6 @@ - org.eclipse.cdt.codan.internal.ui.cxx + org.eclipse.cdt.codan.ui.cxx diff --git a/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/ui/cxx/externaltool/AbstractCxxExternalToolBasedChecker.java b/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/ui/cxx/externaltool/AbstractCxxExternalToolBasedChecker.java index 4329fddd932..ea4df5f20d9 100644 --- a/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/ui/cxx/externaltool/AbstractCxxExternalToolBasedChecker.java +++ b/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/ui/cxx/externaltool/AbstractCxxExternalToolBasedChecker.java @@ -38,6 +38,8 @@ import org.eclipse.ui.editors.text.TextEditor; * external tools cannot see unsaved changes. * * @author alruiz@google.com (Alex Ruiz) + * + * @since 3.0 */ public abstract class AbstractCxxExternalToolBasedChecker extends AbstractExternalToolBasedChecker { /**