Beispiel #1
0
        public LanguageServer(IRPCServer rpcServer)
        {
            this.rpcServer = rpcServer;
            rpcServer.RegisterRequestMethod(CodeActionRequest.Type, CallCodeAction);
            rpcServer.RegisterRequestMethod(CodeLensRequest.Type, CallCodeLens);
            rpcServer.RegisterRequestMethod(CodeLensResolveRequest.Type, CallCodeLensResolve);
            rpcServer.RegisterRequestMethod(CompletionRequest.Type, CallCompletion);
            rpcServer.RegisterRequestMethod(CompletionResolveRequest.Type, CallCompletionResolve);
            rpcServer.RegisterRequestMethod(DocumentHighlightRequest.Type, CallDocumentHighlight);
            rpcServer.RegisterRequestMethod(DocumentSymbolRequest.Type, CallDocumentSymbol);
            rpcServer.RegisterRequestMethod(DocumentFormattingRequest.Type, CallDocumentFormatting);
            rpcServer.RegisterRequestMethod(DocumentOnTypeFormattingRequest.Type, CallDocumentOnTypeFormatting);
            rpcServer.RegisterRequestMethod(DocumentRangeFormattingRequest.Type, CallDocumentRangeFormatting);
            rpcServer.RegisterRequestMethod(DefinitionRequest.Type, CallDefinition);
            rpcServer.RegisterRequestMethod(HoverRequest.Type, CallHoverRequest);
            rpcServer.RegisterRequestMethod(InitializeRequest.Type, CallInitialize);
            rpcServer.RegisterRequestMethod(ReferencesRequest.Type, CallReferences);
            rpcServer.RegisterRequestMethod(RenameRequest.Type, CallRename);
            rpcServer.RegisterRequestMethod(ShutdownRequest.Type, CallShutdown);
            rpcServer.RegisterRequestMethod(SignatureHelpRequest.Type, CallSignatureHelp);
            rpcServer.RegisterRequestMethod(WorkspaceSymbolRequest.Type, CallWorkspaceSymbol);
            rpcServer.RegisterNotificationMethod(DidChangeConfigurationNotification.Type, CallDidChangeConfiguration);
            rpcServer.RegisterNotificationMethod(ExitNotification.Type, CallExit);
            rpcServer.RegisterNotificationMethod(DidChangeWatchedFilesNotification.Type, CallDidChangeWatchedFiles);
            rpcServer.RegisterNotificationMethod(DidChangeTextDocumentNotification.Type, CallDidChangeTextDocument);
            rpcServer.RegisterNotificationMethod(DidCloseTextDocumentNotification.Type, CallDidCloseTextDocument);
            rpcServer.RegisterNotificationMethod(DidOpenTextDocumentNotification.Type, CallDidOpenTextDocument);

            RemoteConsole = new RemoteConsole(rpcServer);
            RemoteWindow = new RemoteWindow(rpcServer);
        }
Beispiel #2
0
        public void CreateRemote()
        {
            RemoteWindow w = new RemoteWindow();

            w.Owner = Application.Current.MainWindow;
            w.ShowDialog();
            if (w.DialogResult == true)
            {
                CreateRemote(w.RemoteName, w.Url, w.UserName, w.Password);
            }
        }
Beispiel #3
0
        public void EditRemote(Remote r)
        {
            RemoteWindow w = new RemoteWindow();

            w.Owner      = Application.Current.MainWindow;
            w.Role       = RemoteWindowRole.Edit;
            w.RemoteName = r.Name;
            w.Url        = r.Url;
            w.UserName   = r.UserName;
            w.Password   = r.Password;
            w.ShowDialog();
            if (w.DialogResult == true)
            {
                EditRemote(r, w.Url, w.UserName, w.Password);
            }
        }
