diff options
author | Sergey Prigogin | 2011-08-20 23:23:05 +0000 |
---|---|---|
committer | Sergey Prigogin | 2011-08-21 03:44:27 +0000 |
commit | 0d95c85386fba3946b8e9208a89d7a677ef91148 (patch) | |
tree | 42c154b328edb480a41c462b899c2c450a84f587 | |
parent | f248dc94b2c3eeb9a5ce6a9949e251a640541a48 (diff) | |
download | org.eclipse.cdt-0d95c85386fba3946b8e9208a89d7a677ef91148.tar.gz org.eclipse.cdt-0d95c85386fba3946b8e9208a89d7a677ef91148.tar.xz org.eclipse.cdt-0d95c85386fba3946b8e9208a89d7a677ef91148.zip |
Cosmetics.
3 files changed, 18 insertions, 21 deletions
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java index e4bc6555ffc..cbbeb1f6ce3 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java @@ -551,10 +551,11 @@ public class IndexBugsTests extends BaseTestCase { fIndex.releaseReadLock(); } } + public void test164360_1() throws Exception { waitForIndexer(); IFile include= TestSourceReader.createFile(fCProject.getProject(), "test164360.h", ""); - TestScannerProvider.sIncludeFiles= new String[]{include.getLocation().toOSString()}; + TestScannerProvider.sIncludeFiles= new String[] { include.getLocation().toOSString() }; IFile file= TestSourceReader.createFile(fCProject.getProject(), "test164360.cpp", ""); TestSourceReader.waitUntilFileIsIndexed(fIndex, file, INDEX_WAIT_TIME); @@ -696,8 +697,7 @@ public class IndexBugsTests extends BaseTestCase { if (bindings[0] instanceof ICompositeType) { struct= bindings[0]; typedef= bindings[1]; - } - else { + } else { struct= bindings[1]; typedef= bindings[0]; } @@ -730,8 +730,7 @@ public class IndexBugsTests extends BaseTestCase { if (bindings[0] instanceof ICPPClassType) { struct= bindings[0]; typedef= bindings[1]; - } - else { + } else { struct= bindings[1]; typedef= bindings[0]; } @@ -1149,8 +1148,7 @@ public class IndexBugsTests extends BaseTestCase { assertEquals(1, bindings.length); IIndexBinding binding = bindings[0]; assertTrue(binding instanceof IVariable); - IIndexName[] names = index.findNames(binding, - IIndex.FIND_ALL_OCCURRENCES); + IIndexName[] names = index.findNames(binding, IIndex.FIND_ALL_OCCURRENCES); assertEquals(1, names.length); assertEquals(f4.getFullPath().toString(), names[0].getFile().getLocation().getFullPath()); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CompositeCStructure.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CompositeCStructure.java index e43876a24c5..35a5891b69b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CompositeCStructure.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/c/CompositeCStructure.java @@ -6,7 +6,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Andrew Ferguson (Symbian) - Initial implementation + * Andrew Ferguson (Symbian) - Initial implementation *******************************************************************************/ package org.eclipse.cdt.internal.core.index.composite.c; @@ -25,7 +25,7 @@ class CompositeCStructure extends CompositeCBinding implements ICompositeType, I } public IField findField(String name) { - IField preresult = ((ICompositeType)rbinding).findField(name); + IField preresult = ((ICompositeType) rbinding).findField(name); return (IField) cf.getCompositeBinding((IIndexFragmentBinding) preresult); } @@ -34,24 +34,24 @@ class CompositeCStructure extends CompositeCBinding implements ICompositeType, I } public IField[] getFields() { - IField[] result = ((ICompositeType)rbinding).getFields(); - for(int i=0; i<result.length; i++) - result[i] = (IField) cf.getCompositeBinding((IIndexFragmentBinding)result[i]); + IField[] result = ((ICompositeType) rbinding).getFields(); + for(int i= 0; i < result.length; i++) + result[i] = (IField) cf.getCompositeBinding((IIndexFragmentBinding) result[i]); return result; } public int getKey() { - return ((ICompositeType)rbinding).getKey(); + return ((ICompositeType) rbinding).getKey(); } public boolean isSameType(IType type) { - return ((ICompositeType)rbinding).isSameType(type); + return ((ICompositeType) rbinding).isSameType(type); } @Override public Object clone() {fail(); return null;} public boolean isAnonymous() { - return ((ICompositeType)rbinding).isAnonymous(); + return ((ICompositeType) rbinding).isAnonymous(); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCStructure.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCStructure.java index 8d91c4280a6..885c2655fe6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCStructure.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCStructure.java @@ -6,9 +6,9 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * QNX - Initial API and implementation - * Markus Schorn (Wind River Systems) - * Andrew Ferguson (Symbian) + * QNX - Initial API and implementation + * Markus Schorn (Wind River Systems) + * Andrew Ferguson (Symbian) *******************************************************************************/ package org.eclipse.cdt.internal.core.pdom.dom.c; @@ -91,7 +91,7 @@ public class PDOMCStructure extends PDOMBinding implements ICompositeType, ICCom @Override public void accept(IPDOMVisitor visitor) throws CoreException { super.accept(visitor); - new PDOMNodeLinkedList(getLinkage(), record+MEMBERLIST).accept(visitor); + new PDOMNodeLinkedList(getLinkage(), record + MEMBERLIST).accept(visitor); } @Override @@ -197,8 +197,7 @@ public class PDOMCStructure extends PDOMBinding implements ICompositeType, ICCom } catch (CoreException e) { if (e.getStatus().equals(Status.OK_STATUS)) { result= visitor.getField(); - } - else { + } else { CCorePlugin.log(e); return null; } |