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

Lsp edit #1

Merged
merged 3 commits into from
Nov 2, 2018
Merged

Lsp edit #1

merged 3 commits into from
Nov 2, 2018

Conversation

JanKoehnlein
Copy link
Contributor

No description provided.

Copy link
Contributor

@spoenemann spoenemann left a comment

Choose a reason for hiding this comment

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

Looks good, remarks below.

}

undo(context: CommandExecutionContext): CommandResult {
// TODO implement revert workspace edit
Copy link
Contributor

Choose a reason for hiding this comment

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

Please create an issue for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#7

@@ -0,0 +1,122 @@
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copyright (c) 2018

@@ -0,0 +1,89 @@
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copyright (c) 2018

@@ -0,0 +1,21 @@
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copyright (c) 2018

@@ -0,0 +1,40 @@
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copyright (c) 2018

@@ -0,0 +1,17 @@
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copyright (c) 2018

@@ -0,0 +1,69 @@
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copyright (c) 2018

@@ -0,0 +1,28 @@
/********************************************************************************
* Copyright (c) 2017-2018 TypeFox and others.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copyright (c) 2018

* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

export * from './languageserver-diagram-contributions'
Copy link
Contributor

Choose a reason for hiding this comment

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

What about languageserver-diagram-module?

handleExportSvgAction(action: ExportSvgAction): boolean {
this.connector.then(c => c.save(this.sourceUri, action))
return true
}

handleRequestPopupModel(action: RequestPopupModelAction): boolean {
if (action.elementId === this.currentRoot.id) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should generalize this so we allow multiple popup models and merge those received from the server with the locally created ones. Then we can also support palettes on elements other than the root, e.g. large container nodes. This should be handled in a separate issue / PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

readonly kind = DeleteWithWorkspaceEditCommand.KIND

// TODO: consider URIs from individual element traces
constructor(readonly workspace: Workspace, readonly sourceUri: string) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not a serializable action, right? Do we need to make a distinction between serializable and non-serializable actions?

Signed-off-by: Jan Koehnlein <[email protected]>
@@ -59,6 +74,18 @@ export class TheiaDiagramServer extends DiagramServer {
this.resolveConnector = resolve)
}

getConnector() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, why did you choose Java-style getters here instead of TypeScript getters?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because it's a promise.

@JanKoehnlein JanKoehnlein merged commit 8ec8ec4 into master Nov 2, 2018
@JanKoehnlein JanKoehnlein deleted the lsp-edit branch November 2, 2018 11:14
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.

2 participants