Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
CppCXY committed Aug 9, 2024
1 parent 17f125a commit dee8525
Showing 1 changed file with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ protected void setType(EmmyDebugTransportType type) {

private boolean isClient() {
EmmyDebugTransportType type = getType();
return type == EmmyDebugTransportType.TCP_CLIENT || type == EmmyDebugTransportType.PIPE_CLIENT;
return type == EmmyDebugTransportType.TCP_CLIENT;
}

private EmmyDebugTransportType getType() {
Expand Down Expand Up @@ -190,7 +190,7 @@ protected JComponent createEditor() {
private EditorEx createEditorEx(Project project) {
EditorFactory editorFactory = EditorFactory.getInstance();
Document editorDocument = editorFactory.createDocument("");
return (EditorEx)editorFactory.createEditor(editorDocument, project, LuaFileType.INSTANCE, false);
return (EditorEx) editorFactory.createEditor(editorDocument, project, LuaFileType.INSTANCE, false);
}

private void updateCode() {
Expand Down Expand Up @@ -218,7 +218,7 @@ private void updateCodeImpl() {
sb.append("package.cpath = package.cpath .. ';")
.append(getDebuggerFolder())
.append("/")
.append(Objects.equals(System.getProperty("os.arch"), "arm64") ? "arm64": "x64")
.append(Objects.equals(System.getProperty("os.arch"), "arm64") ? "arm64" : "x64")
.append("/?.dylib'\n");
} else {
sb.append("package.cpath = package.cpath .. ';")
Expand All @@ -227,16 +227,9 @@ private void updateCodeImpl() {
}
sb.append("local dbg = require('emmy_core')\n");
EmmyDebugTransportType type = getType();
if (type == EmmyDebugTransportType.PIPE_CLIENT) {
sb.append("dbg.pipeListen('").append(getPipeName()).append("')\n");
}
else if (type == EmmyDebugTransportType.PIPE_SERVER) {
sb.append("dbg.pipeConnect('").append(getPipeName()).append("')\n");
}
else if (type == EmmyDebugTransportType.TCP_CLIENT) {
if (type == EmmyDebugTransportType.TCP_CLIENT) {
sb.append("dbg.tcpListen('").append(getHost()).append("', ").append(getPort()).append(")\n");
}
else if (type == EmmyDebugTransportType.TCP_SERVER) {
} else if (type == EmmyDebugTransportType.TCP_SERVER) {
sb.append("dbg.tcpConnect('").append(getHost()).append("', ").append(getPort()).append(")\n");
}

Expand Down

0 comments on commit dee8525

Please sign in to comment.