Skip to content

Commit

Permalink
Merged LSP changes
Browse files Browse the repository at this point in the history
Merges the new LSP and takes the new framework
to use on all the handlers.
  • Loading branch information
gorkem committed Jul 18, 2016
1 parent 5309615 commit ff63bb0
Show file tree
Hide file tree
Showing 55 changed files with 1,110 additions and 1,742 deletions.
1 change: 0 additions & 1 deletion client/src/electron_j.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ function fork(modulePath, args, options, callback) {

var newEnv = generatePatchedEnv(options.env || process.env, stdInPipeName, stdOutPipeName);
var childProcess;
let serversConnected = 0;
let streamInfo = {writer : null,
reader: null} ;
// Begin listening to stdout pipe
Expand Down
2 changes: 1 addition & 1 deletion client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function runJavaServer(){
if (DEBUG) {
params.push('-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044');
// suspend=y is the default. Use this form if you need to debug the server startup code:
// params.push('-agentlib:jdwp=transport=dt_socket,server=y,address=1044');
// params.push('-agentlib:jdwp=transport=dt_socket,server=y,address=1044');
}
params.push('-Declipse.application=org.jboss.tools.vscode.java.id1');
params.push('-Dosgi.bundles.defaultStartLevel=4');
Expand Down
6 changes: 5 additions & 1 deletion server/lang-protocol-generator/generatedTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
DocumentFormattingRequest, DocumentFormattingParams, DocumentRangeFormattingRequest, DocumentRangeFormattingParams,
DocumentOnTypeFormattingRequest, DocumentOnTypeFormattingParams,
RenameRequest, RenameParams,
DocumentSymbolParams
DocumentSymbolParams, ReferenceParams, CodeLensParams
} from './protocol';
import {
Range, Position, Location, Diagnostic, DiagnosticSeverity, Command,
Expand Down Expand Up @@ -92,6 +92,8 @@ export interface AllMessages{
documentOnTypeFormattingParams:DocumentOnTypeFormattingParams,
renameParams:RenameParams
documentSymbolParams:DocumentSymbolParams
referenceParams: ReferenceParams
codeLensParams : CodeLensParams
}

export interface AllProtocol{
Expand Down Expand Up @@ -151,4 +153,6 @@ export interface AllProtocol{
documentOnTypeFormattingParams:DocumentOnTypeFormattingParams,
renameParams:RenameParams
documentSymbolParams:DocumentSymbolParams
referenceParams : ReferenceParams
codeLensParams : CodeLensParams
}
43 changes: 43 additions & 0 deletions server/lang-protocol-generator/ls-protocol/everything.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@
},
"documentSymbolParams": {
"$ref": "#/definitions/DocumentSymbolParams"
},
"referenceParams": {
"$ref": "#/definitions/ReferenceParams"
},
"codeLensParams": {
"$ref": "#/definitions/CodeLensParams"
}
},
"additionalProperties": false,
Expand Down Expand Up @@ -1167,6 +1173,43 @@
}
},
"additionalProperties": false
},
"ReferenceParams": {
"type": "object",
"properties": {
"context": {
"$ref": "#/definitions/ReferenceContext"
},
"textDocument": {
"$ref": "#/definitions/TextDocumentIdentifier",
"description": "The text document."
},
"position": {
"$ref": "#/definitions/Position",
"description": "The position inside the text document."
}
},
"additionalProperties": false
},
"ReferenceContext": {
"type": "object",
"properties": {
"includeDeclaration": {
"description": "Include the declaration of the current symbol.",
"type": "boolean"
}
},
"additionalProperties": false
},
"CodeLensParams": {
"type": "object",
"properties": {
"textDocument": {
"$ref": "#/definitions/TextDocumentIdentifier",
"description": "The document to request code lens for."
}
},
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
Expand Down
43 changes: 43 additions & 0 deletions server/lang-protocol-generator/ls-protocol/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@
},
"documentSymbolParams": {
"$ref": "#/definitions/DocumentSymbolParams"
},
"referenceParams": {
"$ref": "#/definitions/ReferenceParams"
},
"codeLensParams": {
"$ref": "#/definitions/CodeLensParams"
}
},
"additionalProperties": false,
Expand Down Expand Up @@ -708,6 +714,43 @@
}
},
"additionalProperties": false
},
"ReferenceParams": {
"type": "object",
"properties": {
"context": {
"$ref": "#/definitions/ReferenceContext"
},
"textDocument": {
"$ref": "#/definitions/TextDocumentIdentifier",
"description": "The text document."
},
"position": {
"$ref": "#/definitions/Position",
"description": "The position inside the text document."
}
},
"additionalProperties": false
},
"ReferenceContext": {
"type": "object",
"properties": {
"includeDeclaration": {
"description": "Include the declaration of the current symbol.",
"type": "boolean"
}
},
"additionalProperties": false
},
"CodeLensParams": {
"type": "object",
"properties": {
"textDocument": {
"$ref": "#/definitions/TextDocumentIdentifier",
"description": "The document to request code lens for."
}
},
"additionalProperties": false
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
Expand Down
2 changes: 0 additions & 2 deletions server/org.jboss.tools.vscode.ipc/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry exported="true" kind="lib" path="lib/json-smart-1.3.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jsonrpc2-base-1.38.jar"/>
<classpathentry kind="src" path="src/"/>
<classpathentry exported="true" kind="lib" path="lib/junixsocket-common-2.0.4.jar"/>
<classpathentry exported="true" kind="lib" path="lib/junixsocket-native-common-2.0.4.jar"/>
Expand Down
4 changes: 3 additions & 1 deletion server/org.jboss.tools.vscode.ipc/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ Bundle-ClassPath: lib/json-smart-1.3.1.jar,
lib/log4j-1.2.17.jar,
lib/native-lib-loader-2.0.2.jar,
lib/gson-2.7.jar
Export-Package: com.thetransactioncompany.jsonrpc2,
Export-Package: com.google.gson.annotations,
com.thetransactioncompany.jsonrpc2,
com.thetransactioncompany.jsonrpc2.util,
net.minidev.json,
net.minidev.json.parser,
net.minidev.json.reader,
org.jboss.tools.langs,
org.jboss.tools.langs.base,
org.jboss.tools.langs.ext,
org.jboss.tools.vscode.ipc
Bundle-Activator: org.jboss.tools.vscode.ipc.IPCPlugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.12.0"
2 changes: 0 additions & 2 deletions server/org.jboss.tools.vscode.ipc/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
lib/json-smart-1.3.1.jar,\
lib/jsonrpc2-base-1.38.jar,\
lib/junixsocket-common-2.0.4.jar,\
lib/junixsocket-native-common-2.0.4.jar,\
lib/log4j-1.2.17.jar,\
Expand Down
Binary file not shown.
Binary file not shown.
15 changes: 0 additions & 15 deletions server/org.jboss.tools.vscode.ipc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,6 @@
<artifactId>native-lib-loader</artifactId>
<version>2.0.2</version>
</artifactItem>
<artifactItem>
<groupId>com.thetransactioncompany</groupId>
<artifactId>jsonrpc2-base</artifactId>
<version>1.38</version>
</artifactItem>
<artifactItem>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>1.3.1</version>
</artifactItem>
<artifactItem>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
Expand Down Expand Up @@ -95,11 +85,6 @@
<artifactId>junixsocket-native-common</artifactId>
<version>2.0.4</version>
</dependency>
<dependency>
<groupId>com.thetransactioncompany</groupId>
<artifactId>jsonrpc2-base</artifactId>
<version>1.38</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
<dependency>
<groupId>com.google.code.gson</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

package org.jboss.tools.langs;

import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

@Generated("org.jsonschema2pojo")
public class CodeLensParams {

@SerializedName("textDocument")
@Expose
private TextDocumentIdentifier textDocument;

/**
*
* @return
* The textDocument
*/
public TextDocumentIdentifier getTextDocument() {
return textDocument;
}

/**
*
* @param textDocument
* The textDocument
*/
public void setTextDocument(TextDocumentIdentifier textDocument) {
this.textDocument = textDocument;
}

public CodeLensParams withTextDocument(TextDocumentIdentifier textDocument) {
this.textDocument = textDocument;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

package org.jboss.tools.langs;

import javax.annotation.Generated;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

@Generated("org.jsonschema2pojo")
public class ReferenceContext {

/**
* Include the declaration of the current symbol.
*
*/
@SerializedName("includeDeclaration")
@Expose
private Boolean includeDeclaration;

/**
* Include the declaration of the current symbol.
*
* @return
* The includeDeclaration
*/
public Boolean getIncludeDeclaration() {
return includeDeclaration;
}

/**
* Include the declaration of the current symbol.
*
* @param includeDeclaration
* The includeDeclaration
*/
public void setIncludeDeclaration(Boolean includeDeclaration) {
this.includeDeclaration = includeDeclaration;
}

public ReferenceContext withIncludeDeclaration(Boolean includeDeclaration) {
this.includeDeclaration = includeDeclaration;
return this;
}

}
Loading

0 comments on commit ff63bb0

Please sign in to comment.