Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2013-09-06 19:55:57 -0400
committerSergey Prigogin2013-09-10 12:46:11 -0400
commit665f381488dc26e66fa790ff68fd0287864ba83f (patch)
tree17798dc77fe3ef44dc2d7ad5a2bfd243524ffc06
parentf1275ddaaa578dc9f75d2bb6a990df2b4e1499ab (diff)
downloadorg.eclipse.cdt-665f381488dc26e66fa790ff68fd0287864ba83f.tar.gz
org.eclipse.cdt-665f381488dc26e66fa790ff68fd0287864ba83f.tar.xz
org.eclipse.cdt-665f381488dc26e66fa790ff68fd0287864ba83f.zip
Cosmetics.
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexSearchTest.java13
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java11
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java4
4 files changed, 14 insertions, 16 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexSearchTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexSearchTest.java
index edafd768af..00ea462be8 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexSearchTest.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexSearchTest.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Markus Schorn - initial API and implementation
+ * Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.index.tests;
@@ -37,7 +37,6 @@ import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
import org.eclipse.core.runtime.CoreException;
public class IndexSearchTest extends IndexTestBase {
-
private static final IndexFilter INDEX_FILTER = IndexFilter.ALL_DECLARED;
public static TestSuite suite() {
@@ -46,8 +45,8 @@ public class IndexSearchTest extends IndexTestBase {
return suite;
}
- private ICProject fProject= null;
- private IIndex fIndex= null;
+ private ICProject fProject;
+ private IIndex fIndex;
public IndexSearchTest(String name) {
super(name);
@@ -188,7 +187,7 @@ public class IndexSearchTest extends IndexTestBase {
IIndexBinding[] bindings;
- // the binding in the unnamed namespace is not visible in global scope.
+ // The binding in the unnamed namespace is not visible in global scope.
bindings= fIndex.findBindings(pcl, true, INDEX_FILTER, npm());
assertEquals(1, bindings.length);
assertTrue(bindings[0].isFileLocal());
@@ -196,7 +195,7 @@ public class IndexSearchTest extends IndexTestBase {
bindings= fIndex.findBindings(pcl.pattern().toCharArray(), INDEX_FILTER, npm());
assertEquals(1, bindings.length);
assertTrue(bindings[0].isFileLocal());
-}
+ }
public void testFindEnumerator() throws CoreException {
Pattern pEnumeration= Pattern.compile("E20061017");
@@ -206,7 +205,7 @@ public class IndexSearchTest extends IndexTestBase {
IIndexBinding[] bindings;
- // enumerators are found in global scope
+ // Enumerators are found in global scope.
bindings= fIndex.findBindings(pEnumerator, true, INDEX_FILTER, npm());
assertEquals(1, bindings.length);
checkIsEnumerator(bindings[0]);
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java
index 7a7d6a430b..9f6f394ec6 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java
@@ -753,8 +753,7 @@ public class PDOM extends PlatformObject implements IPDOM {
} catch (CoreException e) {
if (e.getStatus() != Status.OK_STATUS)
throw e;
- else
- return IIndexFragmentBinding.EMPTY_INDEX_BINDING_ARRAY;
+ return IIndexFragmentBinding.EMPTY_INDEX_BINDING_ARRAY;
}
}
}
@@ -847,8 +846,7 @@ public class PDOM extends PlatformObject implements IPDOM {
} catch (CoreException e) {
if (e.getStatus() != Status.OK_STATUS)
throw e;
- else
- return IIndexFragmentBinding.EMPTY_INDEX_BINDING_ARRAY;
+ return IIndexFragmentBinding.EMPTY_INDEX_BINDING_ARRAY;
}
}
}
@@ -1326,8 +1324,7 @@ public class PDOM extends PlatformObject implements IPDOM {
result.addAll(visitor.getMacroList());
}
}
- }
- catch (OperationCanceledException e) {
+ } catch (OperationCanceledException e) {
}
return result.toArray(new IIndexFragmentBinding[result.size()]);
}
@@ -1601,6 +1598,7 @@ public class PDOM extends PlatformObject implements IPDOM {
fTraces.add(Thread.currentThread().getStackTrace());
return fTraces.size();
}
+
@SuppressWarnings("nls")
public void write(String threadName) {
System.out.println("Thread: '" + threadName + "': " + fReadLocks + " readlocks, " + fWriteLocks + " writelocks");
@@ -1611,6 +1609,7 @@ public class PDOM extends PlatformObject implements IPDOM {
}
}
}
+
public void inc(DebugLockInfo val) {
fReadLocks+= val.fReadLocks;
fWriteLocks+= val.fWriteLocks;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java
index b3ed6a1eab..b6e2d68c18 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java
@@ -72,7 +72,7 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage
protected static final long[] FILE_LOCAL_REC_DUMMY = new long[]{0};
// Node types
- protected static final int LINKAGE= 0; // special one for myself
+ protected static final int LINKAGE= 0; // Special one for myself
private BTree fMacroIndex= null; // No need for volatile, all fields of BTree are final.
private final PDOM fPDOM;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java
index 559732393d..afd19a4c97 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java
@@ -421,7 +421,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
PDOMBinding pdomBinding= null;
PDOMNode parent2= null;
- // template parameters are created directly by their owners.
+ // Template parameters are created directly by their owners.
if (binding instanceof ICPPTemplateParameter)
return null;
if (binding instanceof ICPPUnknownBinding)
@@ -864,7 +864,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
return null;
}
} else {
- // Skip unnamed namespaces.
+ // Skip anonymous namespaces.
while (owner instanceof ICPPNamespace) {
char[] name= owner.getNameCharArray();
if (name.length > 0) {

Back to the top