mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Compiler warnings.
This commit is contained in:
parent
43cb130a27
commit
88ba647612
23 changed files with 115 additions and 99 deletions
|
@ -11,7 +11,6 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.model;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ICodeReaderFactory;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.index.IIndex;
|
||||
|
@ -20,7 +19,6 @@ import org.eclipse.cdt.core.parser.IParserLogService;
|
|||
import org.eclipse.cdt.core.parser.IScannerInfo;
|
||||
import org.eclipse.cdt.core.parser.IncludeFileContentProvider;
|
||||
import org.eclipse.cdt.internal.core.parser.CodeReaderAdapter;
|
||||
import org.eclipse.cdt.internal.core.parser.CodeReaderFactoryAdapter;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.PlatformObject;
|
||||
|
||||
|
@ -47,7 +45,7 @@ public abstract class AbstractLanguage extends PlatformObject implements ILangua
|
|||
@Deprecated
|
||||
public IASTTranslationUnit getASTTranslationUnit(org.eclipse.cdt.core.parser.CodeReader reader,
|
||||
IScannerInfo scanInfo,
|
||||
ICodeReaderFactory fileCreator, IIndex index, int options, IParserLogService log)
|
||||
org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator, IIndex index, int options, IParserLogService log)
|
||||
throws CoreException {
|
||||
// For backwards compatibility, should be overridden.
|
||||
return getASTTranslationUnit(reader, scanInfo, fileCreator, index, log);
|
||||
|
@ -61,8 +59,9 @@ public abstract class AbstractLanguage extends PlatformObject implements ILangua
|
|||
IncludeFileContentProvider fileCreator, IIndex index, int options, IParserLogService log)
|
||||
throws CoreException {
|
||||
// For backwards compatibility, should be overridden.
|
||||
return getASTTranslationUnit(CodeReaderAdapter.adapt(content), scanInfo, CodeReaderFactoryAdapter
|
||||
.adapt(fileCreator), index, options, log);
|
||||
return getASTTranslationUnit(CodeReaderAdapter.adapt(content), scanInfo,
|
||||
org.eclipse.cdt.internal.core.parser.CodeReaderFactoryAdapter.adapt(fileCreator), index,
|
||||
options, log);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -73,7 +72,8 @@ public abstract class AbstractLanguage extends PlatformObject implements ILangua
|
|||
IncludeFileContentProvider fileCreator, IIndex index, IParserLogService log, int offset)
|
||||
throws CoreException {
|
||||
// For backwards compatibility, should be overridden.
|
||||
return getCompletionNode(CodeReaderAdapter.adapt(reader), scanInfo, CodeReaderFactoryAdapter
|
||||
.adapt(fileCreator), index, log, offset);
|
||||
return getCompletionNode(CodeReaderAdapter.adapt(reader), scanInfo,
|
||||
org.eclipse.cdt.internal.core.parser.CodeReaderFactoryAdapter.adapt(fileCreator), index, log,
|
||||
offset);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2007, 2010 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
|
||||
|
@ -13,13 +13,11 @@ package org.eclipse.cdt.core.model;
|
|||
import java.util.Set;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.dom.ICodeReaderFactory;
|
||||
import org.eclipse.cdt.core.dom.ILinkage;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.index.IIndex;
|
||||
import org.eclipse.cdt.core.parser.CodeReader;
|
||||
import org.eclipse.cdt.core.parser.IParserLogService;
|
||||
import org.eclipse.cdt.core.parser.IScannerInfo;
|
||||
import org.eclipse.cdt.core.parser.KeywordSetKey;
|
||||
|
@ -83,16 +81,20 @@ public class AssemblyLanguage extends AbstractLanguage implements IAsmLanguage,
|
|||
/*
|
||||
* @see org.eclipse.cdt.core.model.ILanguage#getASTTranslationUnit(org.eclipse.cdt.core.parser.CodeReader, org.eclipse.cdt.core.parser.IScannerInfo, org.eclipse.cdt.core.dom.ICodeReaderFactory, org.eclipse.cdt.core.index.IIndex, org.eclipse.cdt.core.parser.IParserLogService)
|
||||
*/
|
||||
public IASTTranslationUnit getASTTranslationUnit(CodeReader reader, IScannerInfo scanInfo,
|
||||
ICodeReaderFactory fileCreator, IIndex index, IParserLogService log) throws CoreException {
|
||||
@Deprecated
|
||||
public IASTTranslationUnit getASTTranslationUnit(org.eclipse.cdt.core.parser.CodeReader reader,
|
||||
IScannerInfo scanInfo, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator, IIndex index,
|
||||
IParserLogService log) throws CoreException {
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* @see org.eclipse.cdt.core.model.ILanguage#getCompletionNode(org.eclipse.cdt.core.parser.CodeReader, org.eclipse.cdt.core.parser.IScannerInfo, org.eclipse.cdt.core.dom.ICodeReaderFactory, org.eclipse.cdt.core.index.IIndex, org.eclipse.cdt.core.parser.IParserLogService, int)
|
||||
*/
|
||||
public IASTCompletionNode getCompletionNode(CodeReader reader, IScannerInfo scanInfo,
|
||||
ICodeReaderFactory fileCreator, IIndex index, IParserLogService log, int offset) throws CoreException {
|
||||
@Deprecated
|
||||
public IASTCompletionNode getCompletionNode(org.eclipse.cdt.core.parser.CodeReader reader,
|
||||
IScannerInfo scanInfo, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator, IIndex index,
|
||||
IParserLogService log, int offset) throws CoreException {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2009 QNX Software Systems and others.
|
||||
* Copyright (c) 2005, 2010 QNX Software Systems 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
|
||||
|
@ -12,7 +12,6 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.model;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ICodeReaderFactory;
|
||||
import org.eclipse.cdt.core.dom.ILinkage;
|
||||
import org.eclipse.cdt.core.dom.ast.ASTVisitor;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
|
||||
|
@ -154,22 +153,24 @@ public interface ILanguage extends IAdaptable {
|
|||
*/
|
||||
@Deprecated
|
||||
IASTTranslationUnit getASTTranslationUnit(org.eclipse.cdt.core.parser.CodeReader reader,
|
||||
IScannerInfo scanInfo, ICodeReaderFactory fileCreator, IIndex index, IParserLogService log)
|
||||
throws CoreException;
|
||||
IScannerInfo scanInfo, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator, IIndex index,
|
||||
IParserLogService log) throws CoreException;
|
||||
|
||||
/**
|
||||
* @deprecated replaced by {@link #getASTTranslationUnit(FileContent, IScannerInfo,
|
||||
* IncludeFileContentProvider, IIndex, int, IParserLogService)}
|
||||
*/
|
||||
@Deprecated
|
||||
IASTTranslationUnit getASTTranslationUnit(org.eclipse.cdt.core.parser.CodeReader reader,
|
||||
IScannerInfo scanInfo, ICodeReaderFactory fileCreator, IIndex index, int options,
|
||||
IParserLogService log) throws CoreException;
|
||||
IScannerInfo scanInfo, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator, IIndex index,
|
||||
int options, IParserLogService log) throws CoreException;
|
||||
|
||||
/**
|
||||
* @deprecated replaced by {@link #getCompletionNode(FileContent, IScannerInfo,
|
||||
* IncludeFileContentProvider, IIndex, IParserLogService, int)}.
|
||||
*/
|
||||
@Deprecated
|
||||
IASTCompletionNode getCompletionNode(org.eclipse.cdt.core.parser.CodeReader reader,
|
||||
IScannerInfo scanInfo, ICodeReaderFactory fileCreator, IIndex index, IParserLogService log,
|
||||
int offset) throws CoreException;
|
||||
IScannerInfo scanInfo, org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator, IIndex index,
|
||||
IParserLogService log, int offset) throws CoreException;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007 Intel Corporation and others.
|
||||
* Copyright (c) 2007, 2010 Intel Corporation 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
|
||||
|
@ -214,6 +214,7 @@ public class PathEntryTranslator {
|
|||
};
|
||||
// private static final int INEXISTENT_INDEX = -1;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private Map<String, IPathEntry>[] fEntryStorage = new Map[STORAGE_SIZE];
|
||||
|
||||
private int kindToIndex(int kind){
|
||||
|
@ -1752,13 +1753,10 @@ public class PathEntryTranslator {
|
|||
private ResourceInfo[] performTranslation(IPath basePath, ResourceInfo[] baseInfos, String seg){
|
||||
IPath filterFullPath = basePath.append(seg);
|
||||
boolean needsParsing = hasSpecChars(seg);
|
||||
ResourceInfo baseInfo;
|
||||
List<ResourceInfo> list = new ArrayList<ResourceInfo>();
|
||||
char[] segChars = seg.toCharArray();
|
||||
IResource baseRc;
|
||||
for(int i = 0; i < baseInfos.length; i++){
|
||||
baseInfo = baseInfos[i];
|
||||
baseRc = baseInfo.fRc;
|
||||
for (ResourceInfo baseInfo : baseInfos) {
|
||||
IResource baseRc = baseInfo.fRc;
|
||||
if(baseRc.getType() == IResource.FILE){
|
||||
continue;
|
||||
} else {
|
||||
|
@ -1773,8 +1771,8 @@ public class PathEntryTranslator {
|
|||
IResource children[] = baseCr.members();
|
||||
ResourceInfo rcInfo;
|
||||
for (IResource child : children) {
|
||||
if(CoreModelUtil.match(segChars, children[i].getName().toCharArray(), true)){
|
||||
rcInfo = new ResourceInfo(children[i], true);
|
||||
if(CoreModelUtil.match(segChars, child.getName().toCharArray(), true)){
|
||||
rcInfo = new ResourceInfo(child, true);
|
||||
addRcInfoToMap(rcInfo);
|
||||
list.add(rcInfo);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007 Intel Corporation and others.
|
||||
* Copyright (c) 2007, 2010 Intel Corporation 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
|
||||
|
@ -82,30 +82,32 @@ public abstract class ResourceChangeHandlerBase implements IResourceChangeListen
|
|||
boolean removed = false;
|
||||
|
||||
switch (delta.getKind()) {
|
||||
case IResourceDelta.REMOVED :
|
||||
removed = true;
|
||||
case IResourceDelta.CHANGED :
|
||||
int flags = delta.getFlags();
|
||||
if ((flags & IResourceDelta.MOVED_TO) != 0) {
|
||||
IPath path = delta.getMovedToPath();
|
||||
if(path != null){
|
||||
IResource toRc = getResource(path, dResource);
|
||||
resume = checkInitHandleResourceMove(dResource, toRc);
|
||||
}
|
||||
break;
|
||||
} else if((flags & IResourceDelta.MOVED_FROM) != 0){
|
||||
IPath path = delta.getMovedFromPath();
|
||||
if(path != null){
|
||||
IResource fromRc = getResource(path, dResource);
|
||||
resume = checkInitHandleResourceMove(fromRc, dResource);
|
||||
}
|
||||
break;
|
||||
} else if (removed){
|
||||
resume = fHandler.handleResourceRemove(dResource);
|
||||
case IResourceDelta.REMOVED:
|
||||
removed = true;
|
||||
//$FALL-THROUGH$
|
||||
case IResourceDelta.CHANGED:
|
||||
int flags = delta.getFlags();
|
||||
if ((flags & IResourceDelta.MOVED_TO) != 0) {
|
||||
IPath path = delta.getMovedToPath();
|
||||
if (path != null) {
|
||||
IResource toRc = getResource(path, dResource);
|
||||
resume = checkInitHandleResourceMove(dResource, toRc);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
} else if ((flags & IResourceDelta.MOVED_FROM) != 0) {
|
||||
IPath path = delta.getMovedFromPath();
|
||||
if (path != null) {
|
||||
IResource fromRc = getResource(path, dResource);
|
||||
resume = checkInitHandleResourceMove(fromRc, dResource);
|
||||
}
|
||||
break;
|
||||
} else if (removed) {
|
||||
resume = fHandler.handleResourceRemove(dResource);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return resume; // visit the children
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007 Intel Corporation and others.
|
||||
* Copyright (c) 2007, 2010 Intel Corporation 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
|
||||
|
@ -158,6 +158,7 @@ public abstract class AbstractCExtensionProxy implements ICProjectDescriptionLis
|
|||
switch(event.getEventType()){
|
||||
case CProjectDescriptionEvent.LOADED:
|
||||
force = true;
|
||||
//$FALL-THROUGH$
|
||||
case CProjectDescriptionEvent.APPLIED:
|
||||
ICProjectDescription des = event.getNewCProjectDescription();
|
||||
if(des != null){
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007 Intel Corporation and others.
|
||||
* Copyright (c) 2007, 2010 Intel Corporation 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
|
||||
|
@ -18,11 +18,13 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICExclusionPatternPathEntry;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
|
||||
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICSourceEntry;
|
||||
import org.eclipse.cdt.core.settings.model.WriteAccessException;
|
||||
|
@ -96,8 +98,7 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
|
|||
ICProjectDescription des = getProjectDescription(toProject, true);
|
||||
if(des != null){
|
||||
ICConfigurationDescription cfgDess[] = des.getConfigurations();
|
||||
for(int i = 0; i < cfgDess.length; i++){
|
||||
ICConfigurationDescription cfg = cfgDess[i];
|
||||
for (ICConfigurationDescription cfg : cfgDess) {
|
||||
ICExclusionPatternPathEntry entries[] = cfg.getSourceEntries();
|
||||
entries = checkMove(fromFullPath, toFullPath, entries);
|
||||
if(entries != null){
|
||||
|
@ -134,8 +135,8 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
|
|||
ICProjectDescription des = getProjectDescription(toProject, true);
|
||||
if(des != null){
|
||||
ICConfigurationDescription cfgDess[] = des.getConfigurations();
|
||||
for(int i = 0; i < cfgDess.length; i++){
|
||||
ICResourceDescription rcDescription = cfgDess[i].getResourceDescription(fromRcProjPath, true);
|
||||
for (ICConfigurationDescription cfgDes : cfgDess) {
|
||||
ICResourceDescription rcDescription = cfgDes.getResourceDescription(fromRcProjPath, true);
|
||||
if(rcDescription != null){
|
||||
try {
|
||||
rcDescription.setPath(toRcProjPath);
|
||||
|
@ -156,9 +157,9 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
|
|||
IProject project = rc.getProject();
|
||||
ICProjectDescription des = fProjDesMap.get(project);
|
||||
if(des == null && !fProjDesMap.containsKey(project)){
|
||||
int flags = load ? 0 : CProjectDescriptionManager.GET_IF_LOADDED;
|
||||
int flags = load ? 0 : ICProjectDescriptionManager.GET_IF_LOADDED;
|
||||
flags |= CProjectDescriptionManager.INTERNAL_GET_IGNORE_CLOSE;
|
||||
flags |= CProjectDescriptionManager.GET_WRITABLE;
|
||||
flags |= ICProjectDescriptionManager.GET_WRITABLE;
|
||||
des = fMngr.getProjectDescription(project, flags);
|
||||
if(des != null)
|
||||
fProjDesMap.put(project, des);
|
||||
|
@ -166,15 +167,15 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
|
|||
return des;
|
||||
}
|
||||
|
||||
private void setProjectDescription(IProject project, ICProjectDescription des){
|
||||
fProjDesMap.put(project, des);
|
||||
}
|
||||
// private void setProjectDescription(IProject project, ICProjectDescription des){
|
||||
// fProjDesMap.put(project, des);
|
||||
// }
|
||||
|
||||
private List<ICExclusionPatternPathEntry> checkRemove(IPath rcFullPath, ICExclusionPatternPathEntry[] entries){
|
||||
List<ICExclusionPatternPathEntry> updatedList = null;
|
||||
int num = 0;
|
||||
for(int k = 0; k < entries.length; k++){
|
||||
if(entries[k].getFullPath().equals(rcFullPath)){
|
||||
for (ICExclusionPatternPathEntry entrie : entries) {
|
||||
if(entrie.getFullPath().equals(rcFullPath)){
|
||||
if(updatedList == null){
|
||||
updatedList = new ArrayList<ICExclusionPatternPathEntry>(Arrays.asList(entries));
|
||||
}
|
||||
|
@ -202,8 +203,7 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
|
|||
if(des != null){
|
||||
IPath rcFullPath = rc.getFullPath();
|
||||
ICConfigurationDescription cfgDess[] = des.getConfigurations();
|
||||
for(int i = 0; i < cfgDess.length; i++){
|
||||
ICConfigurationDescription cfg = cfgDess[i];
|
||||
for (ICConfigurationDescription cfg : cfgDess) {
|
||||
ICExclusionPatternPathEntry[] entries = cfg.getSourceEntries();
|
||||
List<ICExclusionPatternPathEntry> updatedList = checkRemove(rcFullPath, entries);
|
||||
|
||||
|
@ -235,11 +235,11 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
|
|||
if(des != null){
|
||||
IPath rcProjPath = rc.getProjectRelativePath();
|
||||
ICConfigurationDescription cfgDess[] = des.getConfigurations();
|
||||
for(int i = 0; i < cfgDess.length; i++){
|
||||
ICResourceDescription rcDescription = cfgDess[i].getResourceDescription(rcProjPath, true);
|
||||
for (ICConfigurationDescription cfgDes : cfgDess) {
|
||||
ICResourceDescription rcDescription = cfgDes.getResourceDescription(rcProjPath, true);
|
||||
if(rcDescription != null){
|
||||
try {
|
||||
cfgDess[i].removeResourceDescription(rcDescription);
|
||||
cfgDes.removeResourceDescription(rcDescription);
|
||||
} catch (WriteAccessException e) {
|
||||
CCorePlugin.log(e);
|
||||
} catch (CoreException e) {
|
||||
|
@ -271,8 +271,7 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
|
|||
CProjectDescriptionManager.runWspModification(new IWorkspaceRunnable(){
|
||||
|
||||
public void run(IProgressMonitor monitor) throws CoreException {
|
||||
for(Iterator<Map.Entry<IProject, ICProjectDescription>> iter = fProjDesMap.entrySet().iterator(); iter.hasNext();){
|
||||
Map.Entry<IProject, ICProjectDescription> entry = iter.next();
|
||||
for (Entry<IProject, ICProjectDescription> entry : fProjDesMap.entrySet()) {
|
||||
IProject project = entry.getKey();
|
||||
if(!project.isOpen())
|
||||
continue;
|
||||
|
@ -337,8 +336,8 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
|
|||
IResourceDelta delta = event.getDelta();
|
||||
if(delta != null){
|
||||
IResourceDelta projs[] = delta.getAffectedChildren();
|
||||
for(int i = 0; i < projs.length; i++){
|
||||
IResourceDelta projDelta = projs[i];
|
||||
for (IResourceDelta proj : projs) {
|
||||
IResourceDelta projDelta = proj;
|
||||
if(!shouldVisit((IProject)projDelta.getResource()))
|
||||
continue;
|
||||
|
||||
|
@ -346,8 +345,7 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
|
|||
continue;
|
||||
|
||||
IResourceDelta children[] = projDelta.getAffectedChildren();
|
||||
for(int k = 0; k < children.length; k++){
|
||||
IResourceDelta child = children[k];
|
||||
for (IResourceDelta child : children) {
|
||||
IResource rc = child.getResource();
|
||||
if(rc.getType() != IResource.FILE)
|
||||
continue;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2009, 2010 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
|
||||
|
@ -11,7 +11,6 @@
|
|||
package org.eclipse.cdt.core.parser;
|
||||
|
||||
import org.eclipse.cdt.internal.core.parser.EmptyFilesProvider;
|
||||
import org.eclipse.cdt.internal.core.parser.FileContentProviderAdapter;
|
||||
import org.eclipse.cdt.internal.core.parser.SavedFilesProvider;
|
||||
|
||||
|
||||
|
@ -44,6 +43,6 @@ public abstract class IncludeFileContentProvider {
|
|||
*/
|
||||
@Deprecated
|
||||
public static IncludeFileContentProvider adapt(org.eclipse.cdt.core.dom.ICodeReaderFactory factory) {
|
||||
return FileContentProviderAdapter.adapt(factory);
|
||||
return org.eclipse.cdt.internal.core.parser.FileContentProviderAdapter.adapt(factory);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2009 QNX Software Systems and others.
|
||||
* Copyright (c) 2006, 2010 QNX Software Systems 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
|
||||
|
@ -35,6 +35,7 @@ public class StandaloneFastIndexerTask extends StandaloneIndexerTask {
|
|||
super(indexer, added, changed, removed, true);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected IncludeFileContentProvider createReaderFactory() {
|
||||
return IncludeFileContentProvider.adapt(new StandaloneIndexerFallbackReaderFactory());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2009 QNX Software Systems and others.
|
||||
* Copyright (c) 2006, 2010 QNX Software Systems 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
|
||||
|
@ -40,6 +40,7 @@ import org.eclipse.core.runtime.CoreException;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class StandaloneFullIndexer extends StandaloneIndexer{
|
||||
|
||||
private AbstractCodeReaderFactory fCodeReaderFactory;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2009 QNX Software Systems and others.
|
||||
* Copyright (c) 2006, 2010 QNX Software Systems 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
|
||||
|
@ -36,6 +36,7 @@ public class StandaloneFullIndexerTask extends StandaloneIndexerTask {
|
|||
super(indexer, added, changed, removed, false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected IncludeFileContentProvider createReaderFactory() {
|
||||
return IncludeFileContentProvider.adapt(((StandaloneFullIndexer)fIndexer).getCodeReaderFactory());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2007, 2010 IBM Corporation 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
|
||||
|
@ -32,6 +32,7 @@ import org.eclipse.core.runtime.CoreException;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
public class StandaloneIndexerFallbackReaderFactory extends AbstractCodeReaderFactory {
|
||||
|
||||
public StandaloneIndexerFallbackReaderFactory() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2009, 2010 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
|
||||
|
@ -18,6 +18,7 @@ import org.eclipse.cdt.internal.core.dom.AbstractCodeReaderFactory;
|
|||
import org.eclipse.cdt.internal.core.parser.scanner.InternalFileContentProvider;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
@Deprecated
|
||||
public class CodeReaderFactoryAdapter extends AbstractCodeReaderFactory {
|
||||
|
||||
/**
|
||||
|
@ -43,19 +44,16 @@ public class CodeReaderFactoryAdapter extends AbstractCodeReaderFactory {
|
|||
fDelegate= fcp;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public org.eclipse.cdt.core.parser.CodeReader createCodeReaderForInclusion(String path) {
|
||||
return CodeReaderAdapter.adapt(fDelegate.getContentForInclusion(path));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public org.eclipse.cdt.core.parser.CodeReader createCodeReaderForInclusion(IIndexFileLocation ifl, String astPath)
|
||||
throws CoreException, IOException {
|
||||
return CodeReaderAdapter.adapt(fDelegate.getContentForInclusion(ifl, astPath));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public org.eclipse.cdt.core.parser.CodeReader createCodeReaderForTranslationUnit(String path) {
|
||||
return CodeReaderAdapter.adapt(fDelegate.getContentForInclusion(path));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2009, 2010 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
|
||||
|
@ -13,6 +13,7 @@ package org.eclipse.cdt.internal.core.parser;
|
|||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.dom.ICodeReaderFactory;
|
||||
import org.eclipse.cdt.core.index.IIndexFileLocation;
|
||||
import org.eclipse.cdt.core.parser.FileContent;
|
||||
import org.eclipse.cdt.internal.core.dom.AbstractCodeReaderFactory;
|
||||
|
@ -21,13 +22,14 @@ import org.eclipse.cdt.internal.core.parser.scanner.InternalFileContent;
|
|||
import org.eclipse.cdt.internal.core.parser.scanner.InternalFileContentProvider;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
@Deprecated
|
||||
public class FileContentProviderAdapter extends InternalFileContentProvider {
|
||||
|
||||
/**
|
||||
* @deprecated avoid using the adapter, its for backwards compatibility, only.
|
||||
*/
|
||||
@Deprecated
|
||||
public static InternalFileContentProvider adapt(org.eclipse.cdt.core.dom.ICodeReaderFactory fileCreator) {
|
||||
public static InternalFileContentProvider adapt(ICodeReaderFactory fileCreator) {
|
||||
if (fileCreator == null)
|
||||
return null;
|
||||
|
||||
|
@ -54,13 +56,11 @@ public class FileContentProviderAdapter extends InternalFileContentProvider {
|
|||
return fDelegate;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public InternalFileContent getContentForInclusion(String path) {
|
||||
return (InternalFileContent) FileContent.adapt(fDelegate.createCodeReaderForInclusion(path));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public InternalFileContent getContentForInclusion(IIndexFileLocation ifl, String astPath) {
|
||||
try {
|
||||
|
|
|
@ -17,6 +17,7 @@ import org.eclipse.core.runtime.PlatformObject;
|
|||
|
||||
public abstract class AbstractCExtension extends PlatformObject implements ICExtension {
|
||||
private IProject fProject;
|
||||
@Deprecated
|
||||
private ICExtensionReference extensionRef;
|
||||
private ICConfigExtensionReference fCfgExtensionRef;
|
||||
|
||||
|
@ -74,6 +75,7 @@ public abstract class AbstractCExtension extends PlatformObject implements ICExt
|
|||
/**
|
||||
* @noreference This method is not intended to be referenced by clients.
|
||||
*/
|
||||
@Deprecated
|
||||
public void setExtensionReference(ICExtensionReference extReference) {
|
||||
extensionRef = extReference;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2004, 2010 IBM Corporation 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
|
||||
|
@ -12,6 +12,8 @@ package org.eclipse.cdt.core.dom;
|
|||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.model.ILanguage;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IStorage;
|
||||
|
@ -24,7 +26,9 @@ import org.eclipse.core.resources.IStorage;
|
|||
* @author jcamelon
|
||||
* @noextend This interface is not intended to be extended by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
* @deprecated Use methods provided by {@link ITranslationUnit} or {@link ILanguage}.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface IASTServiceProvider {
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2005, 2010 IBM Corporation 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
|
||||
|
@ -40,6 +40,7 @@ import org.eclipse.core.runtime.jobs.Job;
|
|||
* @noextend This class is not intended to be subclassed by clients.
|
||||
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||
*/
|
||||
@Deprecated
|
||||
public class CodeReaderCache implements ICodeReaderCache {
|
||||
/**
|
||||
* The string used to identify this CodeReaderCache. Mainly used for preferences.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2002, 2010 IBM Corporation 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
|
||||
|
@ -62,6 +62,7 @@ public class ParserUtil
|
|||
return null;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static CodeReader createReader(String path, Iterator<IWorkingCopy> workingCopies) {
|
||||
// check to see if the file which this path points to points to an
|
||||
// IResource in the workspace
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008, 2009 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2008, 2010 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
|
||||
|
@ -21,6 +21,7 @@ import org.eclipse.core.runtime.IAdaptable;
|
|||
/**
|
||||
* Base implementation for all code reader factories.
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class AbstractCodeReaderFactory implements ICodeReaderFactory, IAdaptable {
|
||||
|
||||
private final IIncludeFileResolutionHeuristics fHeuristics;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
|
||||
* Copyright (c) 2007, 2010 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
|
||||
|
@ -19,6 +19,7 @@ import org.eclipse.cdt.core.parser.ICodeReaderCache;
|
|||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
@Deprecated
|
||||
public class NullCodeReaderFactory extends AbstractCodeReaderFactory {
|
||||
|
||||
private static final char[] EMPTY_CHARS = new char[0];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2004, 2010 IBM Corporation 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
|
||||
|
@ -28,6 +28,7 @@ import org.eclipse.core.runtime.CoreException;
|
|||
/**
|
||||
* @author jcamelon
|
||||
*/
|
||||
@Deprecated
|
||||
public class PartialWorkingCopyCodeReaderFactory extends AbstractCodeReaderFactory {
|
||||
|
||||
private final IWorkingCopyProvider provider;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2004, 2010 IBM Corporation 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
|
||||
|
@ -25,6 +25,7 @@ import org.eclipse.core.runtime.Preferences;
|
|||
/**
|
||||
* @author jcamelon
|
||||
*/
|
||||
@Deprecated
|
||||
public class SavedCodeReaderFactory extends AbstractCodeReaderFactory {
|
||||
|
||||
private static ICodeReaderCache cache;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2004, 2010 IBM Corporation 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
|
||||
|
@ -18,6 +18,7 @@ import org.eclipse.cdt.core.parser.IScanner;
|
|||
/**
|
||||
* @author jcamelon
|
||||
*/
|
||||
@Deprecated
|
||||
public class WorkingCopyCodeReaderFactory extends PartialWorkingCopyCodeReaderFactory {
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue