mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Cosmetics.
This commit is contained in:
parent
1a13e176e8
commit
a6d6e88dc0
1 changed files with 12 additions and 22 deletions
|
@ -132,8 +132,7 @@ class THHierarchyModel {
|
|||
IWorkbenchSiteProgressService ps= fView.getProgressService();
|
||||
if (ps != null) {
|
||||
ps.schedule(fJob, 0L, true);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
fJob.schedule();
|
||||
}
|
||||
}
|
||||
|
@ -161,22 +160,19 @@ class THHierarchyModel {
|
|||
graph.addSubClasses(index, monitor);
|
||||
if (monitor.isCanceled())
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
index.releaseReadLock();
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
CUIPlugin.log(e);
|
||||
} catch (InterruptedException e) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
onJobDone(graph, job);
|
||||
}
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
|
||||
|
||||
protected void computeNodes() {
|
||||
if (fGraph == null) {
|
||||
return;
|
||||
|
@ -191,13 +187,11 @@ class THHierarchyModel {
|
|||
|
||||
if (fHierarchyKind == TYPE_HIERARCHY) {
|
||||
groots= fGraph.getLeaveNodes();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
THGraphNode node= fGraph.getInputNode();
|
||||
if (node != null) {
|
||||
groots= Collections.singleton(node);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
groots= Collections.emptySet();
|
||||
}
|
||||
}
|
||||
|
@ -214,8 +208,7 @@ class THHierarchyModel {
|
|||
List<THGraphEdge> edges= fwd ? gnode.getOutgoing() : gnode.getIncoming();
|
||||
if (edges.isEmpty()) {
|
||||
leafs.add(node);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
for (THGraphEdge edge : edges) {
|
||||
THGraphNode gchildNode= fwd ? edge.getEndNode() : edge.getStartNode();
|
||||
THNode childNode= createNode(node, gchildNode, inputNode);
|
||||
|
@ -271,8 +264,7 @@ class THHierarchyModel {
|
|||
if (node.equals(fSelectedTypeNode)) {
|
||||
result[0]= node;
|
||||
return;
|
||||
}
|
||||
else if (result[1] == null) {
|
||||
} else if (result[1] == null) {
|
||||
if (node.getElement().equals(fTypeToSelect)) {
|
||||
result[1]= node;
|
||||
}
|
||||
|
@ -324,11 +316,9 @@ class THHierarchyModel {
|
|||
THGraphNode inputNode= fGraph.getInputNode();
|
||||
if (!fGraph.isFileIndexed()) {
|
||||
fView.setMessage(IndexUI.getFileNotIndexedMessage(fInput));
|
||||
}
|
||||
else if (inputNode == null) {
|
||||
} else if (inputNode == null) {
|
||||
fView.setMessage(Messages.THHierarchyModel_errorComputingHierarchy);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (fTypeToSelect == fInput) {
|
||||
fTypeToSelect= inputNode.getElement();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue