This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the main visitor implementation | |
class FooVisitor extends SomeBaseVisitor<T> { | |
} | |
// extend the visitor with hooks for a listener | |
class FooListenerVisitor extends FooVisitor { | |
private ParseTreeListener listener; | |
public FooListenerVisitor(ParseTreeListener listener) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grammar example; | |
start: keyword+ EOF; | |
keyword: A1 | |
| A2 | |
| A3 | |
| A4 | |
| A5 | |
| A6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace JavaLanguageService.Extensions | |
{ | |
using System; | |
using System.Diagnostics.Contracts; | |
using System.Runtime.InteropServices; | |
using Microsoft.VisualStudio; | |
using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; | |
public static class ServiceProviderExtensions | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace JavaLanguageService.Panes | |
{ | |
using System; | |
using System.Diagnostics.Contracts; | |
using Microsoft.VisualStudio; | |
using Microsoft.VisualStudio.Shell.Interop; | |
internal sealed class VsOutputWindowPaneAdapter : IOutputWindowPane, IDisposable | |
{ | |
private IVsOutputWindowPane _pane; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace JavaLanguageService.Panes | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel.Composition; | |
using System.Linq; | |
using JavaLanguageService.Extensions; | |
using Microsoft.VisualStudio; | |
using Microsoft.VisualStudio.Shell.Interop; | |
using IOleServiceProvider = Microsoft.VisualStudio.OLE.Interop.IServiceProvider; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace JavaLanguageService.Panes | |
{ | |
internal interface IOutputWindowDefinitionMetadata | |
{ | |
string Name | |
{ | |
get; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace JavaLanguageService.Panes | |
{ | |
public static class PredefinedOutputWindowPanes | |
{ | |
public static readonly string General = "General"; | |
public static readonly string Debug = "Debug"; | |
public static readonly string Build = "Build"; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace JavaLanguageService.Panes | |
{ | |
public sealed class OutputWindowDefinition | |
{ | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace JavaLanguageService.Panes | |
{ | |
public interface IOutputWindowService | |
{ | |
IOutputWindowPane TryGetPane(string name); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace JavaLanguageService.Panes | |
{ | |
using System; | |
public interface IOutputWindowPane : IDisposable | |
{ | |
string Name | |
{ | |
get; | |
set; |