Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Oberhuber2013-01-15 15:50:16 +0000
committerSergey Prigogin2013-01-16 17:58:46 +0000
commit8f33175f15993fa11803cfc510fa76b18e08abea (patch)
tree59a9ee25e44ff8340ee56c388fda7584f923bba3
parent641ded5f4285520913ad17311f2a091e2176373e (diff)
downloadorg.eclipse.cdt-8f33175f15993fa11803cfc510fa76b18e08abea.tar.gz
org.eclipse.cdt-8f33175f15993fa11803cfc510fa76b18e08abea.tar.xz
org.eclipse.cdt-8f33175f15993fa11803cfc510fa76b18e08abea.zip
Bug 398195 - Consider external ReadOnlyPDOMProvider in Include Browser
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 a1e011e4d9c..7ce213219c7 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 0421681c7a8..c78d9c6ea5b 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);

Back to the top