Skip to content

Commit 1e77279

Browse files
committed
Added common interface library.
1 parent 7f31b7b commit 1e77279

File tree

4 files changed

+215
-0
lines changed

4 files changed

+215
-0
lines changed

Common/Common.csproj

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{8BD992FD-A3B3-4AF9-9371-5AA14DDFDA68}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>Org.Edgerunner.ANTLR4.Tools.Common</RootNamespace>
11+
<AssemblyName>Edgerunner.ANTLR4.Tools.Common</AssemblyName>
12+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugType>pdbonly</DebugType>
27+
<Optimize>true</Optimize>
28+
<OutputPath>bin\Release\</OutputPath>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="System" />
35+
<Reference Include="System.Core" />
36+
<Reference Include="System.Drawing" />
37+
<Reference Include="System.Xml.Linq" />
38+
<Reference Include="System.Data.DataSetExtensions" />
39+
<Reference Include="Microsoft.CSharp" />
40+
<Reference Include="System.Data" />
41+
<Reference Include="System.Net.Http" />
42+
<Reference Include="System.Xml" />
43+
</ItemGroup>
44+
<ItemGroup>
45+
<Compile Include="IEditorGuide.cs" />
46+
<Compile Include="Properties\AssemblyInfo.cs" />
47+
</ItemGroup>
48+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
49+
</Project>

Common/IEditorGuide.cs

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
#region BSD 3-Clause License
2+
// <copyright file="IEditorGuide.cs" company="Edgerunner.org">
3+
// Copyright 2020
4+
// </copyright>
5+
//
6+
// BSD 3-Clause License
7+
//
8+
// Copyright (c) 2020,
9+
// All rights reserved.
10+
//
11+
// Redistribution and use in source and binary forms, with or without
12+
// modification, are permitted provided that the following conditions are met:
13+
//
14+
// 1. Redistributions of source code must retain the above copyright notice, this
15+
// list of conditions and the following disclaimer.
16+
//
17+
// 2. Redistributions in binary form must reproduce the above copyright notice,
18+
// this list of conditions and the following disclaimer in the documentation
19+
// and/or other materials provided with the distribution.
20+
//
21+
// 3. Neither the name of the copyright holder nor the names of its
22+
// contributors may be used to endorse or promote products derived from
23+
// this software without specific prior written permission.
24+
//
25+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28+
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
29+
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30+
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31+
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32+
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33+
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35+
#endregion
36+
37+
using System.Drawing;
38+
39+
namespace Org.Edgerunner.ANTLR4.Tools.Common
40+
{
41+
public interface IEditorGuide
42+
{
43+
/// <summary>
44+
/// Gets the name of the grammar.
45+
/// </summary>
46+
/// <value>The name of the grammar.</value>
47+
string GrammarName { get; }
48+
49+
/// <summary>
50+
/// Gets a value indicating whether to enable automatic indent.
51+
/// </summary>
52+
/// <value><c>true</c> if automatic indentation enabled; otherwise, <c>false</c>.</value>
53+
bool EnableAutoIndent { get; }
54+
55+
/// <summary>
56+
/// Gets a value indicating whether to enable bracket autocomplete.
57+
/// </summary>
58+
/// <value><c>true</c> if bracket autocomplete is enabled; otherwise, <c>false</c>.</value>
59+
bool EnableBracketAutocomplete { get; }
60+
61+
/// <summary>
62+
/// Gets a value indicating whether to enable word wrap.
63+
/// </summary>
64+
/// <value><c>true</c> if word wrap is enabled; otherwise, <c>false</c>.</value>
65+
bool EnableWordWrap { get; }
66+
67+
/// <summary>
68+
/// Gets the color of the line number.
69+
/// </summary>
70+
/// <value>The color of the line number.</value>
71+
Color LineNumberColor { get; }
72+
73+
/// <summary>
74+
/// Gets the color of the foreground text.
75+
/// </summary>
76+
/// <value>The color of the foreground text.</value>
77+
Color ForeColor { get; }
78+
79+
/// <summary>
80+
/// Gets the color of the background.
81+
/// </summary>
82+
/// <value>The color of the background.</value>
83+
Color BackColor { get; }
84+
85+
/// <summary>
86+
/// Gets the color of the caret.
87+
/// </summary>
88+
/// <value>The color of the caret.</value>
89+
Color CaretColor { get; }
90+
91+
/// <summary>
92+
/// Gets the color of the selected text blocks.
93+
/// </summary>
94+
/// <value>The color of the selected text blocks.</value>
95+
Color SelectionColor { get; }
96+
97+
/// <summary>
98+
/// Gets the color to use for parsing errors.
99+
/// </summary>
100+
/// <value>The color of the error.</value>
101+
Color ErrorColor { get; }
102+
103+
/// <summary>
104+
/// Gets the foreground brush to use for the token.
105+
/// </summary>
106+
/// <param name="tokenTypeName">Name of the token type.</param>
107+
/// <returns>The <see cref="Brush"/> to use.</returns>
108+
Brush GetTokenForegroundBrush(string tokenTypeName);
109+
110+
/// <summary>
111+
/// Gets the background brush to use for the token.
112+
/// </summary>
113+
/// <param name="tokenTypeName">Name of the token type.</param>
114+
/// <returns>The <see cref="Brush"/> to use.</returns>
115+
Brush GetTokenBackgroundBrush(string tokenTypeName);
116+
117+
/// <summary>
118+
/// Gets the FontStyle to use for the token.
119+
/// </summary>
120+
/// <param name="tokenTypeName">Name of the token type.</param>
121+
/// <returns>The <see cref="FontStyle"/> to use.</returns>
122+
FontStyle GetTokenFontStyle(string tokenTypeName);
123+
}
124+
}

Common/Properties/AssemblyInfo.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("Common")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("Common")]
13+
[assembly: AssemblyCopyright("Copyright © 2020")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("8bd992fd-a3b3-4af9-9371-5aa14ddfda68")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]

Grun.Net.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1919
EndProject
2020
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Code Grapher", "Code Grapher\Code Grapher.csproj", "{EC6F674C-4D48-40C4-B28B-85627C1EA3CE}"
2121
EndProject
22+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "Common\Common.csproj", "{8BD992FD-A3B3-4AF9-9371-5AA14DDFDA68}"
23+
EndProject
2224
Global
2325
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2426
Debug|Any CPU = Debug|Any CPU
@@ -41,6 +43,10 @@ Global
4143
{EC6F674C-4D48-40C4-B28B-85627C1EA3CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
4244
{EC6F674C-4D48-40C4-B28B-85627C1EA3CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
4345
{EC6F674C-4D48-40C4-B28B-85627C1EA3CE}.Release|Any CPU.Build.0 = Release|Any CPU
46+
{8BD992FD-A3B3-4AF9-9371-5AA14DDFDA68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47+
{8BD992FD-A3B3-4AF9-9371-5AA14DDFDA68}.Debug|Any CPU.Build.0 = Debug|Any CPU
48+
{8BD992FD-A3B3-4AF9-9371-5AA14DDFDA68}.Release|Any CPU.ActiveCfg = Release|Any CPU
49+
{8BD992FD-A3B3-4AF9-9371-5AA14DDFDA68}.Release|Any CPU.Build.0 = Release|Any CPU
4450
EndGlobalSection
4551
GlobalSection(SolutionProperties) = preSolution
4652
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)