-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(eclipse): implement statusbar item sync. (#2896)
- Loading branch information
Showing
27 changed files
with
365 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
This file contains 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
12 changes: 11 additions & 1 deletion
12
clients/eclipse/plugin/src/com/tabbyml/tabby4eclipse/lsp/LanguageClientImpl.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
package com.tabbyml.tabby4eclipse.lsp; | ||
|
||
public class LanguageClientImpl extends org.eclipse.lsp4e.LanguageClientImpl { | ||
import java.util.concurrent.CompletableFuture; | ||
|
||
import org.eclipse.lsp4j.jsonrpc.services.JsonNotification; | ||
|
||
import com.tabbyml.tabby4eclipse.lsp.protocol.StatusInfo; | ||
import com.tabbyml.tabby4eclipse.statusbar.StatusInfoHolder; | ||
|
||
public class LanguageClientImpl extends org.eclipse.lsp4e.LanguageClientImpl { | ||
@JsonNotification("tabby/status/didChange") | ||
void statusDidChange(StatusInfo params) { | ||
StatusInfoHolder.getInstance().setStatusInfo(params); | ||
} | ||
} |
This file contains 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
This file contains 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
17 changes: 17 additions & 0 deletions
17
clients/eclipse/plugin/src/com/tabbyml/tabby4eclipse/lsp/protocol/IStatusService.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.tabbyml.tabby4eclipse.lsp.protocol; | ||
|
||
import java.util.concurrent.CompletableFuture; | ||
import org.eclipse.lsp4j.jsonrpc.services.JsonRequest; | ||
import org.eclipse.lsp4j.jsonrpc.services.JsonSegment; | ||
|
||
@JsonSegment("tabby") | ||
public interface IStatusService { | ||
@JsonRequest("status") | ||
CompletableFuture<StatusInfo> getStatus(StatusRequestParams params); | ||
|
||
@JsonRequest("status/showHelpMessage") | ||
CompletableFuture<Boolean> showHelpMessage(Object params); | ||
|
||
@JsonRequest("status/ignoredIssues/edit") | ||
CompletableFuture<Boolean> editIngoredIssues(StatusIgnoredIssuesEditParams params); | ||
} |
This file contains 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
35 changes: 35 additions & 0 deletions
35
...ipse/plugin/src/com/tabbyml/tabby4eclipse/lsp/protocol/StatusIgnoredIssuesEditParams.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.tabbyml.tabby4eclipse.lsp.protocol; | ||
|
||
public class StatusIgnoredIssuesEditParams { | ||
private String operation; | ||
private String[] issues; | ||
|
||
public StatusIgnoredIssuesEditParams() { | ||
} | ||
|
||
public String getOperation() { | ||
return operation; | ||
} | ||
|
||
public void setOperation(String operation) { | ||
this.operation = operation; | ||
} | ||
|
||
public String[] getIssues() { | ||
return issues; | ||
} | ||
|
||
public void setIssues(String[] issues) { | ||
this.issues = issues; | ||
} | ||
|
||
public static class Operation { | ||
public static final String ADD = "add"; | ||
public static final String REMOVE = "remove"; | ||
public static final String REMOVE_ALL = "removeAll"; | ||
} | ||
|
||
public static class StatusIssuesName { | ||
public static final String COMPLETION_RESPONSE_SLOW = "completionResponseSlow"; | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
clients/eclipse/plugin/src/com/tabbyml/tabby4eclipse/lsp/protocol/StatusInfo.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package com.tabbyml.tabby4eclipse.lsp.protocol; | ||
|
||
import java.util.Map; | ||
|
||
import org.eclipse.lsp4j.Command; | ||
|
||
public class StatusInfo { | ||
private String status; | ||
private String tooltip; | ||
private Map<String, Object> serverHealth; | ||
private Command command; | ||
|
||
public StatusInfo() { | ||
this.status = Status.NOT_INITIALIZED; | ||
} | ||
|
||
public String getStatus() { | ||
return status; | ||
} | ||
|
||
public void setStatus(String status) { | ||
this.status = status; | ||
} | ||
|
||
public String getTooltip() { | ||
return tooltip; | ||
} | ||
|
||
public void setTooltip(String tooltip) { | ||
this.tooltip = tooltip; | ||
} | ||
|
||
public Map<String, Object> getServerHealth() { | ||
return serverHealth; | ||
} | ||
|
||
public void setServerHealth(Map<String, Object> serverHealth) { | ||
this.serverHealth = serverHealth; | ||
} | ||
|
||
public Command getCommand() { | ||
return command; | ||
} | ||
|
||
public void setCommand(Command command) { | ||
this.command = command; | ||
} | ||
|
||
public static class Status { | ||
public static final String NOT_INITIALIZED = "notInitialized"; | ||
public static final String FINALIZED = "finalized"; | ||
public static final String CONNECTING = "connecting"; | ||
public static final String UNAUTHORIZED = "unauthorized"; | ||
public static final String DISCONNECTED = "disconnected"; | ||
public static final String READY = "ready"; | ||
public static final String READY_FOR_AUTO_TRIGGER = "readyForAutoTrigger"; | ||
public static final String READY_FOR_MANUAL_TRIGGER = "readyForManualTrigger"; | ||
public static final String FETCHING = "fetching"; | ||
public static final String COMPLETION_RESPONSE_SLOW = "completionResponseSlow"; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
clients/eclipse/plugin/src/com/tabbyml/tabby4eclipse/lsp/protocol/StatusRequestParams.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.tabbyml.tabby4eclipse.lsp.protocol; | ||
|
||
public class StatusRequestParams { | ||
private boolean recheckConnection; | ||
|
||
public StatusRequestParams() { | ||
} | ||
|
||
public boolean getRecheckConnection() { | ||
return recheckConnection; | ||
} | ||
|
||
public void setRecheckConnection(boolean recheckConnection) { | ||
this.recheckConnection = recheckConnection; | ||
} | ||
} |
Oops, something went wrong.