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();
|
IWorkbenchSiteProgressService ps= fView.getProgressService();
|
||||||
if (ps != null) {
|
if (ps != null) {
|
||||||
ps.schedule(fJob, 0L, true);
|
ps.schedule(fJob, 0L, true);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
fJob.schedule();
|
fJob.schedule();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,22 +160,19 @@ class THHierarchyModel {
|
||||||
graph.addSubClasses(index, monitor);
|
graph.addSubClasses(index, monitor);
|
||||||
if (monitor.isCanceled())
|
if (monitor.isCanceled())
|
||||||
return Status.CANCEL_STATUS;
|
return Status.CANCEL_STATUS;
|
||||||
}
|
} finally {
|
||||||
finally {
|
|
||||||
index.releaseReadLock();
|
index.releaseReadLock();
|
||||||
}
|
}
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
CUIPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
return Status.CANCEL_STATUS;
|
return Status.CANCEL_STATUS;
|
||||||
}
|
} finally {
|
||||||
finally {
|
|
||||||
onJobDone(graph, job);
|
onJobDone(graph, job);
|
||||||
}
|
}
|
||||||
return Status.OK_STATUS;
|
return Status.OK_STATUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void computeNodes() {
|
protected void computeNodes() {
|
||||||
if (fGraph == null) {
|
if (fGraph == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -191,13 +187,11 @@ class THHierarchyModel {
|
||||||
|
|
||||||
if (fHierarchyKind == TYPE_HIERARCHY) {
|
if (fHierarchyKind == TYPE_HIERARCHY) {
|
||||||
groots= fGraph.getLeaveNodes();
|
groots= fGraph.getLeaveNodes();
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
THGraphNode node= fGraph.getInputNode();
|
THGraphNode node= fGraph.getInputNode();
|
||||||
if (node != null) {
|
if (node != null) {
|
||||||
groots= Collections.singleton(node);
|
groots= Collections.singleton(node);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
groots= Collections.emptySet();
|
groots= Collections.emptySet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -214,8 +208,7 @@ class THHierarchyModel {
|
||||||
List<THGraphEdge> edges= fwd ? gnode.getOutgoing() : gnode.getIncoming();
|
List<THGraphEdge> edges= fwd ? gnode.getOutgoing() : gnode.getIncoming();
|
||||||
if (edges.isEmpty()) {
|
if (edges.isEmpty()) {
|
||||||
leafs.add(node);
|
leafs.add(node);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
for (THGraphEdge edge : edges) {
|
for (THGraphEdge edge : edges) {
|
||||||
THGraphNode gchildNode= fwd ? edge.getEndNode() : edge.getStartNode();
|
THGraphNode gchildNode= fwd ? edge.getEndNode() : edge.getStartNode();
|
||||||
THNode childNode= createNode(node, gchildNode, inputNode);
|
THNode childNode= createNode(node, gchildNode, inputNode);
|
||||||
|
@ -271,8 +264,7 @@ class THHierarchyModel {
|
||||||
if (node.equals(fSelectedTypeNode)) {
|
if (node.equals(fSelectedTypeNode)) {
|
||||||
result[0]= node;
|
result[0]= node;
|
||||||
return;
|
return;
|
||||||
}
|
} else if (result[1] == null) {
|
||||||
else if (result[1] == null) {
|
|
||||||
if (node.getElement().equals(fTypeToSelect)) {
|
if (node.getElement().equals(fTypeToSelect)) {
|
||||||
result[1]= node;
|
result[1]= node;
|
||||||
}
|
}
|
||||||
|
@ -324,11 +316,9 @@ class THHierarchyModel {
|
||||||
THGraphNode inputNode= fGraph.getInputNode();
|
THGraphNode inputNode= fGraph.getInputNode();
|
||||||
if (!fGraph.isFileIndexed()) {
|
if (!fGraph.isFileIndexed()) {
|
||||||
fView.setMessage(IndexUI.getFileNotIndexedMessage(fInput));
|
fView.setMessage(IndexUI.getFileNotIndexedMessage(fInput));
|
||||||
}
|
} else if (inputNode == null) {
|
||||||
else if (inputNode == null) {
|
|
||||||
fView.setMessage(Messages.THHierarchyModel_errorComputingHierarchy);
|
fView.setMessage(Messages.THHierarchyModel_errorComputingHierarchy);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (fTypeToSelect == fInput) {
|
if (fTypeToSelect == fInput) {
|
||||||
fTypeToSelect= inputNode.getElement();
|
fTypeToSelect= inputNode.getElement();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue