Skip to content
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

A consistent naming scheme for the LanguageService constructors , with backward compatibility functions. #473

Merged
merged 64 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
7791a57
renamed all language services towards consistency. All verbs or all n…
jurgenvinju Oct 11, 2024
0d86206
made plural/singular consistent
jurgenvinju Oct 11, 2024
31e9417
added missing renaming
jurgenvinju Oct 11, 2024
c926ef9
fixed errors detected by static checker
jurgenvinju Oct 11, 2024
d861a8d
more typos
jurgenvinju Oct 11, 2024
64f8804
fixes #472
jurgenvinju Oct 11, 2024
3d2ea0a
getting the names right
jurgenvinju Oct 11, 2024
5037798
removed superfluous documentation
jurgenvinju Oct 11, 2024
34a6481
more doc cleanup
jurgenvinju Oct 11, 2024
b8da753
Merge branch 'main' into more-consistent-service-names
jurgenvinju Oct 12, 2024
bed2e0e
aligned all the service names with their LSP sources, and extrapolate…
jurgenvinju Oct 12, 2024
71a8ad6
fixed reference to old name
jurgenvinju Oct 12, 2024
f946b1c
fixing minor issues and added demo of using the new API
jurgenvinju Oct 12, 2024
364c393
fixed issues in documentation
jurgenvinju Oct 13, 2024
0d995d5
fixed parse error
jurgenvinju Oct 13, 2024
1d19a4a
renamed constructor names of services in Java side
jurgenvinju Oct 13, 2024
33f86d1
better types for the picoActions function
jurgenvinju Oct 13, 2024
0f707cd
Merge branch 'main' into more-consistent-service-names
jurgenvinju Oct 13, 2024
5518859
Update rascal-lsp/src/main/rascal/demo/lang/pico/NewLanguageServer.rsc
jurgenvinju Oct 14, 2024
60f1754
fixes based on feedback by @sungshik and @davylandman, plus renamed S…
jurgenvinju Oct 14, 2024
cec6310
setting more things straight, especially in the example code
jurgenvinju Oct 14, 2024
50409fe
forgot to add
jurgenvinju Oct 14, 2024
87f09e6
added pitfall
jurgenvinju Oct 14, 2024
8820535
picoLanguageServer not Contribution
jurgenvinju Oct 14, 2024
21a080f
more documentation
jurgenvinju Oct 14, 2024
dfb0bc3
added field names for services back in du to bug in interpreter with …
jurgenvinju Oct 14, 2024
5c37e7a
renamed outline to DocumentSymbols for Rascal as well
jurgenvinju Oct 14, 2024
1c317c6
added backward compatibility wrapper for the Summary.documentation field
jurgenvinju Oct 15, 2024
ef7a3ff
fixed new broken links in docs
jurgenvinju Oct 15, 2024
5ecaff1
improved links in docs
jurgenvinju Oct 15, 2024
dded438
minor fix
jurgenvinju Oct 15, 2024
7c3b87a
improved documentation for compatibility layer
jurgenvinju Oct 15, 2024
ffb9e4f
fixed another typo
jurgenvinju Oct 15, 2024
09ae6d7
docs
jurgenvinju Oct 15, 2024
b22c854
added computeFocusList for testing purposes
jurgenvinju Oct 15, 2024
e80b8f1
fixed interface of computeFocusList
jurgenvinju Oct 15, 2024
c4a4204
log string improved
jurgenvinju Oct 16, 2024
f386f58
Rename methods in `ILanguageContributions` to be consistent with LSP
sungshik Oct 17, 2024
7e3968e
Revert "Rename methods in `ILanguageContributions` to be consistent w…
sungshik Oct 17, 2024
617731d
Rename methods in `ILanguageContributions` to be consistent with LSP
sungshik Oct 17, 2024
90eaac8
Rename methods in `LanguageContributionsMultiplexer` to be consistent…
sungshik Oct 17, 2024
231157d
Rename methods in `InterpretedLanguageContributions` to be consistent…
sungshik Oct 17, 2024
3aeef96
Fix flaky UI test
sungshik Oct 21, 2024
59e361e
Rename methods in `RascalADTs` to be consistent with LSP
sungshik Oct 21, 2024
89b10d6
Merge branch 'more-consistent-service-names-flaky-test' into more-con…
sungshik Oct 21, 2024
d1bd97d
Merge pull request #484 from usethesource/more-consistent-service-nam…
DavyLandman Oct 21, 2024
6b1418b
Rename methods in `RascalLanguageServices` to be consistent with LSP
sungshik Oct 21, 2024
7b3e7ac
Rename methods in `ParametricSummary` to be consistent with LSP
sungshik Oct 21, 2024
565b70a
Rename methods in `RascalTextDocumentService` to be consistent with LSP
sungshik Oct 21, 2024
0a54319
Rename methods in `ParametricTextDocumentService` to be consistent wi…
sungshik Oct 21, 2024
8951698
Rename methods in `Outline` to be consistent with LSP
sungshik Oct 21, 2024
8374e3b
Merge branch 'more-consistent-service-names' into more-consistent-ser…
sungshik Oct 21, 2024
33fa928
Rename method `hasCodeLensDetector` to be consistent with LSP (previo…
sungshik Oct 21, 2024
eae06cf
Improve code layout
sungshik Oct 21, 2024
c1b9dc5
Rename class `Outline` to `DocumentSymbols`
sungshik Oct 22, 2024
a583630
Made names shorter (without `run..Service` pre/suffix)
sungshik Oct 23, 2024
b8cdde6
Made names shorter (without `run..Service` pre/suffix)
sungshik Oct 23, 2024
16d87be
Remove horizontal alignment
sungshik Oct 23, 2024
6fdc985
Merge pull request #482 from usethesource/more-consistent-service-nam…
jurgenvinju Oct 23, 2024
b1b5466
renamed LanguageServer to OldStyleLanguageServer and NewLanguageServe…
jurgenvinju Oct 23, 2024
f059ed4
Merge branch 'main' into more-consistent-service-names
jurgenvinju Oct 23, 2024
3158b01
forgot to add
jurgenvinju Oct 23, 2024
fb9a22e
fixed module names in Language meta data
jurgenvinju Oct 23, 2024
4939d4b
fixed tutor links
jurgenvinju Oct 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,49 +46,50 @@
public interface ILanguageContributions {
public String getName();

public CompletableFuture<ITree> parseSourceFile(ISourceLocation loc, String input);
public InterruptibleFuture<IList> outline(ITree input);
public InterruptibleFuture<IConstructor> analyze(ISourceLocation loc, ITree input);
public CompletableFuture<ITree> parsing(ISourceLocation loc, String input);
public InterruptibleFuture<IConstructor> analysis(ISourceLocation loc, ITree input);
public InterruptibleFuture<IConstructor> build(ISourceLocation loc, ITree input);
public InterruptibleFuture<IList> lenses(ITree input);
public InterruptibleFuture<@Nullable IValue> executeCommand(String command);
public CompletableFuture<IList> parseCodeActions(String command);
public InterruptibleFuture<IList> documentSymbol(ITree input);
public InterruptibleFuture<IList> codeLens(ITree input);
public InterruptibleFuture<IList> inlayHint(@Nullable ITree input);
public InterruptibleFuture<ISet> documentation(IList focus);
public InterruptibleFuture<ISet> definitions(IList focus);
public InterruptibleFuture<@Nullable IValue> execution(String command);
public InterruptibleFuture<ISet> hover(IList focus);
public InterruptibleFuture<ISet> definition(IList focus);
public InterruptibleFuture<ISet> references(IList focus);
public InterruptibleFuture<ISet> implementations(IList focus);
public InterruptibleFuture<IList> codeActions(IList focus);

public CompletableFuture<Boolean> hasAnalyzer();
public CompletableFuture<Boolean> hasBuilder();
public CompletableFuture<Boolean> hasOutliner();
public CompletableFuture<Boolean> hasLensDetector();
public CompletableFuture<Boolean> hasInlayHinter();
public CompletableFuture<Boolean> hasCommandExecutor();
public CompletableFuture<Boolean> hasDocumenter();
public CompletableFuture<Boolean> hasDefiner();
public CompletableFuture<Boolean> hasReferrer();
public CompletableFuture<Boolean> hasImplementer();
public CompletableFuture<Boolean> hasCodeActionsContributor();
public InterruptibleFuture<ISet> implementation(IList focus);
public InterruptibleFuture<IList> codeAction(IList focus);

public CompletableFuture<IList> parseCodeActions(String command);

public CompletableFuture<Boolean> hasAnalysis();
public CompletableFuture<Boolean> hasBuild();
public CompletableFuture<Boolean> hasDocumentSymbol();
public CompletableFuture<Boolean> hasCodeLens();
public CompletableFuture<Boolean> hasInlayHint();
public CompletableFuture<Boolean> hasExecution();
public CompletableFuture<Boolean> hasHover();
public CompletableFuture<Boolean> hasDefinition();
public CompletableFuture<Boolean> hasReferences();
public CompletableFuture<Boolean> hasImplementation();
public CompletableFuture<Boolean> hasCodeAction();

public CompletableFuture<SummaryConfig> getAnalyzerSummaryConfig();
public CompletableFuture<SummaryConfig> getBuilderSummaryConfig();
public CompletableFuture<SummaryConfig> getOndemandSummaryConfig();

public static class SummaryConfig {
public final boolean providesDocumentation;
public final boolean providesHovers;
public final boolean providesDefinitions;
public final boolean providesReferences;
public final boolean providesImplementations;

public SummaryConfig(
boolean providesDocumentation,
boolean providesHovers,
boolean providesDefinitions,
boolean providesReferences,
boolean providesImplementations) {

this.providesDocumentation = providesDocumentation;
this.providesHovers = providesHovers;
this.providesDefinitions = providesDefinitions;
this.providesReferences = providesReferences;
this.providesImplementations = providesImplementations;
Expand All @@ -98,14 +99,13 @@ public SummaryConfig(

public static SummaryConfig or(SummaryConfig a, SummaryConfig b) {
return new SummaryConfig(
a.providesDocumentation || b.providesDocumentation,
a.providesHovers || b.providesHovers,
a.providesDefinitions || b.providesDefinitions,
a.providesReferences || b.providesReferences,
a.providesImplementations || b.providesImplementations);
}
}


@FunctionalInterface // Type alias to conveniently pass methods `analyze`and `build` as parameters
public static interface ScheduledCalculator extends BiFunction<ISourceLocation, ITree, InterruptibleFuture<IConstructor>> {}

Expand Down
Loading
Loading