Beispiel #4
0
        public override InitializeResult OnInitialize(InitializeParams parameters)
        {
            // Initialize the workspace
            // TO DO : receive all these configuration properties from the client
            var    rootDirectory = new DirectoryInfo(parameters.rootPath);
            string workspaceName = rootDirectory.Name + "#" + parameters.processId;

            typeCobolWorkspace = new Workspace(workspaceName, rootDirectory.FullName, new string[] { "*.cbl", "*.pgm", "*.cpy", "*.txt", },
                                               Encoding.GetEncoding("iso-8859-1"), EndOfLineDelimiter.CrLfCharacters, 80, ColumnsLayout.CobolReferenceFormat,
                                               new TypeCobolOptions());

            // DEBUG information
            RemoteWindow.ShowInformationMessage("TypeCobol language server was launched !");

            // Return language server capabilities
            var initializeResult = base.OnInitialize(parameters);

            initializeResult.capabilities.textDocumentSync = TextDocumentSyncKind.Incremental;
            initializeResult.capabilities.hoverProvider    = true;
            return(initializeResult);
        }
Beispiel #5
0
 /// <summary>
 ///     Initializes a new instance of a child of the <see cref="SendInputMouse" /> class.
 /// </summary>
 /// <param name="window">The reference of the <see cref="RemoteWindow" /> object.</param>
 public SendInputMouse(RemoteWindow window) : base(window)
 {
 }
Beispiel #6
0
 public RemoteTablet(RemoteTargetTemperature remoteTargetTemperature, RemoteWindow remoteWindow)
 {
     _remoteTargetTemperature = remoteTargetTemperature;
     _remoteWindow            = remoteWindow;
 }
Beispiel #7
0
 protected BaseKeyboard(RemoteWindow window)
 {
     Window = window;
 }
 public MessageKeyboard(RemoteWindow window) : base(window)
 {
 }
Beispiel #9
0
 internal SendInputMouse(RemoteWindow window) : base(window)
 {
 }
 public WindowKeyboardInput(RemoteWindow Window, bool Recursive = true)
 {
     this.Window    = Window;
     this.Recursive = Recursive;
 }
Beispiel #11
0
 /// <summary>
 ///     Initializes a new instance of a child of the <see cref="BaseKeyboard" /> class.
 /// </summary>
 /// <param name="window">The reference of the <see cref="RemoteWindow" /> object.</param>
 protected BaseKeyboard(RemoteWindow window)
 {
     // Save the parameter
     Window = window;
 }
Beispiel #12
0
 public static WindowKeyboardInput GetKeyboard(RemoteWindow Window, bool Recursive)
 => Window.KeyboardInput;
Beispiel #13
0
 /// <summary>
 /// Initializes a new instance of a child of the <see cref="BaseMouse"/> class.
 /// </summary>
 /// <param name="window">The reference of the <see cref="RemoteWindow"/> object.</param>
 protected BaseMouse(RemoteWindow window)
 {
     // Save the parameter
     Window = window;
 }
Beispiel #14
0
 public WindowMouseInput(RemoteWindow Window, bool Recursive = true)
 {
     this.Window    = Window;
     this.Recursive = Recursive;
 }
Beispiel #15
0
 public MessageMouse(RemoteWindow window) : base(window)
 {
     VirtualCursor = new Point();
 }
Beispiel #16
0
 /// <summary>
 ///     Initializes a new instance of a child of the <see cref="SendInputMouse" /> class.
 /// </summary>
 /// <param name="window">The reference of the <see cref="RemoteWindow" /> object.</param>
 public SendInputMouse(RemoteWindow window)
     : base(window)
 {
 }
Beispiel #17
0
 public static WindowMouseInput GetMouse(RemoteWindow Window, bool Recursive)
 => Window.MouseInput;
Beispiel #18
0
 /// <summary>
 /// Initializes a new instance of a child of the <see cref="BaseKeyboard"/> class.
 /// </summary>
 /// <param name="window">The reference of the <see cref="RemoteWindow"/> object.</param>
 protected BaseKeyboard(RemoteWindow window)
 {
     // Save the parameter
     Window = window;
 }
Beispiel #19
0
 /// <summary>
 /// Initializes a new instance of a child of the <see cref="BaseMouse"/> class.
 /// </summary>
 /// <param name="window">The reference of the <see cref="RemoteWindow"/> object.</param>
 protected BaseMouse(RemoteWindow window)
 {
     // Save the parameter
     Window = window;
 }
Beispiel #20
0
 public MessageKeyboard(RemoteWindow window) : base(window)
 {
 }
Beispiel #21
0
 protected BaseMouse(RemoteWindow window)
 {
     Window = window;
 }