Changeset 14985


Ignore:
Timestamp:
05/16/17 09:26:56 (22 months ago)
Author:
jkarder
Message:

#2520: worked on persistence code fix

  • split existing analyzer and code fix
  • added analyzer and code fix for missing storable ctors
Location:
trunk/tools/PersistenceCodeFix/PersistenceCodeFix
Files:
11 added
3 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix.csproj

    r14933 r14985  
    3535  </PropertyGroup>
    3636  <ItemGroup>
    37     <Compile Include="CodeFixProvider.cs" />
    38     <Compile Include="DiagnosticAnalyzer.cs" />
     37    <Compile Include="Analyzers\DiagnosticIds.cs" />
     38    <Compile Include="Analyzers\MissingStorableConstructor\MissingStorableConstructorAnalyzer.cs" />
     39    <Compile Include="Analyzers\MissingStorableConstructor\MissingStorableConstructorFix.cs" />
     40    <Compile Include="Analyzers\ObsoleteStorableClass\ObsoleteStorableClassAnalyzer.cs" />
     41    <Compile Include="Analyzers\ObsoleteStorableClass\ObsoleteStorableClassFix.cs" />
     42    <Compile Include="Analyzers\MissingStorableType\MissingStorableTypeAnalyzer.cs" />
     43    <Compile Include="Analyzers\MissingStorableType\MissingStorableTypeFix.cs" />
    3944    <Compile Include="Properties\AssemblyInfo.cs" />
    4045    <Compile Include="Resources.Designer.cs">
  • trunk/tools/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix/Resources.Designer.cs

    r14933 r14985  
    6363       
    6464        /// <summary>
     65        ///   Looks up a localized string similar to All StorableTypes should have a storable constructor.
     66        /// </summary>
     67        internal static string MissingStorableConstructorAnalyzerDescription {
     68            get {
     69                return ResourceManager.GetString("MissingStorableConstructorAnalyzerDescription", resourceCulture);
     70            }
     71        }
     72       
     73        /// <summary>
     74        ///   Looks up a localized string similar to Type &apos;{0}&apos; has no storable constructor.
     75        /// </summary>
     76        internal static string MissingStorableConstructorAnalyzerMessageFormat {
     77            get {
     78                return ResourceManager.GetString("MissingStorableConstructorAnalyzerMessageFormat", resourceCulture);
     79            }
     80        }
     81       
     82        /// <summary>
     83        ///   Looks up a localized string similar to Missing storable constructor.
     84        /// </summary>
     85        internal static string MissingStorableConstructorAnalyzerTitle {
     86            get {
     87                return ResourceManager.GetString("MissingStorableConstructorAnalyzerTitle", resourceCulture);
     88            }
     89        }
     90       
     91        /// <summary>
    6592        ///   Looks up a localized string similar to All types should be marked with a StorableType attribute.
    6693        /// </summary>
     
    81108       
    82109        /// <summary>
    83         ///   Looks up a localized string similar to Missing StorableTypeAttribute.
     110        ///   Looks up a localized string similar to Missing StorableType attribute.
    84111        /// </summary>
    85112        internal static string MissingStorableTypeAnalyzerTitle {
     
    88115            }
    89116        }
     117       
     118        /// <summary>
     119        ///   Looks up a localized string similar to The StorableClass attribute is obsolete; Use the StorableType attribute instead.
     120        /// </summary>
     121        internal static string ObsoleteStorableClassAnalyzerDescription {
     122            get {
     123                return ResourceManager.GetString("ObsoleteStorableClassAnalyzerDescription", resourceCulture);
     124            }
     125        }
     126       
     127        /// <summary>
     128        ///   Looks up a localized string similar to Type &apos;{0}&apos; should be marked as StorableType instead of StorableClass.
     129        /// </summary>
     130        internal static string ObsoleteStorableClassAnalyzerMessageFormat {
     131            get {
     132                return ResourceManager.GetString("ObsoleteStorableClassAnalyzerMessageFormat", resourceCulture);
     133            }
     134        }
     135       
     136        /// <summary>
     137        ///   Looks up a localized string similar to Obsolete StorableClass attribute.
     138        /// </summary>
     139        internal static string ObsoleteStorableClassAnalyzerTitle {
     140            get {
     141                return ResourceManager.GetString("ObsoleteStorableClassAnalyzerTitle", resourceCulture);
     142            }
     143        }
    90144    }
    91145}
  • trunk/tools/PersistenceCodeFix/PersistenceCodeFix/PersistenceCodeFix/Resources.resx

    r14933 r14985  
    118118    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
    119119  </resheader>
     120  <data name="MissingStorableConstructorAnalyzerDescription" xml:space="preserve">
     121    <value>All StorableTypes should have a storable constructor</value>
     122  </data>
     123  <data name="MissingStorableConstructorAnalyzerMessageFormat" xml:space="preserve">
     124    <value>Type '{0}' has no storable constructor</value>
     125  </data>
     126  <data name="MissingStorableConstructorAnalyzerTitle" xml:space="preserve">
     127    <value>Missing storable constructor</value>
     128  </data>
    120129  <data name="MissingStorableTypeAnalyzerDescription" xml:space="preserve">
    121130    <value>All types should be marked with a StorableType attribute</value>
     
    125134  </data>
    126135  <data name="MissingStorableTypeAnalyzerTitle" xml:space="preserve">
    127     <value>Missing StorableTypeAttribute</value>
     136    <value>Missing StorableType attribute</value>
     137  </data>
     138  <data name="ObsoleteStorableClassAnalyzerDescription" xml:space="preserve">
     139    <value>The StorableClass attribute is obsolete; Use the StorableType attribute instead</value>
     140  </data>
     141  <data name="ObsoleteStorableClassAnalyzerMessageFormat" xml:space="preserve">
     142    <value>Type '{0}' should be marked as StorableType instead of StorableClass</value>
     143  </data>
     144  <data name="ObsoleteStorableClassAnalyzerTitle" xml:space="preserve">
     145    <value>Obsolete StorableClass attribute</value>
    128146  </data>
    129147</root>
Note: See TracChangeset for help on using the changeset viewer.