diff options
author | Sergey Prigogin | 2011-06-30 04:19:53 +0000 |
---|---|---|
committer | Sergey Prigogin | 2011-06-30 17:02:25 +0000 |
commit | 3d7537fca662c59b029058ce402b394871b5ca84 (patch) | |
tree | 993b78125b0208e57c6a0505d98724ec69269d19 /core | |
parent | a9f41ac547a5e95b79a324273f269d268de508ef (diff) | |
download | org.eclipse.cdt-3d7537fca662c59b029058ce402b394871b5ca84.tar.gz org.eclipse.cdt-3d7537fca662c59b029058ce402b394871b5ca84.tar.xz org.eclipse.cdt-3d7537fca662c59b029058ce402b394871b5ca84.zip |
Cosmetics.
Diffstat (limited to 'core')
3 files changed, 11 insertions, 18 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHContentProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHContentProvider.java index ddbc2242bd7..ed0d6811f88 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHContentProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHContentProvider.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.ui.callhierarchy; @@ -42,7 +42,6 @@ import org.eclipse.cdt.internal.ui.viewsupport.WorkingSetFilterUI; * This is the content provider for the call hierarchy. */ public class CHContentProvider extends AsyncTreeContentProvider { - private static final IProgressMonitor NPM = new NullProgressMonitor(); private boolean fComputeReferencedBy = true; private WorkingSetFilterUI fFilter; @@ -79,13 +78,12 @@ public class CHContentProvider extends AsyncTreeContentProvider { if (node.isInitializer()) { return NO_CHILDREN; } - } - else if (node.isVariableOrEnumerator() || node.isMacro()) { + } else if (node.isVariableOrEnumerator() || node.isMacro()) { return NO_CHILDREN; } } - // allow for async computation + // Allow for async computation return null; } @@ -122,8 +120,7 @@ public class CHContentProvider extends AsyncTreeContentProvider { fView.reportNotIndexed(input); } }); - } - else { + } else { element= IndexUI.attemptConvertionToHandle(index, input); final ICElement finalElement= element; getDisplay().asyncExec(new Runnable() { @@ -146,8 +143,7 @@ public class CHContentProvider extends AsyncTreeContentProvider { } } return new Object[] { new CHNode(null, tu, 0, element, -1) }; - } - finally { + } finally { index.releaseReadLock(); } } @@ -158,8 +154,7 @@ public class CHContentProvider extends AsyncTreeContentProvider { index.acquireReadLock(); try { return CHQueries.findCalledBy(this, parent, index, NPM); - } - finally { + } finally { index.releaseReadLock(); } } @@ -170,8 +165,7 @@ public class CHContentProvider extends AsyncTreeContentProvider { index.acquireReadLock(); try { return CHQueries.findCalls(this, parent, index, NPM); - } - finally { + } finally { index.releaseReadLock(); } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHQueries.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHQueries.java index a58bd7afecd..07cf22d12aa 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHQueries.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHQueries.java @@ -35,7 +35,6 @@ import org.eclipse.cdt.internal.core.model.ext.ICElementHandle; import org.eclipse.cdt.internal.ui.viewsupport.IndexUI; - /** * Access to high level queries in the index. * @since 4.0 @@ -100,7 +99,6 @@ public class CHQueries { } } - private static void findCalledBy2(IIndex index, IBinding callee, boolean includeOrdinaryCalls, ICProject project, CalledByResult result) throws CoreException { IIndexName[] names= index.findNames(callee, IIndex.FIND_REFERENCES | IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES); @@ -130,7 +128,7 @@ public class CHQueries { for (IIndexName name : refs) { IBinding binding= index.findBinding(name); if (CallHierarchyUI.isRelevantForCallHierarchy(binding)) { - for(;;) { + while (true) { ICElement[] defs= null; if (binding instanceof ICPPMethod) { defs = findOverriders(index, (ICPPMethod) binding); @@ -154,7 +152,8 @@ public class CHQueries { } /** - * Searches for overriders of method and converts them to ICElement, returns null, if there are none. + * Searches for overriders of method and converts them to ICElement, returns null, + * if there are none. */ static ICElement[] findOverriders(IIndex index, ICPPMethod binding) throws CoreException { IBinding[] virtualOverriders= ClassTypeHelper.findOverriders(index, binding); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CallHierarchyUI.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CallHierarchyUI.java index e7d35434566..43298556bea 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CallHierarchyUI.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CallHierarchyUI.java @@ -80,7 +80,7 @@ public class CallHierarchyUI { private static CHViewPart internalOpen(IWorkbenchWindow window, ICElement input) { IWorkbenchPage page= window.getActivePage(); try { - CHViewPart result= (CHViewPart)page.showView(CUIPlugin.ID_CALL_HIERARCHY); + CHViewPart result= (CHViewPart) page.showView(CUIPlugin.ID_CALL_HIERARCHY); result.setInput(input); return result; } catch (CoreException e) { |