mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +02:00
Cosmetics.
This commit is contained in:
parent
fe4e3fbe61
commit
6db1a5c8fd
4 changed files with 14 additions and 16 deletions
|
@ -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]);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -422,7 +422,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)
|
||||
|
@ -865,7 +865,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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue