Skip to content

Conversation

@sdedic
Copy link
Member

@sdedic sdedic commented Oct 26, 2020

I've implemented a AbstractDialogDisplayer that, if registered will remote notify() and notifyLater through UIContext into the remote LSP client. I've tested locally on Gradle projects; but it has still some limitations, like Project Problems tend to display a customizer ... so I've commented out the final registration of the service.

I'd like to pull in the infrastructure for collaboration.

@sdedic sdedic requested a review from JaroslavTulach October 26, 2020 14:54
}

@Override
public CompletableFuture<InitializeResult> initialize(InitializeParams init) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this change: some events are fired synchronously from Open Project. If the code asks for something like DialogDisplayer.notify (which some code really does), the initialization request processing would block - and the notify() round-trip would be never completed, freezing LSP client-server communication completely.

*
* @author sdedic
*/
//@ServiceProvider(service = DialogDisplayer.class, position = 1000)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reasonable, given we after feature freeze. This functionality will certainly be needed in the future. For 12.2 we'd rather delay using it, unless necessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm bit confused. The PR is against delivery, but no 12.2 milestone set, I'm not among the reviewers. Am I assuming right upon this comment, that you would like to float this here in case of need? So it is tentative for 12.2? If yes, please decide it till beta3 (29th Oct, late PDT) this week. If that one is messed this one have to go to master. I've put the milestone 12.2 anyway.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is beta3 supposed to become VC1? Oct 29, so close!

I asked Sváťa to propose his infrastructure changes in this PR for 12.2 as they are harmless (until we enable @ServiceProvider), but we may desperately need them. I am afraid we may need to download nbjavac if support for JDK8 is needed. Downloading shall of course only happen after asking a question - preferably through this Sváťa's infrastructure.

That's my rationale. but Oct 29, is so close!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lkishalmi I would added you after the PR passed through Jarda ;) it's easier to review cleaned-up code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The VC is or I'd better call it RC is due to 7th of November. Previously we had 2 week period between beta1 and beta2, I've switched it to one week as usually the forts week in the release mode is when the most commits are happening "oh, this is a minor, but needs to be there". Also the weekly delivery -> master merge is hopefully small enough change to deal with.

}
}

private static final RequestProcessor SERVER_INIT_RP = new RequestProcessor(LanguageServerImpl.class.getName(), 10);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throughput 10!? Isn't opening of project sequential anyway?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm ... OK; I thought about multiple instances that may have been initializing (multiple LSP clients), but you're right as far as there's just project open operation being waited on. Will change.

}

private static final RequestProcessor SERVER_INIT_RP = new RequestProcessor(LanguageServerImpl.class.getName(), 10);
private static final Map<NbCodeClientWrapper, Future> initializations = new WeakHashMap<>();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the initializations field read anywhere? I can't find it (and that'd be good, as I don't think it is needed).

Copy link
Member Author

@sdedic sdedic Oct 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover, will remove. I originally planned to cancel the pending Future if the server receives exit()

* @param original
* @return
*/
private String translateText(String original) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the translation of the text away from HTML shall only happen if it starts with <html>.

@lkishalmi lkishalmi added this to the 12.2 milestone Oct 26, 2020
@lkishalmi lkishalmi merged commit cee80c2 into apache:delivery Oct 26, 2020
@sdedic sdedic deleted the lsp/dialogdisplayer2 branch September 13, 2022 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants