-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/copy books configurable extensions #1479
feature/copy books configurable extensions #1479
Conversation
1. Remove COBOL Copybook language id from package.json 2. Add .cpy and .copy file extensions to "cobol" language id 3. Remove "onLanguage:COBOL Copybook" activation event "COBOL Copybook" language grammar ("contributes.grammar" section in package json) "COBOL Copybook" snippets ("contributes.snippets" section in package json) "COBOL Copybook" configurationDefaults 4. Add a new setting "cobol-lsp.cpy-manager.copybook-extensions" (array or strings) with default [".CPY", ".COPY", ".cpy", ".copy"]
del SettingsService::toStrings because it breaks encapsulation and is being used as static method
…om "cobol-lsp.cpy-manager.copybook-extensions" and if it does treat it as a copybook (no analysis)
…ust (partly) injectService
cobol-lsp.copybook-resolve.ert.cbl.ABC.COBOL but also: cobol-lsp.copybook-resolve.ert.cbl.ABC.CPY.COBOL
and use an extension from server response
# Conflicts: # clients/cobol-lsp-vscode-extension/package.json # server/engine/src/main/java/org/eclipse/lsp/cobol/service/delegates/completions/CompletionStorage.java # server/engine/src/test/java/org/eclipse/lsp/cobol/service/delegates/completions/SnippetCompletionTest.java
…r client-server communication
☝️ please review @Nurkambay @shciubrcom @niharikasw91 |
This reverts commit 9452977.
…nalysis for didOpen/didChange triggers
server/engine/src/main/java/org/eclipse/lsp/cobol/service/copybooks/CopybookNameService.java
Outdated
Show resolved
Hide resolved
server/engine/src/main/java/org/eclipse/lsp/cobol/service/copybooks/CopybookNameService.java
Outdated
Show resolved
Hide resolved
@@ -94,7 +94,7 @@ private void fillInStorage(Map<String, T> props) { | |||
props.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); | |||
} | |||
|
|||
private void getDialectArray(List<Object> dialectObject) { | |||
private void updateDialects(List<Object> dialectObject) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
"default": [ | ||
".CPY", | ||
".COPY", | ||
".cpy", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please look out for the (.) prefix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following are the observations:
- Autocomplete suggestion for copybook name should be unique ( xyz.cpy and xyz.COPY should be shown only once)
- With (.) as prefix the extensions are not recognised
- Do we need to have default .cpy in case of no extensions are defined in the extension settings?
- When the extension has setting started with (.) the defauly .cpy file is picked and the file name is converted from small_case to upper case
1 - resolved |
# Conflicts: # server/engine/src/main/java/org/eclipse/lsp/cobol/service/CobolWorkspaceServiceImpl.java # server/engine/src/main/java/org/eclipse/lsp/cobol/service/delegates/completions/CompletionStorage.java # server/engine/src/test/java/org/eclipse/lsp/cobol/service/delegates/completions/SnippetCompletionTest.java
@@ -14,9 +14,10 @@ | |||
*/ | |||
package org.eclipse.lsp.cobol.service.mocks; | |||
|
|||
import com.google.common.collect.ImmutableList; | |||
import com.google.gson.JsonPrimitive; | |||
//import com.google.common.collect.ImmutableList; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls remove the commented code
@@ -124,7 +124,7 @@ public String readFromInputStream(InputStream inputStream, Charset charset) thro | |||
|
|||
@Override | |||
public List<String> listFilesInDirectory(Path path) { | |||
try (Stream<Path> streamPath = Files.list(path)) { | |||
try (Stream<Path> streamPath = Files.walk(path, 2)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not undestand logic behind maxDepth to 2
No description provided.