summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Oberhuber2013-01-15 10:50:16 (EST)
committer Sergey Prigogin2013-01-15 15:12:03 (EST)
commit4811216ec478de5971f300483c2c2778279a0d1c (patch)
tree6deea3da999a512fe1a8406aa67f2e5b5f1928be
parent62fa04403152027d2bf9b88c931afcdca81a946c (diff)
downloadorg.eclipse.cdt-4811216ec478de5971f300483c2c2778279a0d1c.zip
org.eclipse.cdt-4811216ec478de5971f300483c2c2778279a0d1c.tar.gz
org.eclipse.cdt-4811216ec478de5971f300483c2c2778279a0d1c.tar.bz2
Bug 398195 - Consider external ReadOnlyPDOMProvider in Include Browserrefs/changes/82/9682/2
Change-Id: Iebb2e9bd7c40e3fbfa4beb380208e06d3cb5e49e Reviewed-on: https://git.eclipse.org/r/9682 Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBViewPart.java7
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IncludeBrowserUI.java7
2 files changed, 10 insertions, 4 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBViewPart.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBViewPart.java
index a1e011e..7ce2132 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBViewPart.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBViewPart.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 Wind River Systems, Inc. and others.
+ * Copyright (c) 2006, 2013 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* Markus Schorn - initial API and implementation
* Ed Swartz (Nokia)
+ * Martin Oberhuber (Wind River) - bug 398195: consider external API in IB
*******************************************************************************/
package org.eclipse.cdt.internal.ui.includebrowser;
@@ -81,6 +82,7 @@ import org.eclipse.ui.part.ViewPart;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.index.IIndex;
import org.eclipse.cdt.core.index.IIndexFileLocation;
+import org.eclipse.cdt.core.index.IIndexManager;
import org.eclipse.cdt.core.index.IndexLocationFactory;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.CoreModel;
@@ -214,7 +216,8 @@ public class IBViewPart extends ViewPart implements IShowInSource, IShowInTarget
protected IStatus run(IProgressMonitor monitor) {
try {
final ICProject[] projects= CoreModel.getDefault().getCModel().getCProjects();
- IIndex index= CCorePlugin.getIndexManager().getIndex(projects);
+ IIndex index= CCorePlugin.getIndexManager().getIndex(projects,
+ IIndexManager.ADD_EXTENSION_FRAGMENTS_INCLUDE_BROWSER);
index.acquireReadLock();
try {
if (!IndexUI.isIndexed(index, input)) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IncludeBrowserUI.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IncludeBrowserUI.java
index 0421681..c78d9c6 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IncludeBrowserUI.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IncludeBrowserUI.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2013 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* Markus Schorn - initial API and implementation
+ * Martin Oberhuber (Wind River) - bug 398195: consider external API in IB
*******************************************************************************/
package org.eclipse.cdt.internal.ui.includebrowser;
@@ -21,6 +22,7 @@ import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.index.IIndex;
import org.eclipse.cdt.core.index.IIndexFileLocation;
import org.eclipse.cdt.core.index.IIndexInclude;
+import org.eclipse.cdt.core.index.IIndexManager;
import org.eclipse.cdt.core.model.CoreModelUtil;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICProject;
@@ -70,7 +72,8 @@ public class IncludeBrowserUI {
private static ITranslationUnit findTargetTranslationUnit(IInclude input) throws CoreException, InterruptedException {
ICProject project= input.getCProject();
if (project != null) {
- IIndex index= CCorePlugin.getIndexManager().getIndex(project);
+ IIndex index= CCorePlugin.getIndexManager().getIndex(project,
+ IIndexManager.ADD_EXTENSION_FRAGMENTS_INCLUDE_BROWSER);
index.acquireReadLock();
try {
IIndexInclude include= IndexUI.elementToInclude(index, input);