mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
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>
This commit is contained in:
parent
62fa044031
commit
4811216ec4
2 changed files with 10 additions and 4 deletions
|
@ -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)) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue