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

Inconsistent handling of *Handlers #243

Closed
fbricon opened this issue May 30, 2017 · 0 comments
Closed

Inconsistent handling of *Handlers #243

fbricon opened this issue May 30, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@fbricon
Copy link
Contributor

fbricon commented May 30, 2017

Some *Handler files return CompletableFutures while others return raw types and let the JDTLanguageServer handle the wrapping into CompletableFuture.
eg.

	@Override
	public CompletableFuture<String> classFileContents(TextDocumentIdentifier param) {
		logInfo(">> java/classFileContents");
		ClassfileContentHandler handler = new ClassfileContentHandler();
		return  handler.contents(param);
	}

vs

	@Override
	public CompletableFuture<CodeLens> resolveCodeLens(CodeLens unresolved) {
		logInfo(">> codeLens/resolve");
		CodeLensHandler handler = new CodeLensHandler(preferenceManager);
		return CompletableFuture.supplyAsync(()->handler.resolve(unresolved));
	}

The *Handler behavior should be consistent across the board. I say we leave JDTLanguageServer deal with the CompletableFuture aspects and simplify the Handlers, which will simplify their testing as well.

@fbricon fbricon added the debt label May 30, 2017
@fbricon fbricon self-assigned this Jun 5, 2017
@fbricon fbricon added this to the Mid June 2017 milestone Jun 5, 2017
fbricon added a commit to fbricon/eclipse.jdt.ls that referenced this issue Jun 9, 2017
fbricon added a commit that referenced this issue Jun 9, 2017
@eclipse-jdtls eclipse-jdtls deleted a comment from eclipse-ls-bot Jun 14, 2017
aeschli pushed a commit to aeschli/eclipse.jdt.ls that referenced this issue Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant