mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Show in include browser for external files with multiple projects, bug 230032.
This commit is contained in:
parent
4bf9d0cd24
commit
94d7f9594a
4 changed files with 6 additions and 6 deletions
|
@ -175,7 +175,7 @@ public class CHViewPart extends ViewPart {
|
||||||
|
|
||||||
public void reportNotIndexed(ICElement input) {
|
public void reportNotIndexed(ICElement input) {
|
||||||
if (input != null && getInput() == input) {
|
if (input != null && getInput() == input) {
|
||||||
setMessage(IndexUI.getFleNotIndexedMessage(input));
|
setMessage(IndexUI.getFileNotIndexedMessage(input));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -210,12 +210,12 @@ public class IBViewPart extends ViewPart
|
||||||
@Override
|
@Override
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
try {
|
try {
|
||||||
IIndex index= CCorePlugin.getIndexManager().getIndex(input.getCProject());
|
final ICProject[] projects= CoreModel.getDefault().getCModel().getCProjects();
|
||||||
|
IIndex index= CCorePlugin.getIndexManager().getIndex(projects);
|
||||||
index.acquireReadLock();
|
index.acquireReadLock();
|
||||||
try {
|
try {
|
||||||
if (!IndexUI.isIndexed(index, input)) {
|
if (!IndexUI.isIndexed(index, input)) {
|
||||||
final String msg = IndexUI
|
final String msg = IndexUI.getFileNotIndexedMessage(input);
|
||||||
.getFleNotIndexedMessage(input);
|
|
||||||
display.asyncExec(new Runnable() {
|
display.asyncExec(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
if (fTreeViewer.getInput() == input) {
|
if (fTreeViewer.getInput() == input) {
|
||||||
|
|
|
@ -319,7 +319,7 @@ class THHierarchyModel {
|
||||||
fGraph= graph;
|
fGraph= graph;
|
||||||
THGraphNode inputNode= fGraph.getInputNode();
|
THGraphNode inputNode= fGraph.getInputNode();
|
||||||
if (!fGraph.isFileIndexed()) {
|
if (!fGraph.isFileIndexed()) {
|
||||||
fView.setMessage(IndexUI.getFleNotIndexedMessage(fInput));
|
fView.setMessage(IndexUI.getFileNotIndexedMessage(fInput));
|
||||||
}
|
}
|
||||||
else if (inputNode == null) {
|
else if (inputNode == null) {
|
||||||
fView.setMessage(Messages.THHierarchyModel_errorComputingHierarchy);
|
fView.setMessage(Messages.THHierarchyModel_errorComputingHierarchy);
|
||||||
|
|
|
@ -394,7 +394,7 @@ public class IndexUI {
|
||||||
return result[0];
|
return result[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getFleNotIndexedMessage(ICElement input) {
|
public static String getFileNotIndexedMessage(ICElement input) {
|
||||||
ITranslationUnit tu= null;
|
ITranslationUnit tu= null;
|
||||||
if (input instanceof ISourceReference) {
|
if (input instanceof ISourceReference) {
|
||||||
ISourceReference ref= (ISourceReference) input;
|
ISourceReference ref= (ISourceReference) input;
|
||||||
|
|
Loading…
Add table
Reference in a new issue