null
in case
+ * Returns the file that is included by this include. May return {@code null} in case
* the included file is not part of this fragment.
*/
IIndexFragmentFile getIncludes() throws CoreException;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LocationCtx.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LocationCtx.java
index 3c62af24107..24def9e728f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LocationCtx.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/LocationCtx.java
@@ -69,7 +69,7 @@ abstract class LocationCtx implements ILocationCtx {
* child-contexts behind the given offset, you need to set checkChildren to true
.
*/
public int getSequenceNumberForOffset(int offset, boolean checkChildren) {
- return fSequenceNumber+offset;
+ return fSequenceNumber + offset;
}
/**
@@ -130,7 +130,8 @@ abstract class LocationCtx implements ILocationCtx {
* Returns the sequence of file locations spanning the given range.
* Assumes that the range starts within this context.
*/
- public abstract void collectLocations(int sequenceNumber, int length, ArrayList
+ *
* @since 5.0
*/
class LocationCtxContainer extends LocationCtx {
@@ -76,8 +76,8 @@ class LocationCtxContainer extends LocationCtx {
if (checkChildren && fChildren != null) {
for (int i= fChildren.size() - 1; i >= 0; i--) {
final LocationCtx child= fChildren.get(i);
- if (child.fEndOffsetInParent > offset) { // child was inserted behind the offset, adjust sequence number
- result-= child.getSequenceLength();
+ if (child.fEndOffsetInParent > offset) { // Child was inserted behind the offset, adjust sequence number
+ result -= child.getSequenceLength();
} else {
return result;
}
@@ -88,14 +88,14 @@ class LocationCtxContainer extends LocationCtx {
@Override
public void addChildSequenceLength(int childLength) {
- fChildSequenceLength+= childLength;
+ fChildSequenceLength += childLength;
}
@Override
public final LocationCtx findSurroundingContext(int sequenceNumber, int length) {
int testEnd= length > 1 ? sequenceNumber + length - 1 : sequenceNumber;
final LocationCtx child= findChildLessOrEqualThan(sequenceNumber, false);
- if (child != null && child.fSequenceNumber+child.getSequenceLength() > testEnd) {
+ if (child != null && child.fSequenceNumber + child.getSequenceLength() > testEnd) {
return child.findSurroundingContext(sequenceNumber, length);
}
return this;
@@ -105,7 +105,7 @@ class LocationCtxContainer extends LocationCtx {
public final LocationCtxMacroExpansion findEnclosingMacroExpansion(int sequenceNumber, int length) {
int testEnd= length > 1 ? sequenceNumber + length - 1 : sequenceNumber;
final LocationCtx child= findChildLessOrEqualThan(sequenceNumber, true);
- if (child != null && child.fSequenceNumber+child.getSequenceLength() > testEnd) {
+ if (child != null && child.fSequenceNumber + child.getSequenceLength() > testEnd) {
return child.findEnclosingMacroExpansion(sequenceNumber, length);
}
return null;
@@ -212,7 +212,7 @@ class LocationCtxContainer extends LocationCtx {
LocationCtx child= fChildren.get(middle);
int childSequenceNumber= child.fSequenceNumber;
if (beforeReplacedChars) {
- childSequenceNumber-= child.fEndOffsetInParent - child.fOffsetInParent;
+ childSequenceNumber -= child.fEndOffsetInParent - child.fOffsetInParent;
}
if (childSequenceNumber <= sequenceNumber) {
lower= middle + 1;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/IndexerInputAdapter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/IndexerInputAdapter.java
index fdcc094188a..4f27d33d3aa 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/IndexerInputAdapter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/IndexerInputAdapter.java
@@ -67,7 +67,7 @@ public abstract class IndexerInputAdapter extends ASTFilePathResolver {
/**
* Checks whether the given file should be indexed unconditionally.
- * @param location The Location of the file.
+ * @param location the location of the file.
* @return {@code true} if the file should be indexed unconditionally.
*/
public abstract boolean isIndexedUnconditionally(IIndexFileLocation location);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/TodoTaskParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/TodoTaskParser.java
index eeffbe9ecc7..fb5a294a74f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/TodoTaskParser.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/TodoTaskParser.java
@@ -8,7 +8,6 @@
* Contributors:
* Sergey Prigogin (Google) - initial API and implementation
*******************************************************************************/
-
package org.eclipse.cdt.internal.core.pdom.indexer;
import java.util.ArrayList;
@@ -20,7 +19,7 @@ import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
import org.eclipse.cdt.internal.core.CharOperation;
public class TodoTaskParser {
- private static final Task[] EMPTY_TASK_ARRAY = new Task[0];
+ private static final Task[] EMPTY_TASK_ARRAY = {};
private final char[][] tags;
private final int[] priorities;
@@ -58,11 +57,12 @@ public class TodoTaskParser {
List