Refactory: remove unused classes, imports, fields and methods.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / impl / CompilerOptions.java
index 409f590..c9de5be 100644 (file)
@@ -13,7 +13,7 @@ package net.sourceforge.phpdt.internal.compiler.impl;
 import java.io.ByteArrayInputStream;
 import java.io.InputStreamReader;
 import java.io.UnsupportedEncodingException;
-import java.util.HashMap;
+//import java.util.HashMap;
 import java.util.Map;
 
 import net.sourceforge.phpdt.core.compiler.CharOperation;
@@ -382,146 +382,146 @@ public class CompilerOptions implements ProblemReasons, ProblemSeverities,
                set(settings);
        }
 
-       public Map getMap() {
-               Map optionsMap = new HashMap(30);
-               optionsMap.put(OPTION_PHPIncludeNotExistWarning,
-                               getSeverityString(PHPIncludeNotExistWarning));
-               optionsMap.put(OPTION_PHPVarDeprecatedWarning,
-                               getSeverityString(PHPVarDeprecatedWarning));
-               optionsMap.put(OPTION_PHPBadStyleKeywordWarning,
-                               getSeverityString(PHPBadStyleKeywordWarning));
-               optionsMap.put(OPTION_PHPBadStyleUppercaseIdentifierWarning,
-                               getSeverityString(PHPBadStyleUppercaseIdentifierWarning));
-               optionsMap.put(OPTION_UninitializedLocalVariableWarning,
-                               getSeverityString(UninitializedLocalVariableWarning));
-               optionsMap.put(OPTION_CodeCannotBeReachedWarning,
-                               getSeverityString(CodeCannotBeReachedWarning));
-
-               optionsMap.put(OPTION_LocalVariableAttribute,
-                               (this.produceDebugAttributes & Vars) != 0 ? GENERATE
-                                               : DO_NOT_GENERATE);
-               optionsMap.put(OPTION_LineNumberAttribute,
-                               (this.produceDebugAttributes & Lines) != 0 ? GENERATE
-                                               : DO_NOT_GENERATE);
-               optionsMap.put(OPTION_SourceFileAttribute,
-                               (this.produceDebugAttributes & Source) != 0 ? GENERATE
-                                               : DO_NOT_GENERATE);
-               // optionsMap.put(OPTION_PreserveUnusedLocal,
-               // this.preserveAllLocalVariables ? PRESERVE : OPTIMIZE_OUT);
-               optionsMap.put(OPTION_DocCommentSupport,
-                               this.docCommentSupport ? ENABLED : DISABLED);
-               optionsMap.put(OPTION_ReportMethodWithConstructorName,
-                               getSeverityString(MethodWithConstructorName));
-               optionsMap.put(OPTION_ReportOverridingPackageDefaultMethod,
-                               getSeverityString(OverriddenPackageDefaultMethod));
-               optionsMap.put(OPTION_ReportDeprecation,
-                               getSeverityString(UsingDeprecatedAPI));
-               optionsMap
-                               .put(OPTION_ReportDeprecationInDeprecatedCode,
-                                               this.reportDeprecationInsideDeprecatedCode ? ENABLED
-                                                               : DISABLED);
-               optionsMap.put(OPTION_ReportDeprecationWhenOverridingDeprecatedMethod,
-                               this.reportDeprecationWhenOverridingDeprecatedMethod ? ENABLED
-                                               : DISABLED);
-               optionsMap.put(OPTION_ReportHiddenCatchBlock,
-                               getSeverityString(MaskedCatchBlock));
-               optionsMap.put(OPTION_ReportUnusedLocal,
-                               getSeverityString(UnusedLocalVariable));
-               optionsMap.put(OPTION_ReportUnusedParameter,
-                               getSeverityString(UnusedArgument));
-               optionsMap.put(OPTION_ReportUnusedImport,
-                               getSeverityString(UnusedImport));
-               optionsMap.put(OPTION_ReportSyntheticAccessEmulation,
-                               getSeverityString(AccessEmulation));
-               optionsMap.put(OPTION_ReportNoEffectAssignment,
-                               getSeverityString(NoEffectAssignment));
-               optionsMap.put(OPTION_ReportNonExternalizedStringLiteral,
-                               getSeverityString(NonExternalizedString));
-               optionsMap.put(OPTION_ReportNoImplicitStringConversion,
-                               getSeverityString(NoImplicitStringConversion));
-               optionsMap.put(OPTION_ReportNonStaticAccessToStatic,
-                               getSeverityString(NonStaticAccessToStatic));
-               optionsMap.put(OPTION_ReportIndirectStaticAccess,
-                               getSeverityString(IndirectStaticAccess));
-               optionsMap.put(OPTION_ReportIncompatibleNonInheritedInterfaceMethod,
-                               getSeverityString(IncompatibleNonInheritedInterfaceMethod));
-               optionsMap.put(OPTION_ReportUnusedPrivateMember,
-                               getSeverityString(UnusedPrivateMember));
-               optionsMap.put(OPTION_ReportLocalVariableHiding,
-                               getSeverityString(LocalVariableHiding));
-               optionsMap
-                               .put(OPTION_ReportFieldHiding, getSeverityString(FieldHiding));
-               optionsMap.put(OPTION_ReportPossibleAccidentalBooleanAssignment,
-                               getSeverityString(AccidentalBooleanAssign));
-               optionsMap.put(OPTION_ReportSuperfluousSemicolon,
-                               getSeverityString(SuperfluousSemicolon));
-               optionsMap.put(OPTION_ReportAssertIdentifier,
-                               getSeverityString(AssertUsedAsAnIdentifier));
-               optionsMap.put(OPTION_ReportUndocumentedEmptyBlock,
-                               getSeverityString(UndocumentedEmptyBlock));
-               optionsMap.put(OPTION_ReportUnnecessaryTypeCheck,
-                               getSeverityString(UnnecessaryTypeCheck));
-               optionsMap.put(OPTION_ReportInvalidJavadoc,
-                               getSeverityString(InvalidJavadoc));
-               optionsMap.put(OPTION_ReportInvalidJavadocTagsVisibility,
-                               getVisibilityString(this.reportInvalidJavadocTagsVisibility));
-               optionsMap.put(OPTION_ReportInvalidJavadocTags,
-                               this.reportInvalidJavadocTags ? ENABLED : DISABLED);
-               optionsMap.put(OPTION_ReportMissingJavadocTags,
-                               getSeverityString(MissingJavadocTags));
-               optionsMap.put(OPTION_ReportMissingJavadocTagsVisibility,
-                               getVisibilityString(this.reportMissingJavadocTagsVisibility));
-               optionsMap.put(OPTION_ReportMissingJavadocTagsOverriding,
-                               this.reportMissingJavadocTagsOverriding ? ENABLED : DISABLED);
-               optionsMap.put(OPTION_ReportMissingJavadocComments,
-                               getSeverityString(MissingJavadocComments));
-               optionsMap
-                               .put(
-                                               OPTION_ReportMissingJavadocCommentsVisibility,
-                                               getVisibilityString(this.reportMissingJavadocCommentsVisibility));
-               optionsMap.put(OPTION_ReportMissingJavadocCommentsOverriding,
-                               this.reportMissingJavadocCommentsOverriding ? ENABLED
-                                               : DISABLED);
-               optionsMap.put(OPTION_ReportFinallyBlockNotCompletingNormally,
-                               getSeverityString(FinallyBlockNotCompleting));
-               optionsMap.put(OPTION_ReportUnusedDeclaredThrownException,
-                               getSeverityString(UnusedDeclaredThrownException));
-               optionsMap
-                               .put(
-                                               OPTION_ReportUnusedDeclaredThrownExceptionWhenOverriding,
-                                               this.reportUnusedDeclaredThrownExceptionWhenOverriding ? ENABLED
-                                                               : DISABLED);
-               optionsMap.put(OPTION_ReportUnqualifiedFieldAccess,
-                               getSeverityString(UnqualifiedFieldAccess));
-               // optionsMap.put(OPTION_Compliance,
-               // versionFromJdkLevel(this.complianceLevel));
-               // optionsMap.put(OPTION_Source, versionFromJdkLevel(this.sourceLevel));
-               // optionsMap.put(OPTION_TargetPlatform,
-               // versionFromJdkLevel(this.targetJDK));
-               if (this.defaultEncoding != null) {
-                       optionsMap.put(OPTION_Encoding, this.defaultEncoding);
-               }
-               optionsMap
-                               .put(
-                                               OPTION_TaskTags,
-                                               this.taskTags == null ? "" : new String(CharOperation.concatWith(this.taskTags, ','))); //$NON-NLS-1$
-               optionsMap
-                               .put(
-                                               OPTION_TaskPriorities,
-                                               this.taskPriorites == null ? "" : new String(CharOperation.concatWith(this.taskPriorites, ','))); //$NON-NLS-1$
-               optionsMap.put(OPTION_ReportUnusedParameterWhenImplementingAbstract,
-                               this.reportUnusedParameterWhenImplementingAbstract ? ENABLED
-                                               : DISABLED);
-               optionsMap.put(OPTION_ReportUnusedParameterWhenOverridingConcrete,
-                               this.reportUnusedParameterWhenOverridingConcrete ? ENABLED
-                                               : DISABLED);
-               optionsMap.put(OPTION_ReportSpecialParameterHidingField,
-                               this.reportSpecialParameterHidingField ? ENABLED : DISABLED);
-               optionsMap.put(OPTION_MaxProblemPerUnit, String
-                               .valueOf(this.maxProblemsPerUnit));
-
-               return optionsMap;
-       }
+//     public Map getMap() {
+//             Map optionsMap = new HashMap(30);
+//             optionsMap.put(OPTION_PHPIncludeNotExistWarning,
+//                             getSeverityString(PHPIncludeNotExistWarning));
+//             optionsMap.put(OPTION_PHPVarDeprecatedWarning,
+//                             getSeverityString(PHPVarDeprecatedWarning));
+//             optionsMap.put(OPTION_PHPBadStyleKeywordWarning,
+//                             getSeverityString(PHPBadStyleKeywordWarning));
+//             optionsMap.put(OPTION_PHPBadStyleUppercaseIdentifierWarning,
+//                             getSeverityString(PHPBadStyleUppercaseIdentifierWarning));
+//             optionsMap.put(OPTION_UninitializedLocalVariableWarning,
+//                             getSeverityString(UninitializedLocalVariableWarning));
+//             optionsMap.put(OPTION_CodeCannotBeReachedWarning,
+//                             getSeverityString(CodeCannotBeReachedWarning));
+//
+//             optionsMap.put(OPTION_LocalVariableAttribute,
+//                             (this.produceDebugAttributes & Vars) != 0 ? GENERATE
+//                                             : DO_NOT_GENERATE);
+//             optionsMap.put(OPTION_LineNumberAttribute,
+//                             (this.produceDebugAttributes & Lines) != 0 ? GENERATE
+//                                             : DO_NOT_GENERATE);
+//             optionsMap.put(OPTION_SourceFileAttribute,
+//                             (this.produceDebugAttributes & Source) != 0 ? GENERATE
+//                                             : DO_NOT_GENERATE);
+//             // optionsMap.put(OPTION_PreserveUnusedLocal,
+//             // this.preserveAllLocalVariables ? PRESERVE : OPTIMIZE_OUT);
+//             optionsMap.put(OPTION_DocCommentSupport,
+//                             this.docCommentSupport ? ENABLED : DISABLED);
+//             optionsMap.put(OPTION_ReportMethodWithConstructorName,
+//                             getSeverityString(MethodWithConstructorName));
+//             optionsMap.put(OPTION_ReportOverridingPackageDefaultMethod,
+//                             getSeverityString(OverriddenPackageDefaultMethod));
+//             optionsMap.put(OPTION_ReportDeprecation,
+//                             getSeverityString(UsingDeprecatedAPI));
+//             optionsMap
+//                             .put(OPTION_ReportDeprecationInDeprecatedCode,
+//                                             this.reportDeprecationInsideDeprecatedCode ? ENABLED
+//                                                             : DISABLED);
+//             optionsMap.put(OPTION_ReportDeprecationWhenOverridingDeprecatedMethod,
+//                             this.reportDeprecationWhenOverridingDeprecatedMethod ? ENABLED
+//                                             : DISABLED);
+//             optionsMap.put(OPTION_ReportHiddenCatchBlock,
+//                             getSeverityString(MaskedCatchBlock));
+//             optionsMap.put(OPTION_ReportUnusedLocal,
+//                             getSeverityString(UnusedLocalVariable));
+//             optionsMap.put(OPTION_ReportUnusedParameter,
+//                             getSeverityString(UnusedArgument));
+//             optionsMap.put(OPTION_ReportUnusedImport,
+//                             getSeverityString(UnusedImport));
+//             optionsMap.put(OPTION_ReportSyntheticAccessEmulation,
+//                             getSeverityString(AccessEmulation));
+//             optionsMap.put(OPTION_ReportNoEffectAssignment,
+//                             getSeverityString(NoEffectAssignment));
+//             optionsMap.put(OPTION_ReportNonExternalizedStringLiteral,
+//                             getSeverityString(NonExternalizedString));
+//             optionsMap.put(OPTION_ReportNoImplicitStringConversion,
+//                             getSeverityString(NoImplicitStringConversion));
+//             optionsMap.put(OPTION_ReportNonStaticAccessToStatic,
+//                             getSeverityString(NonStaticAccessToStatic));
+//             optionsMap.put(OPTION_ReportIndirectStaticAccess,
+//                             getSeverityString(IndirectStaticAccess));
+//             optionsMap.put(OPTION_ReportIncompatibleNonInheritedInterfaceMethod,
+//                             getSeverityString(IncompatibleNonInheritedInterfaceMethod));
+//             optionsMap.put(OPTION_ReportUnusedPrivateMember,
+//                             getSeverityString(UnusedPrivateMember));
+//             optionsMap.put(OPTION_ReportLocalVariableHiding,
+//                             getSeverityString(LocalVariableHiding));
+//             optionsMap
+//                             .put(OPTION_ReportFieldHiding, getSeverityString(FieldHiding));
+//             optionsMap.put(OPTION_ReportPossibleAccidentalBooleanAssignment,
+//                             getSeverityString(AccidentalBooleanAssign));
+//             optionsMap.put(OPTION_ReportSuperfluousSemicolon,
+//                             getSeverityString(SuperfluousSemicolon));
+//             optionsMap.put(OPTION_ReportAssertIdentifier,
+//                             getSeverityString(AssertUsedAsAnIdentifier));
+//             optionsMap.put(OPTION_ReportUndocumentedEmptyBlock,
+//                             getSeverityString(UndocumentedEmptyBlock));
+//             optionsMap.put(OPTION_ReportUnnecessaryTypeCheck,
+//                             getSeverityString(UnnecessaryTypeCheck));
+//             optionsMap.put(OPTION_ReportInvalidJavadoc,
+//                             getSeverityString(InvalidJavadoc));
+//             optionsMap.put(OPTION_ReportInvalidJavadocTagsVisibility,
+//                             getVisibilityString(this.reportInvalidJavadocTagsVisibility));
+//             optionsMap.put(OPTION_ReportInvalidJavadocTags,
+//                             this.reportInvalidJavadocTags ? ENABLED : DISABLED);
+//             optionsMap.put(OPTION_ReportMissingJavadocTags,
+//                             getSeverityString(MissingJavadocTags));
+//             optionsMap.put(OPTION_ReportMissingJavadocTagsVisibility,
+//                             getVisibilityString(this.reportMissingJavadocTagsVisibility));
+//             optionsMap.put(OPTION_ReportMissingJavadocTagsOverriding,
+//                             this.reportMissingJavadocTagsOverriding ? ENABLED : DISABLED);
+//             optionsMap.put(OPTION_ReportMissingJavadocComments,
+//                             getSeverityString(MissingJavadocComments));
+//             optionsMap
+//                             .put(
+//                                             OPTION_ReportMissingJavadocCommentsVisibility,
+//                                             getVisibilityString(this.reportMissingJavadocCommentsVisibility));
+//             optionsMap.put(OPTION_ReportMissingJavadocCommentsOverriding,
+//                             this.reportMissingJavadocCommentsOverriding ? ENABLED
+//                                             : DISABLED);
+//             optionsMap.put(OPTION_ReportFinallyBlockNotCompletingNormally,
+//                             getSeverityString(FinallyBlockNotCompleting));
+//             optionsMap.put(OPTION_ReportUnusedDeclaredThrownException,
+//                             getSeverityString(UnusedDeclaredThrownException));
+//             optionsMap
+//                             .put(
+//                                             OPTION_ReportUnusedDeclaredThrownExceptionWhenOverriding,
+//                                             this.reportUnusedDeclaredThrownExceptionWhenOverriding ? ENABLED
+//                                                             : DISABLED);
+//             optionsMap.put(OPTION_ReportUnqualifiedFieldAccess,
+//                             getSeverityString(UnqualifiedFieldAccess));
+//             // optionsMap.put(OPTION_Compliance,
+//             // versionFromJdkLevel(this.complianceLevel));
+//             // optionsMap.put(OPTION_Source, versionFromJdkLevel(this.sourceLevel));
+//             // optionsMap.put(OPTION_TargetPlatform,
+//             // versionFromJdkLevel(this.targetJDK));
+//             if (this.defaultEncoding != null) {
+//                     optionsMap.put(OPTION_Encoding, this.defaultEncoding);
+//             }
+//             optionsMap
+//                             .put(
+//                                             OPTION_TaskTags,
+//                                             this.taskTags == null ? "" : new String(CharOperation.concatWith(this.taskTags, ','))); //$NON-NLS-1$
+//             optionsMap
+//                             .put(
+//                                             OPTION_TaskPriorities,
+//                                             this.taskPriorites == null ? "" : new String(CharOperation.concatWith(this.taskPriorites, ','))); //$NON-NLS-1$
+//             optionsMap.put(OPTION_ReportUnusedParameterWhenImplementingAbstract,
+//                             this.reportUnusedParameterWhenImplementingAbstract ? ENABLED
+//                                             : DISABLED);
+//             optionsMap.put(OPTION_ReportUnusedParameterWhenOverridingConcrete,
+//                             this.reportUnusedParameterWhenOverridingConcrete ? ENABLED
+//                                             : DISABLED);
+//             optionsMap.put(OPTION_ReportSpecialParameterHidingField,
+//                             this.reportSpecialParameterHidingField ? ENABLED : DISABLED);
+//             optionsMap.put(OPTION_MaxProblemPerUnit, String
+//                             .valueOf(this.maxProblemsPerUnit));
+//
+//             return optionsMap;
+//     }
 
        public int getSeverity(long irritant) {
                if ((this.warningThreshold & irritant) != 0)
@@ -853,9 +853,9 @@ public class CompilerOptions implements ProblemReasons, ProblemSeverities,
                }
        }
 
-       public void setVerboseMode(boolean flag) {
-               this.verbose = flag;
-       }
+//     public void setVerboseMode(boolean flag) {
+//             this.verbose = flag;
+//     }
 
        public String toString() {