From ec1281a7934026fd1386f50b9fe04de7a53ae055 Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Tue, 24 Feb 2009 16:58:37 +0000 Subject: [PATCH] Added linkage-id for objective-c, bug 265748. --- .../org/eclipse/cdt/internal/core/dom/Linkage.java | 7 ++++++- .../org/eclipse/cdt/internal/core/index/CIndex.java | 12 ++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/Linkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/Linkage.java index fa25c7fbd8c..ad80a6934df 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/Linkage.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/Linkage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others. + * Copyright (c) 2006, 2009 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 @@ -23,7 +23,12 @@ public class Linkage implements ILinkage { public static final ILinkage OBJC_LINKAGE = new Linkage(OBJC_LINKAGE_ID, OBJC_LINKAGE_NAME); private static final ILinkage[] LINKAGES= {C_LINKAGE, CPP_LINKAGE, FORTRAN_LINKAGE, OBJC_LINKAGE}; + private static final ILinkage[] INDEX_LINKAGES= {C_LINKAGE, CPP_LINKAGE, FORTRAN_LINKAGE}; + public static final ILinkage[] getIndexerLinkages() { + return INDEX_LINKAGES; + } + public static final ILinkage[] getAllLinkages() { return LINKAGES; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/CIndex.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/CIndex.java index 46fc4f2a3e9..656b73eaf66 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/CIndex.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/CIndex.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2008 Wind River Systems, Inc. and others. + * Copyright (c) 2006, 2009 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 @@ -97,7 +97,7 @@ public class CIndex implements IIndex { return fFragments[0].findBindings(patterns, isFullyQualified, filter, monitor); } else { List result = new ArrayList(); - ILinkage[] linkages = Linkage.getAllLinkages(); + ILinkage[] linkages = Linkage.getIndexerLinkages(); for(int j=0; j < linkages.length; j++) { if(filter.acceptLinkage(linkages[j])) { IIndexFragmentBinding[][] fragmentBindings = new IIndexFragmentBinding[fPrimaryFragmentCount][]; @@ -124,7 +124,7 @@ public class CIndex implements IIndex { return fFragments[0].findMacroContainers(pattern, filter, monitor); } else { List result = new ArrayList(); - ILinkage[] linkages = Linkage.getAllLinkages(); + ILinkage[] linkages = Linkage.getIndexerLinkages(); for(int j=0; j < linkages.length; j++) { if(filter.acceptLinkage(linkages[j])) { IIndexFragmentBinding[][] fragmentBindings = new IIndexFragmentBinding[fPrimaryFragmentCount][]; @@ -378,7 +378,7 @@ public class CIndex implements IIndex { monitor= new NullProgressMonitor(); } List result = new ArrayList(); - ILinkage[] linkages = Linkage.getAllLinkages(); + ILinkage[] linkages = Linkage.getIndexerLinkages(); monitor.beginTask(Messages.CIndex_FindBindingsTask_label, fFragments.length * linkages.length); for(int j=0; j < linkages.length; j++) { if(filter.acceptLinkage(linkages[j])) { @@ -504,7 +504,7 @@ public class CIndex implements IIndex { return fFragments[0].findBindingsForPrefix(prefix, filescope, filter, monitor); } else { List result = new ArrayList(); - ILinkage[] linkages = Linkage.getAllLinkages(); + ILinkage[] linkages = Linkage.getIndexerLinkages(); for(int j=0; j < linkages.length; j++) { if(filter.acceptLinkage(linkages[j])) { IIndexFragmentBinding[][] fragmentBindings = new IIndexFragmentBinding[fPrimaryFragmentCount][]; @@ -531,7 +531,7 @@ public class CIndex implements IIndex { return fFragments[0].findBindings(name, filescope, filter, monitor); } else { List result = new ArrayList(); - ILinkage[] linkages = Linkage.getAllLinkages(); + ILinkage[] linkages = Linkage.getIndexerLinkages(); for(int j=0; j < linkages.length; j++) { if(filter.acceptLinkage(linkages[j])) { IIndexFragmentBinding[][] fragmentBindings = new IIndexFragmentBinding[fPrimaryFragmentCount][];