mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-22 00:15:25 +02:00
auto-clean: @Override annotations + organize imports + unnecessary
casts/$NON-NLS + trailing white spaces
This commit is contained in:
parent
2a1cddd716
commit
5c1a981cd7
311 changed files with 6186 additions and 4412 deletions
|
@ -57,6 +57,7 @@ public interface IMethodDeclaration extends IMember, IFunctionDeclaration {
|
||||||
* Returns if this method is static or not
|
* Returns if this method is static or not
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isStatic() throws CModelException;
|
public boolean isStatic() throws CModelException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -21,6 +21,7 @@ public interface IUsing extends ICElement, ISourceManipulation, ISourceReference
|
||||||
* Returns the name of the package the statement refers to.
|
* Returns the name of the package the statement refers to.
|
||||||
* This is a handle-only method.
|
* This is a handle-only method.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
String getElementName();
|
String getElementName();
|
||||||
|
|
||||||
boolean isDirective();
|
boolean isDirective();
|
||||||
|
|
|
@ -164,10 +164,12 @@ public class LanguageManager {
|
||||||
if (langId.equals(id)) {
|
if (langId.equals(id)) {
|
||||||
final ILanguage[] result= new ILanguage[]{null};
|
final ILanguage[] result= new ILanguage[]{null};
|
||||||
SafeRunner.run(new ISafeRunnable() {
|
SafeRunner.run(new ISafeRunnable() {
|
||||||
|
@Override
|
||||||
public void handleException(Throwable exception) {
|
public void handleException(Throwable exception) {
|
||||||
CCorePlugin.log(exception);
|
CCorePlugin.log(exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
result[0]= (ILanguage)languageElem.createExecutableExtension(ATTRIBUTE_CLASS);
|
result[0]= (ILanguage)languageElem.createExecutableExtension(ATTRIBUTE_CLASS);
|
||||||
}
|
}
|
||||||
|
@ -325,10 +327,12 @@ public class LanguageManager {
|
||||||
for (final IConfigurationElement element : configs) {
|
for (final IConfigurationElement element : configs) {
|
||||||
if (ELEMENT_PDOM_LINKAGE_FACTORY.equals(element.getName())) {
|
if (ELEMENT_PDOM_LINKAGE_FACTORY.equals(element.getName())) {
|
||||||
SafeRunner.run(new ISafeRunnable() {
|
SafeRunner.run(new ISafeRunnable() {
|
||||||
|
@Override
|
||||||
public void handleException(Throwable exception) {
|
public void handleException(Throwable exception) {
|
||||||
CCorePlugin.log(exception);
|
CCorePlugin.log(exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
result[0] = (IPDOMLinkageFactory) element.createExecutableExtension(ATTRIBUTE_CLASS);
|
result[0] = (IPDOMLinkageFactory) element.createExecutableExtension(ATTRIBUTE_CLASS);
|
||||||
}}
|
}}
|
||||||
|
@ -364,10 +368,12 @@ public class LanguageManager {
|
||||||
String langId = getLanguageID(languageElem);
|
String langId = getLanguageID(languageElem);
|
||||||
final ILanguage[] result= new ILanguage[] { null };
|
final ILanguage[] result= new ILanguage[] { null };
|
||||||
SafeRunner.run(new ISafeRunnable() {
|
SafeRunner.run(new ISafeRunnable() {
|
||||||
|
@Override
|
||||||
public void handleException(Throwable exception) {
|
public void handleException(Throwable exception) {
|
||||||
CCorePlugin.log(exception);
|
CCorePlugin.log(exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
result[0]= (ILanguage) languageElem.createExecutableExtension(ATTRIBUTE_CLASS);
|
result[0]= (ILanguage) languageElem.createExecutableExtension(ATTRIBUTE_CLASS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ public class LanguageMappingChangeEvent implements ILanguageMappingChangeEvent {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ILanguageMappingsChangeEvent#getAffectedContentTypes()
|
* @see org.eclipse.cdt.core.model.ILanguageMappingsChangeEvent#getAffectedContentTypes()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IContentType[] getAffectedContentTypes() {
|
public IContentType[] getAffectedContentTypes() {
|
||||||
return fContentTypes;
|
return fContentTypes;
|
||||||
}
|
}
|
||||||
|
@ -42,6 +43,7 @@ public class LanguageMappingChangeEvent implements ILanguageMappingChangeEvent {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ILanguageMappingsChangeEvent#getFile()
|
* @see org.eclipse.cdt.core.model.ILanguageMappingsChangeEvent#getFile()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IFile getFile() {
|
public IFile getFile() {
|
||||||
return fFile;
|
return fFile;
|
||||||
}
|
}
|
||||||
|
@ -49,6 +51,7 @@ public class LanguageMappingChangeEvent implements ILanguageMappingChangeEvent {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ILanguageMappingsChangeEvent#getFilename()
|
* @see org.eclipse.cdt.core.model.ILanguageMappingsChangeEvent#getFilename()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getFilename() {
|
public String getFilename() {
|
||||||
|
|
||||||
// if the filename has been set, use it. otherwise get the path from
|
// if the filename has been set, use it. otherwise get the path from
|
||||||
|
@ -84,6 +87,7 @@ public class LanguageMappingChangeEvent implements ILanguageMappingChangeEvent {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ILanguageMappingsChangeEvent#getPath()
|
* @see org.eclipse.cdt.core.model.ILanguageMappingsChangeEvent#getPath()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getPath() {
|
public IPath getPath() {
|
||||||
|
|
||||||
if(fPath != null)
|
if(fPath != null)
|
||||||
|
@ -103,6 +107,7 @@ public class LanguageMappingChangeEvent implements ILanguageMappingChangeEvent {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ILanguageMappingsChangeEvent#getProject()
|
* @see org.eclipse.cdt.core.model.ILanguageMappingsChangeEvent#getProject()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IProject getProject() {
|
public IProject getProject() {
|
||||||
|
|
||||||
if(fProject != null)
|
if(fProject != null)
|
||||||
|
@ -121,6 +126,7 @@ public class LanguageMappingChangeEvent implements ILanguageMappingChangeEvent {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ILanguageMappingsChangeEvent#getType()
|
* @see org.eclipse.cdt.core.model.ILanguageMappingsChangeEvent#getType()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getType() {
|
public int getType() {
|
||||||
return fType;
|
return fType;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ public class CDTListComparator implements Comparator<Object> {
|
||||||
comparator = new CDTListComparator();
|
comparator = new CDTListComparator();
|
||||||
return comparator;
|
return comparator;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public int compare(Object a, Object b) {
|
public int compare(Object a, Object b) {
|
||||||
if (a == null || b == null)
|
if (a == null || b == null)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -45,6 +45,7 @@ public abstract class ACExclusionFilterEntry extends ACPathEntry implements ICEx
|
||||||
* Returns the exclusion patterns
|
* Returns the exclusion patterns
|
||||||
* @return IPath[]
|
* @return IPath[]
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath[] getExclusionPatterns() {
|
public IPath[] getExclusionPatterns() {
|
||||||
return exclusionPatterns.length != 0 ? (IPath[])exclusionPatterns.clone() : exclusionPatterns;
|
return exclusionPatterns.length != 0 ? (IPath[])exclusionPatterns.clone() : exclusionPatterns;
|
||||||
}
|
}
|
||||||
|
@ -52,6 +53,7 @@ public abstract class ACExclusionFilterEntry extends ACPathEntry implements ICEx
|
||||||
/**
|
/**
|
||||||
* Returns a char based representation of the exclusions patterns full path.
|
* Returns a char based representation of the exclusions patterns full path.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public char[][] fullExclusionPatternChars() {
|
public char[][] fullExclusionPatternChars() {
|
||||||
if (this.fullCharExclusionPatterns == UNINIT_PATTERNS) {
|
if (this.fullCharExclusionPatterns == UNINIT_PATTERNS) {
|
||||||
int length = this.exclusionPatterns.length;
|
int length = this.exclusionPatterns.length;
|
||||||
|
|
|
@ -47,6 +47,7 @@ public abstract class ACPathEntry extends ACSettingEntry
|
||||||
// fLocation = path;
|
// fLocation = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath getFullPath() {
|
public IPath getFullPath() {
|
||||||
if(isValueWorkspacePath())
|
if(isValueWorkspacePath())
|
||||||
return new Path(getValue());
|
return new Path(getValue());
|
||||||
|
@ -69,6 +70,7 @@ public abstract class ACPathEntry extends ACSettingEntry
|
||||||
|
|
||||||
protected abstract boolean isFile();
|
protected abstract boolean isFile();
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath getLocation() {
|
public IPath getLocation() {
|
||||||
if(!isValueWorkspacePath())
|
if(!isValueWorkspacePath())
|
||||||
return new Path(getValue());
|
return new Path(getValue());
|
||||||
|
@ -81,6 +83,7 @@ public abstract class ACPathEntry extends ACSettingEntry
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isValueWorkspacePath() {
|
public boolean isValueWorkspacePath() {
|
||||||
return checkFlags(VALUE_WORKSPACE_PATH);
|
return checkFlags(VALUE_WORKSPACE_PATH);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,10 +24,12 @@ public abstract class ACSettingEntry implements ICSettingEntry {
|
||||||
fFlags = flags;
|
fFlags = flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isBuiltIn() {
|
public boolean isBuiltIn() {
|
||||||
return checkFlags(BUILTIN);
|
return checkFlags(BUILTIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isReadOnly() {
|
public boolean isReadOnly() {
|
||||||
return checkFlags(READONLY);
|
return checkFlags(READONLY);
|
||||||
}
|
}
|
||||||
|
@ -36,16 +38,19 @@ public abstract class ACSettingEntry implements ICSettingEntry {
|
||||||
return (fFlags & flags) == flags;
|
return (fFlags & flags) == flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return fName;
|
return fName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
//name and value differ only for macro entry and have the same contents
|
//name and value differ only for macro entry and have the same contents
|
||||||
//for all other entries
|
//for all other entries
|
||||||
return fName;
|
return fName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isResolved() {
|
public boolean isResolved() {
|
||||||
return checkFlags(RESOLVED);
|
return checkFlags(RESOLVED);
|
||||||
}
|
}
|
||||||
|
@ -77,10 +82,12 @@ public abstract class ACSettingEntry implements ICSettingEntry {
|
||||||
return getKind() + fFlags + fName.hashCode();
|
return getKind() + fFlags + fName.hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getFlags() {
|
public int getFlags() {
|
||||||
return fFlags;
|
return fFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean equalsByContents(ICSettingEntry entry) {
|
public boolean equalsByContents(ICSettingEntry entry) {
|
||||||
return equalsByName(entry);
|
return equalsByName(entry);
|
||||||
}
|
}
|
||||||
|
@ -89,6 +96,7 @@ public abstract class ACSettingEntry implements ICSettingEntry {
|
||||||
return (fFlags & (~ (BUILTIN | READONLY | RESOLVED)));
|
return (fFlags & (~ (BUILTIN | READONLY | RESOLVED)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public final boolean equalsByName(ICSettingEntry entry) {
|
public final boolean equalsByName(ICSettingEntry entry) {
|
||||||
if(entry == this)
|
if(entry == this)
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -85,24 +85,28 @@ public final class CExternalSetting implements ICExternalSetting {
|
||||||
return set;
|
return set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getCompatibleContentTypeIds() {
|
public String[] getCompatibleContentTypeIds() {
|
||||||
if (fContentTypeIds != null)
|
if (fContentTypeIds != null)
|
||||||
return fContentTypeIds.clone();
|
return fContentTypeIds.clone();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getCompatibleExtensions() {
|
public String[] getCompatibleExtensions() {
|
||||||
if (fExtensions != null)
|
if (fExtensions != null)
|
||||||
return fExtensions.clone();
|
return fExtensions.clone();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getCompatibleLanguageIds() {
|
public String[] getCompatibleLanguageIds() {
|
||||||
if (fLanguageIds != null)
|
if (fLanguageIds != null)
|
||||||
return fLanguageIds.clone();
|
return fLanguageIds.clone();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICSettingEntry[] getEntries(int kind) {
|
public ICSettingEntry[] getEntries(int kind) {
|
||||||
CEntriesSet set = getEntriesSet(kind, false);
|
CEntriesSet set = getEntriesSet(kind, false);
|
||||||
if (set != null)
|
if (set != null)
|
||||||
|
@ -114,6 +118,7 @@ public final class CExternalSetting implements ICExternalSetting {
|
||||||
// return fId;
|
// return fId;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICSettingEntry[] getEntries() {
|
public ICSettingEntry[] getEntries() {
|
||||||
List<ICSettingEntry> result = new ArrayList<ICSettingEntry>();
|
List<ICSettingEntry> result = new ArrayList<ICSettingEntry>();
|
||||||
int kinds[] = KindBasedStore.getAllEntryKinds();
|
int kinds[] = KindBasedStore.getAllEntryKinds();
|
||||||
|
|
|
@ -28,6 +28,7 @@ public final class CIncludeFileEntry extends ACPathEntry implements
|
||||||
super(rc, flags);
|
super(rc, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public final int getKind() {
|
public final int getKind() {
|
||||||
return INCLUDE_FILE;
|
return INCLUDE_FILE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,12 @@ public final class CIncludePathEntry extends ACPathEntry implements ICIncludePat
|
||||||
super(rc, flags);
|
super(rc, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isLocal() {
|
public boolean isLocal() {
|
||||||
return checkFlags(LOCAL);
|
return checkFlags(LOCAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public final int getKind() {
|
public final int getKind() {
|
||||||
return INCLUDE_PATH;
|
return INCLUDE_PATH;
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,6 +71,7 @@ public final class CLibraryFileEntry extends ACPathEntry implements
|
||||||
fSourceAttachmentPrefixMapping = sourceAttachmentPrefixMapping != null ? sourceAttachmentPrefixMapping : Path.EMPTY;
|
fSourceAttachmentPrefixMapping = sourceAttachmentPrefixMapping != null ? sourceAttachmentPrefixMapping : Path.EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public final int getKind() {
|
public final int getKind() {
|
||||||
return LIBRARY_FILE;
|
return LIBRARY_FILE;
|
||||||
}
|
}
|
||||||
|
@ -80,14 +81,17 @@ public final class CLibraryFileEntry extends ACPathEntry implements
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath getSourceAttachmentPath() {
|
public IPath getSourceAttachmentPath() {
|
||||||
return fSourceAttachmentPath;
|
return fSourceAttachmentPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath getSourceAttachmentPrefixMapping() {
|
public IPath getSourceAttachmentPrefixMapping() {
|
||||||
return fSourceAttachmentPrefixMapping;
|
return fSourceAttachmentPrefixMapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath getSourceAttachmentRootPath() {
|
public IPath getSourceAttachmentRootPath() {
|
||||||
return fSourceAttachmentRootPath;
|
return fSourceAttachmentRootPath;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ public final class CLibraryPathEntry extends ACPathEntry implements
|
||||||
super(rc, flags);
|
super(rc, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public final int getKind() {
|
public final int getKind() {
|
||||||
return LIBRARY_PATH;
|
return LIBRARY_PATH;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ public final class CMacroEntry extends ACSettingEntry implements ICMacroEntry{
|
||||||
return fValue;
|
return fValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public final int getKind() {
|
public final int getKind() {
|
||||||
return MACRO;
|
return MACRO;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ public final class CMacroFileEntry extends ACPathEntry implements
|
||||||
super(rc, flags);
|
super(rc, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public final int getKind() {
|
public final int getKind() {
|
||||||
return MACRO_FILE;
|
return MACRO_FILE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ public final class COutputEntry extends ACExclusionFilterEntry implements ICOutp
|
||||||
super(value, exclusionPatterns, flags | VALUE_WORKSPACE_PATH);
|
super(value, exclusionPatterns, flags | VALUE_WORKSPACE_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public final int getKind() {
|
public final int getKind() {
|
||||||
return OUTPUT_PATH;
|
return OUTPUT_PATH;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ public final class CSourceEntry extends ACExclusionFilterEntry implements ICSour
|
||||||
super(value, exclusionPatterns, flags | VALUE_WORKSPACE_PATH);
|
super(value, exclusionPatterns, flags | VALUE_WORKSPACE_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public final int getKind() {
|
public final int getKind() {
|
||||||
return SOURCE_PATH;
|
return SOURCE_PATH;
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,6 +175,7 @@ public interface ICConfigurationDescription extends ICSettingContainer, ICSettin
|
||||||
/**
|
/**
|
||||||
* Returns whether or not the configuration description was modified
|
* Returns whether or not the configuration description was modified
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
boolean isModified();
|
boolean isModified();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -19,5 +19,6 @@ public interface ICMacroEntry extends ICLanguageSettingEntry {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICSettingEntry#getValue()
|
* @see org.eclipse.cdt.core.settings.model.ICSettingEntry#getValue()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
String getValue();
|
String getValue();
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,6 +114,7 @@ public interface ICProjectDescription extends ICSettingContainer,
|
||||||
/**
|
/**
|
||||||
* @return true if the project description was modified, false otherwise
|
* @return true if the project description was modified, false otherwise
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
boolean isModified();
|
boolean isModified();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,6 +25,7 @@ public abstract class MultiItemsHolder implements ICMultiItemsHolder {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICMultiItemsHolder#getItems()
|
* @see org.eclipse.cdt.core.settings.model.ICMultiItemsHolder#getItems()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public abstract Object[] getItems();
|
public abstract Object[] getItems();
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -30,6 +30,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#getLanguageId()
|
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#getLanguageId()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getLanguageId() {
|
public String getLanguageId() {
|
||||||
return items[0].getLanguageId(); // Assuming language is the same.
|
return items[0].getLanguageId(); // Assuming language is the same.
|
||||||
}
|
}
|
||||||
|
@ -48,6 +49,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#getSettingEntriesList(int)
|
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#getSettingEntriesList(int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public List<ICLanguageSettingEntry> getSettingEntriesList(int kind) {
|
public List<ICLanguageSettingEntry> getSettingEntriesList(int kind) {
|
||||||
return Arrays.asList(getSettingEntries(kind));
|
return Arrays.asList(getSettingEntries(kind));
|
||||||
}
|
}
|
||||||
|
@ -75,6 +77,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#getSupportedEntryKinds()
|
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#getSupportedEntryKinds()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getSupportedEntryKinds() {
|
public int getSupportedEntryKinds() {
|
||||||
int res = 0;
|
int res = 0;
|
||||||
for (ICLanguageSetting item : items)
|
for (ICLanguageSetting item : items)
|
||||||
|
@ -85,11 +88,13 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#setLanguageId(java.lang.String)
|
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#setLanguageId(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setLanguageId(String id) {} // Do nothing
|
public void setLanguageId(String id) {} // Do nothing
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#setSettingEntries(int, org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry[])
|
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#setSettingEntries(int, org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry[])
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setSettingEntries(int kind, ICLanguageSettingEntry[] entries) {
|
public void setSettingEntries(int kind, ICLanguageSettingEntry[] entries) {
|
||||||
for (ICLanguageSetting item : items)
|
for (ICLanguageSetting item : items)
|
||||||
item.setSettingEntries(kind, entries);
|
item.setSettingEntries(kind, entries);
|
||||||
|
@ -98,6 +103,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#setSettingEntries(int, java.util.List)
|
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#setSettingEntries(int, java.util.List)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setSettingEntries(int kind, List<ICLanguageSettingEntry> entriesList) {
|
public void setSettingEntries(int kind, List<ICLanguageSettingEntry> entriesList) {
|
||||||
for (ICLanguageSetting item : items)
|
for (ICLanguageSetting item : items)
|
||||||
item.setSettingEntries(kind, entriesList);
|
item.setSettingEntries(kind, entriesList);
|
||||||
|
@ -106,6 +112,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#setSourceContentTypeIds(java.lang.String[])
|
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#setSourceContentTypeIds(java.lang.String[])
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setSourceContentTypeIds(String[] ids) {
|
public void setSourceContentTypeIds(String[] ids) {
|
||||||
for (ICLanguageSetting item : items)
|
for (ICLanguageSetting item : items)
|
||||||
item.setSourceContentTypeIds(ids);
|
item.setSourceContentTypeIds(ids);
|
||||||
|
@ -114,6 +121,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#setSourceExtensions(java.lang.String[])
|
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#setSourceExtensions(java.lang.String[])
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setSourceExtensions(String[] exts) {
|
public void setSourceExtensions(String[] exts) {
|
||||||
for (ICLanguageSetting item : items)
|
for (ICLanguageSetting item : items)
|
||||||
item.setSourceExtensions(exts);
|
item.setSourceExtensions(exts);
|
||||||
|
@ -122,6 +130,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#supportsEntryKind(int)
|
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#supportsEntryKind(int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean supportsEntryKind(int kind) {
|
public boolean supportsEntryKind(int kind) {
|
||||||
for (ICLanguageSetting item : items)
|
for (ICLanguageSetting item : items)
|
||||||
if (item.supportsEntryKind(kind))
|
if (item.supportsEntryKind(kind))
|
||||||
|
@ -132,6 +141,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICSettingObject#getConfiguration()
|
* @see org.eclipse.cdt.core.settings.model.ICSettingObject#getConfiguration()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICConfigurationDescription getConfiguration() {
|
public ICConfigurationDescription getConfiguration() {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Bad multi access: MultiLanguageSetting.getConfiguration()"); //$NON-NLS-1$
|
System.out.println("Bad multi access: MultiLanguageSetting.getConfiguration()"); //$NON-NLS-1$
|
||||||
|
@ -141,6 +151,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICSettingObject#getId()
|
* @see org.eclipse.cdt.core.settings.model.ICSettingObject#getId()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getId() { // IDs are different
|
public String getId() { // IDs are different
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Bad multi access: MultiLanguageSetting.getId()"); //$NON-NLS-1$
|
System.out.println("Bad multi access: MultiLanguageSetting.getId()"); //$NON-NLS-1$
|
||||||
|
@ -150,6 +161,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICSettingObject#getName()
|
* @see org.eclipse.cdt.core.settings.model.ICSettingObject#getName()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getName() { // names are proposed to be equal
|
public String getName() { // names are proposed to be equal
|
||||||
return items[0].getName();
|
return items[0].getName();
|
||||||
}
|
}
|
||||||
|
@ -157,6 +169,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICSettingObject#getParent()
|
* @see org.eclipse.cdt.core.settings.model.ICSettingObject#getParent()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICSettingContainer getParent() {
|
public ICSettingContainer getParent() {
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
System.out.println("Bad multi access: MultiLanguageSetting.getParent()"); //$NON-NLS-1$
|
System.out.println("Bad multi access: MultiLanguageSetting.getParent()"); //$NON-NLS-1$
|
||||||
|
@ -166,6 +179,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICSettingObject#getType()
|
* @see org.eclipse.cdt.core.settings.model.ICSettingObject#getType()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getType() {
|
public int getType() {
|
||||||
int x = items[0].getType();
|
int x = items[0].getType();
|
||||||
for (ICLanguageSetting item : items)
|
for (ICLanguageSetting item : items)
|
||||||
|
@ -177,6 +191,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICSettingObject#isReadOnly()
|
* @see org.eclipse.cdt.core.settings.model.ICSettingObject#isReadOnly()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isReadOnly() {
|
public boolean isReadOnly() {
|
||||||
for (int i=0; i<items.length; i++)
|
for (int i=0; i<items.length; i++)
|
||||||
if (! items[i].isReadOnly())
|
if (! items[i].isReadOnly())
|
||||||
|
@ -187,6 +202,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICSettingObject#isValid()
|
* @see org.eclipse.cdt.core.settings.model.ICSettingObject#isValid()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isValid() {
|
public boolean isValid() {
|
||||||
for (int i=0; i<items.length; i++)
|
for (int i=0; i<items.length; i++)
|
||||||
if (! items[i].isValid())
|
if (! items[i].isValid())
|
||||||
|
@ -199,19 +215,23 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICLanguageSettingEntry[] getResolvedSettingEntries(int kind) {
|
public ICLanguageSettingEntry[] getResolvedSettingEntries(int kind) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICLanguageSettingEntry[] getSettingEntries(int kind) {
|
public ICLanguageSettingEntry[] getSettingEntries(int kind) {
|
||||||
ICLanguageSettingEntry[][] ses = getSettingEntriesM(kind);
|
ICLanguageSettingEntry[][] ses = getSettingEntriesM(kind);
|
||||||
return ses[0];
|
return ses[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getSourceContentTypeIds() {
|
public String[] getSourceContentTypeIds() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getSourceExtensions() {
|
public String[] getSourceExtensions() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,7 @@ public class CResourceDataContainer {
|
||||||
final List<CResourceData> list = new ArrayList<CResourceData>();
|
final List<CResourceData> list = new ArrayList<CResourceData>();
|
||||||
fRcDataContainer.accept(new IPathSettingsContainerVisitor(){
|
fRcDataContainer.accept(new IPathSettingsContainerVisitor(){
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean visit(PathSettingsContainer container) {
|
public boolean visit(PathSettingsContainer container) {
|
||||||
if(fIncludeCurrent || container != fRcDataContainer){
|
if(fIncludeCurrent || container != fRcDataContainer){
|
||||||
CResourceData data = (CResourceData)container.getValue();
|
CResourceData data = (CResourceData)container.getValue();
|
||||||
|
|
|
@ -177,16 +177,19 @@ public class KindBasedStore<T> implements Cloneable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public T getInfo() {
|
public T getInfo() {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
T info = (T)fEntryStorage[fIdex];
|
T info = (T)fEntryStorage[fIdex];
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getKind() {
|
public int getKind() {
|
||||||
return fKind;
|
return fKind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public T setInfo(T newInfo) {
|
public T setInfo(T newInfo) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
T old = (T)fEntryStorage[fIdex];
|
T old = (T)fEntryStorage[fIdex];
|
||||||
|
|
|
@ -990,6 +990,7 @@ public class PathEntryTranslator {
|
||||||
final Set<PathEntryComposer> set = new HashSet<PathEntryComposer>();
|
final Set<PathEntryComposer> set = new HashSet<PathEntryComposer>();
|
||||||
fStorage.accept(new IPathSettingsContainerVisitor() {
|
fStorage.accept(new IPathSettingsContainerVisitor() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean visit(PathSettingsContainer container) {
|
public boolean visit(PathSettingsContainer container) {
|
||||||
PathEntryCollector clr = (PathEntryCollector)container.getValue();
|
PathEntryCollector clr = (PathEntryCollector)container.getValue();
|
||||||
clr.getLocalCollectedEntries(kind, list, set);
|
clr.getLocalCollectedEntries(kind, list, set);
|
||||||
|
@ -2033,6 +2034,7 @@ public class PathEntryTranslator {
|
||||||
|
|
||||||
final int kinds[] = KindBasedStore.getLanguageEntryKinds();
|
final int kinds[] = KindBasedStore.getLanguageEntryKinds();
|
||||||
rcDatas.accept(new IPathSettingsContainerVisitor() {
|
rcDatas.accept(new IPathSettingsContainerVisitor() {
|
||||||
|
@Override
|
||||||
public boolean visit(PathSettingsContainer container) {
|
public boolean visit(PathSettingsContainer container) {
|
||||||
CResourceData data = (CResourceData)container.getValue();
|
CResourceData data = (CResourceData)container.getValue();
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
|
|
|
@ -181,6 +181,7 @@ public final class PathSettingsContainer {
|
||||||
final List<PathSettingsContainer> list = new ArrayList<PathSettingsContainer>();
|
final List<PathSettingsContainer> list = new ArrayList<PathSettingsContainer>();
|
||||||
accept(new IPathSettingsContainerVisitor(){
|
accept(new IPathSettingsContainerVisitor(){
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean visit(PathSettingsContainer container) {
|
public boolean visit(PathSettingsContainer container) {
|
||||||
if(container != PathSettingsContainer.this || includeThis)
|
if(container != PathSettingsContainer.this || includeThis)
|
||||||
list.add(container);
|
list.add(container);
|
||||||
|
@ -258,6 +259,7 @@ public final class PathSettingsContainer {
|
||||||
final List<Object> list = new ArrayList<Object>();
|
final List<Object> list = new ArrayList<Object>();
|
||||||
accept(new IPathSettingsContainerVisitor(){
|
accept(new IPathSettingsContainerVisitor(){
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean visit(PathSettingsContainer container) {
|
public boolean visit(PathSettingsContainer container) {
|
||||||
if(container != PathSettingsContainer.this || includeThis)
|
if(container != PathSettingsContainer.this || includeThis)
|
||||||
list.add(container.getValue());
|
list.add(container.getValue());
|
||||||
|
|
|
@ -17,8 +17,8 @@ import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.NoSuchElementException;
|
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
import java.util.NoSuchElementException;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.CoreModelUtil;
|
import org.eclipse.cdt.core.model.CoreModelUtil;
|
||||||
|
|
||||||
|
@ -70,14 +70,17 @@ public class PatternNameMap {
|
||||||
|
|
||||||
private class EmptyIterator implements Iterator<PathSettingsContainer>{
|
private class EmptyIterator implements Iterator<PathSettingsContainer>{
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean hasNext() {
|
public boolean hasNext() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public PathSettingsContainer next() {
|
public PathSettingsContainer next() {
|
||||||
throw new NoSuchElementException();
|
throw new NoSuchElementException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void remove() {
|
public void remove() {
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
}
|
}
|
||||||
|
@ -93,15 +96,18 @@ public class PatternNameMap {
|
||||||
Iter (Iterator<Entry<String, PathSettingsContainer>> entryIter){
|
Iter (Iterator<Entry<String, PathSettingsContainer>> entryIter){
|
||||||
this.fEntrySetIter = entryIter;
|
this.fEntrySetIter = entryIter;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public boolean hasNext() {
|
public boolean hasNext() {
|
||||||
return fEntrySetIter.hasNext();
|
return fEntrySetIter.hasNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public PathSettingsContainer next() {
|
public PathSettingsContainer next() {
|
||||||
fCur = fEntrySetIter.next();
|
fCur = fEntrySetIter.next();
|
||||||
return fCur.getValue();
|
return fCur.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void remove() {
|
public void remove() {
|
||||||
fEntrySetIter.remove();
|
fEntrySetIter.remove();
|
||||||
String name = fCur.getKey();
|
String name = fCur.getKey();
|
||||||
|
|
|
@ -89,6 +89,7 @@ public abstract class ResourceChangeHandlerBase implements IResourceChangeListen
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean visit(IResourceDelta delta) throws CoreException {
|
public boolean visit(IResourceDelta delta) throws CoreException {
|
||||||
IResource dResource = delta.getResource();
|
IResource dResource = delta.getResource();
|
||||||
|
|
||||||
|
@ -142,6 +143,7 @@ public abstract class ResourceChangeHandlerBase implements IResourceChangeListen
|
||||||
*
|
*
|
||||||
* @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
|
* @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void resourceChanged(IResourceChangeEvent event) {
|
public void resourceChanged(IResourceChangeEvent event) {
|
||||||
if (event.getSource() instanceof IWorkspace) {
|
if (event.getSource() instanceof IWorkspace) {
|
||||||
IResourceMoveHandler handler = createResourceMoveHandler(event);
|
IResourceMoveHandler handler = createResourceMoveHandler(event);
|
||||||
|
|
|
@ -114,6 +114,7 @@ public class XmlStorageElement implements ICStorageElement {
|
||||||
return new XmlStorageElement(element, this, alowReferencingParent, attributeFilters, childFilters);
|
return new XmlStorageElement(element, this, alowReferencingParent, attributeFilters, childFilters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICStorageElement[] getChildren() {
|
public ICStorageElement[] getChildren() {
|
||||||
return getChildren(XmlStorageElement.class);
|
return getChildren(XmlStorageElement.class);
|
||||||
}
|
}
|
||||||
|
@ -136,10 +137,12 @@ public class XmlStorageElement implements ICStorageElement {
|
||||||
return fChildList.toArray(children);
|
return fChildList.toArray(children);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICStorageElement getParent() {
|
public ICStorageElement getParent() {
|
||||||
return fParentRefAlowed ? fParent : null;
|
return fParentRefAlowed ? fParent : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getAttribute(String name) {
|
public String getAttribute(String name) {
|
||||||
if(isPropertyAlowed(name) && fElement.hasAttribute(name))
|
if(isPropertyAlowed(name) && fElement.hasAttribute(name))
|
||||||
return fElement.getAttribute(name);
|
return fElement.getAttribute(name);
|
||||||
|
@ -182,6 +185,7 @@ public class XmlStorageElement implements ICStorageElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void removeChild(ICStorageElement el) {
|
public void removeChild(ICStorageElement el) {
|
||||||
if(el instanceof XmlStorageElement){
|
if(el instanceof XmlStorageElement){
|
||||||
ICStorageElement[] children = getChildren();
|
ICStorageElement[] children = getChildren();
|
||||||
|
@ -205,16 +209,19 @@ public class XmlStorageElement implements ICStorageElement {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void removeAttribute(String name) {
|
public void removeAttribute(String name) {
|
||||||
if(isPropertyAlowed(name))
|
if(isPropertyAlowed(name))
|
||||||
fElement.removeAttribute(name);
|
fElement.removeAttribute(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setAttribute(String name, String value) {
|
public void setAttribute(String name, String value) {
|
||||||
if(isPropertyAlowed(name))
|
if(isPropertyAlowed(name))
|
||||||
fElement.setAttribute(name, value);
|
fElement.setAttribute(name, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void clear(){
|
public void clear(){
|
||||||
createChildren();
|
createChildren();
|
||||||
|
|
||||||
|
@ -249,14 +256,17 @@ public class XmlStorageElement implements ICStorageElement {
|
||||||
return createAddChild(childElement, alowReferencingParent, attributeFilters, childFilters);
|
return createAddChild(childElement, alowReferencingParent, attributeFilters, childFilters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return fElement.getNodeName();
|
return fElement.getNodeName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICStorageElement createChild(String name) {
|
public ICStorageElement createChild(String name) {
|
||||||
return createChild(name, true, null, null);
|
return createChild(name, true, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
Text text = getTextChild();
|
Text text = getTextChild();
|
||||||
if(text != null)
|
if(text != null)
|
||||||
|
@ -264,6 +274,7 @@ public class XmlStorageElement implements ICStorageElement {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setValue(String value) {
|
public void setValue(String value) {
|
||||||
Text text = getTextChild();
|
Text text = getTextChild();
|
||||||
if(value != null){
|
if(value != null){
|
||||||
|
@ -294,6 +305,7 @@ public class XmlStorageElement implements ICStorageElement {
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICStorageElement importChild(ICStorageElement el) throws UnsupportedOperationException {
|
public ICStorageElement importChild(ICStorageElement el) throws UnsupportedOperationException {
|
||||||
return addChild(el, true, null, null);
|
return addChild(el, true, null, null);
|
||||||
}
|
}
|
||||||
|
@ -393,6 +405,7 @@ public class XmlStorageElement implements ICStorageElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getAttributeNames() {
|
public String[] getAttributeNames() {
|
||||||
NamedNodeMap nodeMap = fElement.getAttributes();
|
NamedNodeMap nodeMap = fElement.getAttributes();
|
||||||
int length = nodeMap.getLength();
|
int length = nodeMap.getLength();
|
||||||
|
@ -409,6 +422,7 @@ public class XmlStorageElement implements ICStorageElement {
|
||||||
/**
|
/**
|
||||||
* @since 5.1
|
* @since 5.1
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICStorageElement createCopy() throws UnsupportedOperationException, CoreException {
|
public ICStorageElement createCopy() throws UnsupportedOperationException, CoreException {
|
||||||
// todo Auto-generated method stub
|
// todo Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
|
@ -417,6 +431,7 @@ public class XmlStorageElement implements ICStorageElement {
|
||||||
/**
|
/**
|
||||||
* @since 5.1
|
* @since 5.1
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean equals(ICStorageElement other) {
|
public boolean equals(ICStorageElement other) {
|
||||||
// todo Auto-generated method stub
|
// todo Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
|
@ -425,6 +440,7 @@ public class XmlStorageElement implements ICStorageElement {
|
||||||
/**
|
/**
|
||||||
* @since 5.1
|
* @since 5.1
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICStorageElement[] getChildrenByName(String name) {
|
public ICStorageElement[] getChildrenByName(String name) {
|
||||||
// todo Auto-generated method stub
|
// todo Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
|
@ -433,6 +449,7 @@ public class XmlStorageElement implements ICStorageElement {
|
||||||
/**
|
/**
|
||||||
* @since 5.1
|
* @since 5.1
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean hasAttribute(String name) {
|
public boolean hasAttribute(String name) {
|
||||||
// todo Auto-generated method stub
|
// todo Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
|
@ -441,6 +458,7 @@ public class XmlStorageElement implements ICStorageElement {
|
||||||
/**
|
/**
|
||||||
* @since 5.1
|
* @since 5.1
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean hasChildren() {
|
public boolean hasChildren() {
|
||||||
// todo Auto-generated method stub
|
// todo Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -334,6 +334,7 @@ public class ASTCache {
|
||||||
final IASTTranslationUnit root[]= new IASTTranslationUnit[1];
|
final IASTTranslationUnit root[]= new IASTTranslationUnit[1];
|
||||||
|
|
||||||
SafeRunner.run(new ISafeRunnable() {
|
SafeRunner.run(new ISafeRunnable() {
|
||||||
|
@Override
|
||||||
public void run() throws CoreException {
|
public void run() throws CoreException {
|
||||||
try {
|
try {
|
||||||
if (progressMonitor != null && progressMonitor.isCanceled()) {
|
if (progressMonitor != null && progressMonitor.isCanceled()) {
|
||||||
|
@ -345,6 +346,7 @@ public class ASTCache {
|
||||||
root[0]= null;
|
root[0]= null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void handleException(Throwable ex) {
|
public void handleException(Throwable ex) {
|
||||||
IStatus status= new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, IStatus.OK, "Error in CDT Core during AST creation", ex); //$NON-NLS-1$
|
IStatus status= new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, IStatus.OK, "Error in CDT Core during AST creation", ex); //$NON-NLS-1$
|
||||||
CCorePlugin.getDefault().getLog().log(status);
|
CCorePlugin.getDefault().getLog().log(status);
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class Archive extends Openable implements IArchive {
|
||||||
binaryArchive = ar;
|
binaryArchive = ar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IBinary[] getBinaries() throws CModelException {
|
public IBinary[] getBinaries() throws CModelException {
|
||||||
ICElement[] e = getChildren();
|
ICElement[] e = getChildren();
|
||||||
IBinary[] b = new IBinary[e.length];
|
IBinary[] b = new IBinary[e.length];
|
||||||
|
|
|
@ -30,6 +30,7 @@ public class ArchiveContainer extends Openable implements IArchiveContainer {
|
||||||
super (cProject, null, CCorePlugin.getResourceString("CoreModel.ArchiveContainer.Archives"), ICElement.C_VCONTAINER); //$NON-NLS-1$
|
super (cProject, null, CCorePlugin.getResourceString("CoreModel.ArchiveContainer.Archives"), ICElement.C_VCONTAINER); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IArchive[] getArchives() throws CModelException {
|
public IArchive[] getArchives() throws CModelException {
|
||||||
((ArchiveContainerInfo)getElementInfo()).sync();
|
((ArchiveContainerInfo)getElementInfo()).sync();
|
||||||
ICElement[] e = getChildren();
|
ICElement[] e = getChildren();
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class AsmLabel extends SourceManipulation implements IAsmLabel, IParent {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.core.model.IAsmLabel#isGlobal()
|
* @see org.eclipse.cdt.core.model.IAsmLabel#isGlobal()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public final boolean isGlobal() {
|
public final boolean isGlobal() {
|
||||||
return fIsGlobal;
|
return fIsGlobal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,8 @@ import org.eclipse.cdt.core.parser.IToken;
|
||||||
import org.eclipse.cdt.core.parser.OffsetLimitReachedException;
|
import org.eclipse.cdt.core.parser.OffsetLimitReachedException;
|
||||||
import org.eclipse.cdt.internal.core.parser.scanner.ILexerLog;
|
import org.eclipse.cdt.internal.core.parser.scanner.ILexerLog;
|
||||||
import org.eclipse.cdt.internal.core.parser.scanner.Lexer;
|
import org.eclipse.cdt.internal.core.parser.scanner.Lexer;
|
||||||
import org.eclipse.cdt.internal.core.parser.scanner.Token;
|
|
||||||
import org.eclipse.cdt.internal.core.parser.scanner.Lexer.LexerOptions;
|
import org.eclipse.cdt.internal.core.parser.scanner.Lexer.LexerOptions;
|
||||||
|
import org.eclipse.cdt.internal.core.parser.scanner.Token;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple model builder for assembly translation units.
|
* A simple model builder for assembly translation units.
|
||||||
|
@ -41,8 +41,10 @@ public class AsmModelBuilder implements IContributedModelBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class LexerLog implements ILexerLog {
|
private static final class LexerLog implements ILexerLog {
|
||||||
|
@Override
|
||||||
public void handleComment(boolean isBlockComment, int offset, int endOffset) {
|
public void handleComment(boolean isBlockComment, int offset, int endOffset) {
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void handleProblem(int problemID, char[] info, int offset, int endOffset) {
|
public void handleProblem(int problemID, char[] info, int offset, int endOffset) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,6 +97,7 @@ public class AsmModelBuilder implements IContributedModelBuilder {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.core.model.IContributedModelBuilder#parse(boolean)
|
* @see org.eclipse.cdt.core.model.IContributedModelBuilder#parse(boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void parse(boolean quickParseMode) throws Exception {
|
public void parse(boolean quickParseMode) throws Exception {
|
||||||
char[] source = fTranslationUnit.getContents();
|
char[] source = fTranslationUnit.getContents();
|
||||||
if (source == null) {
|
if (source == null) {
|
||||||
|
|
|
@ -22,13 +22,13 @@ import java.util.Map;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.CCorePreferenceConstants;
|
import org.eclipse.cdt.core.CCorePreferenceConstants;
|
||||||
import org.eclipse.cdt.core.ISourceFinder;
|
|
||||||
import org.eclipse.cdt.core.ISymbolReader;
|
|
||||||
import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable;
|
import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable;
|
||||||
import org.eclipse.cdt.core.IBinaryParser.IBinaryFile;
|
import org.eclipse.cdt.core.IBinaryParser.IBinaryFile;
|
||||||
import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
|
import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
|
||||||
import org.eclipse.cdt.core.IBinaryParser.IBinaryShared;
|
import org.eclipse.cdt.core.IBinaryParser.IBinaryShared;
|
||||||
import org.eclipse.cdt.core.IBinaryParser.ISymbol;
|
import org.eclipse.cdt.core.IBinaryParser.ISymbol;
|
||||||
|
import org.eclipse.cdt.core.ISourceFinder;
|
||||||
|
import org.eclipse.cdt.core.ISymbolReader;
|
||||||
import org.eclipse.cdt.core.model.BinaryFilePresentation;
|
import org.eclipse.cdt.core.model.BinaryFilePresentation;
|
||||||
import org.eclipse.cdt.core.model.CModelException;
|
import org.eclipse.cdt.core.model.CModelException;
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
import org.eclipse.cdt.core.model.CoreModel;
|
||||||
|
@ -84,22 +84,27 @@ public class Binary extends Openable implements IBinary {
|
||||||
showInBinaryContainer= determineShowInBinaryContainer(bin);
|
showInBinaryContainer= determineShowInBinaryContainer(bin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isSharedLib() {
|
public boolean isSharedLib() {
|
||||||
return getType() == IBinaryFile.SHARED;
|
return getType() == IBinaryFile.SHARED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isExecutable() {
|
public boolean isExecutable() {
|
||||||
return getType() == IBinaryFile.EXECUTABLE;
|
return getType() == IBinaryFile.EXECUTABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isObject() {
|
public boolean isObject() {
|
||||||
return getType() == IBinaryFile.OBJECT;
|
return getType() == IBinaryFile.OBJECT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isCore() {
|
public boolean isCore() {
|
||||||
return getType() == IBinaryFile.CORE;
|
return getType() == IBinaryFile.CORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean hasDebug() {
|
public boolean hasDebug() {
|
||||||
if (isObject() || isExecutable() || isSharedLib()) {
|
if (isObject() || isExecutable() || isSharedLib()) {
|
||||||
if (hasDebug == null || hasChanged()) {
|
if (hasDebug == null || hasChanged()) {
|
||||||
|
@ -112,6 +117,7 @@ public class Binary extends Openable implements IBinary {
|
||||||
return Boolean.valueOf(hasDebug).booleanValue();
|
return Boolean.valueOf(hasDebug).booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getCPU() {
|
public String getCPU() {
|
||||||
if (isObject() || isExecutable() || isSharedLib() || isCore()) {
|
if (isObject() || isExecutable() || isSharedLib() || isCore()) {
|
||||||
if (cpu == null || hasChanged()) {
|
if (cpu == null || hasChanged()) {
|
||||||
|
@ -122,6 +128,7 @@ public class Binary extends Openable implements IBinary {
|
||||||
return (cpu == null ? "" : cpu); //$NON-NLS-1$
|
return (cpu == null ? "" : cpu); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getNeededSharedLibs() {
|
public String[] getNeededSharedLibs() {
|
||||||
if (isExecutable() || isSharedLib()) {
|
if (isExecutable() || isSharedLib()) {
|
||||||
if (needed == null || hasChanged()) {
|
if (needed == null || hasChanged()) {
|
||||||
|
@ -134,6 +141,7 @@ public class Binary extends Openable implements IBinary {
|
||||||
return (needed == null ? new String[0] : needed);
|
return (needed == null ? new String[0] : needed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public long getText() {
|
public long getText() {
|
||||||
if (isObject() || isExecutable() || isSharedLib()) {
|
if (isObject() || isExecutable() || isSharedLib()) {
|
||||||
if (longText == -1 || hasChanged()) {
|
if (longText == -1 || hasChanged()) {
|
||||||
|
@ -146,6 +154,7 @@ public class Binary extends Openable implements IBinary {
|
||||||
return longText;
|
return longText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public long getData() {
|
public long getData() {
|
||||||
if (isObject() || isExecutable() || isSharedLib()) {
|
if (isObject() || isExecutable() || isSharedLib()) {
|
||||||
if (longData == -1 || hasChanged()) {
|
if (longData == -1 || hasChanged()) {
|
||||||
|
@ -158,6 +167,7 @@ public class Binary extends Openable implements IBinary {
|
||||||
return longData;
|
return longData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public long getBSS() {
|
public long getBSS() {
|
||||||
if (isObject() || isExecutable() || isSharedLib()) {
|
if (isObject() || isExecutable() || isSharedLib()) {
|
||||||
if (longBSS == -1 || hasChanged()) {
|
if (longBSS == -1 || hasChanged()) {
|
||||||
|
@ -170,6 +180,7 @@ public class Binary extends Openable implements IBinary {
|
||||||
return longBSS;
|
return longBSS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getSoname() {
|
public String getSoname() {
|
||||||
if (isSharedLib()) {
|
if (isSharedLib()) {
|
||||||
if (soname == null || hasChanged()) {
|
if (soname == null || hasChanged()) {
|
||||||
|
@ -182,6 +193,7 @@ public class Binary extends Openable implements IBinary {
|
||||||
return (soname == null ? "" : soname); //$NON-NLS-1$
|
return (soname == null ? "" : soname); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isLittleEndian() {
|
public boolean isLittleEndian() {
|
||||||
if (isObject() || isExecutable() || isSharedLib() || isCore()) {
|
if (isObject() || isExecutable() || isSharedLib() || isCore()) {
|
||||||
if (endian == null || hasChanged()) {
|
if (endian == null || hasChanged()) {
|
||||||
|
@ -534,6 +546,7 @@ public class Binary extends Openable implements IBinary {
|
||||||
super.closing(info);
|
super.closing(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean showInBinaryContainer() {
|
public boolean showInBinaryContainer() {
|
||||||
return showInBinaryContainer;
|
return showInBinaryContainer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ public class BinaryContainer extends Openable implements IBinaryContainer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IBinary[] getBinaries() throws CModelException {
|
public IBinary[] getBinaries() throws CModelException {
|
||||||
sync();
|
sync();
|
||||||
ICElement[] e = getChildren();
|
ICElement[] e = getChildren();
|
||||||
|
|
|
@ -50,6 +50,7 @@ public class BinaryElement extends CElement implements IBinaryElement, ISourceMa
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ISourceManipulation#copy(org.eclipse.cdt.core.model.ICElement, org.eclipse.cdt.core.model.ICElement, java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.cdt.core.model.ISourceManipulation#copy(org.eclipse.cdt.core.model.ICElement, org.eclipse.cdt.core.model.ICElement, java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void copy(ICElement container, ICElement sibling, String rename, boolean replace, IProgressMonitor monitor)
|
public void copy(ICElement container, ICElement sibling, String rename, boolean replace, IProgressMonitor monitor)
|
||||||
throws CModelException {
|
throws CModelException {
|
||||||
throw new CModelException(new CModelStatus(ICModelStatusConstants.READ_ONLY, this));
|
throw new CModelException(new CModelStatus(ICModelStatusConstants.READ_ONLY, this));
|
||||||
|
@ -58,6 +59,7 @@ public class BinaryElement extends CElement implements IBinaryElement, ISourceMa
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ISourceManipulation#delete(boolean, org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.cdt.core.model.ISourceManipulation#delete(boolean, org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void delete(boolean force, IProgressMonitor monitor) throws CModelException {
|
public void delete(boolean force, IProgressMonitor monitor) throws CModelException {
|
||||||
throw new CModelException(new CModelStatus(ICModelStatusConstants.READ_ONLY, this));
|
throw new CModelException(new CModelStatus(ICModelStatusConstants.READ_ONLY, this));
|
||||||
}
|
}
|
||||||
|
@ -65,6 +67,7 @@ public class BinaryElement extends CElement implements IBinaryElement, ISourceMa
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ISourceManipulation#move(org.eclipse.cdt.core.model.ICElement, org.eclipse.cdt.core.model.ICElement, java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.cdt.core.model.ISourceManipulation#move(org.eclipse.cdt.core.model.ICElement, org.eclipse.cdt.core.model.ICElement, java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void move(ICElement container, ICElement sibling, String rename, boolean replace, IProgressMonitor monitor)
|
public void move(ICElement container, ICElement sibling, String rename, boolean replace, IProgressMonitor monitor)
|
||||||
throws CModelException {
|
throws CModelException {
|
||||||
throw new CModelException(new CModelStatus(ICModelStatusConstants.READ_ONLY, this));
|
throw new CModelException(new CModelStatus(ICModelStatusConstants.READ_ONLY, this));
|
||||||
|
@ -73,6 +76,7 @@ public class BinaryElement extends CElement implements IBinaryElement, ISourceMa
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ISourceManipulation#rename(java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.cdt.core.model.ISourceManipulation#rename(java.lang.String, boolean, org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void rename(String name, boolean replace, IProgressMonitor monitor) throws CModelException {
|
public void rename(String name, boolean replace, IProgressMonitor monitor) throws CModelException {
|
||||||
throw new CModelException(new CModelStatus(ICModelStatusConstants.READ_ONLY, this));
|
throw new CModelException(new CModelStatus(ICModelStatusConstants.READ_ONLY, this));
|
||||||
}
|
}
|
||||||
|
@ -80,6 +84,7 @@ public class BinaryElement extends CElement implements IBinaryElement, ISourceMa
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ISourceReference#getSource()
|
* @see org.eclipse.cdt.core.model.ISourceReference#getSource()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getSource() throws CModelException {
|
public String getSource() throws CModelException {
|
||||||
ITranslationUnit tu = getTranslationUnit();
|
ITranslationUnit tu = getTranslationUnit();
|
||||||
if (tu != null) {
|
if (tu != null) {
|
||||||
|
@ -100,6 +105,7 @@ public class BinaryElement extends CElement implements IBinaryElement, ISourceMa
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ISourceReference#getSourceRange()
|
* @see org.eclipse.cdt.core.model.ISourceReference#getSourceRange()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ISourceRange getSourceRange() throws CModelException {
|
public ISourceRange getSourceRange() throws CModelException {
|
||||||
return new SourceRange(getStartPos(),
|
return new SourceRange(getStartPos(),
|
||||||
getLength(),
|
getLength(),
|
||||||
|
@ -112,6 +118,7 @@ public class BinaryElement extends CElement implements IBinaryElement, ISourceMa
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ISourceReference#getTranslationUnit()
|
* @see org.eclipse.cdt.core.model.ISourceReference#getTranslationUnit()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITranslationUnit getTranslationUnit() {
|
public ITranslationUnit getTranslationUnit() {
|
||||||
if (fSourceTU == null) {
|
if (fSourceTU == null) {
|
||||||
ITranslationUnit tu = null;
|
ITranslationUnit tu = null;
|
||||||
|
@ -171,6 +178,7 @@ public class BinaryElement extends CElement implements IBinaryElement, ISourceMa
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IBinaryElement#getAddress()
|
* @see org.eclipse.cdt.core.model.IBinaryElement#getAddress()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IAddress getAddress() throws CModelException {
|
public IAddress getAddress() throws CModelException {
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
@ -212,6 +220,7 @@ public class BinaryElement extends CElement implements IBinaryElement, ISourceMa
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IBinaryElement#getBinary()
|
* @see org.eclipse.cdt.core.model.IBinaryElement#getBinary()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBinary getBinary() {
|
public IBinary getBinary() {
|
||||||
ICElement current = this;
|
ICElement current = this;
|
||||||
do {
|
do {
|
||||||
|
@ -245,10 +254,12 @@ public class BinaryElement extends CElement implements IBinaryElement, ISourceMa
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isActive() {
|
public boolean isActive() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getIndex() {
|
public int getIndex() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ public class BinaryFunction extends BinaryElement implements IBinaryFunction {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IFunctionDeclaration#getExceptions()
|
* @see org.eclipse.cdt.core.model.IFunctionDeclaration#getExceptions()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getExceptions() {
|
public String[] getExceptions() {
|
||||||
return new String[0];
|
return new String[0];
|
||||||
}
|
}
|
||||||
|
@ -33,6 +34,7 @@ public class BinaryFunction extends BinaryElement implements IBinaryFunction {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IFunctionDeclaration#getNumberOfParameters()
|
* @see org.eclipse.cdt.core.model.IFunctionDeclaration#getNumberOfParameters()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getNumberOfParameters() {
|
public int getNumberOfParameters() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -41,6 +43,7 @@ public class BinaryFunction extends BinaryElement implements IBinaryFunction {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IFunctionDeclaration#getParameterInitializer(int)
|
* @see org.eclipse.cdt.core.model.IFunctionDeclaration#getParameterInitializer(int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getParameterInitializer(int pos) {
|
public String getParameterInitializer(int pos) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return new String();
|
return new String();
|
||||||
|
@ -49,6 +52,7 @@ public class BinaryFunction extends BinaryElement implements IBinaryFunction {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IFunctionDeclaration#getParameterTypes()
|
* @see org.eclipse.cdt.core.model.IFunctionDeclaration#getParameterTypes()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getParameterTypes() {
|
public String[] getParameterTypes() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return new String[0];
|
return new String[0];
|
||||||
|
@ -57,6 +61,7 @@ public class BinaryFunction extends BinaryElement implements IBinaryFunction {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IFunctionDeclaration#getReturnType()
|
* @see org.eclipse.cdt.core.model.IFunctionDeclaration#getReturnType()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getReturnType() {
|
public String getReturnType() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return new String();
|
return new String();
|
||||||
|
@ -65,6 +70,7 @@ public class BinaryFunction extends BinaryElement implements IBinaryFunction {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IFunctionDeclaration#getSignature()
|
* @see org.eclipse.cdt.core.model.IFunctionDeclaration#getSignature()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getSignature() {
|
public String getSignature() {
|
||||||
return getElementName();
|
return getElementName();
|
||||||
}
|
}
|
||||||
|
@ -72,6 +78,7 @@ public class BinaryFunction extends BinaryElement implements IBinaryFunction {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IDeclaration#isStatic()
|
* @see org.eclipse.cdt.core.model.IDeclaration#isStatic()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isStatic() {
|
public boolean isStatic() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
|
@ -80,6 +87,7 @@ public class BinaryFunction extends BinaryElement implements IBinaryFunction {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IDeclaration#isConst()
|
* @see org.eclipse.cdt.core.model.IDeclaration#isConst()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isConst() {
|
public boolean isConst() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
|
@ -88,6 +96,7 @@ public class BinaryFunction extends BinaryElement implements IBinaryFunction {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IDeclaration#isVolatile()
|
* @see org.eclipse.cdt.core.model.IDeclaration#isVolatile()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isVolatile() {
|
public boolean isVolatile() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class BinaryModule extends Parent implements IBinaryModule {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IBinaryModule#getBinaryElements()
|
* @see org.eclipse.cdt.core.model.IBinaryModule#getBinaryElements()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBinaryElement[] getBinaryElements() throws CModelException {
|
public IBinaryElement[] getBinaryElements() throws CModelException {
|
||||||
ICElement[] e = getChildren();
|
ICElement[] e = getChildren();
|
||||||
IBinaryElement[] b = new IBinaryElement[e.length];
|
IBinaryElement[] b = new IBinaryElement[e.length];
|
||||||
|
@ -51,6 +52,7 @@ public class BinaryModule extends Parent implements IBinaryModule {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IBinaryElement#getAddress()
|
* @see org.eclipse.cdt.core.model.IBinaryElement#getAddress()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IAddress getAddress() throws CModelException {
|
public IAddress getAddress() throws CModelException {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -58,6 +60,7 @@ public class BinaryModule extends Parent implements IBinaryModule {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IBinaryElement#getBinary()
|
* @see org.eclipse.cdt.core.model.IBinaryElement#getBinary()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBinary getBinary() {
|
public IBinary getBinary() {
|
||||||
return (IBinary)getParent();
|
return (IBinary)getParent();
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,6 +182,7 @@ public class BinaryRunner {
|
||||||
textContentType = mgr.getContentType("org.eclipse.core.runtime.text"); //$NON-NLS-1$
|
textContentType = mgr.getContentType("org.eclipse.core.runtime.text"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean visit(IResourceProxy proxy) throws CoreException {
|
public boolean visit(IResourceProxy proxy) throws CoreException {
|
||||||
if (vMonitor.isCanceled()) {
|
if (vMonitor.isCanceled()) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -26,6 +26,7 @@ public class BinaryVariable extends BinaryElement implements IVariable {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IVariable#getInitializer()
|
* @see org.eclipse.cdt.core.model.IVariable#getInitializer()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getInitializer() {
|
public String getInitializer() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return ""; //$NON-NLS-1$
|
return ""; //$NON-NLS-1$
|
||||||
|
@ -34,6 +35,7 @@ public class BinaryVariable extends BinaryElement implements IVariable {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IVariableDeclaration#getTypeName()
|
* @see org.eclipse.cdt.core.model.IVariableDeclaration#getTypeName()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getTypeName() {
|
public String getTypeName() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return ""; //$NON-NLS-1$
|
return ""; //$NON-NLS-1$
|
||||||
|
@ -42,6 +44,7 @@ public class BinaryVariable extends BinaryElement implements IVariable {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IVariableDeclaration#setTypeName(java.lang.String)
|
* @see org.eclipse.cdt.core.model.IVariableDeclaration#setTypeName(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setTypeName(String type) {
|
public void setTypeName(String type) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
}
|
}
|
||||||
|
@ -49,6 +52,7 @@ public class BinaryVariable extends BinaryElement implements IVariable {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IDeclaration#isStatic()
|
* @see org.eclipse.cdt.core.model.IDeclaration#isStatic()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isStatic() {
|
public boolean isStatic() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
|
@ -57,6 +61,7 @@ public class BinaryVariable extends BinaryElement implements IVariable {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IDeclaration#isConst()
|
* @see org.eclipse.cdt.core.model.IDeclaration#isConst()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isConst() {
|
public boolean isConst() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
|
@ -65,6 +70,7 @@ public class BinaryVariable extends BinaryElement implements IVariable {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IDeclaration#isVolatile()
|
* @see org.eclipse.cdt.core.model.IDeclaration#isVolatile()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isVolatile() {
|
public boolean isVolatile() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -61,6 +61,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see IBuffer
|
* @see IBuffer
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void addBufferChangedListener(IBufferChangedListener listener) {
|
public void addBufferChangedListener(IBufferChangedListener listener) {
|
||||||
if (this.changeListeners == null) {
|
if (this.changeListeners == null) {
|
||||||
this.changeListeners = new ArrayList<IBufferChangedListener>(5);
|
this.changeListeners = new ArrayList<IBufferChangedListener>(5);
|
||||||
|
@ -72,6 +73,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#append(char[])
|
* @see org.eclipse.cdt.core.model.IBuffer#append(char[])
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void append(char[] text) {
|
public void append(char[] text) {
|
||||||
if (!isReadOnly()) {
|
if (!isReadOnly()) {
|
||||||
if (text == null || text.length == 0) {
|
if (text == null || text.length == 0) {
|
||||||
|
@ -89,6 +91,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#append(java.lang.String)
|
* @see org.eclipse.cdt.core.model.IBuffer#append(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void append(String text) {
|
public void append(String text) {
|
||||||
if (text == null) {
|
if (text == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -99,6 +102,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#close()
|
* @see org.eclipse.cdt.core.model.IBuffer#close()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
BufferChangedEvent event = null;
|
BufferChangedEvent event = null;
|
||||||
synchronized (this.lock) {
|
synchronized (this.lock) {
|
||||||
|
@ -115,6 +119,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#getChar(int)
|
* @see org.eclipse.cdt.core.model.IBuffer#getChar(int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public char getChar(int position) {
|
public char getChar(int position) {
|
||||||
synchronized (this.lock) {
|
synchronized (this.lock) {
|
||||||
if (position < this.gapStart) {
|
if (position < this.gapStart) {
|
||||||
|
@ -128,6 +133,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#getCharacters()
|
* @see org.eclipse.cdt.core.model.IBuffer#getCharacters()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public char[] getCharacters() {
|
public char[] getCharacters() {
|
||||||
if (this.contents == null) return null;
|
if (this.contents == null) return null;
|
||||||
synchronized (this.lock) {
|
synchronized (this.lock) {
|
||||||
|
@ -145,6 +151,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#getContents()
|
* @see org.eclipse.cdt.core.model.IBuffer#getContents()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getContents() {
|
public String getContents() {
|
||||||
if (this.contents == null) return null;
|
if (this.contents == null) return null;
|
||||||
return new String(this.getCharacters());
|
return new String(this.getCharacters());
|
||||||
|
@ -153,6 +160,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#getLength()
|
* @see org.eclipse.cdt.core.model.IBuffer#getLength()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getLength() {
|
public int getLength() {
|
||||||
synchronized (this.lock) {
|
synchronized (this.lock) {
|
||||||
int length = this.gapEnd - this.gapStart;
|
int length = this.gapEnd - this.gapStart;
|
||||||
|
@ -163,6 +171,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#getOwner()
|
* @see org.eclipse.cdt.core.model.IBuffer#getOwner()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IOpenable getOwner() {
|
public IOpenable getOwner() {
|
||||||
return this.owner;
|
return this.owner;
|
||||||
}
|
}
|
||||||
|
@ -170,6 +179,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#getText(int, int)
|
* @see org.eclipse.cdt.core.model.IBuffer#getText(int, int)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getText(int offset, int length) {
|
public String getText(int offset, int length) {
|
||||||
if (this.contents == null)
|
if (this.contents == null)
|
||||||
return ""; //$NON-NLS-1$
|
return ""; //$NON-NLS-1$
|
||||||
|
@ -190,6 +200,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#getUnderlyingResource()
|
* @see org.eclipse.cdt.core.model.IBuffer#getUnderlyingResource()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IResource getUnderlyingResource() {
|
public IResource getUnderlyingResource() {
|
||||||
return this.file;
|
return this.file;
|
||||||
}
|
}
|
||||||
|
@ -197,6 +208,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#hasUnsavedChanges()
|
* @see org.eclipse.cdt.core.model.IBuffer#hasUnsavedChanges()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean hasUnsavedChanges() {
|
public boolean hasUnsavedChanges() {
|
||||||
return (this.flags & F_HAS_UNSAVED_CHANGES) != 0;
|
return (this.flags & F_HAS_UNSAVED_CHANGES) != 0;
|
||||||
}
|
}
|
||||||
|
@ -204,6 +216,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#isClosed()
|
* @see org.eclipse.cdt.core.model.IBuffer#isClosed()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isClosed() {
|
public boolean isClosed() {
|
||||||
return (this.flags & F_IS_CLOSED) != 0;
|
return (this.flags & F_IS_CLOSED) != 0;
|
||||||
}
|
}
|
||||||
|
@ -211,6 +224,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#isReadOnly()
|
* @see org.eclipse.cdt.core.model.IBuffer#isReadOnly()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isReadOnly() {
|
public boolean isReadOnly() {
|
||||||
if (this.file == null) {
|
if (this.file == null) {
|
||||||
return (this.flags & F_IS_READ_ONLY) != 0;
|
return (this.flags & F_IS_READ_ONLY) != 0;
|
||||||
|
@ -227,9 +241,11 @@ public class Buffer implements IBuffer {
|
||||||
for (int i = 0, size = this.changeListeners.size(); i < size; ++i) {
|
for (int i = 0, size = this.changeListeners.size(); i < size; ++i) {
|
||||||
final IBufferChangedListener listener = this.changeListeners.get(i);
|
final IBufferChangedListener listener = this.changeListeners.get(i);
|
||||||
SafeRunner.run(new ISafeRunnable() {
|
SafeRunner.run(new ISafeRunnable() {
|
||||||
|
@Override
|
||||||
public void handleException(Throwable exception) {
|
public void handleException(Throwable exception) {
|
||||||
Util.log(exception, "Exception occurred in listener of buffer change notification", ICLogConstants.CDT); //$NON-NLS-1$
|
Util.log(exception, "Exception occurred in listener of buffer change notification", ICLogConstants.CDT); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
listener.bufferChanged(event);
|
listener.bufferChanged(event);
|
||||||
}
|
}
|
||||||
|
@ -240,6 +256,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see IBuffer
|
* @see IBuffer
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removeBufferChangedListener(IBufferChangedListener listener) {
|
public void removeBufferChangedListener(IBufferChangedListener listener) {
|
||||||
if (this.changeListeners != null) {
|
if (this.changeListeners != null) {
|
||||||
this.changeListeners.remove(listener);
|
this.changeListeners.remove(listener);
|
||||||
|
@ -251,6 +268,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#replace(int, int, char[])
|
* @see org.eclipse.cdt.core.model.IBuffer#replace(int, int, char[])
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void replace(int position, int length, char[] text) {
|
public void replace(int position, int length, char[] text) {
|
||||||
if (!isReadOnly()) {
|
if (!isReadOnly()) {
|
||||||
int textLength = text == null ? 0 : text.length;
|
int textLength = text == null ? 0 : text.length;
|
||||||
|
@ -284,6 +302,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#replace(int, int, java.lang.String)
|
* @see org.eclipse.cdt.core.model.IBuffer#replace(int, int, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void replace(int position, int length, String text) {
|
public void replace(int position, int length, String text) {
|
||||||
this.replace(position, length, text == null ? null : text.toCharArray());
|
this.replace(position, length, text == null ? null : text.toCharArray());
|
||||||
}
|
}
|
||||||
|
@ -291,6 +310,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#save(org.eclipse.core.runtime.IProgressMonitor, boolean)
|
* @see org.eclipse.cdt.core.model.IBuffer#save(org.eclipse.core.runtime.IProgressMonitor, boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void save(IProgressMonitor progress, boolean force)
|
public void save(IProgressMonitor progress, boolean force)
|
||||||
throws CModelException {
|
throws CModelException {
|
||||||
// determine if saving is required
|
// determine if saving is required
|
||||||
|
@ -340,6 +360,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#setContents(char[])
|
* @see org.eclipse.cdt.core.model.IBuffer#setContents(char[])
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setContents(char[] newContents) {
|
public void setContents(char[] newContents) {
|
||||||
// allow special case for first initialization
|
// allow special case for first initialization
|
||||||
// after creation by buffer factory
|
// after creation by buffer factory
|
||||||
|
@ -368,6 +389,7 @@ public class Buffer implements IBuffer {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IBuffer#setContents(java.lang.String)
|
* @see org.eclipse.cdt.core.model.IBuffer#setContents(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setContents(String newContents) {
|
public void setContents(String newContents) {
|
||||||
this.setContents(newContents.toCharArray());
|
this.setContents(newContents.toCharArray());
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,6 +92,7 @@ public class BufferManager implements IBufferFactory {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.internal.core.model.IBufferFactory#createBuffer(org.eclipse.cdt.core.model.IOpenable)
|
* @see org.eclipse.cdt.internal.core.model.IBufferFactory#createBuffer(org.eclipse.cdt.core.model.IOpenable)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBuffer createBuffer(IOpenable owner) {
|
public IBuffer createBuffer(IOpenable owner) {
|
||||||
ICElement element = (ICElement)owner;
|
ICElement element = (ICElement)owner;
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,7 @@ public class CContainer extends Openable implements ICContainer {
|
||||||
*
|
*
|
||||||
* @see ICContainer#getBinaries()
|
* @see ICContainer#getBinaries()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBinary[] getBinaries() throws CModelException {
|
public IBinary[] getBinaries() throws CModelException {
|
||||||
List<?> list = getChildrenOfType(C_BINARY);
|
List<?> list = getChildrenOfType(C_BINARY);
|
||||||
IBinary[] array = new IBinary[list.size()];
|
IBinary[] array = new IBinary[list.size()];
|
||||||
|
@ -63,6 +64,7 @@ public class CContainer extends Openable implements ICContainer {
|
||||||
/**
|
/**
|
||||||
* @see ICContainer#getBinary(String)
|
* @see ICContainer#getBinary(String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBinary getBinary(String name) {
|
public IBinary getBinary(String name) {
|
||||||
IFile file = getContainer().getFile(new Path(name));
|
IFile file = getContainer().getFile(new Path(name));
|
||||||
return getBinary(file);
|
return getBinary(file);
|
||||||
|
@ -81,6 +83,7 @@ public class CContainer extends Openable implements ICContainer {
|
||||||
*
|
*
|
||||||
* @see ICContainer#getArchives()
|
* @see ICContainer#getArchives()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IArchive[] getArchives() throws CModelException {
|
public IArchive[] getArchives() throws CModelException {
|
||||||
List<?> list = getChildrenOfType(C_ARCHIVE);
|
List<?> list = getChildrenOfType(C_ARCHIVE);
|
||||||
IArchive[] array = new IArchive[list.size()];
|
IArchive[] array = new IArchive[list.size()];
|
||||||
|
@ -91,6 +94,7 @@ public class CContainer extends Openable implements ICContainer {
|
||||||
/**
|
/**
|
||||||
* @see ICContainer#getArchive(String)
|
* @see ICContainer#getArchive(String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IArchive getArchive(String name) {
|
public IArchive getArchive(String name) {
|
||||||
IFile file = getContainer().getFile(new Path(name));
|
IFile file = getContainer().getFile(new Path(name));
|
||||||
return getArchive(file);
|
return getArchive(file);
|
||||||
|
@ -107,6 +111,7 @@ public class CContainer extends Openable implements ICContainer {
|
||||||
/**
|
/**
|
||||||
* @see ICContainer#getTranslationUnits()
|
* @see ICContainer#getTranslationUnits()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITranslationUnit[] getTranslationUnits() throws CModelException {
|
public ITranslationUnit[] getTranslationUnits() throws CModelException {
|
||||||
List<?> list = getChildrenOfType(C_UNIT);
|
List<?> list = getChildrenOfType(C_UNIT);
|
||||||
ITranslationUnit[] array = new ITranslationUnit[list.size()];
|
ITranslationUnit[] array = new ITranslationUnit[list.size()];
|
||||||
|
@ -119,6 +124,7 @@ public class CContainer extends Openable implements ICContainer {
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.model.ICContainer#getTranslationUnit(java.lang.String)
|
* @see org.eclipse.cdt.core.model.ICContainer#getTranslationUnit(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITranslationUnit getTranslationUnit(String name) {
|
public ITranslationUnit getTranslationUnit(String name) {
|
||||||
IFile file = getContainer().getFile(new Path(name));
|
IFile file = getContainer().getFile(new Path(name));
|
||||||
return getTranslationUnit(file);
|
return getTranslationUnit(file);
|
||||||
|
@ -134,6 +140,7 @@ public class CContainer extends Openable implements ICContainer {
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.model.ICContainer#getCContainers()
|
* @see org.eclipse.cdt.core.model.ICContainer#getCContainers()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICContainer[] getCContainers() throws CModelException {
|
public ICContainer[] getCContainers() throws CModelException {
|
||||||
List<?> list = getChildrenOfType(C_CCONTAINER);
|
List<?> list = getChildrenOfType(C_CCONTAINER);
|
||||||
ICContainer[] array = new ICContainer[list.size()];
|
ICContainer[] array = new ICContainer[list.size()];
|
||||||
|
@ -146,6 +153,7 @@ public class CContainer extends Openable implements ICContainer {
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.model.ICContainer#getCContainer(java.lang.String)
|
* @see org.eclipse.cdt.core.model.ICContainer#getCContainer(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICContainer getCContainer(String name) {
|
public ICContainer getCContainer(String name) {
|
||||||
IFolder folder = getContainer().getFolder(new Path(name));
|
IFolder folder = getContainer().getFolder(new Path(name));
|
||||||
return getCContainer(folder);
|
return getCContainer(folder);
|
||||||
|
@ -198,6 +206,7 @@ public class CContainer extends Openable implements ICContainer {
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.model.ICContainer#getNonCResources()
|
* @see org.eclipse.cdt.core.model.ICContainer#getNonCResources()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Object[] getNonCResources() throws CModelException {
|
public Object[] getNonCResources() throws CModelException {
|
||||||
return ((CContainerInfo) getElementInfo()).getNonCResources(getResource());
|
return ((CContainerInfo) getElementInfo()).getNonCResources(getResource());
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,18 +97,22 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
||||||
|
|
||||||
// getters
|
// getters
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getElementType() {
|
public int getElementType() {
|
||||||
return fType;
|
return fType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getElementName() {
|
public String getElementName() {
|
||||||
return fName;
|
return fName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICElement getParent() {
|
public ICElement getParent() {
|
||||||
return fParent;
|
return fParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath getPath() {
|
public IPath getPath() {
|
||||||
IResource res = getUnderlyingResource();
|
IResource res = getUnderlyingResource();
|
||||||
if (res != null)
|
if (res != null)
|
||||||
|
@ -116,6 +120,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
||||||
return new Path(getElementName());
|
return new Path(getElementName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public URI getLocationURI() {
|
public URI getLocationURI() {
|
||||||
IResource res = getUnderlyingResource();
|
IResource res = getUnderlyingResource();
|
||||||
|
|
||||||
|
@ -128,6 +133,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean exists() {
|
public boolean exists() {
|
||||||
try {
|
try {
|
||||||
return getElementInfo() != null;
|
return getElementInfo() != null;
|
||||||
|
@ -202,6 +208,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
||||||
return new ICElement[]{this};
|
return new ICElement[]{this};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isReadOnly () {
|
public boolean isReadOnly () {
|
||||||
IResource r = getUnderlyingResource();
|
IResource r = getUnderlyingResource();
|
||||||
if (r != null) {
|
if (r != null) {
|
||||||
|
@ -213,10 +220,12 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isStructureKnown() throws CModelException {
|
public boolean isStructureKnown() throws CModelException {
|
||||||
return getElementInfo().isStructureKnown();
|
return getElementInfo().isStructureKnown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICModel getCModel () {
|
public ICModel getCModel () {
|
||||||
ICElement current = this;
|
ICElement current = this;
|
||||||
do {
|
do {
|
||||||
|
@ -225,6 +234,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICProject getCProject() {
|
public ICProject getCProject() {
|
||||||
ICElement current = this;
|
ICElement current = this;
|
||||||
do {
|
do {
|
||||||
|
@ -236,6 +246,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
||||||
protected void addChild(ICElement e) throws CModelException {
|
protected void addChild(ICElement e) throws CModelException {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IResource getUnderlyingResource() {
|
public IResource getUnderlyingResource() {
|
||||||
IResource res = getResource();
|
IResource res = getResource();
|
||||||
if (res == null) {
|
if (res == null) {
|
||||||
|
@ -247,6 +258,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public abstract IResource getResource() ;
|
public abstract IResource getResource() ;
|
||||||
|
|
||||||
protected abstract CElementInfo createElementInfo();
|
protected abstract CElementInfo createElementInfo();
|
||||||
|
@ -455,6 +467,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
||||||
/**
|
/**
|
||||||
* @see ICElement
|
* @see ICElement
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElement getAncestor(int ancestorType) {
|
public ICElement getAncestor(int ancestorType) {
|
||||||
ICElement element = this;
|
ICElement element = this;
|
||||||
while (element != null) {
|
while (element != null) {
|
||||||
|
@ -517,6 +530,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICElement#accept(org.eclipse.cdt.core.model.ICElementVisitor)
|
* @see org.eclipse.cdt.core.model.ICElement#accept(org.eclipse.cdt.core.model.ICElementVisitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void accept(ICElementVisitor visitor) throws CoreException {
|
public void accept(ICElementVisitor visitor) throws CoreException {
|
||||||
// Visit me, return right away if the visitor doesn't want to visit my children
|
// Visit me, return right away if the visitor doesn't want to visit my children
|
||||||
if (!visitor.visit(this))
|
if (!visitor.visit(this))
|
||||||
|
@ -533,6 +547,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.core.model.ICElement#getHandleIdentifier()
|
* @see org.eclipse.cdt.core.model.ICElement#getHandleIdentifier()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getHandleIdentifier() {
|
public String getHandleIdentifier() {
|
||||||
return getHandleMemento();
|
return getHandleMemento();
|
||||||
}
|
}
|
||||||
|
|
|
@ -329,6 +329,7 @@ public class CElementDelta implements ICElementDelta {
|
||||||
/**
|
/**
|
||||||
* @see ICElementDelta
|
* @see ICElementDelta
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElementDelta[] getAddedChildren() {
|
public ICElementDelta[] getAddedChildren() {
|
||||||
return getChildrenOfType(ADDED);
|
return getChildrenOfType(ADDED);
|
||||||
}
|
}
|
||||||
|
@ -336,6 +337,7 @@ public class CElementDelta implements ICElementDelta {
|
||||||
/**
|
/**
|
||||||
* @see ICElementDelta
|
* @see ICElementDelta
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElementDelta[] getAffectedChildren() {
|
public ICElementDelta[] getAffectedChildren() {
|
||||||
return fAffectedChildren;
|
return fAffectedChildren;
|
||||||
}
|
}
|
||||||
|
@ -366,6 +368,7 @@ public class CElementDelta implements ICElementDelta {
|
||||||
/**
|
/**
|
||||||
* @see ICElementDelta
|
* @see ICElementDelta
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElementDelta[] getChangedChildren() {
|
public ICElementDelta[] getChangedChildren() {
|
||||||
return getChildrenOfType(CHANGED);
|
return getChildrenOfType(CHANGED);
|
||||||
}
|
}
|
||||||
|
@ -415,6 +418,7 @@ public class CElementDelta implements ICElementDelta {
|
||||||
/**
|
/**
|
||||||
* @see ICElementDelta
|
* @see ICElementDelta
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElement getElement() {
|
public ICElement getElement() {
|
||||||
return fChangedElement;
|
return fChangedElement;
|
||||||
}
|
}
|
||||||
|
@ -422,6 +426,7 @@ public class CElementDelta implements ICElementDelta {
|
||||||
/**
|
/**
|
||||||
* @see ICElementDelta
|
* @see ICElementDelta
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getFlags() {
|
public int getFlags() {
|
||||||
return fChangeFlags;
|
return fChangeFlags;
|
||||||
}
|
}
|
||||||
|
@ -429,6 +434,7 @@ public class CElementDelta implements ICElementDelta {
|
||||||
/**
|
/**
|
||||||
* @see ICElementDelta
|
* @see ICElementDelta
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getKind() {
|
public int getKind() {
|
||||||
return fKind;
|
return fKind;
|
||||||
}
|
}
|
||||||
|
@ -436,6 +442,7 @@ public class CElementDelta implements ICElementDelta {
|
||||||
/**
|
/**
|
||||||
* @see ICElementDelta
|
* @see ICElementDelta
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElement getMovedFromElement() {
|
public ICElement getMovedFromElement() {
|
||||||
return fMovedFromHandle;
|
return fMovedFromHandle;
|
||||||
}
|
}
|
||||||
|
@ -443,6 +450,7 @@ public class CElementDelta implements ICElementDelta {
|
||||||
/**
|
/**
|
||||||
* @see ICElementDelta
|
* @see ICElementDelta
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElement getMovedToElement() {
|
public ICElement getMovedToElement() {
|
||||||
return fMovedToHandle;
|
return fMovedToHandle;
|
||||||
}
|
}
|
||||||
|
@ -450,6 +458,7 @@ public class CElementDelta implements ICElementDelta {
|
||||||
/**
|
/**
|
||||||
* @see ICElementDelta
|
* @see ICElementDelta
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElementDelta[] getRemovedChildren() {
|
public ICElementDelta[] getRemovedChildren() {
|
||||||
return getChildrenOfType(REMOVED);
|
return getChildrenOfType(REMOVED);
|
||||||
}
|
}
|
||||||
|
@ -457,6 +466,7 @@ public class CElementDelta implements ICElementDelta {
|
||||||
/**
|
/**
|
||||||
* Return the collection of resource deltas. Return null if none.
|
* Return the collection of resource deltas. Return null if none.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IResourceDelta[] getResourceDeltas() {
|
public IResourceDelta[] getResourceDeltas() {
|
||||||
if (resourceDeltas == null)
|
if (resourceDeltas == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -48,6 +48,7 @@ public class CModel extends Openable implements ICModel {
|
||||||
return super.equals(o);
|
return super.equals(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICProject[] getCProjects() throws CModelException {
|
public ICProject[] getCProjects() throws CModelException {
|
||||||
List<?> list = getChildrenOfType(C_PROJECT);
|
List<?> list = getChildrenOfType(C_PROJECT);
|
||||||
ICProject[] array= new ICProject[list.size()];
|
ICProject[] array= new ICProject[list.size()];
|
||||||
|
@ -58,6 +59,7 @@ public class CModel extends Openable implements ICModel {
|
||||||
/**
|
/**
|
||||||
* ICModel#getCProject(String)
|
* ICModel#getCProject(String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICProject getCProject(String name) {
|
public ICProject getCProject(String name) {
|
||||||
IProject project = ((IWorkspaceRoot) getResource()).getProject(name);
|
IProject project = ((IWorkspaceRoot) getResource()).getProject(name);
|
||||||
return CModelManager.getDefault().create(project);
|
return CModelManager.getDefault().create(project);
|
||||||
|
@ -102,10 +104,12 @@ public class CModel extends Openable implements ICModel {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IWorkspace getWorkspace() {
|
public IWorkspace getWorkspace() {
|
||||||
return getUnderlyingResource().getWorkspace();
|
return getUnderlyingResource().getWorkspace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void copy(ICElement[] elements, ICElement[] containers, ICElement[] siblings,
|
public void copy(ICElement[] elements, ICElement[] containers, ICElement[] siblings,
|
||||||
String[] renamings, boolean replace, IProgressMonitor monitor) throws CModelException {
|
String[] renamings, boolean replace, IProgressMonitor monitor) throws CModelException {
|
||||||
if (elements != null && elements[0] != null && elements[0].getElementType() <= ICElement.C_UNIT ) {
|
if (elements != null && elements[0] != null && elements[0].getElementType() <= ICElement.C_UNIT ) {
|
||||||
|
@ -117,6 +121,7 @@ public class CModel extends Openable implements ICModel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void delete(ICElement[] elements, boolean force, IProgressMonitor monitor)
|
public void delete(ICElement[] elements, boolean force, IProgressMonitor monitor)
|
||||||
throws CModelException {
|
throws CModelException {
|
||||||
CModelOperation op;
|
CModelOperation op;
|
||||||
|
@ -128,6 +133,7 @@ public class CModel extends Openable implements ICModel {
|
||||||
op.runOperation(monitor);
|
op.runOperation(monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void move(ICElement[] elements, ICElement[] containers, ICElement[] siblings,
|
public void move(ICElement[] elements, ICElement[] containers, ICElement[] siblings,
|
||||||
String[] renamings, boolean replace, IProgressMonitor monitor) throws CModelException {
|
String[] renamings, boolean replace, IProgressMonitor monitor) throws CModelException {
|
||||||
if (elements != null && elements[0] != null && elements[0].getElementType() <= ICElement.C_UNIT) {
|
if (elements != null && elements[0] != null && elements[0].getElementType() <= ICElement.C_UNIT) {
|
||||||
|
@ -139,6 +145,7 @@ public class CModel extends Openable implements ICModel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void rename(ICElement[] elements, ICElement[] destinations, String[] renamings,
|
public void rename(ICElement[] elements, ICElement[] destinations, String[] renamings,
|
||||||
boolean force, IProgressMonitor monitor) throws CModelException {
|
boolean force, IProgressMonitor monitor) throws CModelException {
|
||||||
CModelOperation op;
|
CModelOperation op;
|
||||||
|
@ -210,6 +217,7 @@ public class CModel extends Openable implements ICModel {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICModel#getNonCResources()
|
* @see org.eclipse.cdt.core.model.ICModel#getNonCResources()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Object[] getNonCResources() throws CModelException {
|
public Object[] getNonCResources() throws CModelException {
|
||||||
return ((CModelInfo) getElementInfo()).getNonCResources();
|
return ((CModelInfo) getElementInfo()).getNonCResources();
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,6 +118,7 @@ public class CModelBuilder2 implements IContributedModelBuilder {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.core.model.IContributedModelBuilder#parse(boolean)
|
* @see org.eclipse.cdt.core.model.IContributedModelBuilder#parse(boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void parse(boolean quickParseMode) throws Exception {
|
public void parse(boolean quickParseMode) throws Exception {
|
||||||
final IIndexManager indexManager= CCorePlugin.getIndexManager();
|
final IIndexManager indexManager= CCorePlugin.getIndexManager();
|
||||||
IIndex index= indexManager.getIndex(fTranslationUnit.getCProject(), IIndexManager.ADD_DEPENDENCIES);
|
IIndex index= indexManager.getIndex(fTranslationUnit.getCProject(), IIndexManager.ADD_DEPENDENCIES);
|
||||||
|
@ -229,6 +230,7 @@ public class CModelBuilder2 implements IContributedModelBuilder {
|
||||||
// sort by offset
|
// sort by offset
|
||||||
final List<ICElement> children= getElementInfo(fTranslationUnit).internalGetChildren();
|
final List<ICElement> children= getElementInfo(fTranslationUnit).internalGetChildren();
|
||||||
Collections.sort(children, new Comparator<ICElement>() {
|
Collections.sort(children, new Comparator<ICElement>() {
|
||||||
|
@Override
|
||||||
public int compare(ICElement o1, ICElement o2) {
|
public int compare(ICElement o1, ICElement o2) {
|
||||||
final SourceManipulationInfo info1= getSourceManipulationInfo((SourceManipulation) o1);
|
final SourceManipulationInfo info1= getSourceManipulationInfo((SourceManipulation) o1);
|
||||||
final SourceManipulationInfo info2= getSourceManipulationInfo((SourceManipulation) o2);
|
final SourceManipulationInfo info2= getSourceManipulationInfo((SourceManipulation) o2);
|
||||||
|
|
|
@ -854,6 +854,7 @@ public class CModelManager implements IResourceChangeListener, IContentTypeChang
|
||||||
* @see IResourceDelta
|
* @see IResourceDelta
|
||||||
* @see IResource
|
* @see IResource
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void resourceChanged(IResourceChangeEvent event) {
|
public void resourceChanged(IResourceChangeEvent event) {
|
||||||
if (event.getSource() instanceof IWorkspace) {
|
if (event.getSource() instanceof IWorkspace) {
|
||||||
IResourceDelta delta = event.getDelta();
|
IResourceDelta delta = event.getDelta();
|
||||||
|
@ -899,6 +900,7 @@ public class CModelManager implements IResourceChangeListener, IContentTypeChang
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void handleEvent(CProjectDescriptionEvent event) {
|
public void handleEvent(CProjectDescriptionEvent event) {
|
||||||
switch(event.getEventType()) {
|
switch(event.getEventType()) {
|
||||||
case CProjectDescriptionEvent.APPLIED:
|
case CProjectDescriptionEvent.APPLIED:
|
||||||
|
@ -961,6 +963,7 @@ public class CModelManager implements IResourceChangeListener, IContentTypeChang
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.core.runtime.content.IContentTypeManager.IContentTypeListener#contentTypeChanged()
|
* @see org.eclipse.core.runtime.content.IContentTypeManager.IContentTypeListener#contentTypeChanged()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void contentTypeChanged(ContentTypeChangeEvent event) {
|
public void contentTypeChanged(ContentTypeChangeEvent event) {
|
||||||
ContentTypeProcessor.processContentTypeChanges(new ContentTypeChangeEvent[]{ event });
|
ContentTypeProcessor.processContentTypeChanges(new ContentTypeChangeEvent[]{ event });
|
||||||
}
|
}
|
||||||
|
@ -1093,10 +1096,12 @@ public class CModelManager implements IResourceChangeListener, IContentTypeChang
|
||||||
// wrap callbacks with Safe runnable for subsequent listeners to be called when some are causing grief
|
// wrap callbacks with Safe runnable for subsequent listeners to be called when some are causing grief
|
||||||
SafeRunner.run(new ISafeRunnable() {
|
SafeRunner.run(new ISafeRunnable() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void handleException(Throwable exception) {
|
public void handleException(Throwable exception) {
|
||||||
//CCorePlugin.log(exception, "Exception occurred in listener of C element change notification"); //$NON-NLS-1$
|
//CCorePlugin.log(exception, "Exception occurred in listener of C element change notification"); //$NON-NLS-1$
|
||||||
CCorePlugin.log(exception);
|
CCorePlugin.log(exception);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
listener.elementChanged(extraEvent);
|
listener.elementChanged(extraEvent);
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,6 +198,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
|
||||||
/**
|
/**
|
||||||
* @see IProgressMonitor
|
* @see IProgressMonitor
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void beginTask(String name, int totalWork) {
|
public void beginTask(String name, int totalWork) {
|
||||||
if (fMonitor != null) {
|
if (fMonitor != null) {
|
||||||
fMonitor.beginTask(name, totalWork);
|
fMonitor.beginTask(name, totalWork);
|
||||||
|
@ -320,6 +321,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
|
||||||
/**
|
/**
|
||||||
* @see IProgressMonitor
|
* @see IProgressMonitor
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void done() {
|
public void done() {
|
||||||
if (fMonitor != null) {
|
if (fMonitor != null) {
|
||||||
fMonitor.done();
|
fMonitor.done();
|
||||||
|
@ -477,6 +479,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
|
||||||
return !this.isReadOnly() && this.hasModifiedResource;
|
return !this.isReadOnly() && this.hasModifiedResource;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void internalWorked(double work) {
|
public void internalWorked(double work) {
|
||||||
if (fMonitor != null) {
|
if (fMonitor != null) {
|
||||||
fMonitor.internalWorked(work);
|
fMonitor.internalWorked(work);
|
||||||
|
@ -486,6 +489,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
|
||||||
/**
|
/**
|
||||||
* @see IProgressMonitor
|
* @see IProgressMonitor
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isCanceled() {
|
public boolean isCanceled() {
|
||||||
if (fMonitor != null) {
|
if (fMonitor != null) {
|
||||||
return fMonitor.isCanceled();
|
return fMonitor.isCanceled();
|
||||||
|
@ -593,6 +597,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
|
||||||
* @see IWorkspaceRunnable
|
* @see IWorkspaceRunnable
|
||||||
* @exception CoreException if the operation fails
|
* @exception CoreException if the operation fails
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void run(IProgressMonitor monitor) throws CoreException {
|
public void run(IProgressMonitor monitor) throws CoreException {
|
||||||
CModelManager manager= CModelManager.getDefault();
|
CModelManager manager= CModelManager.getDefault();
|
||||||
int previousDeltaCount = manager.fCModelDeltas.size();
|
int previousDeltaCount = manager.fCModelDeltas.size();
|
||||||
|
@ -649,6 +654,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
|
||||||
/**
|
/**
|
||||||
* @see IProgressMonitor
|
* @see IProgressMonitor
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setCanceled(boolean b) {
|
public void setCanceled(boolean b) {
|
||||||
if (fMonitor != null) {
|
if (fMonitor != null) {
|
||||||
fMonitor.setCanceled(b);
|
fMonitor.setCanceled(b);
|
||||||
|
@ -666,6 +672,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
|
||||||
/**
|
/**
|
||||||
* @see IProgressMonitor
|
* @see IProgressMonitor
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setTaskName(String name) {
|
public void setTaskName(String name) {
|
||||||
if (fMonitor != null) {
|
if (fMonitor != null) {
|
||||||
fMonitor.setTaskName(name);
|
fMonitor.setTaskName(name);
|
||||||
|
@ -675,6 +682,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
|
||||||
/**
|
/**
|
||||||
* @see IProgressMonitor
|
* @see IProgressMonitor
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void subTask(String name) {
|
public void subTask(String name) {
|
||||||
if (fMonitor != null) {
|
if (fMonitor != null) {
|
||||||
fMonitor.subTask(name);
|
fMonitor.subTask(name);
|
||||||
|
@ -698,6 +706,7 @@ public abstract class CModelOperation implements IWorkspaceRunnable, IProgressMo
|
||||||
/**
|
/**
|
||||||
* @see IProgressMonitor
|
* @see IProgressMonitor
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void worked(int work) {
|
public void worked(int work) {
|
||||||
if (fMonitor != null) {
|
if (fMonitor != null) {
|
||||||
fMonitor.worked(work);
|
fMonitor.worked(work);
|
||||||
|
|
|
@ -157,6 +157,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
||||||
/**
|
/**
|
||||||
* @see ICModelStatus
|
* @see ICModelStatus
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElement[] getElements() {
|
public ICElement[] getElements() {
|
||||||
return fElements;
|
return fElements;
|
||||||
}
|
}
|
||||||
|
@ -289,6 +290,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
||||||
return exception.toString();
|
return exception.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath getPath() {
|
public IPath getPath() {
|
||||||
if (fPath == null) {
|
if (fPath == null) {
|
||||||
return Path.EMPTY;
|
return Path.EMPTY;
|
||||||
|
@ -316,6 +318,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
||||||
/**
|
/**
|
||||||
* @see ICModelStatus
|
* @see ICModelStatus
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getString() {
|
public String getString() {
|
||||||
if (fString == null) {
|
if (fString == null) {
|
||||||
return EMPTY_STRING;
|
return EMPTY_STRING;
|
||||||
|
@ -333,6 +336,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
||||||
/**
|
/**
|
||||||
* @see ICModelStatus
|
* @see ICModelStatus
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean doesNotExist() {
|
public boolean doesNotExist() {
|
||||||
return getCode() == ELEMENT_DOES_NOT_EXIST;
|
return getCode() == ELEMENT_DOES_NOT_EXIST;
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,18 +72,22 @@ public class CProject extends Openable implements ICProject {
|
||||||
super(parent, project, ICElement.C_PROJECT);
|
super(parent, project, ICElement.C_PROJECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IBinaryContainer getBinaryContainer() throws CModelException {
|
public IBinaryContainer getBinaryContainer() throws CModelException {
|
||||||
return ((CProjectInfo) getElementInfo()).getBinaryContainer();
|
return ((CProjectInfo) getElementInfo()).getBinaryContainer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IArchiveContainer getArchiveContainer() throws CModelException {
|
public IArchiveContainer getArchiveContainer() throws CModelException {
|
||||||
return ((CProjectInfo) getElementInfo()).getArchiveContainer();
|
return ((CProjectInfo) getElementInfo()).getArchiveContainer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IProject getProject() {
|
public IProject getProject() {
|
||||||
return getUnderlyingResource().getProject();
|
return getUnderlyingResource().getProject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICElement findElement(IPath path) throws CModelException {
|
public ICElement findElement(IPath path) throws CModelException {
|
||||||
ICElement celem = null;
|
ICElement celem = null;
|
||||||
if (path.isAbsolute()) {
|
if (path.isAbsolute()) {
|
||||||
|
@ -156,6 +160,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
return getProject().hashCode();
|
return getProject().hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IIncludeReference[] getIncludeReferences() throws CModelException {
|
public IIncludeReference[] getIncludeReferences() throws CModelException {
|
||||||
CProjectInfo pinfo = (CProjectInfo)CModelManager.getDefault().peekAtInfo(this);
|
CProjectInfo pinfo = (CProjectInfo)CModelManager.getDefault().peekAtInfo(this);
|
||||||
IIncludeReference[] incRefs = null;
|
IIncludeReference[] incRefs = null;
|
||||||
|
@ -179,6 +184,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
return incRefs;
|
return incRefs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ILibraryReference[] getLibraryReferences() throws CModelException {
|
public ILibraryReference[] getLibraryReferences() throws CModelException {
|
||||||
CProjectInfo pinfo = (CProjectInfo)CModelManager.getDefault().peekAtInfo(this);
|
CProjectInfo pinfo = (CProjectInfo)CModelManager.getDefault().peekAtInfo(this);
|
||||||
ILibraryReference[] libRefs = null;
|
ILibraryReference[] libRefs = null;
|
||||||
|
@ -240,6 +246,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/**
|
/**
|
||||||
* @see ICProject#getRequiredProjectNames()
|
* @see ICProject#getRequiredProjectNames()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getRequiredProjectNames() throws CModelException {
|
public String[] getRequiredProjectNames() throws CModelException {
|
||||||
return projectPrerequisites(getResolvedPathEntries());
|
return projectPrerequisites(getResolvedPathEntries());
|
||||||
}
|
}
|
||||||
|
@ -252,6 +259,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.ICProject#getOption(String, boolean)
|
* @see org.eclipse.cdt.core.model.ICProject#getOption(String, boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getOption(String optionName, boolean inheritCCoreOptions) {
|
public String getOption(String optionName, boolean inheritCCoreOptions) {
|
||||||
if (CModelManager.OptionNames.contains(optionName)) {
|
if (CModelManager.OptionNames.contains(optionName)) {
|
||||||
IEclipsePreferences preferences = getPreferences();
|
IEclipsePreferences preferences = getPreferences();
|
||||||
|
@ -269,6 +277,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.ICProject#getOptions(boolean)
|
* @see org.eclipse.cdt.core.model.ICProject#getOptions(boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Map<String, String> getOptions(boolean inheritCCoreOptions) {
|
public Map<String, String> getOptions(boolean inheritCCoreOptions) {
|
||||||
// initialize to the defaults from CCorePlugin options pool
|
// initialize to the defaults from CCorePlugin options pool
|
||||||
Map<String, String> options= inheritCCoreOptions ? CCorePlugin.getOptions() : new HashMap<String, String>(5);
|
Map<String, String> options= inheritCCoreOptions ? CCorePlugin.getOptions() : new HashMap<String, String>(5);
|
||||||
|
@ -296,6 +305,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.ICProject#setOption(java.lang.String, java.lang.String)
|
* @see org.eclipse.cdt.core.model.ICProject#setOption(java.lang.String, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setOption(String optionName, String optionValue) {
|
public void setOption(String optionName, String optionValue) {
|
||||||
if (!CModelManager.OptionNames.contains(optionName))
|
if (!CModelManager.OptionNames.contains(optionName))
|
||||||
return; // unrecognized option
|
return; // unrecognized option
|
||||||
|
@ -319,6 +329,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.ICProject#setOptions(Map)
|
* @see org.eclipse.cdt.core.model.ICProject#setOptions(Map)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setOptions(Map<String, String> newOptions) {
|
public void setOptions(Map<String, String> newOptions) {
|
||||||
Preferences preferences = new Preferences();
|
Preferences preferences = new Preferences();
|
||||||
setPreferences(preferences); // always reset (26255)
|
setPreferences(preferences); // always reset (26255)
|
||||||
|
@ -397,6 +408,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICProject#getResolvedCPathEntries()
|
* @see org.eclipse.cdt.core.model.ICProject#getResolvedCPathEntries()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPathEntry[] getResolvedPathEntries() throws CModelException {
|
public IPathEntry[] getResolvedPathEntries() throws CModelException {
|
||||||
return CoreModel.getResolvedPathEntries(this);
|
return CoreModel.getResolvedPathEntries(this);
|
||||||
}
|
}
|
||||||
|
@ -404,6 +416,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICProject#getRawCPathEntries()
|
* @see org.eclipse.cdt.core.model.ICProject#getRawCPathEntries()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPathEntry[] getRawPathEntries() throws CModelException {
|
public IPathEntry[] getRawPathEntries() throws CModelException {
|
||||||
return CoreModel.getRawPathEntries(this);
|
return CoreModel.getRawPathEntries(this);
|
||||||
}
|
}
|
||||||
|
@ -411,6 +424,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICProject#setRawCPathEntries(org.eclipse.cdt.core.model.IPathEntry[], org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.cdt.core.model.ICProject#setRawCPathEntries(org.eclipse.cdt.core.model.IPathEntry[], org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setRawPathEntries(IPathEntry[] newEntries, IProgressMonitor monitor) throws CModelException {
|
public void setRawPathEntries(IPathEntry[] newEntries, IProgressMonitor monitor) throws CModelException {
|
||||||
CoreModel.setRawPathEntries(this, newEntries, monitor);
|
CoreModel.setRawPathEntries(this, newEntries, monitor);
|
||||||
}
|
}
|
||||||
|
@ -418,6 +432,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICProject#getSourceRoot(org.eclipse.cdt.core.model.ISourceEntry)
|
* @see org.eclipse.cdt.core.model.ICProject#getSourceRoot(org.eclipse.cdt.core.model.ISourceEntry)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ISourceRoot getSourceRoot(ISourceEntry entry) throws CModelException {
|
public ISourceRoot getSourceRoot(ISourceEntry entry) throws CModelException {
|
||||||
return getSourceRoot(new CSourceEntry(entry.getPath(), entry.getExclusionPatterns(), 0));
|
return getSourceRoot(new CSourceEntry(entry.getPath(), entry.getExclusionPatterns(), 0));
|
||||||
}
|
}
|
||||||
|
@ -444,6 +459,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICProject#findSourceRoot()
|
* @see org.eclipse.cdt.core.model.ICProject#findSourceRoot()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ISourceRoot findSourceRoot(IResource res) {
|
public ISourceRoot findSourceRoot(IResource res) {
|
||||||
try {
|
try {
|
||||||
ISourceRoot[] roots = getAllSourceRoots();
|
ISourceRoot[] roots = getAllSourceRoots();
|
||||||
|
@ -460,6 +476,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICProject#findSourceRoot()
|
* @see org.eclipse.cdt.core.model.ICProject#findSourceRoot()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ISourceRoot findSourceRoot(IPath path) {
|
public ISourceRoot findSourceRoot(IPath path) {
|
||||||
try {
|
try {
|
||||||
ISourceRoot[] roots = getAllSourceRoots();
|
ISourceRoot[] roots = getAllSourceRoots();
|
||||||
|
@ -476,6 +493,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICProject#getSourceRoots()
|
* @see org.eclipse.cdt.core.model.ICProject#getSourceRoots()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ISourceRoot[] getSourceRoots() throws CModelException {
|
public ISourceRoot[] getSourceRoots() throws CModelException {
|
||||||
Object[] children = getChildren();
|
Object[] children = getChildren();
|
||||||
ArrayList<ISourceRoot> result = new ArrayList<ISourceRoot>(children.length);
|
ArrayList<ISourceRoot> result = new ArrayList<ISourceRoot>(children.length);
|
||||||
|
@ -493,6 +511,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
* @return all source roots
|
* @return all source roots
|
||||||
* @throws CModelException
|
* @throws CModelException
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ISourceRoot[] getAllSourceRoots() throws CModelException {
|
public ISourceRoot[] getAllSourceRoots() throws CModelException {
|
||||||
CProjectInfo pinfo = (CProjectInfo)CModelManager.getDefault().peekAtInfo(this);
|
CProjectInfo pinfo = (CProjectInfo)CModelManager.getDefault().peekAtInfo(this);
|
||||||
ISourceRoot[] roots = null;
|
ISourceRoot[] roots = null;
|
||||||
|
@ -510,6 +529,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
return roots;
|
return roots;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IOutputEntry[] getOutputEntries() throws CModelException {
|
public IOutputEntry[] getOutputEntries() throws CModelException {
|
||||||
CProjectInfo pinfo = (CProjectInfo) CModelManager.getDefault().peekAtInfo(this);
|
CProjectInfo pinfo = (CProjectInfo) CModelManager.getDefault().peekAtInfo(this);
|
||||||
IOutputEntry[] outs = null;
|
IOutputEntry[] outs = null;
|
||||||
|
@ -545,6 +565,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOnOutputEntry(IResource resource) {
|
public boolean isOnOutputEntry(IResource resource) {
|
||||||
IPath path = resource.getFullPath();
|
IPath path = resource.getFullPath();
|
||||||
|
|
||||||
|
@ -668,6 +689,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/*
|
/*
|
||||||
* @see ICProject
|
* @see ICProject
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOnSourceRoot(ICElement element) {
|
public boolean isOnSourceRoot(ICElement element) {
|
||||||
try {
|
try {
|
||||||
ISourceRoot[] roots = getSourceRoots();
|
ISourceRoot[] roots = getSourceRoots();
|
||||||
|
@ -685,6 +707,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/*
|
/*
|
||||||
* @see ICProject
|
* @see ICProject
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOnSourceRoot(IResource resource) {
|
public boolean isOnSourceRoot(IResource resource) {
|
||||||
try {
|
try {
|
||||||
ISourceRoot[] roots = getSourceRoots();
|
ISourceRoot[] roots = getSourceRoots();
|
||||||
|
@ -713,6 +736,7 @@ public class CProject extends Openable implements ICProject {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICProject#getNonCResources()
|
* @see org.eclipse.cdt.core.model.ICProject#getNonCResources()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Object[] getNonCResources() throws CModelException {
|
public Object[] getNonCResources() throws CModelException {
|
||||||
return ((CProjectInfo) getElementInfo()).getNonCResources(getResource());
|
return ((CProjectInfo) getElementInfo()).getNonCResources(getResource());
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class CShiftData implements ICElementDelta {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICElementDelta#getAddedChildren()
|
* @see org.eclipse.cdt.core.model.ICElementDelta#getAddedChildren()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElementDelta[] getAddedChildren() {
|
public ICElementDelta[] getAddedChildren() {
|
||||||
return new ICElementDelta[0];
|
return new ICElementDelta[0];
|
||||||
}
|
}
|
||||||
|
@ -56,6 +57,7 @@ public class CShiftData implements ICElementDelta {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICElementDelta#getAffectedChildren()
|
* @see org.eclipse.cdt.core.model.ICElementDelta#getAffectedChildren()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElementDelta[] getAffectedChildren() {
|
public ICElementDelta[] getAffectedChildren() {
|
||||||
return new ICElementDelta[0];
|
return new ICElementDelta[0];
|
||||||
}
|
}
|
||||||
|
@ -63,6 +65,7 @@ public class CShiftData implements ICElementDelta {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICElementDelta#getChangedChildren()
|
* @see org.eclipse.cdt.core.model.ICElementDelta#getChangedChildren()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElementDelta[] getChangedChildren() {
|
public ICElementDelta[] getChangedChildren() {
|
||||||
return new ICElementDelta[0];
|
return new ICElementDelta[0];
|
||||||
}
|
}
|
||||||
|
@ -70,6 +73,7 @@ public class CShiftData implements ICElementDelta {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICElementDelta#getElement()
|
* @see org.eclipse.cdt.core.model.ICElementDelta#getElement()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElement getElement() {
|
public ICElement getElement() {
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
|
@ -77,6 +81,7 @@ public class CShiftData implements ICElementDelta {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICElementDelta#getFlags()
|
* @see org.eclipse.cdt.core.model.ICElementDelta#getFlags()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getFlags() {
|
public int getFlags() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -84,6 +89,7 @@ public class CShiftData implements ICElementDelta {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICElementDelta#getKind()
|
* @see org.eclipse.cdt.core.model.ICElementDelta#getKind()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getKind() {
|
public int getKind() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -91,6 +97,7 @@ public class CShiftData implements ICElementDelta {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICElementDelta#getMovedFromElement()
|
* @see org.eclipse.cdt.core.model.ICElementDelta#getMovedFromElement()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElement getMovedFromElement() {
|
public ICElement getMovedFromElement() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -98,6 +105,7 @@ public class CShiftData implements ICElementDelta {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICElementDelta#getMovedToElement()
|
* @see org.eclipse.cdt.core.model.ICElementDelta#getMovedToElement()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElement getMovedToElement() {
|
public ICElement getMovedToElement() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -105,6 +113,7 @@ public class CShiftData implements ICElementDelta {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICElementDelta#getRemovedChildren()
|
* @see org.eclipse.cdt.core.model.ICElementDelta#getRemovedChildren()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElementDelta[] getRemovedChildren() {
|
public ICElementDelta[] getRemovedChildren() {
|
||||||
return new ICElementDelta[0];
|
return new ICElementDelta[0];
|
||||||
}
|
}
|
||||||
|
@ -112,6 +121,7 @@ public class CShiftData implements ICElementDelta {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ICElementDelta#getResourceDeltas()
|
* @see org.eclipse.cdt.core.model.ICElementDelta#getResourceDeltas()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IResourceDelta[] getResourceDeltas() {
|
public IResourceDelta[] getResourceDeltas() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,7 @@ public class DefaultPathEntryStore implements IPathEntryStore, ICDescriptorListe
|
||||||
CCorePlugin.getDefault().getCDescriptorManager().addDescriptorListener(this);
|
CCorePlugin.getDefault().getCDescriptorManager().addDescriptorListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPathEntry[] getRawPathEntries() throws CoreException {
|
public IPathEntry[] getRawPathEntries() throws CoreException {
|
||||||
ICDescriptor cdesc = CCorePlugin.getDefault().getCProjectDescription(fProject, false);
|
ICDescriptor cdesc = CCorePlugin.getDefault().getCProjectDescription(fProject, false);
|
||||||
if (cdesc != null) {
|
if (cdesc != null) {
|
||||||
|
@ -98,6 +99,7 @@ public class DefaultPathEntryStore implements IPathEntryStore, ICDescriptorListe
|
||||||
return NO_PATHENTRIES;
|
return NO_PATHENTRIES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setRawPathEntries(IPathEntry[] newRawEntries) throws CoreException {
|
public void setRawPathEntries(IPathEntry[] newRawEntries) throws CoreException {
|
||||||
if (Arrays.equals(newRawEntries, getRawPathEntries())) {
|
if (Arrays.equals(newRawEntries, getRawPathEntries())) {
|
||||||
return;
|
return;
|
||||||
|
@ -359,6 +361,7 @@ public class DefaultPathEntryStore implements IPathEntryStore, ICDescriptorListe
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.ICDescriptorListener#descriptorChanged(org.eclipse.cdt.core.CDescriptorEvent)
|
* @see org.eclipse.cdt.core.ICDescriptorListener#descriptorChanged(org.eclipse.cdt.core.CDescriptorEvent)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void descriptorChanged(CDescriptorEvent event) {
|
public void descriptorChanged(CDescriptorEvent event) {
|
||||||
if (event.getType() == CDescriptorEvent.CDTPROJECT_CHANGED
|
if (event.getType() == CDescriptorEvent.CDTPROJECT_CHANGED
|
||||||
/*|| event.getType() == CDescriptorEvent.CDTPROJECT_ADDED*/) {
|
/*|| event.getType() == CDescriptorEvent.CDTPROJECT_ADDED*/) {
|
||||||
|
@ -373,6 +376,7 @@ public class DefaultPathEntryStore implements IPathEntryStore, ICDescriptorListe
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.resources.IPathEntryStore#addPathEntryStoreListener(org.eclipse.cdt.core.resources.IPathEntryStoreListener)
|
* @see org.eclipse.cdt.core.resources.IPathEntryStore#addPathEntryStoreListener(org.eclipse.cdt.core.resources.IPathEntryStoreListener)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void addPathEntryStoreListener(IPathEntryStoreListener listener) {
|
public void addPathEntryStoreListener(IPathEntryStoreListener listener) {
|
||||||
listeners.add(listener);
|
listeners.add(listener);
|
||||||
}
|
}
|
||||||
|
@ -380,6 +384,7 @@ public class DefaultPathEntryStore implements IPathEntryStore, ICDescriptorListe
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.resources.IPathEntryStore#removePathEntryStoreListener(org.eclipse.cdt.core.resources.IPathEntryStoreListener)
|
* @see org.eclipse.cdt.core.resources.IPathEntryStore#removePathEntryStoreListener(org.eclipse.cdt.core.resources.IPathEntryStoreListener)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removePathEntryStoreListener(IPathEntryStoreListener listener) {
|
public void removePathEntryStoreListener(IPathEntryStoreListener listener) {
|
||||||
listeners.remove(listener);
|
listeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
@ -396,6 +401,7 @@ public class DefaultPathEntryStore implements IPathEntryStore, ICDescriptorListe
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.resources.IPathEntryStore#fireClosedChangedEvent(IProject)
|
* @see org.eclipse.cdt.core.resources.IPathEntryStore#fireClosedChangedEvent(IProject)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
PathEntryStoreChangedEvent evt = new PathEntryStoreChangedEvent(this, fProject, PathEntryStoreChangedEvent.STORE_CLOSED);
|
PathEntryStoreChangedEvent evt = new PathEntryStoreChangedEvent(this, fProject, PathEntryStoreChangedEvent.STORE_CLOSED);
|
||||||
IPathEntryStoreListener[] observers = new IPathEntryStoreListener[listeners.size()];
|
IPathEntryStoreListener[] observers = new IPathEntryStoreListener[listeners.size()];
|
||||||
|
@ -406,14 +412,17 @@ public class DefaultPathEntryStore implements IPathEntryStore, ICDescriptorListe
|
||||||
CCorePlugin.getDefault().getCDescriptorManager().removeDescriptorListener(this);
|
CCorePlugin.getDefault().getCDescriptorManager().removeDescriptorListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IProject getProject() {
|
public IProject getProject() {
|
||||||
return fProject;
|
return fProject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICExtensionReference getExtensionReference() {
|
public ICExtensionReference getExtensionReference() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICConfigExtensionReference getConfigExtensionReference() {
|
public ICConfigExtensionReference getConfigExtensionReference() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@ public class Enumeration extends SourceManipulation implements IEnumeration{
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IVariableDeclaration#getTypeName()
|
* @see org.eclipse.cdt.core.model.IVariableDeclaration#getTypeName()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getTypeName() throws CModelException {
|
public String getTypeName() throws CModelException {
|
||||||
return getEnumerationInfo().getTypeName();
|
return getEnumerationInfo().getTypeName();
|
||||||
}
|
}
|
||||||
|
@ -48,6 +49,7 @@ public class Enumeration extends SourceManipulation implements IEnumeration{
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IDeclaration#isConst()
|
* @see org.eclipse.cdt.core.model.IDeclaration#isConst()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isConst() throws CModelException {
|
public boolean isConst() throws CModelException {
|
||||||
return getEnumerationInfo().isConst();
|
return getEnumerationInfo().isConst();
|
||||||
}
|
}
|
||||||
|
@ -55,6 +57,7 @@ public class Enumeration extends SourceManipulation implements IEnumeration{
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IDeclaration#isStatic()
|
* @see org.eclipse.cdt.core.model.IDeclaration#isStatic()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isStatic() throws CModelException {
|
public boolean isStatic() throws CModelException {
|
||||||
return getEnumerationInfo().isStatic();
|
return getEnumerationInfo().isStatic();
|
||||||
}
|
}
|
||||||
|
@ -62,6 +65,7 @@ public class Enumeration extends SourceManipulation implements IEnumeration{
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IDeclaration#isVolatile()
|
* @see org.eclipse.cdt.core.model.IDeclaration#isVolatile()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isVolatile() throws CModelException {
|
public boolean isVolatile() throws CModelException {
|
||||||
return getEnumerationInfo().isVolatile();
|
return getEnumerationInfo().isVolatile();
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ public class Enumerator extends SourceManipulation implements IEnumerator{
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IEnumerator#getConstantExpression()
|
* @see org.eclipse.cdt.core.model.IEnumerator#getConstantExpression()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getConstantExpression() {
|
public String getConstantExpression() {
|
||||||
return constantExpression;
|
return constantExpression;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ public class Field extends VariableDeclaration implements IField {
|
||||||
super(parent, name, ICElement.C_FIELD);
|
super(parent, name, ICElement.C_FIELD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isMutable() throws CModelException{
|
public boolean isMutable() throws CModelException{
|
||||||
return getFieldInfo().isMutable();
|
return getFieldInfo().isMutable();
|
||||||
}
|
}
|
||||||
|
@ -70,6 +71,7 @@ public class Field extends VariableDeclaration implements IField {
|
||||||
getFieldInfo().setStatic(isStatic);
|
getFieldInfo().setStatic(isStatic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ASTAccessVisibility getVisibility() throws CModelException {
|
public ASTAccessVisibility getVisibility() throws CModelException {
|
||||||
return getFieldInfo().getVisibility();
|
return getFieldInfo().getVisibility();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class FunctionDeclaration extends SourceManipulation implements IFunction
|
||||||
fParameterTypes= fgEmptyStrings;
|
fParameterTypes= fgEmptyStrings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getReturnType(){
|
public String getReturnType(){
|
||||||
if (returnType != null) {
|
if (returnType != null) {
|
||||||
return returnType;
|
return returnType;
|
||||||
|
@ -42,10 +43,12 @@ public class FunctionDeclaration extends SourceManipulation implements IFunction
|
||||||
returnType = type;
|
returnType = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getNumberOfParameters() {
|
public int getNumberOfParameters() {
|
||||||
return fParameterTypes == null ? 0 : fParameterTypes.length;
|
return fParameterTypes == null ? 0 : fParameterTypes.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getParameterTypes() {
|
public String[] getParameterTypes() {
|
||||||
return fParameterTypes;
|
return fParameterTypes;
|
||||||
}
|
}
|
||||||
|
@ -54,6 +57,7 @@ public class FunctionDeclaration extends SourceManipulation implements IFunction
|
||||||
fParameterTypes = parameterTypes;
|
fParameterTypes = parameterTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getSignature() throws CModelException{
|
public String getSignature() throws CModelException{
|
||||||
return getSignature(this);
|
return getSignature(this);
|
||||||
}
|
}
|
||||||
|
@ -95,10 +99,12 @@ public class FunctionDeclaration extends SourceManipulation implements IFunction
|
||||||
return sig.toString();
|
return sig.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getParameterInitializer(int pos) {
|
public String getParameterInitializer(int pos) {
|
||||||
return ""; //$NON-NLS-1$
|
return ""; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getExceptions(){
|
public String[] getExceptions(){
|
||||||
return new String[] {};
|
return new String[] {};
|
||||||
}
|
}
|
||||||
|
@ -130,6 +136,7 @@ public class FunctionDeclaration extends SourceManipulation implements IFunction
|
||||||
* FunctionDeclarations and Functions can not be constant
|
* FunctionDeclarations and Functions can not be constant
|
||||||
* @see org.eclipse.cdt.core.model.IDeclaration#isConst()
|
* @see org.eclipse.cdt.core.model.IDeclaration#isConst()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isConst() throws CModelException{
|
public boolean isConst() throws CModelException{
|
||||||
return getFunctionInfo().isConst();
|
return getFunctionInfo().isConst();
|
||||||
}
|
}
|
||||||
|
@ -142,6 +149,7 @@ public class FunctionDeclaration extends SourceManipulation implements IFunction
|
||||||
* Returns the isStatic.
|
* Returns the isStatic.
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isStatic() throws CModelException {
|
public boolean isStatic() throws CModelException {
|
||||||
return getFunctionInfo().isStatic();
|
return getFunctionInfo().isStatic();
|
||||||
}
|
}
|
||||||
|
@ -150,6 +158,7 @@ public class FunctionDeclaration extends SourceManipulation implements IFunction
|
||||||
* Returns the isVolatile.
|
* Returns the isVolatile.
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isVolatile() throws CModelException {
|
public boolean isVolatile() throws CModelException {
|
||||||
return getFunctionInfo().isVolatile();
|
return getFunctionInfo().isVolatile();
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,10 +29,12 @@ public class FunctionTemplate extends Function implements IFunctionTemplate {
|
||||||
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateParameterTypes()
|
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateParameterTypes()
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getTemplateParameterTypes() {
|
public String[] getTemplateParameterTypes() {
|
||||||
return fTemplate.getTemplateParameterTypes();
|
return fTemplate.getTemplateParameterTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getTemplateArguments() {
|
public String[] getTemplateArguments() {
|
||||||
return fTemplate.getTemplateArguments();
|
return fTemplate.getTemplateArguments();
|
||||||
}
|
}
|
||||||
|
@ -47,6 +49,7 @@ public class FunctionTemplate extends Function implements IFunctionTemplate {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.ITemplate#getNumberOfTemplateParameters()
|
* @see org.eclipse.cdt.core.model.ITemplate#getNumberOfTemplateParameters()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getNumberOfTemplateParameters() {
|
public int getNumberOfTemplateParameters() {
|
||||||
return fTemplate.getNumberOfTemplateParameters();
|
return fTemplate.getNumberOfTemplateParameters();
|
||||||
}
|
}
|
||||||
|
@ -62,6 +65,7 @@ public class FunctionTemplate extends Function implements IFunctionTemplate {
|
||||||
* normal parameter list, then a colon then the function's
|
* normal parameter list, then a colon then the function's
|
||||||
* return type.
|
* return type.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getTemplateSignature() throws CModelException {
|
public String getTemplateSignature() throws CModelException {
|
||||||
StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
|
StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
|
||||||
sig.append(this.getParameterClause());
|
sig.append(this.getParameterClause());
|
||||||
|
|
|
@ -24,14 +24,17 @@ public class FunctionTemplateDeclaration extends FunctionDeclaration implements
|
||||||
fTemplate = new Template(name);
|
fTemplate = new Template(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getTemplateParameterTypes() {
|
public String[] getTemplateParameterTypes() {
|
||||||
return fTemplate.getTemplateParameterTypes();
|
return fTemplate.getTemplateParameterTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getTemplateArguments() {
|
public String[] getTemplateArguments() {
|
||||||
return fTemplate.getTemplateArguments();
|
return fTemplate.getTemplateArguments();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getTemplateSignature() throws CModelException {
|
public String getTemplateSignature() throws CModelException {
|
||||||
StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
|
StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
|
||||||
sig.append(this.getParameterClause());
|
sig.append(this.getParameterClause());
|
||||||
|
@ -48,6 +51,7 @@ public class FunctionTemplateDeclaration extends FunctionDeclaration implements
|
||||||
return sig.toString();
|
return sig.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getNumberOfTemplateParameters() {
|
public int getNumberOfTemplateParameters() {
|
||||||
return fTemplate.getNumberOfTemplateParameters();
|
return fTemplate.getNumberOfTemplateParameters();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,10 +26,12 @@ public class Include extends SourceManipulation implements IInclude {
|
||||||
standard = isStandard;
|
standard = isStandard;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getIncludeName() {
|
public String getIncludeName() {
|
||||||
return getElementName();
|
return getElementName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isStandard() {
|
public boolean isStandard() {
|
||||||
return standard;
|
return standard;
|
||||||
}
|
}
|
||||||
|
@ -37,6 +39,7 @@ public class Include extends SourceManipulation implements IInclude {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IInclude#getFullFileName()
|
* @see org.eclipse.cdt.core.model.IInclude#getFullFileName()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getFullFileName() {
|
public String getFullFileName() {
|
||||||
return fullPath;
|
return fullPath;
|
||||||
}
|
}
|
||||||
|
@ -44,6 +47,7 @@ public class Include extends SourceManipulation implements IInclude {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IInclude#isLocal()
|
* @see org.eclipse.cdt.core.model.IInclude#isLocal()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isLocal() {
|
public boolean isLocal() {
|
||||||
return !isStandard();
|
return !isStandard();
|
||||||
}
|
}
|
||||||
|
@ -63,6 +67,7 @@ public class Include extends SourceManipulation implements IInclude {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.core.model.IInclude#isResolved()
|
* @see org.eclipse.cdt.core.model.IInclude#isResolved()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isResolved() {
|
public boolean isResolved() {
|
||||||
return fIsResolved;
|
return fIsResolved;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,7 @@ public class IncludeEntry extends APathEntry implements IIncludeEntry {
|
||||||
*
|
*
|
||||||
* @return IPath
|
* @return IPath
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getIncludePath() {
|
public IPath getIncludePath() {
|
||||||
return includePath;
|
return includePath;
|
||||||
}
|
}
|
||||||
|
@ -45,6 +46,7 @@ public class IncludeEntry extends APathEntry implements IIncludeEntry {
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isSystemInclude() {
|
public boolean isSystemInclude() {
|
||||||
return isSystemInclude;
|
return isSystemInclude;
|
||||||
}
|
}
|
||||||
|
@ -95,6 +97,7 @@ public class IncludeEntry extends APathEntry implements IIncludeEntry {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IIncludeEntry#getFullIncludePath()
|
* @see org.eclipse.cdt.core.model.IIncludeEntry#getFullIncludePath()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getFullIncludePath() {
|
public IPath getFullIncludePath() {
|
||||||
final IPath inc = getIncludePath();
|
final IPath inc = getIncludePath();
|
||||||
if (!basePath.isEmpty()) {
|
if (!basePath.isEmpty()) {
|
||||||
|
|
|
@ -36,6 +36,7 @@ public class IncludeFileEntry extends APathEntry implements IIncludeFileEntry {
|
||||||
*
|
*
|
||||||
* @return IPath
|
* @return IPath
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getIncludeFilePath() {
|
public IPath getIncludeFilePath() {
|
||||||
return includeFilePath;
|
return includeFilePath;
|
||||||
}
|
}
|
||||||
|
@ -83,6 +84,7 @@ public class IncludeFileEntry extends APathEntry implements IIncludeFileEntry {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IIncludeEntry#getFullIncludePath()
|
* @see org.eclipse.cdt.core.model.IIncludeEntry#getFullIncludePath()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getFullIncludeFilePath() {
|
public IPath getFullIncludeFilePath() {
|
||||||
final IPath inc = getIncludeFilePath();
|
final IPath inc = getIncludeFilePath();
|
||||||
if (!basePath.isEmpty()) {
|
if (!basePath.isEmpty()) {
|
||||||
|
|
|
@ -88,6 +88,7 @@ public class IncludeReference extends Openable implements IIncludeReference {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IIncludeReference#getIncludeEntry()
|
* @see org.eclipse.cdt.core.model.IIncludeReference#getIncludeEntry()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IIncludeEntry getIncludeEntry() {
|
public IIncludeEntry getIncludeEntry() {
|
||||||
return fIncludeEntry;
|
return fIncludeEntry;
|
||||||
}
|
}
|
||||||
|
@ -103,6 +104,7 @@ public class IncludeReference extends Openable implements IIncludeReference {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IIncludeReference#getAffectedPath()
|
* @see org.eclipse.cdt.core.model.IIncludeReference#getAffectedPath()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getAffectedPath() {
|
public IPath getAffectedPath() {
|
||||||
return fIncludeEntry.getPath();
|
return fIncludeEntry.getPath();
|
||||||
}
|
}
|
||||||
|
@ -175,6 +177,7 @@ public class IncludeReference extends Openable implements IIncludeReference {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IIncludeReference#isOnIncludeEntry(org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.core.model.IIncludeReference#isOnIncludeEntry(org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOnIncludeEntry(IPath path) {
|
public boolean isOnIncludeEntry(IPath path) {
|
||||||
if (fIncludeEntry.getFullIncludePath().isPrefixOf(path)
|
if (fIncludeEntry.getFullIncludePath().isPrefixOf(path)
|
||||||
&& !CoreModelUtil.isExcluded(path, fIncludeEntry.fullExclusionPatternChars())) {
|
&& !CoreModelUtil.isExcluded(path, fIncludeEntry.fullExclusionPatternChars())) {
|
||||||
|
|
|
@ -37,13 +37,16 @@ public class LanguageDescriptor extends CExtensionDescriptor implements
|
||||||
super(el);
|
super(el);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ILanguage getLanguage() {
|
public ILanguage getLanguage() {
|
||||||
if(fLanguage == null){
|
if(fLanguage == null){
|
||||||
SafeRunner.run(new ISafeRunnable(){
|
SafeRunner.run(new ISafeRunnable(){
|
||||||
|
@Override
|
||||||
public void handleException(Throwable exception) {
|
public void handleException(Throwable exception) {
|
||||||
CCorePlugin.log(exception);
|
CCorePlugin.log(exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
fLanguage = (ILanguage)getConfigurationElement().createExecutableExtension(ATTRIBUTE_CLASS);
|
fLanguage = (ILanguage)getConfigurationElement().createExecutableExtension(ATTRIBUTE_CLASS);
|
||||||
}
|
}
|
||||||
|
@ -52,6 +55,7 @@ public class LanguageDescriptor extends CExtensionDescriptor implements
|
||||||
return fLanguage;
|
return fLanguage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getContentTypeIds() {
|
public String[] getContentTypeIds() {
|
||||||
if(fContentTypeIds == null){
|
if(fContentTypeIds == null){
|
||||||
fContentTypeIds = calculateCintentTypeIds();
|
fContentTypeIds = calculateCintentTypeIds();
|
||||||
|
@ -91,6 +95,7 @@ public class LanguageDescriptor extends CExtensionDescriptor implements
|
||||||
return fId;
|
return fId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IContentType[] getContentTypes() {
|
public IContentType[] getContentTypes() {
|
||||||
if(fContentTypes == null){
|
if(fContentTypes == null){
|
||||||
fContentTypes = calculateContentTypes(getContentTypeIds());
|
fContentTypes = calculateContentTypes(getContentTypeIds());
|
||||||
|
|
|
@ -58,6 +58,7 @@ public class LibraryEntry extends APathEntry implements ILibraryEntry {
|
||||||
*
|
*
|
||||||
* @return the path to the source archive or folder, or <code>null</code> if none
|
* @return the path to the source archive or folder, or <code>null</code> if none
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getSourceAttachmentPath() {
|
public IPath getSourceAttachmentPath() {
|
||||||
return sourceAttachmentPath;
|
return sourceAttachmentPath;
|
||||||
}
|
}
|
||||||
|
@ -72,6 +73,7 @@ public class LibraryEntry extends APathEntry implements ILibraryEntry {
|
||||||
* @return the path within the source archive or folder, or <code>null</code> if
|
* @return the path within the source archive or folder, or <code>null</code> if
|
||||||
* not applicable
|
* not applicable
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getSourceAttachmentRootPath() {
|
public IPath getSourceAttachmentRootPath() {
|
||||||
return sourceAttachmentRootPath;
|
return sourceAttachmentRootPath;
|
||||||
}
|
}
|
||||||
|
@ -86,6 +88,7 @@ public class LibraryEntry extends APathEntry implements ILibraryEntry {
|
||||||
* @return the path mapping within the source archive or folder, or <code>null</code> if
|
* @return the path mapping within the source archive or folder, or <code>null</code> if
|
||||||
* not applicable
|
* not applicable
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getSourceAttachmentPrefixMapping() {
|
public IPath getSourceAttachmentPrefixMapping() {
|
||||||
return sourceAttachmentPrefixMapping;
|
return sourceAttachmentPrefixMapping;
|
||||||
}
|
}
|
||||||
|
@ -143,6 +146,7 @@ public class LibraryEntry extends APathEntry implements ILibraryEntry {
|
||||||
return super.equals(obj);
|
return super.equals(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath getFullLibraryPath() {
|
public IPath getFullLibraryPath() {
|
||||||
IPath p;
|
IPath p;
|
||||||
IPath lib = getLibraryPath();
|
IPath lib = getLibraryPath();
|
||||||
|
@ -178,6 +182,7 @@ public class LibraryEntry extends APathEntry implements ILibraryEntry {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ILibraryEntry#getLibraryPath()
|
* @see org.eclipse.cdt.core.model.ILibraryEntry#getLibraryPath()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getLibraryPath() {
|
public IPath getLibraryPath() {
|
||||||
return libraryPath;
|
return libraryPath;
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,7 @@ public class LibraryReference extends Parent implements ILibraryReference {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ILibraryReference#getLibraryEntry()
|
* @see org.eclipse.cdt.core.model.ILibraryReference#getLibraryEntry()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ILibraryEntry getLibraryEntry() {
|
public ILibraryEntry getLibraryEntry() {
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,7 @@ public class LibraryReferenceArchive extends Archive implements ILibraryReferenc
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ILibraryReference#getLibraryEntry()
|
* @see org.eclipse.cdt.core.model.ILibraryReference#getLibraryEntry()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ILibraryEntry getLibraryEntry() {
|
public ILibraryEntry getLibraryEntry() {
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,6 +79,7 @@ public class LibraryReferenceShared extends Binary implements ILibraryReference
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ILibraryReference#getLibraryEntry()
|
* @see org.eclipse.cdt.core.model.ILibraryReference#getLibraryEntry()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ILibraryEntry getLibraryEntry() {
|
public ILibraryEntry getLibraryEntry() {
|
||||||
return entry;
|
return entry;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,10 +26,12 @@ public class Macro extends SourceManipulation implements IMacro {
|
||||||
super(parent, name, ICElement.C_MACRO);
|
super(parent, name, ICElement.C_MACRO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getIdentifierList() {
|
public String getIdentifierList() {
|
||||||
return ""; //$NON-NLS-1$
|
return ""; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getTokenSequence() {
|
public String getTokenSequence() {
|
||||||
return ""; //$NON-NLS-1$
|
return ""; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
@ -39,6 +41,7 @@ public class Macro extends SourceManipulation implements IMacro {
|
||||||
return new SourceManipulationInfo(this);
|
return new SourceManipulationInfo(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isFunctionStyle() {
|
public boolean isFunctionStyle() {
|
||||||
return fFunctionStyle;
|
return fFunctionStyle;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@ public class MacroEntry extends APathEntry implements IMacroEntry {
|
||||||
* Returns the macro name.
|
* Returns the macro name.
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getMacroName() {
|
public String getMacroName() {
|
||||||
return macroName;
|
return macroName;
|
||||||
}
|
}
|
||||||
|
@ -40,6 +41,7 @@ public class MacroEntry extends APathEntry implements IMacroEntry {
|
||||||
* Returns the macro value.
|
* Returns the macro value.
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getMacroValue() {
|
public String getMacroValue() {
|
||||||
return macroValue;
|
return macroValue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@ public class MacroFileEntry extends APathEntry implements IMacroFileEntry {
|
||||||
*
|
*
|
||||||
* @return IPath
|
* @return IPath
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getMacroFilePath() {
|
public IPath getMacroFilePath() {
|
||||||
return macroFilePath;
|
return macroFilePath;
|
||||||
}
|
}
|
||||||
|
@ -81,6 +82,7 @@ public class MacroFileEntry extends APathEntry implements IMacroFileEntry {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IIncludeEntry#getFullIncludePath()
|
* @see org.eclipse.cdt.core.model.IIncludeEntry#getFullIncludePath()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getFullMacroFilePath() {
|
public IPath getFullMacroFilePath() {
|
||||||
IPath p;
|
IPath p;
|
||||||
IPath inc = getMacroFilePath();
|
IPath inc = getMacroFilePath();
|
||||||
|
|
|
@ -32,10 +32,12 @@ public class MethodDeclaration extends FunctionDeclaration implements IMethodDec
|
||||||
super(parent, name, type);
|
super(parent, name, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isConstructor(){
|
public boolean isConstructor(){
|
||||||
return isConstructor;
|
return isConstructor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isDestructor() {
|
public boolean isDestructor() {
|
||||||
return isDestructor;
|
return isDestructor;
|
||||||
}
|
}
|
||||||
|
@ -48,10 +50,12 @@ public class MethodDeclaration extends FunctionDeclaration implements IMethodDec
|
||||||
this.isDestructor = isDestructor;
|
this.isDestructor = isDestructor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isOperator(){
|
public boolean isOperator(){
|
||||||
return getElementName().startsWith("operator"); //$NON-NLS-1$
|
return getElementName().startsWith("operator"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isPureVirtual() throws CModelException{
|
public boolean isPureVirtual() throws CModelException{
|
||||||
return getMethodInfo().isPureVirtual();
|
return getMethodInfo().isPureVirtual();
|
||||||
}
|
}
|
||||||
|
@ -60,6 +64,7 @@ public class MethodDeclaration extends FunctionDeclaration implements IMethodDec
|
||||||
getMethodInfo().setPureVirtual(isPureVirtual);
|
getMethodInfo().setPureVirtual(isPureVirtual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isInline() throws CModelException{
|
public boolean isInline() throws CModelException{
|
||||||
return getMethodInfo().isInline();
|
return getMethodInfo().isInline();
|
||||||
}
|
}
|
||||||
|
@ -68,6 +73,7 @@ public class MethodDeclaration extends FunctionDeclaration implements IMethodDec
|
||||||
getMethodInfo().setInline(isInline);
|
getMethodInfo().setInline(isInline);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isVirtual() throws CModelException{
|
public boolean isVirtual() throws CModelException{
|
||||||
return getMethodInfo().isVirtual();
|
return getMethodInfo().isVirtual();
|
||||||
}
|
}
|
||||||
|
@ -76,6 +82,7 @@ public class MethodDeclaration extends FunctionDeclaration implements IMethodDec
|
||||||
getMethodInfo().setVirtual(isVirtual);
|
getMethodInfo().setVirtual(isVirtual);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isFriend() throws CModelException{
|
public boolean isFriend() throws CModelException{
|
||||||
return getMethodInfo().isFriend();
|
return getMethodInfo().isFriend();
|
||||||
}
|
}
|
||||||
|
@ -94,6 +101,7 @@ public class MethodDeclaration extends FunctionDeclaration implements IMethodDec
|
||||||
this.isConst = isConst;
|
this.isConst = isConst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ASTAccessVisibility getVisibility() throws CModelException{
|
public ASTAccessVisibility getVisibility() throws CModelException{
|
||||||
return getMethodInfo().getVisibility();
|
return getMethodInfo().getVisibility();
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,10 +29,12 @@ public class MethodTemplate extends Method implements IMethodTemplate {
|
||||||
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateParameterTypes()
|
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateParameterTypes()
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getTemplateParameterTypes() {
|
public String[] getTemplateParameterTypes() {
|
||||||
return fTemplate.getTemplateParameterTypes();
|
return fTemplate.getTemplateParameterTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getTemplateArguments() {
|
public String[] getTemplateArguments() {
|
||||||
return fTemplate.getTemplateArguments();
|
return fTemplate.getTemplateArguments();
|
||||||
}
|
}
|
||||||
|
@ -48,6 +50,7 @@ public class MethodTemplate extends Method implements IMethodTemplate {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.ITemplate#getNumberOfTemplateParameters()
|
* @see org.eclipse.cdt.core.model.ITemplate#getNumberOfTemplateParameters()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getNumberOfTemplateParameters() {
|
public int getNumberOfTemplateParameters() {
|
||||||
return fTemplate.getNumberOfTemplateParameters();
|
return fTemplate.getNumberOfTemplateParameters();
|
||||||
}
|
}
|
||||||
|
@ -64,6 +67,7 @@ public class MethodTemplate extends Method implements IMethodTemplate {
|
||||||
* return type.
|
* return type.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getTemplateSignature() throws CModelException {
|
public String getTemplateSignature() throws CModelException {
|
||||||
StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
|
StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
|
||||||
sig.append(this.getParameterClause());
|
sig.append(this.getParameterClause());
|
||||||
|
|
|
@ -24,14 +24,17 @@ public class MethodTemplateDeclaration extends MethodDeclaration implements IMet
|
||||||
fTemplate = new Template(name);
|
fTemplate = new Template(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getTemplateParameterTypes() {
|
public String[] getTemplateParameterTypes() {
|
||||||
return fTemplate.getTemplateParameterTypes();
|
return fTemplate.getTemplateParameterTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getTemplateArguments() {
|
public String[] getTemplateArguments() {
|
||||||
return fTemplate.getTemplateArguments();
|
return fTemplate.getTemplateArguments();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getTemplateSignature() throws CModelException {
|
public String getTemplateSignature() throws CModelException {
|
||||||
StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
|
StringBuffer sig = new StringBuffer(fTemplate.getTemplateSignature());
|
||||||
sig.append(this.getParameterClause());
|
sig.append(this.getParameterClause());
|
||||||
|
@ -49,6 +52,7 @@ public class MethodTemplateDeclaration extends MethodDeclaration implements IMet
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getNumberOfTemplateParameters() {
|
public int getNumberOfTemplateParameters() {
|
||||||
return fTemplate.getNumberOfTemplateParameters();
|
return fTemplate.getNumberOfTemplateParameters();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ public class Namespace extends SourceManipulation implements INamespace{
|
||||||
* Returns the typeName.
|
* Returns the typeName.
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getTypeName() {
|
public String getTypeName() {
|
||||||
return typeName;
|
return typeName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ public class NullBinaryParser extends PlatformObject implements IBinaryParser {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.IBinaryParser#getBinary(org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.core.IBinaryParser#getBinary(org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBinaryFile getBinary(byte[] data, IPath path) throws IOException {
|
public IBinaryFile getBinary(byte[] data, IPath path) throws IOException {
|
||||||
throw new IOException(CCorePlugin.getResourceString("CoreModel.NullBinaryParser.Not_binary_file")); //$NON-NLS-1$
|
throw new IOException(CCorePlugin.getResourceString("CoreModel.NullBinaryParser.Not_binary_file")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
@ -32,6 +33,7 @@ public class NullBinaryParser extends PlatformObject implements IBinaryParser {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.IBinaryParser#getBinary(org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.core.IBinaryParser#getBinary(org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBinaryFile getBinary(IPath path) throws IOException {
|
public IBinaryFile getBinary(IPath path) throws IOException {
|
||||||
throw new IOException(CCorePlugin.getResourceString("CoreModel.NullBinaryParser.Not_binary_file")); //$NON-NLS-1$
|
throw new IOException(CCorePlugin.getResourceString("CoreModel.NullBinaryParser.Not_binary_file")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
@ -39,6 +41,7 @@ public class NullBinaryParser extends PlatformObject implements IBinaryParser {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.IBinaryParser#getFormat()
|
* @see org.eclipse.cdt.core.IBinaryParser#getFormat()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getFormat() {
|
public String getFormat() {
|
||||||
return CCorePlugin.getResourceString("CoreModel.NullBinaryParser.Null_Format"); //$NON-NLS-1$
|
return CCorePlugin.getResourceString("CoreModel.NullBinaryParser.Null_Format"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
@ -46,6 +49,7 @@ public class NullBinaryParser extends PlatformObject implements IBinaryParser {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.IBinaryParser#isBinary(byte[], org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.core.IBinaryParser#isBinary(byte[], org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isBinary(byte[] array, IPath path) {
|
public boolean isBinary(byte[] array, IPath path) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -53,6 +57,7 @@ public class NullBinaryParser extends PlatformObject implements IBinaryParser {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.IBinaryParser#getBufferSize()
|
* @see org.eclipse.cdt.core.IBinaryParser#getBufferSize()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getHintBufferSize() {
|
public int getHintBufferSize() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,7 @@ public abstract class Openable extends Parent implements IOpenable {
|
||||||
*
|
*
|
||||||
* @see IBufferChangedListener
|
* @see IBufferChangedListener
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void bufferChanged(BufferChangedEvent event) {
|
public void bufferChanged(BufferChangedEvent event) {
|
||||||
if (event.getBuffer().isClosed()) {
|
if (event.getBuffer().isClosed()) {
|
||||||
CModelManager.getDefault().getElementsOutOfSynchWithBuffers().remove(this);
|
CModelManager.getDefault().getElementsOutOfSynchWithBuffers().remove(this);
|
||||||
|
@ -103,6 +104,7 @@ public abstract class Openable extends Parent implements IOpenable {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IOpenable#getBuffer()
|
* @see org.eclipse.cdt.core.model.IOpenable#getBuffer()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBuffer getBuffer() throws CModelException {
|
public IBuffer getBuffer() throws CModelException {
|
||||||
if (hasBuffer()) {
|
if (hasBuffer()) {
|
||||||
// ensure element is open
|
// ensure element is open
|
||||||
|
@ -143,6 +145,7 @@ public abstract class Openable extends Parent implements IOpenable {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IOpenable#hasUnsavedChanges()
|
* @see org.eclipse.cdt.core.model.IOpenable#hasUnsavedChanges()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean hasUnsavedChanges() throws CModelException{
|
public boolean hasUnsavedChanges() throws CModelException{
|
||||||
if (isReadOnly() || !isOpen()) {
|
if (isReadOnly() || !isOpen()) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -174,6 +177,7 @@ public abstract class Openable extends Parent implements IOpenable {
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.model.IOpenable#isConsistent()
|
* @see org.eclipse.cdt.core.model.IOpenable#isConsistent()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isConsistent() throws CModelException {
|
public boolean isConsistent() throws CModelException {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -181,6 +185,7 @@ public abstract class Openable extends Parent implements IOpenable {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IOpenable#isOpen()
|
* @see org.eclipse.cdt.core.model.IOpenable#isOpen()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOpen() {
|
public boolean isOpen() {
|
||||||
return CModelManager.getDefault().getInfo(this) != null;
|
return CModelManager.getDefault().getInfo(this) != null;
|
||||||
}
|
}
|
||||||
|
@ -203,10 +208,12 @@ public abstract class Openable extends Parent implements IOpenable {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IOpenable#makeConsistent(IProgressMonitor)
|
* @see org.eclipse.cdt.core.model.IOpenable#makeConsistent(IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void makeConsistent(IProgressMonitor pm) throws CModelException {
|
public void makeConsistent(IProgressMonitor pm) throws CModelException {
|
||||||
makeConsistent(pm, false);
|
makeConsistent(pm, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void makeConsistent(IProgressMonitor monitor, boolean forced) throws CModelException {
|
public void makeConsistent(IProgressMonitor monitor, boolean forced) throws CModelException {
|
||||||
// only translation units can be inconsistent
|
// only translation units can be inconsistent
|
||||||
// other openables cannot be inconsistent so default is to do nothing
|
// other openables cannot be inconsistent so default is to do nothing
|
||||||
|
@ -215,6 +222,7 @@ public abstract class Openable extends Parent implements IOpenable {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IOpenable#open(IProgressMonitor)
|
* @see org.eclipse.cdt.core.model.IOpenable#open(IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void open(IProgressMonitor pm) throws CModelException {
|
public void open(IProgressMonitor pm) throws CModelException {
|
||||||
getElementInfo(pm);
|
getElementInfo(pm);
|
||||||
}
|
}
|
||||||
|
@ -276,6 +284,7 @@ public abstract class Openable extends Parent implements IOpenable {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IOpenable#save(IProgressMonitor, boolean)
|
* @see org.eclipse.cdt.core.model.IOpenable#save(IProgressMonitor, boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void save(IProgressMonitor pm, boolean force) throws CModelException {
|
public void save(IProgressMonitor pm, boolean force) throws CModelException {
|
||||||
IResource res = getResource();
|
IResource res = getResource();
|
||||||
if (res != null) {
|
if (res != null) {
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class PathEntry implements IPathEntry {
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.IPathEntry#getEntryKind()
|
* @see org.eclipse.cdt.core.IPathEntry#getEntryKind()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getPath() {
|
public IPath getPath() {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
@ -40,6 +41,7 @@ public class PathEntry implements IPathEntry {
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.IPathEntry#getEntryKind()
|
* @see org.eclipse.cdt.core.IPathEntry#getEntryKind()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getEntryKind() {
|
public int getEntryKind() {
|
||||||
return entryKind;
|
return entryKind;
|
||||||
}
|
}
|
||||||
|
@ -49,6 +51,7 @@ public class PathEntry implements IPathEntry {
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.IPathEntry#isExported()
|
* @see org.eclipse.cdt.core.IPathEntry#isExported()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isExported() {
|
public boolean isExported() {
|
||||||
return isExported;
|
return isExported;
|
||||||
}
|
}
|
||||||
|
|
|
@ -156,6 +156,7 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.model.IPathEntryContainer#getPathEntries()
|
* @see org.eclipse.cdt.core.model.IPathEntryContainer#getPathEntries()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPathEntry[] getPathEntries() {
|
public IPathEntry[] getPathEntries() {
|
||||||
return NO_PATHENTRIES;
|
return NO_PATHENTRIES;
|
||||||
}
|
}
|
||||||
|
@ -165,6 +166,7 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.model.IPathEntryContainer#getDescription()
|
* @see org.eclipse.cdt.core.model.IPathEntryContainer#getDescription()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return new String("Lock container"); //$NON-NLS-1$
|
return new String("Lock container"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
@ -174,6 +176,7 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.model.IPathEntryContainer#getPath()
|
* @see org.eclipse.cdt.core.model.IPathEntryContainer#getPath()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath getPath() {
|
public IPath getPath() {
|
||||||
return Path.EMPTY;
|
return Path.EMPTY;
|
||||||
}
|
}
|
||||||
|
@ -745,12 +748,14 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
// causing some grief
|
// causing some grief
|
||||||
SafeRunner.run(new ISafeRunnable() {
|
SafeRunner.run(new ISafeRunnable() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void handleException(Throwable exception) {
|
public void handleException(Throwable exception) {
|
||||||
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID,
|
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID,
|
||||||
"Exception occurred in container initializer: " + initializer, exception); //$NON-NLS-1$
|
"Exception occurred in container initializer: " + initializer, exception); //$NON-NLS-1$
|
||||||
CCorePlugin.log(status);
|
CCorePlugin.log(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void run() throws Exception {
|
public void run() throws Exception {
|
||||||
initializer.initialize(containerPath, project);
|
initializer.initialize(containerPath, project);
|
||||||
ok[0] = true;
|
ok[0] = true;
|
||||||
|
@ -1299,6 +1304,7 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.resources.IPathEntryStoreListener#pathEntryStoreChanged(org.eclipse.cdt.core.resources.PathEntryChangedEvent)
|
* @see org.eclipse.cdt.core.resources.IPathEntryStoreListener#pathEntryStoreChanged(org.eclipse.cdt.core.resources.PathEntryChangedEvent)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void pathEntryStoreChanged(PathEntryStoreChangedEvent event) {
|
public void pathEntryStoreChanged(PathEntryStoreChangedEvent event) {
|
||||||
IProject project = event.getProject();
|
IProject project = event.getProject();
|
||||||
|
|
||||||
|
@ -1332,6 +1338,7 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.core.model.IElementChangedListener#elementChanged(org.eclipse.cdt.core.model.ElementChangedEvent)
|
* @see org.eclipse.cdt.core.model.IElementChangedListener#elementChanged(org.eclipse.cdt.core.model.ElementChangedEvent)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void elementChanged(ElementChangedEvent event) {
|
public void elementChanged(ElementChangedEvent event) {
|
||||||
try {
|
try {
|
||||||
if (processDelta(event.getDelta()) == true) {
|
if (processDelta(event.getDelta()) == true) {
|
||||||
|
|
|
@ -43,6 +43,7 @@ public class PathEntryStoreProxy extends AbstractCExtensionProxy implements IPat
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.resources.IPathEntryStore#addPathEntryStoreListener(org.eclipse.cdt.core.resources.IPathEntryStoreListener)
|
* @see org.eclipse.cdt.core.resources.IPathEntryStore#addPathEntryStoreListener(org.eclipse.cdt.core.resources.IPathEntryStoreListener)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void addPathEntryStoreListener(IPathEntryStoreListener listener) {
|
public void addPathEntryStoreListener(IPathEntryStoreListener listener) {
|
||||||
fListeners.add(listener);
|
fListeners.add(listener);
|
||||||
}
|
}
|
||||||
|
@ -50,6 +51,7 @@ public class PathEntryStoreProxy extends AbstractCExtensionProxy implements IPat
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.resources.IPathEntryStore#removePathEntryStoreListener(org.eclipse.cdt.core.resources.IPathEntryStoreListener)
|
* @see org.eclipse.cdt.core.resources.IPathEntryStore#removePathEntryStoreListener(org.eclipse.cdt.core.resources.IPathEntryStoreListener)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void removePathEntryStoreListener(IPathEntryStoreListener listener) {
|
public void removePathEntryStoreListener(IPathEntryStoreListener listener) {
|
||||||
fListeners.remove(listener);
|
fListeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
@ -86,26 +88,31 @@ public class PathEntryStoreProxy extends AbstractCExtensionProxy implements IPat
|
||||||
return super.getProject();
|
return super.getProject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICExtensionReference getExtensionReference() {
|
public ICExtensionReference getExtensionReference() {
|
||||||
//TODO: calculate
|
//TODO: calculate
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICConfigExtensionReference getConfigExtensionReference() {
|
public ICConfigExtensionReference getConfigExtensionReference() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPathEntry[] getRawPathEntries() throws CoreException {
|
public IPathEntry[] getRawPathEntries() throws CoreException {
|
||||||
providerRequested();
|
providerRequested();
|
||||||
return fStore.getRawPathEntries();
|
return fStore.getRawPathEntries();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setRawPathEntries(IPathEntry[] entries) throws CoreException {
|
public void setRawPathEntries(IPathEntry[] entries) throws CoreException {
|
||||||
providerRequested();
|
providerRequested();
|
||||||
fStore.setRawPathEntries(entries);
|
fStore.setRawPathEntries(entries);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void pathEntryStoreChanged(PathEntryStoreChangedEvent event) {
|
public void pathEntryStoreChanged(PathEntryStoreChangedEvent event) {
|
||||||
notifyListeners(event);
|
notifyListeners(event);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ public class ProgressMonitorAndCanceler extends NullProgressMonitor implements I
|
||||||
|
|
||||||
private ICancelable fCancelable;
|
private ICancelable fCancelable;
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setCancelable(ICancelable cancelable) {
|
public void setCancelable(ICancelable cancelable) {
|
||||||
fCancelable= cancelable;
|
fCancelable= cancelable;
|
||||||
checkCanceled();
|
checkCanceled();
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class Region implements IRegion {
|
||||||
/**
|
/**
|
||||||
* @see IRegion#add(ICElement)
|
* @see IRegion#add(ICElement)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void add(ICElement element) {
|
public void add(ICElement element) {
|
||||||
if (!contains(element)) {
|
if (!contains(element)) {
|
||||||
// "new" element added to region
|
// "new" element added to region
|
||||||
|
@ -54,6 +55,7 @@ public class Region implements IRegion {
|
||||||
/**
|
/**
|
||||||
* @see IRegion
|
* @see IRegion
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean contains(ICElement element) {
|
public boolean contains(ICElement element) {
|
||||||
|
|
||||||
int size = fRootElements.size();
|
int size = fRootElements.size();
|
||||||
|
@ -93,6 +95,7 @@ public class Region implements IRegion {
|
||||||
/**
|
/**
|
||||||
* @see IRegion
|
* @see IRegion
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElement[] getElements() {
|
public ICElement[] getElements() {
|
||||||
int size = fRootElements.size();
|
int size = fRootElements.size();
|
||||||
ICElement[] roots = new ICElement[size];
|
ICElement[] roots = new ICElement[size];
|
||||||
|
@ -106,6 +109,7 @@ public class Region implements IRegion {
|
||||||
/**
|
/**
|
||||||
* @see IRegion#remove(ICElement)
|
* @see IRegion#remove(ICElement)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean remove(ICElement element) {
|
public boolean remove(ICElement element) {
|
||||||
|
|
||||||
removeAllChildren(element);
|
removeAllChildren(element);
|
||||||
|
|
|
@ -52,6 +52,7 @@ public class SourceManipulation extends Parent implements ISourceManipulation, I
|
||||||
/**
|
/**
|
||||||
* @see ISourceManipulation
|
* @see ISourceManipulation
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void copy(ICElement container, ICElement sibling, String rename, boolean force,
|
public void copy(ICElement container, ICElement sibling, String rename, boolean force,
|
||||||
IProgressMonitor monitor) throws CModelException {
|
IProgressMonitor monitor) throws CModelException {
|
||||||
if (container == null) {
|
if (container == null) {
|
||||||
|
@ -73,6 +74,7 @@ public class SourceManipulation extends Parent implements ISourceManipulation, I
|
||||||
/**
|
/**
|
||||||
* @see ISourceManipulation
|
* @see ISourceManipulation
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void delete(boolean force, IProgressMonitor monitor) throws CModelException {
|
public void delete(boolean force, IProgressMonitor monitor) throws CModelException {
|
||||||
ICElement[] elements = new ICElement[] {this};
|
ICElement[] elements = new ICElement[] {this};
|
||||||
getCModel().delete(elements, force, monitor);
|
getCModel().delete(elements, force, monitor);
|
||||||
|
@ -81,6 +83,7 @@ public class SourceManipulation extends Parent implements ISourceManipulation, I
|
||||||
/**
|
/**
|
||||||
* @see ISourceManipulation
|
* @see ISourceManipulation
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void move(ICElement container, ICElement sibling, String rename, boolean force,
|
public void move(ICElement container, ICElement sibling, String rename, boolean force,
|
||||||
IProgressMonitor monitor) throws CModelException {
|
IProgressMonitor monitor) throws CModelException {
|
||||||
if (container == null) {
|
if (container == null) {
|
||||||
|
@ -102,6 +105,7 @@ public class SourceManipulation extends Parent implements ISourceManipulation, I
|
||||||
/**
|
/**
|
||||||
* @see ISourceManipulation
|
* @see ISourceManipulation
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void rename(String name, boolean force, IProgressMonitor monitor) throws CModelException {
|
public void rename(String name, boolean force, IProgressMonitor monitor) throws CModelException {
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
throw new IllegalArgumentException("element.nullName"); //$NON-NLS-1$
|
throw new IllegalArgumentException("element.nullName"); //$NON-NLS-1$
|
||||||
|
@ -115,6 +119,7 @@ public class SourceManipulation extends Parent implements ISourceManipulation, I
|
||||||
/**
|
/**
|
||||||
* @see IMember
|
* @see IMember
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITranslationUnit getTranslationUnit() {
|
public ITranslationUnit getTranslationUnit() {
|
||||||
try {
|
try {
|
||||||
return getSourceManipulationInfo().getTranslationUnit();
|
return getSourceManipulationInfo().getTranslationUnit();
|
||||||
|
@ -152,6 +157,7 @@ public class SourceManipulation extends Parent implements ISourceManipulation, I
|
||||||
/**
|
/**
|
||||||
* @see ISourceReference
|
* @see ISourceReference
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getSource() throws CModelException {
|
public String getSource() throws CModelException {
|
||||||
return getSourceManipulationInfo().getSource();
|
return getSourceManipulationInfo().getSource();
|
||||||
}
|
}
|
||||||
|
@ -159,6 +165,7 @@ public class SourceManipulation extends Parent implements ISourceManipulation, I
|
||||||
/**
|
/**
|
||||||
* @see ISourceReference
|
* @see ISourceReference
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ISourceRange getSourceRange() throws CModelException {
|
public ISourceRange getSourceRange() throws CModelException {
|
||||||
return getSourceManipulationInfo().getSourceRange();
|
return getSourceManipulationInfo().getSourceRange();
|
||||||
}
|
}
|
||||||
|
@ -362,10 +369,12 @@ public class SourceManipulation extends Parent implements ISourceManipulation, I
|
||||||
return CElement.CEM_SOURCEELEMENT;
|
return CElement.CEM_SOURCEELEMENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isActive() {
|
public boolean isActive() {
|
||||||
return fIsActive;
|
return fIsActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getIndex() {
|
public int getIndex() {
|
||||||
return fIndex;
|
return fIndex;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,7 @@ class SourceRange implements ISourceRange {
|
||||||
/**
|
/**
|
||||||
* @see ISourceRange
|
* @see ISourceRange
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getLength() {
|
public int getLength() {
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
@ -57,24 +58,29 @@ class SourceRange implements ISourceRange {
|
||||||
/**
|
/**
|
||||||
* @see ISourceRange
|
* @see ISourceRange
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getStartPos() {
|
public int getStartPos() {
|
||||||
return startPos;
|
return startPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getIdStartPos() {
|
public int getIdStartPos() {
|
||||||
return idStartPos;
|
return idStartPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getIdLength() {
|
public int getIdLength() {
|
||||||
return idLength;
|
return idLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getStartLine() {
|
public int getStartLine() {
|
||||||
return startLine;
|
return startLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getEndLine() {
|
public int getEndLine() {
|
||||||
return endLine;
|
return endLine;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,7 @@ public class SourceRoot extends CContainer implements ISourceRoot {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ISourceRoot#isOnclasspath(org.eclipse.cdt.core.model.ICElement)
|
* @see org.eclipse.cdt.core.model.ISourceRoot#isOnclasspath(org.eclipse.cdt.core.model.ICElement)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOnSourceEntry(ICElement element) {
|
public boolean isOnSourceEntry(ICElement element) {
|
||||||
IPath path = element.getPath();
|
IPath path = element.getPath();
|
||||||
return this.isOnSourceEntry(path);
|
return this.isOnSourceEntry(path);
|
||||||
|
@ -58,11 +59,13 @@ public class SourceRoot extends CContainer implements ISourceRoot {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ISourceRoot#isOnSourceEntry(org.eclipse.core.resources.IResource)
|
* @see org.eclipse.cdt.core.model.ISourceRoot#isOnSourceEntry(org.eclipse.core.resources.IResource)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOnSourceEntry(IResource res) {
|
public boolean isOnSourceEntry(IResource res) {
|
||||||
IPath path = res.getFullPath();
|
IPath path = res.getFullPath();
|
||||||
return isOnSourceEntry(path);
|
return isOnSourceEntry(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isOnSourceEntry(IPath path) {
|
public boolean isOnSourceEntry(IPath path) {
|
||||||
if (sourceEntry.getFullPath().isPrefixOf(path)
|
if (sourceEntry.getFullPath().isPrefixOf(path)
|
||||||
&& !CoreModelUtil.isExcluded(path, sourceEntry.fullExclusionPatternChars())) {
|
&& !CoreModelUtil.isExcluded(path, sourceEntry.fullExclusionPatternChars())) {
|
||||||
|
|
|
@ -31,12 +31,14 @@ public class Structure extends StructureDeclaration implements IStructure {
|
||||||
super(parent, name, kind);
|
super(parent, name, kind);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IField[] getFields() throws CModelException {
|
public IField[] getFields() throws CModelException {
|
||||||
List<ICElement> fields = new ArrayList<ICElement>();
|
List<ICElement> fields = new ArrayList<ICElement>();
|
||||||
fields.addAll(getChildrenOfType(ICElement.C_FIELD));
|
fields.addAll(getChildrenOfType(ICElement.C_FIELD));
|
||||||
return fields.toArray(new IField[fields.size()]);
|
return fields.toArray(new IField[fields.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IField getField(String name) {
|
public IField getField(String name) {
|
||||||
try {
|
try {
|
||||||
IField[] fields = getFields();
|
IField[] fields = getFields();
|
||||||
|
@ -50,6 +52,7 @@ public class Structure extends StructureDeclaration implements IStructure {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IMethodDeclaration[] getMethods() throws CModelException {
|
public IMethodDeclaration[] getMethods() throws CModelException {
|
||||||
List<ICElement> methods = new ArrayList<ICElement>();
|
List<ICElement> methods = new ArrayList<ICElement>();
|
||||||
methods.addAll(getChildrenOfType(ICElement.C_METHOD_DECLARATION));
|
methods.addAll(getChildrenOfType(ICElement.C_METHOD_DECLARATION));
|
||||||
|
@ -57,6 +60,7 @@ public class Structure extends StructureDeclaration implements IStructure {
|
||||||
return methods.toArray(new IMethodDeclaration[methods.size()]);
|
return methods.toArray(new IMethodDeclaration[methods.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IMethodDeclaration getMethod(String name) {
|
public IMethodDeclaration getMethod(String name) {
|
||||||
try {
|
try {
|
||||||
IMethodDeclaration[] methods = getMethods();
|
IMethodDeclaration[] methods = getMethods();
|
||||||
|
@ -70,6 +74,7 @@ public class Structure extends StructureDeclaration implements IStructure {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isAbstract() throws CModelException {
|
public boolean isAbstract() throws CModelException {
|
||||||
IMethodDeclaration[] methods = getMethods();
|
IMethodDeclaration[] methods = getMethods();
|
||||||
for (IMethodDeclaration method : methods) {
|
for (IMethodDeclaration method : methods) {
|
||||||
|
@ -79,10 +84,12 @@ public class Structure extends StructureDeclaration implements IStructure {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getSuperClassesNames(){
|
public String[] getSuperClassesNames(){
|
||||||
return superClassesNames.keySet().toArray(new String[superClassesNames.keySet().size()]);
|
return superClassesNames.keySet().toArray(new String[superClassesNames.keySet().size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ASTAccessVisibility getSuperClassAccess(String name){
|
public ASTAccessVisibility getSuperClassAccess(String name){
|
||||||
return superClassesNames.get(name);
|
return superClassesNames.get(name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ public class StructureDeclaration extends SourceManipulation implements IStructu
|
||||||
super(parent, name, kind);
|
super(parent, name, kind);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getTypeName() throws CModelException {
|
public String getTypeName() throws CModelException {
|
||||||
return getStructureInfo().getTypeName();
|
return getStructureInfo().getTypeName();
|
||||||
}
|
}
|
||||||
|
@ -32,14 +33,17 @@ public class StructureDeclaration extends SourceManipulation implements IStructu
|
||||||
getStructureInfo().setTypeName(type);
|
getStructureInfo().setTypeName(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isUnion() throws CModelException {
|
public boolean isUnion() throws CModelException {
|
||||||
return getStructureInfo().isUnion();
|
return getStructureInfo().isUnion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isClass() throws CModelException {
|
public boolean isClass() throws CModelException {
|
||||||
return getStructureInfo().isClass();
|
return getStructureInfo().isClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isStruct() throws CModelException {
|
public boolean isStruct() throws CModelException {
|
||||||
return getStructureInfo().isStruct();
|
return getStructureInfo().isStruct();
|
||||||
}
|
}
|
||||||
|
@ -56,6 +60,7 @@ public class StructureDeclaration extends SourceManipulation implements IStructu
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IDeclaration#isStatic()
|
* @see org.eclipse.cdt.core.model.IDeclaration#isStatic()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isStatic() throws CModelException {
|
public boolean isStatic() throws CModelException {
|
||||||
return getStructureInfo().isStatic();
|
return getStructureInfo().isStatic();
|
||||||
}
|
}
|
||||||
|
@ -63,6 +68,7 @@ public class StructureDeclaration extends SourceManipulation implements IStructu
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IDeclaration#isConst()
|
* @see org.eclipse.cdt.core.model.IDeclaration#isConst()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isConst() throws CModelException {
|
public boolean isConst() throws CModelException {
|
||||||
return getStructureInfo().isConst();
|
return getStructureInfo().isConst();
|
||||||
}
|
}
|
||||||
|
@ -70,6 +76,7 @@ public class StructureDeclaration extends SourceManipulation implements IStructu
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IDeclaration#isVolatile()
|
* @see org.eclipse.cdt.core.model.IDeclaration#isVolatile()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isVolatile() throws CModelException {
|
public boolean isVolatile() throws CModelException {
|
||||||
return getStructureInfo().isVolatile();
|
return getStructureInfo().isVolatile();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,12 @@ public class StructureTemplate extends Structure implements IStructureTemplate {
|
||||||
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateParameterTypes()
|
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateParameterTypes()
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getTemplateParameterTypes() {
|
public String[] getTemplateParameterTypes() {
|
||||||
return fTemplate.getTemplateParameterTypes();
|
return fTemplate.getTemplateParameterTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getTemplateArguments() {
|
public String[] getTemplateArguments() {
|
||||||
return fTemplate.getTemplateArguments();
|
return fTemplate.getTemplateArguments();
|
||||||
}
|
}
|
||||||
|
@ -46,6 +48,7 @@ public class StructureTemplate extends Structure implements IStructureTemplate {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.ITemplate#getNumberOfTemplateParameters()
|
* @see org.eclipse.cdt.core.model.ITemplate#getNumberOfTemplateParameters()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getNumberOfTemplateParameters() {
|
public int getNumberOfTemplateParameters() {
|
||||||
return fTemplate.getNumberOfTemplateParameters();
|
return fTemplate.getNumberOfTemplateParameters();
|
||||||
}
|
}
|
||||||
|
@ -53,6 +56,7 @@ public class StructureTemplate extends Structure implements IStructureTemplate {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateSignature()
|
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateSignature()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getTemplateSignature() {
|
public String getTemplateSignature() {
|
||||||
return fTemplate.getTemplateSignature();
|
return fTemplate.getTemplateSignature();
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,10 +25,12 @@ public class StructureTemplateDeclaration extends StructureDeclaration implement
|
||||||
fTemplate = new Template(name);
|
fTemplate = new Template(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getTemplateParameterTypes() {
|
public String[] getTemplateParameterTypes() {
|
||||||
return fTemplate.getTemplateParameterTypes();
|
return fTemplate.getTemplateParameterTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getTemplateArguments() {
|
public String[] getTemplateArguments() {
|
||||||
return fTemplate.getTemplateArguments();
|
return fTemplate.getTemplateArguments();
|
||||||
}
|
}
|
||||||
|
@ -37,10 +39,12 @@ public class StructureTemplateDeclaration extends StructureDeclaration implement
|
||||||
fTemplate.setTemplateInfo(templateParameterTypes, null);
|
fTemplate.setTemplateInfo(templateParameterTypes, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getTemplateSignature() throws CModelException {
|
public String getTemplateSignature() throws CModelException {
|
||||||
return fTemplate.getTemplateSignature();
|
return fTemplate.getTemplateSignature();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getNumberOfTemplateParameters() {
|
public int getNumberOfTemplateParameters() {
|
||||||
return fTemplate.getNumberOfTemplateParameters();
|
return fTemplate.getNumberOfTemplateParameters();
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,10 +29,12 @@ public class Template implements ITemplate {
|
||||||
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateParameterTypes()
|
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateParameterTypes()
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getTemplateParameterTypes() {
|
public String[] getTemplateParameterTypes() {
|
||||||
return fTemplateParameterTypes;
|
return fTemplateParameterTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getTemplateArguments() {
|
public String[] getTemplateArguments() {
|
||||||
return fTemplateArgs;
|
return fTemplateArgs;
|
||||||
}
|
}
|
||||||
|
@ -48,6 +50,7 @@ public class Template implements ITemplate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getNumberOfTemplateParameters() {
|
public int getNumberOfTemplateParameters() {
|
||||||
return fTemplateParameterTypes == null ? 0 : fTemplateParameterTypes.length;
|
return fTemplateParameterTypes == null ? 0 : fTemplateParameterTypes.length;
|
||||||
}
|
}
|
||||||
|
@ -55,6 +58,7 @@ public class Template implements ITemplate {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateSignature()
|
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateSignature()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getTemplateSignature() {
|
public String getTemplateSignature() {
|
||||||
StringBuffer sig = new StringBuffer(fName);
|
StringBuffer sig = new StringBuffer(fName);
|
||||||
if(getNumberOfTemplateParameters() > 0){
|
if(getNumberOfTemplateParameters() > 0){
|
||||||
|
|
|
@ -117,10 +117,12 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
setContentTypeID(idType);
|
setContentTypeID(idType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ITranslationUnit getTranslationUnit() {
|
public ITranslationUnit getTranslationUnit() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IInclude createInclude(String includeName, boolean isStd, ICElement sibling,
|
public IInclude createInclude(String includeName, boolean isStd, ICElement sibling,
|
||||||
IProgressMonitor monitor) throws CModelException {
|
IProgressMonitor monitor) throws CModelException {
|
||||||
CreateIncludeOperation op = new CreateIncludeOperation(includeName, isStd, this);
|
CreateIncludeOperation op = new CreateIncludeOperation(includeName, isStd, this);
|
||||||
|
@ -131,6 +133,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return getInclude(includeName);
|
return getInclude(includeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IUsing createUsing(String usingName, boolean isDirective, ICElement sibling,
|
public IUsing createUsing(String usingName, boolean isDirective, ICElement sibling,
|
||||||
IProgressMonitor monitor) throws CModelException {
|
IProgressMonitor monitor) throws CModelException {
|
||||||
CreateIncludeOperation op = new CreateIncludeOperation(usingName, isDirective, this);
|
CreateIncludeOperation op = new CreateIncludeOperation(usingName, isDirective, this);
|
||||||
|
@ -141,6 +144,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return getUsing(usingName);
|
return getUsing(usingName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public INamespace createNamespace(String namespace, ICElement sibling,
|
public INamespace createNamespace(String namespace, ICElement sibling,
|
||||||
IProgressMonitor monitor) throws CModelException {
|
IProgressMonitor monitor) throws CModelException {
|
||||||
CreateNamespaceOperation op = new CreateNamespaceOperation(namespace, this);
|
CreateNamespaceOperation op = new CreateNamespaceOperation(namespace, this);
|
||||||
|
@ -151,6 +155,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return getNamespace(namespace);
|
return getNamespace(namespace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICElement getElementAtLine(int line) throws CModelException {
|
public ICElement getElementAtLine(int line) throws CModelException {
|
||||||
ICElement[] celements = getChildren();
|
ICElement[] celements = getChildren();
|
||||||
for (ICElement celement : celements) {
|
for (ICElement celement : celements) {
|
||||||
|
@ -164,6 +169,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICElement getElementAtOffset(int pos) throws CModelException {
|
public ICElement getElementAtOffset(int pos) throws CModelException {
|
||||||
ICElement e = getSourceElementAtOffset(pos);
|
ICElement e = getSourceElementAtOffset(pos);
|
||||||
if (e == this) {
|
if (e == this) {
|
||||||
|
@ -172,6 +178,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICElement[] getElementsAtOffset(int pos) throws CModelException {
|
public ICElement[] getElementsAtOffset(int pos) throws CModelException {
|
||||||
ICElement[] e = getSourceElementsAtOffset(pos);
|
ICElement[] e = getSourceElementsAtOffset(pos);
|
||||||
if (e.length == 1 && e[0] == this) {
|
if (e.length == 1 && e[0] == this) {
|
||||||
|
@ -180,6 +187,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICElement getElement(String name) {
|
public ICElement getElement(String name) {
|
||||||
if (name == null || name.length() == 0) {
|
if (name == null || name.length() == 0) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -218,6 +226,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IInclude getInclude(String name) {
|
public IInclude getInclude(String name) {
|
||||||
try {
|
try {
|
||||||
ICElement[] celements = getChildren();
|
ICElement[] celements = getChildren();
|
||||||
|
@ -233,6 +242,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IInclude[] getIncludes() throws CModelException {
|
public IInclude[] getIncludes() throws CModelException {
|
||||||
ICElement[] celements = getChildren();
|
ICElement[] celements = getChildren();
|
||||||
ArrayList<ICElement> aList = new ArrayList<ICElement>();
|
ArrayList<ICElement> aList = new ArrayList<ICElement>();
|
||||||
|
@ -244,6 +254,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return aList.toArray(new IInclude[0]);
|
return aList.toArray(new IInclude[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IUsing getUsing(String name) {
|
public IUsing getUsing(String name) {
|
||||||
try {
|
try {
|
||||||
ICElement[] celements = getChildren();
|
ICElement[] celements = getChildren();
|
||||||
|
@ -259,6 +270,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IUsing[] getUsings() throws CModelException {
|
public IUsing[] getUsings() throws CModelException {
|
||||||
ICElement[] celements = getChildren();
|
ICElement[] celements = getChildren();
|
||||||
ArrayList<ICElement> aList = new ArrayList<ICElement>();
|
ArrayList<ICElement> aList = new ArrayList<ICElement>();
|
||||||
|
@ -270,6 +282,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return aList.toArray(new IUsing[0]);
|
return aList.toArray(new IUsing[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public INamespace getNamespace(String name) {
|
public INamespace getNamespace(String name) {
|
||||||
try {
|
try {
|
||||||
String[] names = name.split("::"); //$NON-NLS-1$
|
String[] names = name.split("::"); //$NON-NLS-1$
|
||||||
|
@ -298,6 +311,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public INamespace[] getNamespaces() throws CModelException {
|
public INamespace[] getNamespaces() throws CModelException {
|
||||||
ICElement[] celements = getChildren();
|
ICElement[] celements = getChildren();
|
||||||
ArrayList<ICElement> elementList = new ArrayList<ICElement>();
|
ArrayList<ICElement> elementList = new ArrayList<ICElement>();
|
||||||
|
@ -313,6 +327,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
location = loc;
|
location = loc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath getLocation() {
|
public IPath getLocation() {
|
||||||
if (location == null) {
|
if (location == null) {
|
||||||
IFile file = getFile();
|
IFile file = getFile();
|
||||||
|
@ -346,28 +361,34 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void copy(ICElement container, ICElement sibling, String rename, boolean force,
|
public void copy(ICElement container, ICElement sibling, String rename, boolean force,
|
||||||
IProgressMonitor monitor) throws CModelException {
|
IProgressMonitor monitor) throws CModelException {
|
||||||
getSourceManipulationInfo().copy(container, sibling, rename, force, monitor);
|
getSourceManipulationInfo().copy(container, sibling, rename, force, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void delete(boolean force, IProgressMonitor monitor) throws CModelException {
|
public void delete(boolean force, IProgressMonitor monitor) throws CModelException {
|
||||||
getSourceManipulationInfo().delete(force, monitor);
|
getSourceManipulationInfo().delete(force, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void move(ICElement container, ICElement sibling, String rename, boolean force,
|
public void move(ICElement container, ICElement sibling, String rename, boolean force,
|
||||||
IProgressMonitor monitor) throws CModelException {
|
IProgressMonitor monitor) throws CModelException {
|
||||||
getSourceManipulationInfo().move(container, sibling, rename, force, monitor);
|
getSourceManipulationInfo().move(container, sibling, rename, force, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void rename(String name, boolean force, IProgressMonitor monitor) throws CModelException {
|
public void rename(String name, boolean force, IProgressMonitor monitor) throws CModelException {
|
||||||
getSourceManipulationInfo().rename(name, force, monitor);
|
getSourceManipulationInfo().rename(name, force, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getSource() throws CModelException {
|
public String getSource() throws CModelException {
|
||||||
return getSourceManipulationInfo().getSource();
|
return getSourceManipulationInfo().getSource();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ISourceRange getSourceRange() throws CModelException {
|
public ISourceRange getSourceRange() throws CModelException {
|
||||||
return getSourceManipulationInfo().getSourceRange();
|
return getSourceManipulationInfo().getSourceRange();
|
||||||
}
|
}
|
||||||
|
@ -402,6 +423,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return super.equals(o) && !((ITranslationUnit) o).isWorkingCopy();
|
return super.equals(o) && !((ITranslationUnit) o).isWorkingCopy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IWorkingCopy findSharedWorkingCopy() {
|
public IWorkingCopy findSharedWorkingCopy() {
|
||||||
return CModelManager.getDefault().findSharedWorkingCopy(null, this);
|
return CModelManager.getDefault().findSharedWorkingCopy(null, this);
|
||||||
}
|
}
|
||||||
|
@ -442,6 +464,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return unitInfo.isStructureKnown();
|
return unitInfo.isStructureKnown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public char[] getContents() {
|
public char[] getContents() {
|
||||||
try {
|
try {
|
||||||
IBuffer buffer = this.getBuffer();
|
IBuffer buffer = this.getBuffer();
|
||||||
|
@ -451,19 +474,23 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IWorkingCopy getSharedWorkingCopy(IProgressMonitor monitor, IProblemRequestor requestor)
|
public IWorkingCopy getSharedWorkingCopy(IProgressMonitor monitor, IProblemRequestor requestor)
|
||||||
throws CModelException {
|
throws CModelException {
|
||||||
return CModelManager.getDefault().getSharedWorkingCopy(null, this, requestor, monitor);
|
return CModelManager.getDefault().getSharedWorkingCopy(null, this, requestor, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IWorkingCopy getWorkingCopy() throws CModelException {
|
public IWorkingCopy getWorkingCopy() throws CModelException {
|
||||||
return this.getWorkingCopy(null, null);
|
return this.getWorkingCopy(null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IWorkingCopy getWorkingCopy(IProgressMonitor monitor) throws CModelException {
|
public IWorkingCopy getWorkingCopy(IProgressMonitor monitor) throws CModelException {
|
||||||
return getWorkingCopy(monitor, null);
|
return getWorkingCopy(monitor, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IWorkingCopy getWorkingCopy(IProgressMonitor monitor, IBufferFactory factory) throws CModelException {
|
public IWorkingCopy getWorkingCopy(IProgressMonitor monitor, IBufferFactory factory) throws CModelException {
|
||||||
WorkingCopy workingCopy;
|
WorkingCopy workingCopy;
|
||||||
IFile file= getFile();
|
IFile file= getFile();
|
||||||
|
@ -559,6 +586,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isWorkingCopy() {
|
public boolean isWorkingCopy() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -601,6 +629,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Map<?, ?> parse() {
|
public Map<?, ?> parse() {
|
||||||
throw new UnsupportedOperationException("Deprecated method"); //$NON-NLS-1$
|
throw new UnsupportedOperationException("Deprecated method"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
@ -655,10 +684,12 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return problemRequestor;
|
return problemRequestor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isHeaderUnit() {
|
public boolean isHeaderUnit() {
|
||||||
return isHeaderContentType(contentTypeId);
|
return isHeaderContentType(contentTypeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isSourceUnit() {
|
public boolean isSourceUnit() {
|
||||||
return isSourceContentType(contentTypeId);
|
return isSourceContentType(contentTypeId);
|
||||||
}
|
}
|
||||||
|
@ -678,16 +709,19 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
|| LanguageManager.getInstance().isContributedContentType(contentType);
|
|| LanguageManager.getInstance().isContributedContentType(contentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isCLanguage() {
|
public boolean isCLanguage() {
|
||||||
return CCorePlugin.CONTENT_TYPE_CSOURCE.equals(contentTypeId)
|
return CCorePlugin.CONTENT_TYPE_CSOURCE.equals(contentTypeId)
|
||||||
|| CCorePlugin.CONTENT_TYPE_CHEADER.equals(contentTypeId);
|
|| CCorePlugin.CONTENT_TYPE_CHEADER.equals(contentTypeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isCXXLanguage() {
|
public boolean isCXXLanguage() {
|
||||||
return CCorePlugin.CONTENT_TYPE_CXXSOURCE.equals(contentTypeId)
|
return CCorePlugin.CONTENT_TYPE_CXXSOURCE.equals(contentTypeId)
|
||||||
|| CCorePlugin.CONTENT_TYPE_CXXHEADER.equals(contentTypeId);
|
|| CCorePlugin.CONTENT_TYPE_CXXHEADER.equals(contentTypeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isASMLanguage() {
|
public boolean isASMLanguage() {
|
||||||
return CCorePlugin.CONTENT_TYPE_ASMSOURCE.equals(contentTypeId);
|
return CCorePlugin.CONTENT_TYPE_ASMSOURCE.equals(contentTypeId);
|
||||||
}
|
}
|
||||||
|
@ -710,6 +744,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ILanguage getLanguage() throws CoreException {
|
public ILanguage getLanguage() throws CoreException {
|
||||||
ILanguage language = null;
|
ILanguage language = null;
|
||||||
|
|
||||||
|
@ -738,6 +773,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return language;
|
return language;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getContentTypeId() {
|
public String getContentTypeId() {
|
||||||
return contentTypeId;
|
return contentTypeId;
|
||||||
}
|
}
|
||||||
|
@ -762,6 +798,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
*
|
*
|
||||||
* @param wasSuccessful
|
* @param wasSuccessful
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setIsStructureKnown(boolean wasSuccessful) {
|
public void setIsStructureKnown(boolean wasSuccessful) {
|
||||||
try {
|
try {
|
||||||
this.getElementInfo().setIsStructureKnown(wasSuccessful);
|
this.getElementInfo().setIsStructureKnown(wasSuccessful);
|
||||||
|
@ -769,10 +806,12 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IASTTranslationUnit getAST() throws CoreException {
|
public IASTTranslationUnit getAST() throws CoreException {
|
||||||
return getAST(null, 0, null);
|
return getAST(null, 0, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IASTTranslationUnit getAST(IIndex index, int style) throws CoreException {
|
public IASTTranslationUnit getAST(IIndex index, int style) throws CoreException {
|
||||||
return getAST(index, style, null);
|
return getAST(index, style, null);
|
||||||
}
|
}
|
||||||
|
@ -921,6 +960,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IASTCompletionNode getCompletionNode(IIndex index, int style, int offset) throws CoreException {
|
public IASTCompletionNode getCompletionNode(IIndex index, int style, int offset) throws CoreException {
|
||||||
IIndexFile[] contextToHeader = getContextToHeader(index, style);
|
IIndexFile[] contextToHeader = getContextToHeader(index, style);
|
||||||
ITranslationUnit configureWith = getConfigureWith(contextToHeader);
|
ITranslationUnit configureWith = getConfigureWith(contextToHeader);
|
||||||
|
@ -952,6 +992,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public org.eclipse.cdt.core.parser.CodeReader getCodeReader() {
|
public org.eclipse.cdt.core.parser.CodeReader getCodeReader() {
|
||||||
IPath location= getLocation();
|
IPath location= getLocation();
|
||||||
|
@ -975,6 +1016,7 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IScannerInfo getScannerInfo(boolean force) {
|
public IScannerInfo getScannerInfo(boolean force) {
|
||||||
IResource resource = getResource();
|
IResource resource = getResource();
|
||||||
ICProject project = getCProject();
|
ICProject project = getCProject();
|
||||||
|
@ -1165,24 +1207,29 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return CElement.CEM_TRANSLATIONUNIT;
|
return CElement.CEM_TRANSLATIONUNIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isActive() {
|
public boolean isActive() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getIndex() {
|
public int getIndex() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public IWorkingCopy findSharedWorkingCopy(IBufferFactory bufferFactory) {
|
public IWorkingCopy findSharedWorkingCopy(IBufferFactory bufferFactory) {
|
||||||
return CModelManager.getDefault().findSharedWorkingCopy(bufferFactory, this);
|
return CModelManager.getDefault().findSharedWorkingCopy(bufferFactory, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public IWorkingCopy getSharedWorkingCopy(IProgressMonitor monitor, IBufferFactory factory, IProblemRequestor requestor) throws CModelException {
|
public IWorkingCopy getSharedWorkingCopy(IProgressMonitor monitor, IBufferFactory factory, IProblemRequestor requestor) throws CModelException {
|
||||||
return CModelManager.getDefault().getSharedWorkingCopy(factory, this, requestor, monitor);
|
return CModelManager.getDefault().getSharedWorkingCopy(factory, this, requestor, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public IWorkingCopy getSharedWorkingCopy(IProgressMonitor monitor, IBufferFactory factory) throws CModelException {
|
public IWorkingCopy getSharedWorkingCopy(IProgressMonitor monitor, IBufferFactory factory) throws CModelException {
|
||||||
return CModelManager.getDefault().getSharedWorkingCopy(factory, this, null, monitor);
|
return CModelManager.getDefault().getSharedWorkingCopy(factory, this, null, monitor);
|
||||||
|
|
|
@ -24,6 +24,7 @@ public class TypeDef extends SourceManipulation implements ITypeDef {
|
||||||
* Returns the typeName.
|
* Returns the typeName.
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getTypeName() {
|
public String getTypeName() {
|
||||||
return typeName;
|
return typeName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class Using extends SourceManipulation implements IUsing {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.IUsing#isDirective()
|
* @see org.eclipse.cdt.core.model.IUsing#isDirective()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isDirective() {
|
public boolean isDirective() {
|
||||||
return directive;
|
return directive;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ public class Variable extends VariableDeclaration implements IVariable {
|
||||||
super(parent, name, kind);
|
super(parent, name, kind);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getInitializer() {
|
public String getInitializer() {
|
||||||
return ""; //$NON-NLS-1$
|
return ""; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,14 +25,17 @@ public class VariableDeclaration extends SourceManipulation implements IVariable
|
||||||
super(parent, name, type);
|
super(parent, name, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getTypeName() throws CModelException {
|
public String getTypeName() throws CModelException {
|
||||||
return getVariableInfo().getTypeName();
|
return getVariableInfo().getTypeName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void setTypeName(String type) throws CModelException {
|
public void setTypeName(String type) throws CModelException {
|
||||||
getVariableInfo().setTypeString(type);
|
getVariableInfo().setTypeString(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isConst() throws CModelException {
|
public boolean isConst() throws CModelException {
|
||||||
return getVariableInfo().isConst();
|
return getVariableInfo().isConst();
|
||||||
}
|
}
|
||||||
|
@ -41,6 +44,7 @@ public class VariableDeclaration extends SourceManipulation implements IVariable
|
||||||
getVariableInfo().setConst(isConst);
|
getVariableInfo().setConst(isConst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isVolatile() throws CModelException {
|
public boolean isVolatile() throws CModelException {
|
||||||
return getVariableInfo().isVolatile();
|
return getVariableInfo().isVolatile();
|
||||||
}
|
}
|
||||||
|
@ -49,6 +53,7 @@ public class VariableDeclaration extends SourceManipulation implements IVariable
|
||||||
getVariableInfo().setVolatile(isVolatile);
|
getVariableInfo().setVolatile(isVolatile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isStatic() throws CModelException {
|
public boolean isStatic() throws CModelException {
|
||||||
return getVariableInfo().isStatic();
|
return getVariableInfo().isStatic();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ public class VariableTemplate extends Variable implements ITemplate {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ITemplate#getNumberOfTemplateParameters()
|
* @see org.eclipse.cdt.core.model.ITemplate#getNumberOfTemplateParameters()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public int getNumberOfTemplateParameters() {
|
public int getNumberOfTemplateParameters() {
|
||||||
return templateParameterTypes == null ? 0 : templateParameterTypes.length;
|
return templateParameterTypes == null ? 0 : templateParameterTypes.length;
|
||||||
}
|
}
|
||||||
|
@ -33,10 +34,12 @@ public class VariableTemplate extends Variable implements ITemplate {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateParameterTypes()
|
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateParameterTypes()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] getTemplateParameterTypes() {
|
public String[] getTemplateParameterTypes() {
|
||||||
return templateParameterTypes;
|
return templateParameterTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getTemplateArguments() {
|
public String[] getTemplateArguments() {
|
||||||
return fgEmptyList;
|
return fgEmptyList;
|
||||||
}
|
}
|
||||||
|
@ -51,6 +54,7 @@ public class VariableTemplate extends Variable implements ITemplate {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateSignature()
|
* @see org.eclipse.cdt.core.model.ITemplate#getTemplateSignature()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getTemplateSignature() throws CModelException {
|
public String getTemplateSignature() throws CModelException {
|
||||||
StringBuffer sig = new StringBuffer(getElementName());
|
StringBuffer sig = new StringBuffer(getElementName());
|
||||||
if(getNumberOfTemplateParameters() > 0){
|
if(getNumberOfTemplateParameters() > 0){
|
||||||
|
|
|
@ -74,6 +74,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IWorkingCopy#commit(boolean, org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.cdt.core.model.IWorkingCopy#commit(boolean, org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void commit(boolean force, IProgressMonitor monitor) throws CModelException {
|
public void commit(boolean force, IProgressMonitor monitor) throws CModelException {
|
||||||
ITranslationUnit original = this.getOriginalElement();
|
ITranslationUnit original = this.getOriginalElement();
|
||||||
if (original.exists()) {
|
if (original.exists()) {
|
||||||
|
@ -114,6 +115,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IWorkingCopy#destroy()
|
* @see org.eclipse.cdt.core.model.IWorkingCopy#destroy()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
if (--this.useCount > 0) {
|
if (--this.useCount > 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -162,6 +164,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
* @return the original element the specified working copy element was created from,
|
* @return the original element the specified working copy element was created from,
|
||||||
* or <code>null</code> if this is not a working copy element
|
* or <code>null</code> if this is not a working copy element
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ICElement getOriginal(ICElement workingCopyElement) {
|
public ICElement getOriginal(ICElement workingCopyElement) {
|
||||||
// It has to come from the same workingCopy, meaning ours.
|
// It has to come from the same workingCopy, meaning ours.
|
||||||
if (workingCopyElement instanceof ISourceReference) {
|
if (workingCopyElement instanceof ISourceReference) {
|
||||||
|
@ -211,6 +214,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IWorkingCopy#getOriginalElement()
|
* @see org.eclipse.cdt.core.model.IWorkingCopy#getOriginalElement()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public ITranslationUnit getOriginalElement() {
|
public ITranslationUnit getOriginalElement() {
|
||||||
IFile file= getFile();
|
IFile file= getFile();
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
|
@ -246,6 +250,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
/**
|
/**
|
||||||
* @see IWorkingCopy
|
* @see IWorkingCopy
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isBasedOn(IResource resource) {
|
public boolean isBasedOn(IResource resource) {
|
||||||
if (resource.getType() != IResource.FILE) {
|
if (resource.getType() != IResource.FILE) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -339,6 +344,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IWorkingCopy#reconcile()
|
* @see org.eclipse.cdt.core.model.IWorkingCopy#reconcile()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IMarker[] reconcile() throws CModelException {
|
public IMarker[] reconcile() throws CModelException {
|
||||||
reconcile(false, null);
|
reconcile(false, null);
|
||||||
return null;
|
return null;
|
||||||
|
@ -347,6 +353,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IWorkingCopy#reconcile(boolean, org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.cdt.core.model.IWorkingCopy#reconcile(boolean, org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void reconcile(boolean forceProblemDetection, IProgressMonitor monitor) throws CModelException {
|
public void reconcile(boolean forceProblemDetection, IProgressMonitor monitor) throws CModelException {
|
||||||
reconcile(false, forceProblemDetection, monitor);
|
reconcile(false, forceProblemDetection, monitor);
|
||||||
}
|
}
|
||||||
|
@ -354,6 +361,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.cdt.core.model.IWorkingCopy#restore()
|
* @see org.eclipse.cdt.core.model.IWorkingCopy#restore()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void restore() throws CModelException{
|
public void restore() throws CModelException{
|
||||||
if (this.useCount == 0) throw newNotPresentException(); //was destroyed
|
if (this.useCount == 0) throw newNotPresentException(); //was destroyed
|
||||||
|
|
||||||
|
@ -394,6 +402,7 @@ public class WorkingCopy extends TranslationUnit implements IWorkingCopy {
|
||||||
/*
|
/*
|
||||||
* @see org.eclipse.cdt.core.model.IWorkingCopy#reconcile(boolean, boolean, org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.cdt.core.model.IWorkingCopy#reconcile(boolean, boolean, org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IASTTranslationUnit reconcile(boolean computeAST, boolean forceProblemDetection, IProgressMonitor monitor)
|
public IASTTranslationUnit reconcile(boolean computeAST, boolean forceProblemDetection, IProgressMonitor monitor)
|
||||||
throws CModelException {
|
throws CModelException {
|
||||||
if (this.useCount == 0)
|
if (this.useCount == 0)
|
||||||
|
|
|
@ -79,6 +79,7 @@ abstract class CElementHandle implements ICElementHandle, ISourceReference {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public Object getAdapter(Class adapter) {
|
public Object getAdapter(Class adapter) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -89,6 +90,7 @@ abstract class CElementHandle implements ICElementHandle, ISourceReference {
|
||||||
fTimestamp= timestamp;
|
fTimestamp= timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ISourceRange getSourceRange() throws CModelException {
|
public ISourceRange getSourceRange() throws CModelException {
|
||||||
IRegion region= fRegion;
|
IRegion region= fRegion;
|
||||||
ITranslationUnit tu= getTranslationUnit();
|
ITranslationUnit tu= getTranslationUnit();
|
||||||
|
@ -103,10 +105,12 @@ abstract class CElementHandle implements ICElementHandle, ISourceReference {
|
||||||
return new SourceRange(startpos, length);
|
return new SourceRange(startpos, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getSource() throws CModelException {
|
public String getSource() throws CModelException {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ITranslationUnit getTranslationUnit() {
|
public ITranslationUnit getTranslationUnit() {
|
||||||
ICElement parent= fParent;
|
ICElement parent= fParent;
|
||||||
do {
|
do {
|
||||||
|
@ -119,57 +123,71 @@ abstract class CElementHandle implements ICElementHandle, ISourceReference {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void accept(ICElementVisitor visitor) throws CoreException {
|
public void accept(ICElementVisitor visitor) throws CoreException {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean exists() {
|
public boolean exists() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICElement getAncestor(int ancestorType) {
|
public ICElement getAncestor(int ancestorType) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICModel getCModel() {
|
public ICModel getCModel() {
|
||||||
return fParent.getCModel();
|
return fParent.getCModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICProject getCProject() {
|
public ICProject getCProject() {
|
||||||
return fParent.getCProject();
|
return fParent.getCProject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getElementName() {
|
public String getElementName() {
|
||||||
return fName;
|
return fName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getElementType() {
|
public int getElementType() {
|
||||||
return fType;
|
return fType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ICElement getParent() {
|
public ICElement getParent() {
|
||||||
return fParent;
|
return fParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath getPath() {
|
public IPath getPath() {
|
||||||
return getTranslationUnit().getPath();
|
return getTranslationUnit().getPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public URI getLocationURI() {
|
public URI getLocationURI() {
|
||||||
return getTranslationUnit().getLocationURI();
|
return getTranslationUnit().getLocationURI();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IResource getResource() {
|
public IResource getResource() {
|
||||||
return getTranslationUnit().getResource();
|
return getTranslationUnit().getResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IResource getUnderlyingResource() {
|
public IResource getUnderlyingResource() {
|
||||||
return getResource();
|
return getResource();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isReadOnly() {
|
public boolean isReadOnly() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isStructureKnown() throws CModelException {
|
public boolean isStructureKnown() throws CModelException {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -292,6 +310,7 @@ abstract class CElementHandle implements ICElementHandle, ISourceReference {
|
||||||
/**
|
/**
|
||||||
* @see ICElement
|
* @see ICElement
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getHandleIdentifier() {
|
public String getHandleIdentifier() {
|
||||||
ICElement cModelElement= mapToModelElement();
|
ICElement cModelElement= mapToModelElement();
|
||||||
if (cModelElement != null) {
|
if (cModelElement != null) {
|
||||||
|
@ -309,10 +328,12 @@ abstract class CElementHandle implements ICElementHandle, ISourceReference {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isActive() {
|
public boolean isActive() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public int getIndex() {
|
public int getIndex() {
|
||||||
return fIndex;
|
return fIndex;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ public class EnumerationHandle extends CElementHandle implements org.eclipse.cdt
|
||||||
super(parent, ICElement.C_ENUMERATION, enumeration.getName());
|
super(parent, ICElement.C_ENUMERATION, enumeration.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isStatic() throws CModelException {
|
public boolean isStatic() throws CModelException {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue