mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Team shared warning levels for core-plugin, fixed warnings.
This commit is contained in:
parent
a14a63c060
commit
b5ad408a60
551 changed files with 1675 additions and 240 deletions
|
@ -1,12 +1,81 @@
|
|||
#Fri Dec 28 14:46:56 EST 2007
|
||||
#Wed Apr 09 13:24:35 CEST 2008
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.5
|
||||
|
|
|
@ -53,6 +53,7 @@ public class AllTypesCache {
|
|||
|
||||
IIndexBinding[] all =
|
||||
index.findBindings(Pattern.compile(".*"), false, new IndexFilter() { //$NON-NLS-1$
|
||||
@Override
|
||||
public boolean acceptBinding(IBinding binding) {
|
||||
return IndexModelUtil.bindingHasCElementType(binding, kinds);
|
||||
}},
|
||||
|
|
|
@ -283,6 +283,7 @@ public class QualifiedTypeName implements IQualifiedTypeName {
|
|||
return (val.getSeverity() != IStatus.ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
if (fHashCode == 0) {
|
||||
fHashCode = HASH_INIT;
|
||||
|
@ -293,6 +294,7 @@ public class QualifiedTypeName implements IQualifiedTypeName {
|
|||
return fHashCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getFullyQualifiedName();
|
||||
}
|
||||
|
@ -345,6 +347,7 @@ public class QualifiedTypeName implements IQualifiedTypeName {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
|
|
|
@ -207,6 +207,7 @@ public class TypeInfo implements ITypeInfo
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return fQualifiedName.toString();
|
||||
}
|
||||
|
@ -225,6 +226,7 @@ public class TypeInfo implements ITypeInfo
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hashCode = fQualifiedName.hashCode() + fElementType;
|
||||
ICProject project = getEnclosingProject();
|
||||
|
@ -233,6 +235,7 @@ public class TypeInfo implements ITypeInfo
|
|||
return hashCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
|
|
|
@ -213,6 +213,7 @@ public class TypeReference implements ITypeReference {
|
|||
return path;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
IPath path = getLocation();
|
||||
if (path != null) {
|
||||
|
@ -224,10 +225,12 @@ public class TypeReference implements ITypeReference {
|
|||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return toString().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
|
|
|
@ -25,10 +25,12 @@ public class UnknownTypeInfo extends TypeInfo {
|
|||
super(0, typeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUndefinedType() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSubstituteFor(ITypeInfo info) {
|
||||
int compareType = info.getCElementType();
|
||||
if (fElementType == 0 || compareType == 0 || fElementType == compareType) {
|
||||
|
|
|
@ -93,6 +93,7 @@ public class IndexTypeReference extends TypeReference {
|
|||
/*
|
||||
* @see org.eclipse.cdt.core.browser.ITypeReference#getCElements()
|
||||
*/
|
||||
@Override
|
||||
public ICElement[] getCElements() {
|
||||
if (fCElement != null) {
|
||||
return new ICElement[] { fCElement };
|
||||
|
|
|
@ -107,6 +107,7 @@ public class CModelException extends CoreException {
|
|||
* Returns a printable representation of this exception suitable for debugging
|
||||
* purposes only.
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer buffer= new StringBuffer();
|
||||
buffer.append("C Model Exception: "); //$NON-NLS-1$
|
||||
|
|
|
@ -61,6 +61,7 @@ public class ElementChangedEvent extends EventObject {
|
|||
* @since 2.0
|
||||
* @deprecated - no longer used, such deltas are now notified during POST_CHANGE
|
||||
*/
|
||||
@Deprecated
|
||||
public static final int PRE_AUTO_BUILD = 2;
|
||||
/**
|
||||
* Event type constant (bit mask) indicating an after-the-fact
|
||||
|
|
|
@ -240,47 +240,55 @@ public interface ICElement extends IAdaptable {
|
|||
* Modifier indicating a class constructor
|
||||
* @deprecated use {@link IMethodDeclaration#isConstructor()}
|
||||
*/
|
||||
@Deprecated
|
||||
static final int C_CLASS_CTOR = 0x100;
|
||||
|
||||
/**
|
||||
* Modifier indicating a class destructor
|
||||
* @deprecated use {@link IMethodDeclaration#isDestructor()}
|
||||
*/
|
||||
@Deprecated
|
||||
static final int C_CLASS_DTOR = 0x200;
|
||||
|
||||
/**
|
||||
* Modifier indicating a static storage attribute
|
||||
* @deprecated use {@link IDeclaration#isStatic()}
|
||||
*/
|
||||
@Deprecated
|
||||
static final int C_STORAGE_STATIC = 0x400;
|
||||
|
||||
/**
|
||||
* Modifier indicating an extern storage attribute
|
||||
* @deprecated not used anymore
|
||||
*/
|
||||
@Deprecated
|
||||
static final int C_STORAGE_EXTERN = 0x800;
|
||||
|
||||
/**
|
||||
* Modifier indicating a private class
|
||||
* @deprecated use {@link IMember#getVisibility()}
|
||||
*/
|
||||
@Deprecated
|
||||
static final int CPP_PRIVATE = 0x1000;
|
||||
|
||||
/**
|
||||
* Modifier indicating a public class
|
||||
* @deprecated use {@link IMember#getVisibility()}
|
||||
*/
|
||||
@Deprecated
|
||||
static final int CPP_PUBLIC = 0x2000;
|
||||
|
||||
/**
|
||||
* Modifier indicating a protected class
|
||||
* @deprecated use {@link IMember#getVisibility()}
|
||||
*/
|
||||
@Deprecated
|
||||
static final int CPP_PROTECTED = 0x4000;
|
||||
/**
|
||||
* Modifier indicating a friend class
|
||||
* @deprecated use {@link IMethodDeclaration#isFriend()}
|
||||
*/
|
||||
@Deprecated
|
||||
static final int CPP_FRIEND = 0x8000;
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,5 +21,6 @@ public interface IEnumeration extends IParent, IDeclaration {
|
|||
* @throws CModelException
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
String getTypeName() throws CModelException;
|
||||
}
|
||||
|
|
|
@ -41,5 +41,6 @@ public interface IStructureDeclaration extends IDeclaration {
|
|||
* Return "class", "struct", "union"
|
||||
* @deprecated use isUnion(), isClass(), isStruct()
|
||||
*/
|
||||
@Deprecated
|
||||
String getTypeName() throws CModelException;
|
||||
}
|
||||
|
|
|
@ -425,6 +425,7 @@ public interface ITranslationUnit extends ICElement, IParent, IOpenable, ISource
|
|||
* @deprecated this is currently only used by the core tests. It should
|
||||
* be removed from the interface.
|
||||
*/
|
||||
@Deprecated
|
||||
Map parse();
|
||||
|
||||
/**
|
||||
|
|
|
@ -225,6 +225,7 @@ public class LanguageManager {
|
|||
/**
|
||||
* @deprecated use getRegisteredContentTypes() instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public ArrayList/*<String>*/ getAllContentTypes() {
|
||||
ArrayList/*<String>*/ allTypes = new ArrayList();
|
||||
allTypes.add(CCorePlugin.CONTENT_TYPE_ASMSOURCE);
|
||||
|
|
|
@ -196,6 +196,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getItems() {
|
||||
return items;
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ public abstract class ACExclusionFilterEntry extends ACPathEntry implements ICEx
|
|||
this.exclusionPatterns = exclusionPatterns != null ? (IPath[])exclusionPatterns.clone() : new IPath[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final boolean isFile() {
|
||||
return false;
|
||||
}
|
||||
|
@ -67,6 +68,7 @@ public abstract class ACExclusionFilterEntry extends ACPathEntry implements ICEx
|
|||
return this.fullCharExclusionPatterns;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if(!super.equals(other))
|
||||
return false;
|
||||
|
@ -75,10 +77,12 @@ public abstract class ACExclusionFilterEntry extends ACPathEntry implements ICEx
|
|||
return Arrays.equals(exclusionPatterns, otherEntry.exclusionPatterns);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + exclusionPatterns.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsByContents(ICSettingEntry entry) {
|
||||
if(!super.equalsByContents(entry))
|
||||
return false;
|
||||
|
@ -87,6 +91,7 @@ public abstract class ACExclusionFilterEntry extends ACPathEntry implements ICEx
|
|||
return Arrays.equals(exclusionPatterns, otherEntry.exclusionPatterns);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String contentsToString() {
|
||||
String result = super.contentsToString();
|
||||
if(exclusionPatterns.length != 0){
|
||||
|
|
|
@ -85,6 +85,7 @@ public abstract class ACPathEntry extends ACSettingEntry
|
|||
return checkFlags(VALUE_WORKSPACE_PATH);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String contentsToString() {
|
||||
return fName;
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ public abstract class ACSettingEntry implements ICSettingEntry {
|
|||
return checkFlags(RESOLVED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other){
|
||||
if(other == this)
|
||||
return true;
|
||||
|
@ -70,6 +71,7 @@ public abstract class ACSettingEntry implements ICSettingEntry {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode(){
|
||||
return getKind() + fFlags + fName.hashCode();
|
||||
}
|
||||
|
@ -116,6 +118,7 @@ public abstract class ACSettingEntry implements ICSettingEntry {
|
|||
return codeForNameKey();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String toString(){
|
||||
StringBuffer buf = new StringBuffer();
|
||||
buf.append('[').append(LanguageSettingEntriesSerializer.kindToString(getKind())).append(']').append(' ');
|
||||
|
|
|
@ -32,6 +32,7 @@ public final class CIncludeFileEntry extends ACPathEntry implements
|
|||
return INCLUDE_FILE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isFile() {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ public final class CIncludePathEntry extends ACPathEntry implements ICIncludePat
|
|||
return INCLUDE_PATH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isFile() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ public final class CLibraryFileEntry extends ACPathEntry implements
|
|||
return LIBRARY_FILE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isFile() {
|
||||
return true;
|
||||
}
|
||||
|
@ -91,6 +92,7 @@ public final class CLibraryFileEntry extends ACPathEntry implements
|
|||
return fSourceAttachmentRootPath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if(other == this)
|
||||
return true;
|
||||
|
@ -101,6 +103,7 @@ public final class CLibraryFileEntry extends ACPathEntry implements
|
|||
return sourceAttachmentSettingsEqual((CLibraryFileEntry)other);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsByContents(ICSettingEntry entry) {
|
||||
if(entry == this)
|
||||
return true;
|
||||
|
@ -121,6 +124,7 @@ public final class CLibraryFileEntry extends ACPathEntry implements
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String contentsToString() {
|
||||
String result = super.contentsToString();
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ public final class CLibraryPathEntry extends ACPathEntry implements
|
|||
return LIBRARY_PATH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isFile() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ public final class CMacroEntry extends ACSettingEntry implements ICMacroEntry{
|
|||
fValue = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return fValue;
|
||||
}
|
||||
|
@ -30,16 +31,19 @@ public final class CMacroEntry extends ACSettingEntry implements ICMacroEntry{
|
|||
return MACRO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if(!super.equals(other))
|
||||
return false;
|
||||
return fValue.equals(((CMacroEntry)other).fValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + fValue.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equalsByContents(ICSettingEntry entry) {
|
||||
if(!super.equalsByContents(entry))
|
||||
return false;
|
||||
|
@ -47,6 +51,7 @@ public final class CMacroEntry extends ACSettingEntry implements ICMacroEntry{
|
|||
return fValue.equals(((CMacroEntry)entry).fValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String contentsToString() {
|
||||
return new StringBuffer().append(fName).append('=').append(fValue).toString();
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ public final class CMacroFileEntry extends ACPathEntry implements
|
|||
return MACRO_FILE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isFile() {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.eclipse.cdt.core.settings.model.ICSettingBase;
|
|||
import org.eclipse.core.runtime.IPath;
|
||||
|
||||
public abstract class CBuildData extends CDataObject {
|
||||
@Override
|
||||
public final int getType() {
|
||||
return ICSettingBase.SETTING_BUILD;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ public abstract class CConfigurationData extends CDataObject {
|
|||
protected CConfigurationData() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getType(){
|
||||
return SETTING_CONFIGURATION;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ public abstract class CFileData extends CResourceData {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getType(){
|
||||
return ICSettingBase.SETTING_FILE;
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ public abstract class CFolderData extends CResourceData {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getType(){
|
||||
return ICSettingBase.SETTING_FOLDER;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ public abstract class CLanguageData extends CDataObject {
|
|||
|
||||
// public abstract CDataObject getChildById(String id);
|
||||
|
||||
@Override
|
||||
public final int getType() {
|
||||
return SETTING_LANGUAGE;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ package org.eclipse.cdt.core.settings.model.extension;
|
|||
import org.eclipse.cdt.core.settings.model.ICSettingBase;
|
||||
|
||||
public abstract class CTargetPlatformData extends CDataObject {
|
||||
@Override
|
||||
public final int getType(){
|
||||
return ICSettingBase.SETTING_TARGET_PLATFORM;
|
||||
}
|
||||
|
|
|
@ -57,22 +57,26 @@ public class CDefaultBuildData extends CBuildData {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPath getBuilderCWD() {
|
||||
return fCWD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getErrorParserIDs() {
|
||||
if(fErrorParserIDs != null && fErrorParserIDs.length != 0)
|
||||
return (String[])fErrorParserIDs.clone();
|
||||
return EMPTY_STRING_ARRAY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICOutputEntry[] getOutputDirectories() {
|
||||
if(fOutputEntries != null && fOutputEntries.length != 0)
|
||||
return (ICOutputEntry[])fOutputEntries.clone();
|
||||
return EMPTY_OUTPUT_ENTRIES_ARRAY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBuilderCWD(IPath path) {
|
||||
if(CDataUtil.objectsEqual(path, fCWD))
|
||||
return;
|
||||
|
@ -82,6 +86,7 @@ public class CDefaultBuildData extends CBuildData {
|
|||
setModified(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setErrorParserIDs(String[] ids) {
|
||||
if(Arrays.equals(ids, fErrorParserIDs))
|
||||
return;
|
||||
|
@ -93,6 +98,7 @@ public class CDefaultBuildData extends CBuildData {
|
|||
setModified(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOutputDirectories(ICOutputEntry[] entries) {
|
||||
if(Arrays.equals(entries, fOutputEntries))
|
||||
return;
|
||||
|
@ -105,18 +111,22 @@ public class CDefaultBuildData extends CBuildData {
|
|||
setModified(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return fId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return fName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return getId() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEnvironmentContributor getBuildEnvironmentContributor() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
|
|
|
@ -153,6 +153,7 @@ public class CDefaultConfigurationData extends CConfigurationData {
|
|||
return fFactory.createBuildData(this, data, null, data != null ? data.getName() : null, clone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CFolderData createFolderData(IPath path, CFolderData base) throws CoreException{
|
||||
CFolderData data = copyFolderData(path, base, false);
|
||||
addRcData(data);
|
||||
|
@ -162,6 +163,7 @@ public class CDefaultConfigurationData extends CConfigurationData {
|
|||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CFileData createFileData(IPath path, CFileData base) throws CoreException{
|
||||
CFileData data = copyFileData(path, base, false);
|
||||
addRcData(data);
|
||||
|
@ -171,6 +173,7 @@ public class CDefaultConfigurationData extends CConfigurationData {
|
|||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CFileData createFileData(IPath path, CFolderData base, CLanguageData langData) throws CoreException{
|
||||
CFileData data = copyFileData(path, base, langData);
|
||||
addRcData(data);
|
||||
|
@ -180,10 +183,12 @@ public class CDefaultConfigurationData extends CConfigurationData {
|
|||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return fDescription;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDescription(String description) {
|
||||
if(CDataUtil.objectsEqual(description, fDescription))
|
||||
return;
|
||||
|
@ -192,10 +197,12 @@ public class CDefaultConfigurationData extends CConfigurationData {
|
|||
setModified(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CResourceData[] getResourceDatas() {
|
||||
return (CResourceData[])fResourceDataMap.values().toArray(new CResourceData[fResourceDataMap.size()]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CFolderData getRootFolderData() {
|
||||
return fRootFolderData;
|
||||
}
|
||||
|
@ -207,6 +214,7 @@ public class CDefaultConfigurationData extends CConfigurationData {
|
|||
return fRootFolderData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeResourceData(CResourceData data) throws CoreException {
|
||||
if(data == getResourceData(data.getPath())){
|
||||
IPath path = standardizePath(data.getPath());
|
||||
|
@ -221,10 +229,12 @@ public class CDefaultConfigurationData extends CConfigurationData {
|
|||
return (CResourceData)fResourceDataMap.get(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return fName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setName(String name) {
|
||||
if(CDataUtil.objectsEqual(name, fName))
|
||||
return;
|
||||
|
@ -232,22 +242,27 @@ public class CDefaultConfigurationData extends CConfigurationData {
|
|||
setModified(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return fId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return getId() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CTargetPlatformData getTargetPlatformData() {
|
||||
return fTargetPlatformData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICSourceEntry[] getSourceEntries() {
|
||||
return fSourceEntries != null ? (ICSourceEntry[])fSourceEntries.clone() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSourceEntries(ICSourceEntry[] entries) {
|
||||
if(Arrays.equals(entries, fSourceEntries))
|
||||
return;
|
||||
|
@ -256,6 +271,7 @@ public class CDefaultConfigurationData extends CConfigurationData {
|
|||
setModified(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CBuildData getBuildData() {
|
||||
return fBuildData;
|
||||
}
|
||||
|
@ -283,6 +299,7 @@ public class CDefaultConfigurationData extends CConfigurationData {
|
|||
return fBuildData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICdtVariablesContributor getBuildVariablesContributor() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
|
@ -312,6 +329,7 @@ public class CDefaultConfigurationData extends CConfigurationData {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public CConfigurationStatus getStatus() {
|
||||
return fStatus;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ public class CDefaultConfigurationDataProvider extends
|
|||
CConfigurationDataProvider {
|
||||
private static final String DEFAULT_STORAGE_ID = "defaultConfigurationDataProvider"; //$NON-NLS-1$
|
||||
|
||||
@Override
|
||||
public CConfigurationData applyConfiguration(
|
||||
ICConfigurationDescription des,
|
||||
ICConfigurationDescription baseDescription,
|
||||
|
@ -35,6 +36,7 @@ public class CDefaultConfigurationDataProvider extends
|
|||
return base;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CConfigurationData createConfiguration(
|
||||
ICConfigurationDescription des,
|
||||
ICConfigurationDescription baseDescription,
|
||||
|
@ -45,6 +47,7 @@ public class CDefaultConfigurationDataProvider extends
|
|||
return factory.createConfigurationdata(des.getId(), des.getName(), base, clone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CConfigurationData loadConfiguration(ICConfigurationDescription des,
|
||||
IProgressMonitor monitor)
|
||||
throws CoreException {
|
||||
|
@ -65,6 +68,7 @@ public class CDefaultConfigurationDataProvider extends
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeConfiguration(ICConfigurationDescription des,
|
||||
CConfigurationData data,
|
||||
IProgressMonitor monitor) {
|
||||
|
|
|
@ -71,6 +71,7 @@ public class CDefaultFileData extends CFileData {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IPath getPath() {
|
||||
return fPath;
|
||||
}
|
||||
|
@ -86,10 +87,12 @@ public class CDefaultFileData extends CFileData {
|
|||
// fIsExcluded = excluded;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void setPath(IPath path) {
|
||||
fPath = path;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return fName;
|
||||
}
|
||||
|
@ -98,14 +101,17 @@ public class CDefaultFileData extends CFileData {
|
|||
fName = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return fId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return getId() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CLanguageData getLanguageData() {
|
||||
return fLanguageData;
|
||||
}
|
||||
|
@ -124,6 +130,7 @@ public class CDefaultFileData extends CFileData {
|
|||
fFactory.setModified(fLanguageData, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomSettings() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -64,10 +64,12 @@ public class CDefaultFolderData extends CFolderData {
|
|||
return fFactory.createLanguageData(fCfg, this, base, null, clone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CLanguageData[] getLanguageDatas() {
|
||||
return (CLanguageData[])fLanguageDatas.toArray(new CLanguageData[fLanguageDatas.size()]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPath getPath() {
|
||||
return fPath;
|
||||
}
|
||||
|
@ -84,6 +86,7 @@ public class CDefaultFolderData extends CFolderData {
|
|||
// setModified(true);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void setPath(IPath path) {
|
||||
if(CDataUtil.objectsEqual(path, fPath))
|
||||
return;
|
||||
|
@ -92,14 +95,17 @@ public class CDefaultFolderData extends CFolderData {
|
|||
setModified(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return fName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return fId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return getId() != null;
|
||||
}
|
||||
|
@ -114,6 +120,7 @@ public class CDefaultFolderData extends CFolderData {
|
|||
// return fFactory.createLanguageData(fCfg, this, null, null, languageId, extensions, false);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public CLanguageData createLanguageDataForContentTypes(String languageId,
|
||||
String[] typesIds) {
|
||||
throw new UnsupportedOperationException();
|
||||
|
@ -125,6 +132,7 @@ public class CDefaultFolderData extends CFolderData {
|
|||
// return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CLanguageData createLanguageDataForExtensions(String languageId,
|
||||
String[] extensions) {
|
||||
throw new UnsupportedOperationException();
|
||||
|
@ -161,6 +169,7 @@ public class CDefaultFolderData extends CFolderData {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomSettings() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -105,22 +105,27 @@ public class CDefaultLanguageData extends CLanguageData {
|
|||
return new EntryStore(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return fName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return fId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return getId() != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLanguageId() {
|
||||
return fLanguageId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLanguageId(String id) {
|
||||
if(CDataUtil.objectsEqual(id, fLanguageId))
|
||||
return;
|
||||
|
@ -169,22 +174,26 @@ public class CDefaultLanguageData extends CLanguageData {
|
|||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public String[] getSourceContentTypeIds() {
|
||||
if(fSourceContentTypeIds != null)
|
||||
return fSourceContentTypeIds;
|
||||
return EMPTY_STRING_ARRAY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getSourceExtensions() {
|
||||
if(fSourceExts != null)
|
||||
return fSourceExts;
|
||||
return EMPTY_STRING_ARRAY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSupportedEntryKinds() {
|
||||
return fSupportedKinds;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEntries(int kind, ICLanguageSettingEntry entries[]) {
|
||||
entries = processStoredEntries(entries, OP_SET);
|
||||
fStore.storeEntries(kind, entries);
|
||||
|
@ -192,10 +201,12 @@ public class CDefaultLanguageData extends CLanguageData {
|
|||
setModified(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICLanguageSettingEntry[] getEntries(int kind) {
|
||||
return fStore.getEntries(kind);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSourceContentTypeIds(String[] ids) {
|
||||
if(Arrays.equals(ids, fSourceContentTypeIds))
|
||||
return;
|
||||
|
@ -206,6 +217,7 @@ public class CDefaultLanguageData extends CLanguageData {
|
|||
setModified(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSourceExtensions(String[] exts) {
|
||||
if(Arrays.equals(exts, fSourceExts))
|
||||
return;
|
||||
|
|
|
@ -52,12 +52,14 @@ public class CDefaultTargetPlatformData extends CTargetPlatformData {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getBinaryParserIds() {
|
||||
if(fBinaryParserIds != null)
|
||||
return (String[])fBinaryParserIds.clone();
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBinaryParserIds(String[] ids) {
|
||||
if(Arrays.equals(ids, fBinaryParserIds))
|
||||
return;
|
||||
|
@ -70,14 +72,17 @@ public class CDefaultTargetPlatformData extends CTargetPlatformData {
|
|||
setModified(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return fId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return fName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
return getId() != null;
|
||||
}
|
||||
|
|
|
@ -45,12 +45,14 @@ public abstract class UserAndDiscoveredEntryConfigurationDataProvider extends
|
|||
fSupportedKinds = kinds;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICLanguageSettingEntry[] getAllDiscoveredEntries(int kind) {
|
||||
return UserAndDiscoveredEntryConfigurationDataProvider.this.getAllDiscoveredEntries(this, kind);
|
||||
}
|
||||
}
|
||||
|
||||
protected class DataFactory extends CDataFacroty {
|
||||
@Override
|
||||
public CLanguageData createLanguageData(CConfigurationData cfg,
|
||||
CResourceData rcBase, CLanguageData base, String id, boolean clone) {
|
||||
if(id == null)
|
||||
|
@ -58,6 +60,7 @@ public abstract class UserAndDiscoveredEntryConfigurationDataProvider extends
|
|||
return new LanguageData(id, base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CLanguageData createLanguageData(CConfigurationData cfg,
|
||||
CResourceData rcBase, String id, String name, String languageId,
|
||||
int supportedKinds, String[] rcTypes, boolean isContentTypes) {
|
||||
|
@ -68,10 +71,12 @@ public abstract class UserAndDiscoveredEntryConfigurationDataProvider extends
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CDataSerializer getDataSerializer() {
|
||||
return UserAndDiscoveredEntryDataSerializer.getDefault();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CDataFacroty getDataFactory() {
|
||||
if(fDataFactory == null){
|
||||
fDataFactory = new DataFactory();
|
||||
|
|
|
@ -20,6 +20,7 @@ public class EntryContentsKey {
|
|||
fEntry = entry;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(this == obj)
|
||||
return true;
|
||||
|
@ -29,6 +30,7 @@ public class EntryContentsKey {
|
|||
return fEntry.equalsByContents(((EntryContentsKey)obj).fEntry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ((ACSettingEntry)fEntry).codeForContentsKey();
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ public class EntryNameKey {
|
|||
fEntry = entry;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(this == obj)
|
||||
return true;
|
||||
|
@ -29,6 +30,7 @@ public class EntryNameKey {
|
|||
return fEntry.equalsByName(((EntryNameKey)obj).fEntry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ((ACSettingEntry)fEntry).codeForNameKey();
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ public abstract class EntryStorageBasedLanguageData extends CDefaultLanguageData
|
|||
super(id, languageId, ids, isContentTypes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICLanguageSettingEntry[] getEntries(int kind) {
|
||||
AbstractEntryStorage storage = getStorage(kind);
|
||||
if(storage != null){
|
||||
|
@ -40,6 +41,7 @@ public abstract class EntryStorageBasedLanguageData extends CDefaultLanguageData
|
|||
return new ICLanguageSettingEntry[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEntries(int kind, ICLanguageSettingEntry[] entries) {
|
||||
AbstractEntryStorage storage = getStorage(kind);
|
||||
if(storage != null){
|
||||
|
@ -55,6 +57,7 @@ public abstract class EntryStorageBasedLanguageData extends CDefaultLanguageData
|
|||
return fStore.getEntries(kind);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected EntryStore createStore(){
|
||||
return new EntryStore(false);
|
||||
}
|
||||
|
|
|
@ -193,6 +193,7 @@ public class KindBasedStore implements Cloneable {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object clone() {
|
||||
try {
|
||||
KindBasedStore clone = (KindBasedStore)super.clone();
|
||||
|
|
|
@ -134,6 +134,7 @@ public class PathEntryTranslator {
|
|||
fCfg = cfg;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResolvedMacro resolveMacro(ICdtVariable macro)
|
||||
throws CdtVariableException {
|
||||
if(!CdtVarPathEntryVariableManager.isPathEntryVariable(macro, fCfg, fMngr))
|
||||
|
|
|
@ -627,6 +627,7 @@ public final class PathSettingsContainer {
|
|||
fDirectParentContainer = parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return contributeToString(new StringBuffer(), 0).toString();
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ public class PatternNameMap {
|
|||
return fCharArray;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(obj == this)
|
||||
return true;
|
||||
|
@ -55,10 +56,12 @@ public class PatternNameMap {
|
|||
return fString.equals(((StringCharArray)obj).fString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return fString.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return fString;
|
||||
}
|
||||
|
@ -109,18 +112,22 @@ public class PatternNameMap {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator iterator() {
|
||||
return fChildrenMap != null ? (Iterator)new Iter(fChildrenMap.entrySet().iterator()) : (Iterator)new EmptyIterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return PatternNameMap.this.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear(){
|
||||
PatternNameMap.this.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean contains(Object o){
|
||||
return fChildrenMap != null ? fChildrenMap.containsValue(o) : false;
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ public class UserAndDiscoveredEntryDataSerializer extends CDataSerializer {
|
|||
return fInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadEntries(CLanguageData data, ICStorageElement el) {
|
||||
UserAndDiscoveredEntryLanguageData lData = (UserAndDiscoveredEntryLanguageData)data;
|
||||
|
||||
|
@ -86,6 +87,7 @@ public class UserAndDiscoveredEntryDataSerializer extends CDataSerializer {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void storeEntries(CLanguageData data, ICStorageElement el) {
|
||||
UserAndDiscoveredEntryLanguageData lData = (UserAndDiscoveredEntryLanguageData)data;
|
||||
int kinds[] = KindBasedStore.getLanguageEntryKinds();
|
||||
|
|
|
@ -28,6 +28,7 @@ public abstract class UserAndDiscoveredEntryLanguageData extends
|
|||
super(id, base);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void copySettingsFrom(CLanguageData data) {
|
||||
super.copySettingsFrom(data);
|
||||
|
||||
|
@ -62,28 +63,34 @@ public abstract class UserAndDiscoveredEntryLanguageData extends
|
|||
fLangData = lData;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICLanguageSettingEntry[] getDiscoveredEntries(
|
||||
Set disabledNameSet) {
|
||||
return fLangData.getDiscoveredEntries(getKind(), disabledNameSet);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICLanguageSettingEntry[] getUserEntries() {
|
||||
return fLangData.getUserEntries(getKind());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setDisabledDiscoveredNames(Set disabledNameSet) {
|
||||
fLangData.setDisabledDiscoveredNames(getKind(), disabledNameSet);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUserEntries(ICLanguageSettingEntry[] entries) {
|
||||
fLangData.setUserEntries(getKind(), entries);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canDisableDiscoveredEntries() {
|
||||
return fLangData.canDisableDiscoveredEntries(getKind());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractEntryStorage getStorage(int kind) {
|
||||
return new UserAndDiscoveredEntryLanguageDataEntryStorage(kind, this);
|
||||
}
|
||||
|
@ -146,6 +153,7 @@ public abstract class UserAndDiscoveredEntryLanguageData extends
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ICLanguageSettingEntry[] getEntriesToCopy(int kind,
|
||||
CLanguageData data) {
|
||||
return ((UserAndDiscoveredEntryLanguageData)data).getEntriesFromStore(kind);
|
||||
|
|
|
@ -22,6 +22,7 @@ public abstract class UserAndDiscoveredEntryStorage extends AbstractEntryStorage
|
|||
super(kind);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SettingsSet createEmptySettings(){
|
||||
SettingsSet settings = new SettingsSet(2);
|
||||
SettingLevel levels[] = settings.getLevels();
|
||||
|
@ -41,6 +42,7 @@ public abstract class UserAndDiscoveredEntryStorage extends AbstractEntryStorage
|
|||
return settings;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void obtainEntriesFromLevel(int levelNum, SettingLevel level) {
|
||||
switch(levelNum){
|
||||
case 0:
|
||||
|
@ -56,6 +58,7 @@ public abstract class UserAndDiscoveredEntryStorage extends AbstractEntryStorage
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void putEntriesToLevel(int levelNum, SettingLevel level) {
|
||||
switch(levelNum){
|
||||
case 0:
|
||||
|
|
|
@ -83,6 +83,7 @@ public abstract class APathEntry extends PathEntry {
|
|||
return this.fullCharExclusionPatterns;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof APathEntry) {
|
||||
APathEntry otherEntry = (APathEntry)obj;
|
||||
|
@ -130,6 +131,7 @@ public abstract class APathEntry extends PathEntry {
|
|||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(super.toString());
|
||||
|
|
|
@ -52,10 +52,12 @@ public class Archive extends Openable implements IArchive {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.model.ICElement#isReadOnly()
|
||||
*/
|
||||
@Override
|
||||
public boolean isReadOnly() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CElementInfo createElementInfo() {
|
||||
return new ArchiveInfo(this);
|
||||
}
|
||||
|
@ -64,6 +66,7 @@ public class Archive extends Openable implements IArchive {
|
|||
return (ArchiveInfo)getElementInfo();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean buildStructure(OpenableInfo info, IProgressMonitor pm, Map newElements, IResource underlyingResource)
|
||||
throws CModelException {
|
||||
return computeChildren(info, underlyingResource);
|
||||
|
@ -87,6 +90,7 @@ public class Archive extends Openable implements IArchive {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public Object getAdapter(Class adapter) {
|
||||
if (IBinaryArchive.class.equals(adapter)) {
|
||||
return getBinaryArchive();
|
||||
|
@ -101,6 +105,7 @@ public class Archive extends Openable implements IArchive {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.model.ICElement#exists()
|
||||
*/
|
||||
@Override
|
||||
public boolean exists() {
|
||||
IResource res = getResource();
|
||||
if (res != null)
|
||||
|
@ -111,6 +116,7 @@ public class Archive extends Openable implements IArchive {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CElement#closing(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
protected void closing(Object info) throws CModelException {
|
||||
ICProject cproject = getCProject();
|
||||
CProjectInfo pinfo = (CProjectInfo)CModelManager.getDefault().peekAtInfo(cproject);
|
||||
|
|
|
@ -37,6 +37,7 @@ public class ArchiveContainer extends Openable implements IArchiveContainer {
|
|||
return a;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CElementInfo createElementInfo() {
|
||||
return new ArchiveContainerInfo(this);
|
||||
}
|
||||
|
@ -44,6 +45,7 @@ public class ArchiveContainer extends Openable implements IArchiveContainer {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.Openable#buildStructure(org.eclipse.cdt.internal.core.model.OpenableInfo, org.eclipse.core.runtime.IProgressMonitor, java.util.Map, org.eclipse.core.resources.IResource)
|
||||
*/
|
||||
@Override
|
||||
protected boolean buildStructure(OpenableInfo info, IProgressMonitor pm, Map newElements, IResource underlyingResource)
|
||||
throws CModelException {
|
||||
// this will bootstrap/start the runner for the project.
|
||||
|
|
|
@ -34,6 +34,7 @@ public class ArchiveContainerInfo extends OpenableInfo {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CElementInfo#addChild(org.eclipse.cdt.core.model.ICElement)
|
||||
*/
|
||||
@Override
|
||||
protected void addChild(ICElement child) {
|
||||
if (!includesChild(child)) {
|
||||
super.addChild(child);
|
||||
|
|
|
@ -48,6 +48,7 @@ public class AsmLabel extends SourceManipulation implements IAsmLabel, IParent {
|
|||
/*
|
||||
* @see org.eclipse.cdt.internal.core.model.CElement#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o instanceof AsmLabel) {
|
||||
return equals(this, (AsmLabel) o);
|
||||
|
|
|
@ -29,6 +29,7 @@ public class BatchOperation extends CModelOperation {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.jdt.internal.core.JavaModelOperation#executeOperation()
|
||||
*/
|
||||
@Override
|
||||
protected void executeOperation() throws CModelException {
|
||||
try {
|
||||
this.runnable.run(fMonitor);
|
||||
|
@ -49,6 +50,7 @@ public class BatchOperation extends CModelOperation {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.jdt.internal.core.JavaModelOperation#verify()
|
||||
*/
|
||||
@Override
|
||||
protected ICModelStatus verify() {
|
||||
// cannot verify user defined operation
|
||||
return CModelStatus.VERIFIED_OK;
|
||||
|
|
|
@ -198,6 +198,7 @@ public class Binary extends Openable implements IBinary {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public Object getAdapter(Class adapter) {
|
||||
if (IBinaryObject.class.equals(adapter)) {
|
||||
return getBinaryObject();
|
||||
|
@ -213,6 +214,7 @@ public class Binary extends Openable implements IBinary {
|
|||
return fBinType;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean hasChanged() {
|
||||
long modification = getModificationStamp();
|
||||
boolean changed = modification != fLastModification;
|
||||
|
@ -241,17 +243,20 @@ public class Binary extends Openable implements IBinary {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.model.ICElement#isReadOnly()
|
||||
*/
|
||||
@Override
|
||||
public boolean isReadOnly() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public CElementInfo createElementInfo() {
|
||||
@Override
|
||||
public CElementInfo createElementInfo() {
|
||||
return new BinaryInfo(this);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.Openable#buildStructure(org.eclipse.cdt.internal.core.model.OpenableInfo, org.eclipse.core.runtime.IProgressMonitor, java.util.Map, org.eclipse.core.resources.IResource)
|
||||
*/
|
||||
@Override
|
||||
protected boolean buildStructure(OpenableInfo info, IProgressMonitor pm, Map newElements, IResource underlyingResource)
|
||||
throws CModelException {
|
||||
return computeChildren(info, underlyingResource);
|
||||
|
@ -421,6 +426,7 @@ public class Binary extends Openable implements IBinary {
|
|||
* overridden from default as we do not need to create our children to provider a buffer since the buffer just contains
|
||||
* IBinaryOject contents which is not model specific.
|
||||
*/
|
||||
@Override
|
||||
public IBuffer getBuffer() throws CModelException {
|
||||
if (hasBuffer()) {
|
||||
IBuffer buffer = getBufferManager().getBuffer(this);
|
||||
|
@ -436,6 +442,7 @@ public class Binary extends Openable implements IBinary {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.Openable#openBuffer(org.eclipse.core.runtime.IProgressMonitor)
|
||||
*/
|
||||
@Override
|
||||
protected IBuffer openBuffer(IProgressMonitor pm) throws CModelException {
|
||||
|
||||
// create buffer - translation units only use default buffer factory
|
||||
|
@ -480,6 +487,7 @@ public class Binary extends Openable implements IBinary {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.Openable#hasBuffer()
|
||||
*/
|
||||
@Override
|
||||
protected boolean hasBuffer() {
|
||||
return true;
|
||||
}
|
||||
|
@ -487,6 +495,7 @@ public class Binary extends Openable implements IBinary {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.model.ICElement#exists()
|
||||
*/
|
||||
@Override
|
||||
public boolean exists() {
|
||||
IResource res = getResource();
|
||||
if (res != null)
|
||||
|
@ -496,6 +505,7 @@ public class Binary extends Openable implements IBinary {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CElement#closing(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
protected void closing(Object info) throws CModelException {
|
||||
ICProject cproject = getCProject();
|
||||
CProjectInfo pinfo = (CProjectInfo)CModelManager.getDefault().peekAtInfo(cproject);
|
||||
|
|
|
@ -54,6 +54,7 @@ public class BinaryContainer extends Openable implements IBinaryContainer {
|
|||
return b;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CElementInfo createElementInfo() {
|
||||
return new BinaryContainerInfo(this);
|
||||
}
|
||||
|
@ -61,6 +62,7 @@ public class BinaryContainer extends Openable implements IBinaryContainer {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.Openable#buildStructure(org.eclipse.cdt.internal.core.model.OpenableInfo, org.eclipse.core.runtime.IProgressMonitor, java.util.Map, org.eclipse.core.resources.IResource)
|
||||
*/
|
||||
@Override
|
||||
protected boolean buildStructure(OpenableInfo info, IProgressMonitor pm, Map newElements, IResource underlyingResource)
|
||||
throws CModelException {
|
||||
// this will bootstrap/start the runner for the project.
|
||||
|
|
|
@ -28,6 +28,7 @@ public class BinaryContainerInfo extends OpenableInfo {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CElementInfo#addChild(org.eclipse.cdt.core.model.ICElement)
|
||||
*/
|
||||
@Override
|
||||
protected void addChild(ICElement child) {
|
||||
if (!includesChild(child)) {
|
||||
super.addChild(child);
|
||||
|
|
|
@ -155,6 +155,7 @@ public class BinaryElement extends CElement implements IBinaryElement, ISourceMa
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CElement#createElementInfo()
|
||||
*/
|
||||
@Override
|
||||
protected CElementInfo createElementInfo() {
|
||||
return new CElementInfo(this);
|
||||
}
|
||||
|
@ -162,6 +163,7 @@ public class BinaryElement extends CElement implements IBinaryElement, ISourceMa
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.model.ICElement#getResource()
|
||||
*/
|
||||
@Override
|
||||
public IResource getResource() {
|
||||
return null;
|
||||
}
|
||||
|
@ -247,6 +249,7 @@ public class BinaryElement extends CElement implements IBinaryElement, ISourceMa
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CElement#generateInfos(java.lang.Object, java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
|
||||
*/
|
||||
@Override
|
||||
protected void generateInfos(Object info, Map newElements, IProgressMonitor monitor) throws CModelException {
|
||||
}
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ public class BinaryModule extends Parent implements IBinaryModule {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.model.ICElement#getResource()
|
||||
*/
|
||||
@Override
|
||||
public IResource getResource() {
|
||||
IWorkspaceRoot root = getCModel().getWorkspace().getRoot();
|
||||
IPath path = getPath();
|
||||
|
@ -77,6 +78,7 @@ public class BinaryModule extends Parent implements IBinaryModule {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.model.ICElement#isReadOnly()
|
||||
*/
|
||||
@Override
|
||||
public boolean isReadOnly() {
|
||||
return true;
|
||||
}
|
||||
|
@ -84,6 +86,7 @@ public class BinaryModule extends Parent implements IBinaryModule {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CElement#createElementInfo()
|
||||
*/
|
||||
@Override
|
||||
protected CElementInfo createElementInfo() {
|
||||
return new CElementInfo(this);
|
||||
}
|
||||
|
@ -91,6 +94,7 @@ public class BinaryModule extends Parent implements IBinaryModule {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.model.ICElement#getPath()
|
||||
*/
|
||||
@Override
|
||||
public IPath getPath() {
|
||||
return fPath;
|
||||
}
|
||||
|
@ -98,6 +102,7 @@ public class BinaryModule extends Parent implements IBinaryModule {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CElement#generateInfos(java.lang.Object, java.util.Map, org.eclipse.core.runtime.IProgressMonitor)
|
||||
*/
|
||||
@Override
|
||||
protected void generateInfos(Object info, Map newElements, IProgressMonitor monitor) throws CModelException {
|
||||
newElements.put(this, info);
|
||||
}
|
||||
|
|
|
@ -50,10 +50,12 @@ public class BinaryRunner {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CModelOperation#isReadOnly()
|
||||
*/
|
||||
@Override
|
||||
public boolean isReadOnly() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void executeOperation() throws CModelException {
|
||||
ICProject cproj = (ICProject)getElementsToProcess()[0];
|
||||
IParent[] containers = new IParent[2];
|
||||
|
@ -94,6 +96,7 @@ public class BinaryRunner {
|
|||
String taskName = CCorePlugin.getResourceString("CoreModel.BinaryRunner.Binary_Search_Thread"); //$NON-NLS-1$
|
||||
taskName += " (" + cproject.getElementName() + ")"; //$NON-NLS-1$//$NON-NLS-2$
|
||||
Job job= new Job(taskName) {
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
IStatus status = Status.OK_STATUS;
|
||||
try {
|
||||
|
|
|
@ -426,6 +426,7 @@ public class Buffer implements IBuffer {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append("Owner: " + ((CElement)this.owner).toString()); //$NON-NLS-1$
|
||||
|
|
|
@ -52,6 +52,7 @@ public class BufferManager implements IBufferFactory {
|
|||
* <p>NOTE: this triggers an external removal of this buffer
|
||||
* by closing the buffer.
|
||||
*/
|
||||
@Override
|
||||
protected boolean close(LRUCacheEntry entry) {
|
||||
IBuffer buffer= (IBuffer) entry._fValue;
|
||||
if (buffer.hasUnsavedChanges()) {
|
||||
|
@ -63,6 +64,7 @@ public class BufferManager implements IBufferFactory {
|
|||
/**
|
||||
* Returns a new instance of the reciever.
|
||||
*/
|
||||
@Override
|
||||
protected LRUCache newInstance(int size, int overflow) {
|
||||
return new BufferCache(size, overflow);
|
||||
}
|
||||
|
|
|
@ -159,11 +159,13 @@ public class CContainer extends Openable implements ICContainer {
|
|||
return (IContainer) getResource();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CElementInfo createElementInfo() {
|
||||
return new CContainerInfo(this);
|
||||
}
|
||||
|
||||
// CHECKPOINT: folders will return the hash code of their path
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getPath().hashCode();
|
||||
}
|
||||
|
@ -171,6 +173,7 @@ public class CContainer extends Openable implements ICContainer {
|
|||
/**
|
||||
* @see Openable
|
||||
*/
|
||||
@Override
|
||||
protected boolean buildStructure(OpenableInfo info, IProgressMonitor pm, Map newElements, IResource underlyingResource)
|
||||
throws CModelException {
|
||||
boolean validInfo = false;
|
||||
|
|
|
@ -73,6 +73,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.core.runtime.PlatformObject#getAdapter(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public Object getAdapter(Class adapter) {
|
||||
// handle all kinds of resources
|
||||
if (IResource.class.isAssignableFrom(adapter)) {
|
||||
|
@ -260,6 +261,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
|||
/**
|
||||
* Tests if an element has the same name, type and an equal parent.
|
||||
*/
|
||||
@Override
|
||||
public boolean equals (Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
|
@ -304,6 +306,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
|||
return info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getElementName();
|
||||
}
|
||||
|
@ -488,6 +491,7 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
|||
*/
|
||||
// CHECKPOINT: making not equal objects seem equal
|
||||
// What elements should override this?
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return hashCode(this);
|
||||
}
|
||||
|
|
|
@ -764,6 +764,7 @@ public class CElementDelta implements ICElementDelta {
|
|||
* Returns a string representation of this delta's
|
||||
* structure suitable for debug purposes.
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return toDebugString(0);
|
||||
}
|
||||
|
|
|
@ -368,6 +368,7 @@ private void removed(ICElement element) {
|
|||
private void removeElementInfo(ICElement element) {
|
||||
this.infos.remove(element);
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append("Built delta:\n"); //$NON-NLS-1$
|
||||
|
|
|
@ -144,6 +144,7 @@ class CElementInfo {
|
|||
fIsStructureKnown = newIsStructureKnown;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object clone() {
|
||||
try {
|
||||
return super.clone();
|
||||
|
|
|
@ -41,6 +41,7 @@ public class CModel extends Openable implements ICModel {
|
|||
super (null, root, ICElement.C_MODEL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof CModel)) {
|
||||
return false;
|
||||
|
@ -160,11 +161,13 @@ public class CModel extends Openable implements ICModel {
|
|||
op.runOperation(monitor);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CElementInfo createElementInfo () {
|
||||
return new CModelInfo(this);
|
||||
}
|
||||
|
||||
// CHECKPOINT: Roots will return the hashcode of their resource
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return resource.hashCode();
|
||||
}
|
||||
|
@ -184,6 +187,7 @@ public class CModel extends Openable implements ICModel {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.Openable#buildStructure(org.eclipse.cdt.internal.core.model.OpenableInfo, org.eclipse.core.runtime.IProgressMonitor, java.util.Map, org.eclipse.core.resources.IResource)
|
||||
*/
|
||||
@Override
|
||||
protected boolean buildStructure(OpenableInfo info, IProgressMonitor pm, Map newElements, IResource underlyingResource) throws CModelException {
|
||||
boolean validInfo = false;
|
||||
try {
|
||||
|
|
|
@ -152,6 +152,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
|||
/**
|
||||
* @see IStatus
|
||||
*/
|
||||
@Override
|
||||
public IStatus[] getChildren() {
|
||||
return fChildren;
|
||||
}
|
||||
|
@ -166,6 +167,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
|||
/**
|
||||
* Returns the message that is relevant to the code of this status.
|
||||
*/
|
||||
@Override
|
||||
public String getMessage() {
|
||||
Throwable exception = getException();
|
||||
if (isMultiStatus()) {
|
||||
|
@ -314,6 +316,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
|||
/**
|
||||
* @see IStatus
|
||||
*/
|
||||
@Override
|
||||
public int getSeverity() {
|
||||
if (fChildren == fgEmptyChildren)
|
||||
return super.getSeverity();
|
||||
|
@ -354,6 +357,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
|||
/**
|
||||
* @see IStatus
|
||||
*/
|
||||
@Override
|
||||
public boolean isMultiStatus() {
|
||||
return fChildren != fgEmptyChildren;
|
||||
}
|
||||
|
@ -361,6 +365,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
|||
/**
|
||||
* @see ICModelStatus
|
||||
*/
|
||||
@Override
|
||||
public boolean isOK() {
|
||||
return getCode() == OK;
|
||||
}
|
||||
|
@ -368,6 +373,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
|||
/**
|
||||
* @see IStatus#matches
|
||||
*/
|
||||
@Override
|
||||
public boolean matches(int mask) {
|
||||
if (!isMultiStatus()) {
|
||||
return matches(this, mask);
|
||||
|
@ -417,6 +423,7 @@ public class CModelStatus extends Status implements ICModelStatus, ICModelStatus
|
|||
* Returns a printable representation of this exception for debugging
|
||||
* purposes.
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
if (this == VERIFIED_OK) {
|
||||
return "CModelStatus[OK]"; //$NON-NLS-1$
|
||||
|
|
|
@ -130,6 +130,7 @@ public class CProject extends Openable implements ICProject {
|
|||
*
|
||||
* @see CElement#equals(Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
||||
if (this == o)
|
||||
|
@ -142,11 +143,13 @@ public class CProject extends Openable implements ICProject {
|
|||
return getProject().equals(other.getProject());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CElementInfo createElementInfo() {
|
||||
return new CProjectInfo(this);
|
||||
}
|
||||
|
||||
// CHECKPOINT: CProjects will return the hash code of their underlying IProject
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getProject().hashCode();
|
||||
}
|
||||
|
@ -574,6 +577,7 @@ public class CProject extends Openable implements ICProject {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.Openable#buildStructure(org.eclipse.cdt.internal.core.model.OpenableInfo, org.eclipse.core.runtime.IProgressMonitor, java.util.Map, org.eclipse.core.resources.IResource)
|
||||
*/
|
||||
@Override
|
||||
protected boolean buildStructure(OpenableInfo info, IProgressMonitor pm,
|
||||
Map newElements, IResource underlyingResource)
|
||||
throws CModelException {
|
||||
|
@ -701,6 +705,7 @@ public class CProject extends Openable implements ICProject {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.model.ICElement#exists()
|
||||
*/
|
||||
@Override
|
||||
public boolean exists() {
|
||||
if (!isCProject()) {
|
||||
return false;
|
||||
|
@ -718,6 +723,7 @@ public class CProject extends Openable implements ICProject {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CElement#closing(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
protected void closing(Object info) throws CModelException {
|
||||
if (info instanceof CProjectInfo) {
|
||||
CProjectInfo pinfo = (CProjectInfo)info;
|
||||
|
|
|
@ -116,6 +116,7 @@ public class CShiftData implements ICElementDelta {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ("CShiftData: offset=" + offset + ", size=" + size + ", lines=" + lines); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
package org.eclipse.cdt.internal.core.model;
|
||||
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.model.CModelException;
|
||||
import org.eclipse.cdt.core.model.IBuffer;
|
||||
import org.eclipse.cdt.core.model.ICElement;
|
||||
|
@ -63,6 +62,7 @@ public class CommitWorkingCopyOperation extends CModelOperation {
|
|||
super(new ICElement[] {element}, force);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISchedulingRule getSchedulingRule() {
|
||||
IResource resource = getElementToProcess().getResource();
|
||||
IWorkspace workspace = resource.getWorkspace();
|
||||
|
@ -75,6 +75,7 @@ public class CommitWorkingCopyOperation extends CModelOperation {
|
|||
/**
|
||||
* @see org.eclipse.cdt.internal.core.model.CModelOperation#executeOperation()
|
||||
*/
|
||||
@Override
|
||||
protected void executeOperation() throws CModelException {
|
||||
try {
|
||||
beginTask(CoreModelMessages.getString("workingCopy.commit"), 2); //$NON-NLS-1$
|
||||
|
@ -171,6 +172,7 @@ public class CommitWorkingCopyOperation extends CModelOperation {
|
|||
* </ul>
|
||||
*/
|
||||
|
||||
@Override
|
||||
public ICModelStatus verify() {
|
||||
|
||||
IWorkingCopy wc = (IWorkingCopy) getElementToProcess();
|
||||
|
|
|
@ -20,6 +20,7 @@ public class ContainerEntry extends PathEntry implements IContainerEntry {
|
|||
super(IPathEntry.CDT_CONTAINER, path, isExported);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof IContainerEntry) {
|
||||
IContainerEntry container = (IContainerEntry)obj;
|
||||
|
|
|
@ -56,10 +56,12 @@ public class ContentTypeProcessor extends CModelOperation {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CModelOperation#isReadOnly()
|
||||
*/
|
||||
@Override
|
||||
public boolean isReadOnly() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void executeOperation() throws CModelException {
|
||||
for (int i = 0; i < fEvents.length; ++i) {
|
||||
IContentType contentType = fEvents[i].getContentType();
|
||||
|
|
|
@ -79,6 +79,7 @@ public class CopyElementsOperation extends MultiOperation {
|
|||
* Returns the <code>String</code> to use as the main task name
|
||||
* for progress monitoring.
|
||||
*/
|
||||
@Override
|
||||
protected String getMainTaskName() {
|
||||
return CoreModelMessages.getString("operation.copyElementProgress"); //$NON-NLS-1$
|
||||
}
|
||||
|
@ -153,6 +154,7 @@ public class CopyElementsOperation extends MultiOperation {
|
|||
* @exception CModelException if the operation is unable to
|
||||
* be completed
|
||||
*/
|
||||
@Override
|
||||
protected void processElement(ICElement element) throws CModelException {
|
||||
CModelOperation op = getNestedOperation(element);
|
||||
if (op == null) {
|
||||
|
@ -215,6 +217,7 @@ public class CopyElementsOperation extends MultiOperation {
|
|||
* does not match the number of elements that were supplied.
|
||||
* </ul>
|
||||
*/
|
||||
@Override
|
||||
protected ICModelStatus verify() {
|
||||
ICModelStatus status = super.verify();
|
||||
if (!status.isOK()) {
|
||||
|
@ -249,6 +252,7 @@ public class CopyElementsOperation extends MultiOperation {
|
|||
|
||||
* </ul>
|
||||
*/
|
||||
@Override
|
||||
protected void verify(ICElement element) throws CModelException {
|
||||
if (element == null || !element.exists())
|
||||
error(ICModelStatusConstants.ELEMENT_DOES_NOT_EXIST, element);
|
||||
|
|
|
@ -83,6 +83,7 @@ public class CopyResourceElementsOperation extends MultiOperation {
|
|||
/**
|
||||
* @see MultiOperation
|
||||
*/
|
||||
@Override
|
||||
protected String getMainTaskName() {
|
||||
return CoreModelMessages.getString("operation.copyResourceProgress"); //$NON-NLS-1$
|
||||
}
|
||||
|
@ -189,6 +190,7 @@ public class CopyResourceElementsOperation extends MultiOperation {
|
|||
* <code>processPackageFragmentResource</code>, depending on the type of
|
||||
* <code>element</code>.
|
||||
*/
|
||||
@Override
|
||||
protected void processElement(ICElement element) throws CModelException {
|
||||
ICElement dest = getDestinationParent(element);
|
||||
if (element.getElementType() <= ICElement.C_UNIT) {
|
||||
|
@ -204,6 +206,7 @@ public class CopyResourceElementsOperation extends MultiOperation {
|
|||
* Overridden to allow special processing of <code>CElementDelta</code>s
|
||||
* and <code>fResultElements</code>.
|
||||
*/
|
||||
@Override
|
||||
protected void processElements() throws CModelException {
|
||||
fCreatedElements = new ArrayList(fElementsToProcess.length);
|
||||
try {
|
||||
|
@ -225,6 +228,7 @@ public class CopyResourceElementsOperation extends MultiOperation {
|
|||
* does not match the number of elements that were supplied.
|
||||
* </ul>
|
||||
*/
|
||||
@Override
|
||||
protected ICModelStatus verify() {
|
||||
ICModelStatus status = super.verify();
|
||||
if (!status.isOK()) {
|
||||
|
@ -240,6 +244,7 @@ public class CopyResourceElementsOperation extends MultiOperation {
|
|||
/**
|
||||
* @see MultiOperation
|
||||
*/
|
||||
@Override
|
||||
protected void verify(ICElement element) throws CModelException {
|
||||
if (element == null || !element.exists())
|
||||
error(ICModelStatusConstants.ELEMENT_DOES_NOT_EXIST, element);
|
||||
|
|
|
@ -103,6 +103,7 @@ public abstract class CreateElementInTUOperation extends CModelOperation {
|
|||
/**
|
||||
* Only allow cancelling if this operation is not nested.
|
||||
*/
|
||||
@Override
|
||||
protected void checkCanceled() {
|
||||
if (!fNested) {
|
||||
super.checkCanceled();
|
||||
|
@ -135,6 +136,7 @@ public abstract class CreateElementInTUOperation extends CModelOperation {
|
|||
*
|
||||
* @exception CModelException if the operation is unable to complete
|
||||
*/
|
||||
@Override
|
||||
protected void executeOperation() throws CModelException {
|
||||
beginTask(getMainTaskName(), getMainAmountOfWork());
|
||||
CElementDelta delta = newCElementDelta();
|
||||
|
@ -225,6 +227,7 @@ public abstract class CreateElementInTUOperation extends CModelOperation {
|
|||
/**
|
||||
* Returns the elements created by this operation.
|
||||
*/
|
||||
@Override
|
||||
public ICElement[] getResultElements() {
|
||||
return fResultElements;
|
||||
}
|
||||
|
@ -306,6 +309,7 @@ public abstract class CreateElementInTUOperation extends CModelOperation {
|
|||
* @see ICModelStatus
|
||||
* @see CNamingConventions
|
||||
*/
|
||||
@Override
|
||||
public ICModelStatus verify() {
|
||||
if (getParentElement() == null) {
|
||||
return new CModelStatus(ICModelStatusConstants.NO_ELEMENTS_TO_PROCESS);
|
||||
|
|
|
@ -47,6 +47,7 @@ public class CreateFieldOperation extends CreateMemberOperation {
|
|||
/**
|
||||
* @see CreateElementInCUOperation#getMainTaskName
|
||||
*/
|
||||
@Override
|
||||
public String getMainTaskName(){
|
||||
return "operation.createFieldProgress"; //$NON-NLS-1$
|
||||
}
|
||||
|
@ -56,6 +57,7 @@ public class CreateFieldOperation extends CreateMemberOperation {
|
|||
* declaration, or as the first member in the type if there are no
|
||||
* field declarations.
|
||||
*/
|
||||
@Override
|
||||
protected void initializeDefaultPosition() {
|
||||
IStructure parentElement = getStructure();
|
||||
try {
|
||||
|
@ -75,6 +77,7 @@ public class CreateFieldOperation extends CreateMemberOperation {
|
|||
/**
|
||||
* @see CreateElementInCUOperation#generateResultHandle
|
||||
*/
|
||||
@Override
|
||||
protected ICElement generateResultHandle() {
|
||||
return getStructure().getField(fName);
|
||||
}
|
||||
|
@ -82,6 +85,7 @@ public class CreateFieldOperation extends CreateMemberOperation {
|
|||
/**
|
||||
* @see CreateTypeMemberOperation#verifyNameCollision
|
||||
*/
|
||||
@Override
|
||||
protected ICModelStatus verifyNameCollision() {
|
||||
return super.verifyNameCollision();
|
||||
}
|
||||
|
@ -89,6 +93,7 @@ public class CreateFieldOperation extends CreateMemberOperation {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CreateElementInTUOperation#generateElement(org.eclipse.cdt.core.model.ITranslationUnit)
|
||||
*/
|
||||
@Override
|
||||
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(fReturnType).append(' ');
|
||||
|
|
|
@ -58,6 +58,7 @@ public class CreateIncludeOperation extends CreateElementInTUOperation {
|
|||
/**
|
||||
* @see CreateElementInCUOperation#generateResultHandle
|
||||
*/
|
||||
@Override
|
||||
protected ICElement generateResultHandle() {
|
||||
return getTranslationUnit().getInclude(fIncludeName);
|
||||
}
|
||||
|
@ -65,6 +66,7 @@ public class CreateIncludeOperation extends CreateElementInTUOperation {
|
|||
/**
|
||||
* @see CreateElementInCUOperation#getMainTaskName
|
||||
*/
|
||||
@Override
|
||||
public String getMainTaskName(){
|
||||
return "operation.createIncludeProgress"; //$NON-NLS-1$
|
||||
}
|
||||
|
@ -75,6 +77,7 @@ public class CreateIncludeOperation extends CreateElementInTUOperation {
|
|||
* </ul>
|
||||
* if no include
|
||||
*/
|
||||
@Override
|
||||
protected void initializeDefaultPosition() {
|
||||
try {
|
||||
ITranslationUnit cu = getTranslationUnit();
|
||||
|
@ -96,6 +99,7 @@ public class CreateIncludeOperation extends CreateElementInTUOperation {
|
|||
* @see ICModelStatus
|
||||
* @see CNamingConventions
|
||||
*/
|
||||
@Override
|
||||
public ICModelStatus verify() {
|
||||
ICModelStatus status = super.verify();
|
||||
if (!status.isOK()) {
|
||||
|
@ -111,6 +115,7 @@ public class CreateIncludeOperation extends CreateElementInTUOperation {
|
|||
/*
|
||||
* TODO: Use the ASTRewrite once it is available.
|
||||
*/
|
||||
@Override
|
||||
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("#include "); //$NON-NLS-1$;
|
||||
|
|
|
@ -60,6 +60,7 @@ public abstract class CreateMemberOperation extends CreateElementInTUOperation {
|
|||
* create this new element.
|
||||
* Used by the <code>CopyElementsOperation</code> for renaming
|
||||
*/
|
||||
@Override
|
||||
protected void setAlteredName(String newName) {
|
||||
fAlteredName = newName;
|
||||
}
|
||||
|
@ -72,6 +73,7 @@ public abstract class CreateMemberOperation extends CreateElementInTUOperation {
|
|||
* <li>NAME_COLLISION - A name collision occurred in the destination
|
||||
* </ul>
|
||||
*/
|
||||
@Override
|
||||
public ICModelStatus verify() {
|
||||
ICModelStatus status = super.verify();
|
||||
if (!status.isOK()) {
|
||||
|
|
|
@ -52,6 +52,7 @@ public class CreateMethodOperation extends CreateMemberOperation {
|
|||
/**
|
||||
* @see CreateElementInCUOperation#generateResultHandle
|
||||
*/
|
||||
@Override
|
||||
protected ICElement generateResultHandle() {
|
||||
//TODO: what about collisions, we need the signature here.
|
||||
return getStructure().getMethod(fName);
|
||||
|
@ -60,6 +61,7 @@ public class CreateMethodOperation extends CreateMemberOperation {
|
|||
/**
|
||||
* @see CreateElementInCUOperation#getMainTaskName
|
||||
*/
|
||||
@Override
|
||||
public String getMainTaskName(){
|
||||
return "operation.createMethodProgress"; //$NON-NLS-1$
|
||||
}
|
||||
|
@ -67,6 +69,7 @@ public class CreateMethodOperation extends CreateMemberOperation {
|
|||
/**
|
||||
* @see CreateTypeMemberOperation#verifyNameCollision
|
||||
*/
|
||||
@Override
|
||||
protected ICModelStatus verifyNameCollision() {
|
||||
ICModelStatus status = super.verify();
|
||||
if (!status.isOK()) {
|
||||
|
@ -90,6 +93,7 @@ public class CreateMethodOperation extends CreateMemberOperation {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CreateElementInTUOperation#generateElement(org.eclipse.cdt.core.model.ITranslationUnit)
|
||||
*/
|
||||
@Override
|
||||
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(fReturnType);
|
||||
|
|
|
@ -41,6 +41,7 @@ public class CreateNamespaceOperation extends CreateElementInTUOperation {
|
|||
/**
|
||||
* @see CreateElementInCUOperation#generateResultHandle
|
||||
*/
|
||||
@Override
|
||||
protected ICElement generateResultHandle() {
|
||||
return getTranslationUnit().getNamespace(fNamespace);
|
||||
}
|
||||
|
@ -48,6 +49,7 @@ public class CreateNamespaceOperation extends CreateElementInTUOperation {
|
|||
/**
|
||||
* @see CreateElementInCUOperation#getMainTaskName
|
||||
*/
|
||||
@Override
|
||||
public String getMainTaskName(){
|
||||
return "operation.createNamespaceProgress"; //$NON-NLS-1$
|
||||
}
|
||||
|
@ -57,6 +59,7 @@ public class CreateNamespaceOperation extends CreateElementInTUOperation {
|
|||
* <li> after the last namespace
|
||||
* </ul>
|
||||
*/
|
||||
@Override
|
||||
protected void initializeDefaultPosition() {
|
||||
try {
|
||||
ITranslationUnit cu = getTranslationUnit();
|
||||
|
@ -72,6 +75,7 @@ public class CreateNamespaceOperation extends CreateElementInTUOperation {
|
|||
/*
|
||||
* TODO: Use the ASTRewrite once it is available.
|
||||
*/
|
||||
@Override
|
||||
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("namespace "); //$NON-NLS-1$;
|
||||
|
|
|
@ -50,6 +50,7 @@ public class CreateSourceReferenceOperation extends CreateElementInTUOperation {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CreateElementInTUOperation#generateElement(org.eclipse.cdt.core.model.ITranslationUnit)
|
||||
*/
|
||||
@Override
|
||||
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
||||
return fSource;
|
||||
}
|
||||
|
@ -57,6 +58,7 @@ public class CreateSourceReferenceOperation extends CreateElementInTUOperation {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CreateElementInTUOperation#generateResultHandle()
|
||||
*/
|
||||
@Override
|
||||
protected ICElement generateResultHandle() {
|
||||
IParent parent = (IParent)getParentElement();
|
||||
try {
|
||||
|
@ -78,6 +80,7 @@ public class CreateSourceReferenceOperation extends CreateElementInTUOperation {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CreateElementInTUOperation#getMainTaskName()
|
||||
*/
|
||||
@Override
|
||||
protected String getMainTaskName() {
|
||||
return "operation.createsourceReference"; //$NON-NLS-1$
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ public class CreateUsingOperation extends CreateElementInTUOperation {
|
|||
/**
|
||||
* @see CreateElementInCUOperation#generateResultHandle
|
||||
*/
|
||||
@Override
|
||||
protected ICElement generateResultHandle() {
|
||||
return getTranslationUnit().getUsing(fUsingName);
|
||||
}
|
||||
|
@ -55,6 +56,7 @@ public class CreateUsingOperation extends CreateElementInTUOperation {
|
|||
/**
|
||||
* @see CreateElementInCUOperation#getMainTaskName
|
||||
*/
|
||||
@Override
|
||||
public String getMainTaskName(){
|
||||
return "operation.createUsingProgress"; //$NON-NLS-1$
|
||||
}
|
||||
|
@ -65,6 +67,7 @@ public class CreateUsingOperation extends CreateElementInTUOperation {
|
|||
* </ul>
|
||||
* if no using
|
||||
*/
|
||||
@Override
|
||||
protected void initializeDefaultPosition() {
|
||||
try {
|
||||
ITranslationUnit cu = getTranslationUnit();
|
||||
|
@ -80,6 +83,7 @@ public class CreateUsingOperation extends CreateElementInTUOperation {
|
|||
/*
|
||||
* TODO: Use the ASTRewrite once it is available.
|
||||
*/
|
||||
@Override
|
||||
protected String generateElement(ITranslationUnit unit) throws CModelException {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("using "); //$NON-NLS-1$;
|
||||
|
|
|
@ -39,6 +39,7 @@ public class CreateWorkingCopyOperation extends CModelOperation {
|
|||
this.factory = factory;
|
||||
this.problemRequestor = problemRequestor;
|
||||
}
|
||||
@Override
|
||||
protected void executeOperation() throws CModelException {
|
||||
ITranslationUnit tu = getTranslationUnit();
|
||||
|
||||
|
@ -79,6 +80,7 @@ public class CreateWorkingCopyOperation extends CModelOperation {
|
|||
/**
|
||||
* @see JavaModelOperation#isReadOnly
|
||||
*/
|
||||
@Override
|
||||
public boolean isReadOnly() {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ public class DeleteElementsOperation extends MultiOperation {
|
|||
/**
|
||||
* @see MultiOperation
|
||||
*/
|
||||
@Override
|
||||
protected String getMainTaskName() {
|
||||
return CoreModelMessages.getString("operation.deleteElementProgress"); //$NON-NLS-1$
|
||||
}
|
||||
|
@ -88,6 +89,7 @@ public class DeleteElementsOperation extends MultiOperation {
|
|||
* Deletes this element from its compilation unit.
|
||||
* @see MultiOperation
|
||||
*/
|
||||
@Override
|
||||
protected void processElement(ICElement element) throws CModelException {
|
||||
ITranslationUnit tu = (ITranslationUnit) element;
|
||||
|
||||
|
@ -117,6 +119,7 @@ public class DeleteElementsOperation extends MultiOperation {
|
|||
/**
|
||||
* @deprecated marked deprecated, future to use ASTRewrite
|
||||
*/
|
||||
@Deprecated
|
||||
private void replaceElementInBuffer(IBuffer buffer, ICElement elementToRemove, String cuName) throws CModelException {
|
||||
if (elementToRemove instanceof ISourceReference) {
|
||||
ISourceRange range = ((ISourceReference)elementToRemove).getSourceRange();
|
||||
|
@ -152,6 +155,7 @@ public class DeleteElementsOperation extends MultiOperation {
|
|||
* This method first group the elements by <code>ICompilationUnit</code>,
|
||||
* and then processes the <code>ICompilationUnit</code>.
|
||||
*/
|
||||
@Override
|
||||
protected void processElements() throws CModelException {
|
||||
groupElements();
|
||||
super.processElements();
|
||||
|
@ -159,6 +163,7 @@ public class DeleteElementsOperation extends MultiOperation {
|
|||
/**
|
||||
* @see MultiOperation
|
||||
*/
|
||||
@Override
|
||||
protected void verify(ICElement element) throws CModelException {
|
||||
ICElement[] children = ((IRegion) fChildrenToRemove.get(element)).getElements();
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
|
|
|
@ -33,6 +33,7 @@ public class DeleteResourceElementsOperation extends MultiOperation {
|
|||
/**
|
||||
* @see MultiOperation
|
||||
*/
|
||||
@Override
|
||||
protected String getMainTaskName() {
|
||||
return CoreModelMessages.getString("operation.deleteResourceProgress"); //$NON-NLS-1$
|
||||
}
|
||||
|
@ -41,6 +42,7 @@ public class DeleteResourceElementsOperation extends MultiOperation {
|
|||
* @see MultiOperation. This method delegate to <code>deleteResource</code> or
|
||||
* <code>deletePackageFragment</code> depending on the type of <code>element</code>.
|
||||
*/
|
||||
@Override
|
||||
protected void processElement(ICElement element) throws CModelException {
|
||||
deleteResource(element.getResource(), fForce);
|
||||
}
|
||||
|
@ -48,6 +50,7 @@ public class DeleteResourceElementsOperation extends MultiOperation {
|
|||
/**
|
||||
* @see MultiOperation
|
||||
*/
|
||||
@Override
|
||||
protected void verify(ICElement element) throws CModelException {
|
||||
if (element == null || !element.exists())
|
||||
error(ICModelStatusConstants.ELEMENT_DOES_NOT_EXIST, element);
|
||||
|
|
|
@ -29,6 +29,7 @@ public class DestroyWorkingCopyOperation extends CModelOperation {
|
|||
* @exception CModelException if setting the source
|
||||
* of the original translation unit fails
|
||||
*/
|
||||
@Override
|
||||
protected void executeOperation() throws CModelException {
|
||||
|
||||
WorkingCopy workingCopy = getWorkingCopy();
|
||||
|
@ -72,6 +73,7 @@ public class DestroyWorkingCopyOperation extends CModelOperation {
|
|||
/**
|
||||
* @see CModelOperation#isReadOnly
|
||||
*/
|
||||
@Override
|
||||
public boolean isReadOnly() {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ public class ElementCache extends OverflowingLRUCache {
|
|||
* <p>NOTE: this triggers an external removal of this element
|
||||
* by closing the element.
|
||||
*/
|
||||
@Override
|
||||
protected boolean close(LRUCacheEntry entry) {
|
||||
IOpenable element = (IOpenable) entry._fKey;
|
||||
try {
|
||||
|
@ -57,6 +58,7 @@ public class ElementCache extends OverflowingLRUCache {
|
|||
/**
|
||||
* Returns a new instance of the reciever.
|
||||
*/
|
||||
@Override
|
||||
protected LRUCache newInstance(int size, int overflow) {
|
||||
return new ElementCache(size, overflow);
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ public class Enumeration extends SourceManipulation implements IEnumeration{
|
|||
super(parent, name, ICElement.C_ENUMERATION);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CElementInfo createElementInfo () {
|
||||
return new EnumerationInfo(this);
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ public class Enumerator extends SourceManipulation implements IEnumerator{
|
|||
super(parent, name, ICElement.C_ENUMERATOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CElementInfo createElementInfo () {
|
||||
return new SourceManipulationInfo(this);
|
||||
}
|
||||
|
|
|
@ -30,34 +30,42 @@ public class Field extends VariableDeclaration implements IField {
|
|||
getFieldInfo().setMutable(mutable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeName() throws CModelException {
|
||||
return getFieldInfo().getTypeName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeName(String type) throws CModelException {
|
||||
getFieldInfo().setTypeName(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isConst() throws CModelException {
|
||||
return getFieldInfo().isConst();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setConst(boolean isConst) throws CModelException {
|
||||
getFieldInfo().setConst(isConst);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVolatile() throws CModelException {
|
||||
return getFieldInfo().isVolatile();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVolatile(boolean isVolatile) throws CModelException {
|
||||
getFieldInfo().setVolatile(isVolatile);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStatic() throws CModelException {
|
||||
return getFieldInfo().isStatic();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStatic(boolean isStatic) throws CModelException {
|
||||
getFieldInfo().setStatic(isStatic);
|
||||
}
|
||||
|
@ -74,6 +82,7 @@ public class Field extends VariableDeclaration implements IField {
|
|||
return (FieldInfo) getElementInfo();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CElementInfo createElementInfo () {
|
||||
return new FieldInfo(this);
|
||||
}
|
||||
|
|
|
@ -85,6 +85,7 @@ public class FieldInfo extends SourceManipulationInfo {
|
|||
/**
|
||||
* @see org.eclipse.cdt.internal.core.model.SourceManipulationInfo#hasSameContentsAs(SourceManipulationInfo)
|
||||
*/
|
||||
@Override
|
||||
public boolean hasSameContentsAs( SourceManipulationInfo info){
|
||||
|
||||
return( super.hasSameContentsAs(info)
|
||||
|
|
|
@ -103,6 +103,7 @@ public class FunctionDeclaration extends SourceManipulation implements IFunction
|
|||
return new String[] {};
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CElementInfo createElementInfo () {
|
||||
return new FunctionInfo(this);
|
||||
}
|
||||
|
@ -111,6 +112,7 @@ public class FunctionDeclaration extends SourceManipulation implements IFunction
|
|||
return (FunctionInfo) getElementInfo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other instanceof IFunctionDeclaration) {
|
||||
return equals(this, (IFunctionDeclaration) other);
|
||||
|
|
|
@ -57,6 +57,7 @@ class FunctionInfo extends SourceManipulationInfo {
|
|||
/**
|
||||
* @see org.eclipse.cdt.internal.core.model.SourceManipulationInfo#hasSameContentsAs(org.eclipse.cdt.internal.core.model.SourceManipulationInfo)
|
||||
*/
|
||||
@Override
|
||||
public boolean hasSameContentsAs(SourceManipulationInfo otherInfo) {
|
||||
return (super.hasSameContentsAs(otherInfo)
|
||||
&& (this.isStatic() == ((FunctionInfo)otherInfo).isStatic())
|
||||
|
|
|
@ -93,6 +93,7 @@ public class Include extends SourceManipulation implements IInclude {
|
|||
/*
|
||||
* @see org.eclipse.cdt.internal.core.model.CElement#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (other instanceof IInclude && equals(this, (IInclude) other)) {
|
||||
if (other instanceof Include) {
|
||||
|
|
|
@ -49,6 +49,7 @@ public class IncludeEntry extends APathEntry implements IIncludeEntry {
|
|||
return isSystemInclude;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof IIncludeEntry) {
|
||||
IIncludeEntry otherEntry = (IIncludeEntry) obj;
|
||||
|
@ -116,6 +117,7 @@ public class IncludeEntry extends APathEntry implements IIncludeEntry {
|
|||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(super.toString());
|
||||
|
|
|
@ -40,6 +40,7 @@ public class IncludeFileEntry extends APathEntry implements IIncludeFileEntry {
|
|||
return includeFilePath;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof IIncludeFileEntry) {
|
||||
IIncludeFileEntry otherEntry = (IIncludeFileEntry) obj;
|
||||
|
@ -104,6 +105,7 @@ public class IncludeFileEntry extends APathEntry implements IIncludeFileEntry {
|
|||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(super.toString());
|
||||
|
|
|
@ -59,6 +59,7 @@ public class IncludeReference extends Openable implements IIncludeReference {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.model.ICElement#getResource()
|
||||
*/
|
||||
@Override
|
||||
public IResource getResource() {
|
||||
return null;
|
||||
}
|
||||
|
@ -66,6 +67,7 @@ public class IncludeReference extends Openable implements IIncludeReference {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.CElement#createElementInfo()
|
||||
*/
|
||||
@Override
|
||||
protected CElementInfo createElementInfo() {
|
||||
return new OpenableInfo(this);
|
||||
}
|
||||
|
@ -80,6 +82,7 @@ public class IncludeReference extends Openable implements IIncludeReference {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.internal.core.model.Openable#buildStructure(org.eclipse.cdt.internal.core.model.OpenableInfo, org.eclipse.core.runtime.IProgressMonitor, java.util.Map, org.eclipse.core.resources.IResource)
|
||||
*/
|
||||
@Override
|
||||
protected boolean buildStructure(OpenableInfo info, IProgressMonitor pm, Map newElements, IResource underlyingResource) throws CModelException {
|
||||
return computeChildren(info, underlyingResource);
|
||||
}
|
||||
|
@ -144,6 +147,7 @@ public class IncludeReference extends Openable implements IIncludeReference {
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.model.ICElement#getPath()
|
||||
*/
|
||||
@Override
|
||||
public IPath getPath() {
|
||||
return fPath;
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ public class LanguageDescriptor extends CExtensionDescriptor implements
|
|||
return ids;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId(){
|
||||
if(fId == null)
|
||||
fId = getConfigurationElement().getNamespaceIdentifier() + NAMESPACE_SEPARATOR + super.getId();
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue