<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) ZeroC, Inc. -->
<Rule
    Name="SliceCompileFile"
    DisplayName="Slice Tools for C++"
    PageTemplate="generic"
    Description="Slice Tools for C++ file settings"
    xmlns="http://schemas.microsoft.com/build/2009/properties">

    <Rule.DataSource>
        <DataSource Persistence="ProjectFile"
                    ItemType="SliceCompile"
                    Label="SliceTools"
                    HasConfigurationCondition="false"/>
    </Rule.DataSource>

    <StringProperty
        Name="OutputDir"
        DisplayName="Output Directory"
        Description="Directory of C++ source files generated by slice2cpp."
        Subtype="folder"
        Category="General">
        <StringProperty.DataSource>
            <DataSource Persistence="ProjectFile"
                        ItemType="SliceCompile"
                        Label="SliceTools"
                        HasConfigurationCondition="false"/>
        </StringProperty.DataSource>
    </StringProperty>

    <StringProperty
        Name="HeaderOutputDir"
        DisplayName="Header Output Directory"
        Description="Directory of C++ header files generated by slice2cpp; if left unset, use Output Directory."
        Subtype="folder"
        Category="General">
        <StringProperty.DataSource>
            <DataSource Persistence="ProjectFile"
                        ItemType="SliceCompile"
                        Label="SliceTools"
                        HasConfigurationCondition="false"/>
        </StringProperty.DataSource>
    </StringProperty>

    <!-- Parsing Options -->
    <StringListProperty
        Name="IncludeDirectories"
        DisplayName="Include Directories"
        Description="Specifies one or more directories to add to the Slice include path; use semi-colons (;) as directory separators."
        Subtype="folder"
        Category="General">
        <StringListProperty.DataSource>
            <DataSource Persistence="ProjectFile"
                        ItemType="SliceCompile"
                        Label="SliceTools"
                        HasConfigurationCondition="false"/>
        </StringListProperty.DataSource>
    </StringListProperty>

    <!-- Output Options -->
    <StringProperty
        Name="BaseDirectoryForGeneratedInclude"
        DisplayName="Base Directory For Generated #include"
        Category="General"
        Description="Base directory for #include directives in C++ files generated by slice2cpp.">
        <StringProperty.DataSource>
            <DataSource Persistence="ProjectFile"
                        ItemType="SliceCompile"
                        Label="SliceTools"
                        HasConfigurationCondition="false"/>
        </StringProperty.DataSource>
    </StringProperty>

    <EnumProperty
        Name="HeaderExt"
        DisplayName="Generated Header Extension"
        Description="File extension for C++ header files generated by slice2cpp."
        Category="General">
        <EnumValue Name="h"
                   DisplayName=".h"
                   Description=".h"/>
        <EnumValue Name="hpp"
                   DisplayName=".hpp"
                   Description=".hpp"/>
        <EnumValue Name="hh"
                   DisplayName=".hh"
                   Description=".hh"/>
        <EnumValue Name="hxx"
                   DisplayName=".hxx"
                   Description=".hxx"/>
        <EnumProperty.DataSource>
            <DataSource Persistence="ProjectFile"
                        ItemType="SliceCompile"
                        Label="SliceTools"
                        HasConfigurationCondition="false"/>
        </EnumProperty.DataSource>
    </EnumProperty>

    <EnumProperty
        Name="SourceExt"
        DisplayName="Generated Source Extension"
        Description="File extension for C++ source files generated by slice2cpp."
        Category="General">
        <EnumValue Name="cpp"
                   DisplayName=".cpp"
                   Description=".cpp"/>
        <EnumValue Name="cc"
                   DisplayName=".cc"
                   Description=".cc"/>
        <EnumValue Name="cxx"
                   DisplayName=".cxx"
                   Description=".cxx"/>
        <EnumProperty.DataSource>
            <DataSource Persistence="ProjectFile"
                        ItemType="SliceCompile"
                        Label="SliceTools"
                        HasConfigurationCondition="false"/>
        </EnumProperty.DataSource>
    </EnumProperty>

    <StringListProperty
        DisplayName="Additional Options"
        Name="AdditionalOptions"
        Description="Additional command-line options to pass to slice2cpp.">
        <StringListProperty.DataSource>
            <DataSource Persistence="ProjectFile"
                        ItemType="SliceCompile"
                        Label="SliceTools"
                        HasConfigurationCondition="false"/>
        </StringListProperty.DataSource>
    </StringListProperty>

    <!-- BUGFIX: With Visual Studio 2017 we need to have at least one property with a configuration condition otherwise our
         property page will not show up -->
    <StringProperty
        Name="Dummy"
        Visible="False">
        <StringProperty.DataSource>
            <DataSource Persistence="ProjectFile"
                        ItemType="SliceCompile"
                        Label="SliceTools"
                        HasConfigurationCondition="true"/>
        </StringProperty.DataSource>
    </StringProperty>
</Rule>
