<?xml version="1.0" encoding="utf-8"?>
<Rule Name="Antlr3" DisplayName="File Properties" PageTemplate="generic" Description="File Properties" xmlns="http://schemas.microsoft.com/build/2009/properties">
  <Rule.DataSource>
    <DataSource Persistence="ProjectFile" ItemType="Antlr3" HasConfigurationCondition="False" SourceOfDefaultValue="AfterContext" />
  </Rule.DataSource>

  <Rule.Categories>
    <Category Name="Advanced" DisplayName="Advanced" />
    <Category Name="Misc" DisplayName="Misc" />
    <Category Name="ANTLR" DisplayName="ANTLR" />
  </Rule.Categories>

  <StringProperty
    Category="ANTLR"
    Name="TargetLanguage"
    DisplayName="Language Target"
    Default="(Not Set)"
    Description="Explicitly specifies the grammar's target language. If set, this property overrides any value specified within the grammar itself." />
  <BoolProperty
    Category="ANTLR"
    Name="DebugGrammar"
    DisplayName="Debug Grammar"
    Default="false"
    Description="Builds a debug version of the grammar. Note that this feature may not be available for all language targets." />
  <BoolProperty
    Category="ANTLR"
    Name="ProfileGrammar"
    DisplayName="Profile Grammar"
    Default="false"
    Description="Builds a version of the grammar for profiling. Note that this feature may not be available for all language targets." />

  <!--
    The rest of these properties are not ANTLR-specific, but CPS provides no way to inherit properties, so if we fail to
    include them then they will just disappear.
  -->

  <DynamicEnumProperty Name="{}{ItemType}" DisplayName="Build Action"  Category="Advanced"
                   Description="How the file relates to the build and deployment processes."
                   EnumProvider="ItemTypes" />
  <EnumProperty
    Name="CopyToOutputDirectory"
    DisplayName="Copy to Output Directory"
    Category="Advanced"
    Description="Specifies the source file will be copied to the output directory.">
    <EnumValue Name="Never" DisplayName="Do not copy" />
    <EnumValue Name="Always" DisplayName="Copy always" />
    <EnumValue Name="PreserveNewest" DisplayName="Copy if newer" />
  </EnumProperty>

  <StringProperty
    Name="Generator"
    Category="Advanced"
    DisplayName="Custom Tool"
    Description="Specifies the tool that transforms a file at design time and places the output of that transformation into another file. For example, a dataset (.xsd) file comes with a default custom tool." />
  <StringProperty
    Name="CustomToolNamespace"
    Category="Advanced"
    DisplayName="Custom Tool Namespace"
    Description="The namespace into which the output of the custom tool is placed." />

  <StringProperty
    Name="Identity"
    Visible="false"
    ReadOnly="true"
    Category="Misc"
    Description="The item specified in the Include attribute.">
    <StringProperty.DataSource>
      <DataSource Persistence="Intrinsic" ItemType="Antlr3" PersistedName="Identity" SourceOfDefaultValue="AfterContext" />
    </StringProperty.DataSource>
  </StringProperty>

  <StringProperty
    Name="FullPath"
    DisplayName="Full Path"
    ReadOnly="true"
    Category="Misc"
    Description="Location of the file.">
    <StringProperty.DataSource>
      <DataSource Persistence="Intrinsic" ItemType="Antlr3" PersistedName="FullPath" SourceOfDefaultValue="AfterContext" />
    </StringProperty.DataSource>
  </StringProperty>

  <StringProperty
    Name="FileNameAndExtension"
    DisplayName="File Name"
    ReadOnly="true"
    Category="Misc"
    Description="Name of the file or folder.">
    <StringProperty.DataSource>
      <DataSource Persistence="Intrinsic" ItemType="Antlr3" PersistedName="FileNameAndExtension" SourceOfDefaultValue="AfterContext" />
    </StringProperty.DataSource>
  </StringProperty>

  <StringProperty Name="URL" ReadOnly="true" Visible="false">
    <StringProperty.DataSource>
      <DataSource Persistence="Intrinsic" ItemType="Antlr3" PersistedName="FullPath" SourceOfDefaultValue="AfterContext" />
    </StringProperty.DataSource>
  </StringProperty>
  <BoolProperty Name="Visible" Visible="false" />
  <StringProperty Name="DependentUpon" Visible="false" />
  <StringProperty Name="Link" Visible="false">
    <StringProperty.DataSource>
      <DataSource PersistenceStyle="Attribute" SourceOfDefaultValue="AfterContext" />
    </StringProperty.DataSource>
  </StringProperty>
  <StringProperty Name="Extension" Visible="False" ReadOnly="true">
    <StringProperty.DataSource>
      <DataSource Persistence="Intrinsic" ItemType="Antlr3" PersistedName="Extension" SourceOfDefaultValue="AfterContext" />
    </StringProperty.DataSource>
  </StringProperty>
  <StringProperty Name="LastGenOutput" Visible="false" Description="The filename of the last file generated as a result of the SFG." />
  <BoolProperty Name="DesignTime" Visible="false" Description="A value indicating whether this file has a designer." />
  <BoolProperty Name="AutoGen" Visible="false" Description="A value indicating whether this is a generated file." />
  <StringProperty Name="CustomTool" Visible="false" Description="DTE Property for accessing the Generator property.">
    <StringProperty.DataSource>
      <DataSource Persistence="ProjectFile" ItemType="Antlr3" PersistedName="Generator" HasConfigurationCondition="False" SourceOfDefaultValue="AfterContext" />
    </StringProperty.DataSource>
  </StringProperty>
</Rule>
