-
Notifications
You must be signed in to change notification settings - Fork 28
Collab advanced #241
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
Open
MatthiasHofstaetter
wants to merge
289
commits into
eclipse-glsp:master
Choose a base branch
from
MatthiasHofstaetter:collabAdvanced
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+330
−35
Open
Collab advanced #241
Changes from all commits
Commits
Show all changes
289 commits
Select commit
Hold shift + click to select a range
e0a973b
Add plugin sources to p2 update site
tortmayr 256efb0
Add timeouts to CI pipline stages (#42)
tortmayr aca65d5
Fix CenterAction and FitToScreenAction (#47)
ndoschek 07b0d59
Update README.md
planger e028999
Align snapshot version numbers (#48)
tortmayr d8d6b5a
#18 Revise Action/Operation API (#46)
tortmayr 4cede84
Fix guava version contraint
tortmayr 69458c6
Add CONTRIBUTION.MD
planger 20239aa
Fix BasicActionHandler constructor (#49)
tortmayr 5e6c70f
Fix uri of graph package
tortmayr 127954b
Create issue template
planger d5ae6f0
Add unit tests for glsp.graph (#50)
planger 62521fd
Add custom action for sending messages from the server to the client …
martin-fleck-at 8d378b1
Fallback to model search when the GModelIndexImpl is still indexing
planger c146392
DefaultToolPaletteItemProvider should provide a consistent order (#53)
planger 8adc42b
Add auto-complete widget and generic edit validation support (#54)
planger 16c762b
#58 Support for multiple elementTypes per CreateOperationHandler
tortmayr b03b60d
Subtype support for GModelElementTypeAdapter (#56)
tortmayr b57e6b8
Add navigation support and navigation target resolution (#57)
planger e7442ca
Also support line and columns that have double style (e.g. 1.0) (#58)
planger e4e1637
Remove unnecessary arguments and usages of this
planger 29a124a
Add support for CompoundOperations (#59) (#60)
tortmayr 3ac4556
#75 Update to LSP4J 0.9.0 (#61)
tortmayr 711aea7
#82 Properly dispose sockets after client connection close (#63)
tortmayr 1372448
Reduce minimum requirement for lsp4j (#64)
tortmayr 75f5577
#42 Add customizable location retrieval to CreateNodeOperationHandler
tortmayr ecc595e
#87 Add readonly support for GLSP diagrams (#65)
tortmayr 09bd204
Fix typo in OperationActionhandler
tortmayr 509762f
Fixes #21: Align action processor with client-side action dispatcher …
martin-fleck-at 7660f10
#87 Make editMode retrievable via ModelState (#67)
tortmayr 810a4ae
#21 Refactor ActionProcessor (#68)
tortmayr add144a
#95 Cleanup GLSPServerLauncher & add CLI parsing (#69)
tortmayr e39ff76
#88 Apply fix for PropertyBasedTyeAdapter (#70)
tortmayr 240aa82
Ensure Java 1.8 compatibility in LaunchUtil (#71)
tortmayr 4a8be94
#101 Ensure proper handling of empty DeleteElementOperation (#72)
tortmayr a2aa2e0
#96 #94 Cleanup and refactor client-server communication (#73)
tortmayr fd93384
Align jetty version & shutdown server on websocket close
tortmayr 869bd2e
#97 ActionDispatcher should process all messages in the same thread (…
CamilleLetavernier 169c1d9
#96 Introduce InitializeClientSessionAction (#75)
tortmayr 0a15627
Use clientId provided by DisposeClientSession
tortmayr d598a99
#109 Remove the UUID requirement / ApplicationID (#76)
CamilleLetavernier 44fd729
#109 Fix concurrent modification exception when a client disconnects …
CamilleLetavernier 5fcc9ff
#96 Propagate errors to client in case of non-initialized session
tortmayr 51383ac
Fix errorHandling in GLPSDefaultServer (#78)
tortmayr b68e8cc
#111 Restructure workflow server example (#79)
tortmayr ee0273d
#123 Centralize configuration in the server (#80)
CamilleLetavernier 321094d
Refactor internal and public API (#81)
planger 22ba4e0
#112, #131: Minor adaptations for consistency
martin-fleck-at 3cce802
Add model source change notification (#83)
planger 388160c
Fix failing test cases by avoiding debouncing on file watching (#85)
martin-fleck-at 6508f85
Properly use completable future during server initialization (#84)
tortmayr 211fe3c
#140 Improve extendibility of DefaultGLSPServer (#87)
tortmayr 537502e
#124 [Server - ActionDispatcher] Missing error handling for responses…
CamilleLetavernier e565e25
#35 Extend server launcher for embedded use case (#88)
tortmayr 3ce80ce
#132 Further clean up server API (#89)
tortmayr 7c94bc9
0.8.0 Release
tortmayr b28dc41
Update to 0.9.0-SNAPSHOT versions
tortmayr 72c1c59
Websocket: Do not reuse the same Injector for each client connection …
CamilleLetavernier 94f7658
#153: Improve external navigation support through dedicated action (#92)
martin-fleck-at 893663a
#153: Add utility class for JsonOpenerOptions (#93)
martin-fleck-at 828eb37
Set minimal version constraint for javax.websocket to 1.0.0
tortmayr 2ee2d54
#156 Use package-import rather than require-bundle for javax.servlet …
CamilleLetavernier 17b959b
#122 #123 Centralize configuration in the server (#95)
planger d3f70af
[136] Readme for Workflow example and integrations (#97)
CamilleLetavernier b14d1ba
Remove unneeded question mark
planger 19600e7
Prevent exception when starting from fat jar
planger bffdd11
Fix item list
planger 1d3f8b4
Remove additional GIF at the end
planger dc6239f
Fix command to build fat jar
planger 3d9df79
In-comment Elk Layout Initialization
planger fdcc09c
Centralize model loading and GModel creation (#96)
planger 66c8e7d
#191: Provide correct kind for SelectAction (#98)
martin-fleck-at c3ff7f8
Adds SetViewportAction (#99)
planger 8ebeee8
Add args to SModelElements (#100)
planger 4057635
#197, #196: Improve dirty state handling (#101)
tortmayr 2e3477b
#193 #200 Update model loading & saving (#102)
tortmayr eeece97
#208 Add `fileUri` to `SaveModelAction` (#103)
tortmayr 0644ec8
#180: Add additional default types and improve arguments handling (#105)
martin-fleck-at 5cc08aa
#220 Rework workflow-example (#107)
lucas-koehler acc8e99
#233 Add operation arguments to CreateNodeOperationHandler (#108)
tortmayr bef86fa
#81 Migrate to emfcloud checkstyle project (#106)
tortmayr 736732c
#151 Cleanup incomplee Refactoring of `ShapeTypeHint` (#109)
tortmayr 94d0469
#60 #17 Cleanup/update CI & maven build (#112)
tortmayr 9e0966f
Update CONTRIBUTING.md (#113)
planger 5ef121f
Update maven config
tortmayr eb92049
Update README.md (#114)
tortmayr 500248a
#253 Align operation definitions for ChangeContainerOperation (#115)
ndoschek fadb5e5
#246 Use generic stand-in developer (#116)
tortmayr 4aff77d
Replace `mvn install` with `mvn verify` (#117)
planger 9ca913d
#237 Setup automated code scanning alerts (#118)
tortmayr 6816814
Update codeql-analysis.yml
tortmayr d36f040
#260 Update to Guice 5.0.1 (#119)
tortmayr 0c45065
Bump Guava to version 30.1 to fix security alert (#122)
tortmayr b19c75c
Update maven build to fix security alert (#124)
tortmayr e2ee370
#315 Refactor base protocol (#123)
tortmayr a41def6
Spectrum to GH Discussions (#125)
planger 1cdaf34
#385 Improve customizability of DefaultGLSPServerLauncher (#128)
tortmayr 55413f7
Fix error in popup rendering if <br> is unclosed (#130)
planger f4caf3d
Create SECURITY.md (#131)
tortmayr ef228ce
#150 #141 Rework dependency injection architecture (#127)
tortmayr e3212d2
Add property map in model state to store values in between handler ca…
planger de979e3
#421 Improve implementation of DefaultGLSPServer (#133)
tortmayr 3b69c61
392: Add categories to the model (#129)
CamilleLetavernier bfd1d4a
#406 Update to Theia 1.18.0 and switch to Codicons
ndoschek 673a5c5
Change to Import-Package for org.apache.log4j
ivy-cst 80861b1
Change org.apache.log4j from Require-Bundle to Import-Package (#137)
ivy-cst 93602f6
#425#120 Rework Actionhandler/Operationhandler API (#135)
tortmayr 2689a11
#422 Cleanup ActionDispatcher API (#138)
tortmayr 45d8bb7
#441#219 Ensure that `newBounds` of ChangeBoundsAction are properly a…
tortmayr 48c8421
#441 Always apply size in `ChangeBoundsOperationHandler` (#140)
tortmayr 2a13df9
#448 Implement dispatching of actions on next model-update (#141)
tortmayr edfdeec
#467: Use graph as default root element instead of plain model root (…
martin-fleck-at 4f63c49
#460: Notify source/target feature change on source/target id change …
martin-fleck-at d8c5aea
#432#257 Align server action with client protocol
tortmayr 010c9c0
v.0.9.0
tortmayr 03b2954
Switch to 0.10.0-SNAPSHOT versions
tortmayr 690a6ae
Set minimum version for jetty to 4.4
tortmayr 968a911
#484 Update WorkflowPopupFactory (#145)
tortmayr abfee53
#487 Improve GLSP Server API documentation (#146)
ndoschek 7dbeac2
#487 Fix Javadoc parameter (#147)
ndoschek ecfd74c
Improve styling and simplify workflow example (#148)
planger 870cbac
#529 Add GitHub issue templates to the repositories
ndoschek e01800e
#503: Add 'model' directory to generated maven artifacts (#149)
martin-fleck-at 20f1d2a
#571 Properly dispose temporary configuration session injectors (#151)
tortmayr 49add54
#534: Provide utility methods to properly match actual type argument …
martin-fleck-at 1dfd99f
Ensure that LayoutEngine is only injected into an optional field
planger 4031e35
Refactorings regarding source model loading and saving (#154)
planger fe0583f
Improve workflow layouter (#156)
planger 24d6e3e
Remove dependency to Apache Commons IO (org.apache.commons.io) (#157)
ivy-cst 1c88981
#622 Add reusable API for EMF use cases and add notation model (#159)
ndoschek 5b2ddd5
#622: Remove 'setRoot' from API in favor of 'updateRoot' (#161)
martin-fleck-at 6ae7edb
#579 Update to log4j 2.17.1 (#163)
ndoschek 9c23872
648: Clean up operation handlers (#164)
martin-fleck-at afc9995
#622 Add new plugin to p2 deployment (#160)
ndoschek 7d77a6a
Fix video and add more info for GLSP client frames (#162)
planger cde176a
Update changelog (#166)
tortmayr b658f26
Refactor classes that are only useful for GModel source models (#165)
planger 7b83708
Remove final modifier from DefaultClientSessionManager (#167)
tortmayr 4b59106
GH-641 Implement GShapePrerenderedElement builder (#168)
tortmayr e9e541d
Rename `ModelSourceChangedAction` etc to `SourceModelChangedAction` (…
planger 42df2f9
#658 Fix console log level for WebsocketLauncher (#170)
ndoschek c53b472
#635: Execute all pending actions before disposing action dispatcher …
martin-fleck-at 3e896ab
v1.0.0 (#173)
tortmayr f599b30
Change to 1.1.0-SNAPSHOT Version (#174)
tortmayr 2e68379
#622 Add glsp.server.emf source to p2 plugin (#176)
ndoschek 4086508
#622 Export missing package org.eclipse.glsp.server.emf.idgen (#177)
ndoschek 6a73618
#694: Add Layoutable interface (#175)
CamilleLetavernier 2c98175
#694 Update CHANGELOG (#178)
ndoschek 8e04f99
GH-706 Update protocol version (#179)
xai 9d5605c
#738: Extend ComputedBoundsAction with route (#181)
martin-fleck-at bb8c083
added a new constructor method providing a custom sort string (#182)
rsoika ffdd8d2
Update tycho maven version: 2.3.0 => 2.7.5 (#180)
xai db1154f
Update Jenkinsconfiguration (#184)
tortmayr a0ede16
Replace shield.io bages
tortmayr 5de00e2
Update server.websocket to Jetty 11 (#185)
tortmayr 2c89a2d
Switch to Jetty 10 (#186)
tortmayr cd912b2
Update changelog (#188)
tortmayr 284e2dd
don't wait on stdin in websocket server (#189)
mockersf cbff858
Let OperationHandlers return an optional command to control execution…
martin-fleck-at 88719d8
Fix Javadoc comment (#190)
martin-fleck-at e1e1ef4
Remove unnecessary 'ApplyTaskEditAction' and update operation handler…
martin-fleck-at 3cd5d8a
Ensure existing IdKeeperAdapters are found
planger 30f049b
Update changelog (#193)
tortmayr a398b24
Maintain the revision of graph models in `EMFGModelFactory`
planger 24a9ee7
Adds Ares Spifly to target & update site (#196)
tortmayr 75284c4
GLSP-964 Properly bind WorkflowGLSPServer (#197)
tortmayr 406046b
chore: align startup message to include port number (#195)
xai 5a0d50b
GLSP-974: Use interface-injection for all subclasses of ModelState (#…
CamilleLetavernier 0ef0a7e
implement subclientId for server
hege088 a5107f0
implement subclientId for server
hege088 4a5bb99
Add validation reason and distinguish between live and batch validati…
planger 75cf930
feat: adjust server startup to use autoassigned ports (#198)
xai 593b597
GLSP-991: Switch Jenkins build to Java 17 (#201)
tortmayr 6d96d40
fix selection bug: subclientId not passed to response actions
hege088 f4ebcf0
fix selection bug: subclientId not passed to response actions
hege088 365d38b
Merge branch 'master' into glsp-collaboration
hege088 63dc23b
Merge branch 'master' into glsp-collaboration
hege088 cfa7065
add subclientId to EmfModelState interface
hege088 017bf0e
add subclientId to EmfModelState interface
hege088 d835a03
move CommandStackManager out of internal
hege088 adb437d
move CommandStackManager out of internal
hege088 19a4bfd
give access to command package from outside
hege088 dbc2f53
give access to command package from outside
hege088 353b98a
Adding max version requirements for guava to prevent version conflicts
N1k145 de002f8
Replace VSCode with VS Code in readme
planger 63ac005
GLSP-979: Introduce 'deselectAll' flag for SelectAction (#204)
martin-fleck-at 92b3258
Add support for progress reporting
planger 975dec8
Fix Javadoc @returns and use @return instead (#206)
planger d01e5da
Expected and actual are swapped
planger 0f9e3ee
GLSP-77: Allow WebSocket connections to reconnect after interrupt (#208)
ndoschek 3e31289
Remove constant for deprecated stack layout
planger 7ecc193
GLSP-1116 Revise model loading
tortmayr 947ad04
GLSP-1117: Remove need for explicit definition of client actions
tortmayr c8389fa
GLSP-1071: Rename ServerStatus/ServerMessage action
tortmayr ff544bc
Fix typo in javadoc
tortmayr 4e59c8e
Remove accidential commited code
tortmayr b061e44
Add hostname arg to cli parser (#214)
tortmayr 7dc105e
211: Revise TypeHints and server side feedback for creation actions (…
CamilleLetavernier c242862
GLSP-211 Fix typos in new Edge Checker API (#215)
tortmayr 2d38664
Updated Guice to 7.0.0 (#216)
N1k145 0814290
Update to Java 17 (#217)
tortmayr c17a028
GLSP-1127: Fix publish build (#218)
tortmayr 3a422c8
Bugfixes for 2.0 (#219)
tortmayr 28f8498
v2.0.0 (#220)
tortmayr 3ba1ec1
Switch back to snapshot versions (#222)
tortmayr 6df5044
Add ghost elements to tool palette items through trigger actions (#221)
martin-fleck-at 3586921
Fixes https://github.com/eclipse-glsp/glsp/issues/1199 (#223)
dmm9 dece944
GLSP-1213 Fix ELK version to 0.8.1 (#225)
tortmayr de3825e
Fixes eclipse-glsp/glsp#1212 (#224)
ivy-cst 3d47c33
v2.1.0 (#226)
tortmayr 78a5fbd
fix findings
xai 7a40ce7
fix findings
xai 78ec6bc
Merge branch 'master' into glsp-collaboration
hege088 bae2608
Merge branch 'master' into glsp-collaboration
hege088 3d8d7f4
Add comment to subclientId, fix remaining findings from Merge
hege088 960bfb6
Add comment to subclientId, fix remaining findings from Merge
hege088 9738515
Add PR template
planger 3f46eee
Fix log4j maven version (#230)
haydar-metin 384e49c
Add Resizable with 'resizeLocations' to shape elements (#231)
martin-fleck-at d1f939b
Minor improvements (#233)
tortmayr f421a56
Configure fork and join nodes as not resizable (#232)
tortmayr e7f46ab
Make ActionDispatcher more easily customizable (#235)
martin-fleck-at f137307
Improve customizability through more protected methods and fields (#236)
martin-fleck-at f5eda9c
Update changelog (#237)
tortmayr cfb3ec5
Fix workflow documentation navigation example (#238)
tortmayr 4a2c8dc
Update to 2.2.0 snapshot versions (#239)
tortmayr fee6301
v2.2.1
tortmayr 2830044
Switch to 2.3.0-SNAPSHOT version
tortmayr d37d7df
* set subclientid within ActionDispatcher to remove it from method si…
b214e07
* set subclientid within ActionDispatcher to remove it from method si…
411ddfa
Merge branch 'refs/heads/master' into collabAdvanced
ae71e47
Merge branch 'refs/heads/master' into collabAdvanced
2fb9f99
* implement fixes of PR comments
6441a5b
* implement fixes of PR comments
36832c4
* set subclientid within ActionDispatcher to remove it from method si…
MatthiasHofstaetter 76e45eb
Add PR template
planger 64419ec
Fix log4j maven version (#230)
haydar-metin 00a8f77
Add Resizable with 'resizeLocations' to shape elements (#231)
martin-fleck-at 050c1b0
Minor improvements (#233)
tortmayr 44188ce
Configure fork and join nodes as not resizable (#232)
tortmayr 6bea5d5
Make ActionDispatcher more easily customizable (#235)
martin-fleck-at 952d7ed
Improve customizability through more protected methods and fields (#236)
martin-fleck-at 04ec7b9
Update changelog (#237)
tortmayr 2484659
Fix workflow documentation navigation example (#238)
tortmayr 354a11e
Update to 2.2.0 snapshot versions (#239)
tortmayr 66a75da
v2.2.1
tortmayr c8715d2
Switch to 2.3.0-SNAPSHOT version
tortmayr dbce3c0
* implement fixes of PR comments
MatthiasHofstaetter 03c6f94
Merge remote-tracking branch 'origin/collabAdvanced' into collabAdvanced
MatthiasHofstaetter 7ab57b6
Merge branch 'collabAdvanced' of https://github.com/MatthiasHofstaett…
MatthiasHofstaetter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/command/CommandStackFactory.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2019-2021 EclipseSource and others. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* https://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the Eclipse | ||
* Public License v. 2.0 are satisfied: GNU General Public License, version 2 | ||
* with the GNU Classpath Exception which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
******************************************************************************/ | ||
package org.eclipse.glsp.server.command; | ||
|
||
import org.eclipse.emf.common.command.CommandStack; | ||
|
||
public interface CommandStackFactory { | ||
CommandStack createCommandStack(); | ||
} |
28 changes: 28 additions & 0 deletions
28
plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/command/CommandStackManager.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2019-2021 EclipseSource and others. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* https://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the Eclipse | ||
* Public License v. 2.0 are satisfied: GNU General Public License, version 2 | ||
* with the GNU Classpath Exception which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
******************************************************************************/ | ||
package org.eclipse.glsp.server.command; | ||
MatthiasHofstaetter marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
import java.util.List; | ||
|
||
import org.eclipse.emf.common.command.CommandStack; | ||
|
||
public interface CommandStackManager { | ||
CommandStack getOrCreateCommandStack(String subclientId); | ||
|
||
List<CommandStack> getAllCommandStacks(); | ||
|
||
void setCommandStack(CommandStack commandStack, String subclientId); | ||
} |
67 changes: 67 additions & 0 deletions
67
...g.eclipse.glsp.server/src/org/eclipse/glsp/server/command/DefaultCommandStackManager.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2019-2021 EclipseSource and others. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* https://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the Eclipse | ||
* Public License v. 2.0 are satisfied: GNU General Public License, version 2 | ||
* with the GNU Classpath Exception which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
******************************************************************************/ | ||
package org.eclipse.glsp.server.command; | ||
MatthiasHofstaetter marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
import java.util.ArrayList; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import org.eclipse.emf.common.command.CommandStack; | ||
import org.eclipse.glsp.server.utils.CollaborationUtil; | ||
|
||
import com.google.inject.Inject; | ||
|
||
public class DefaultCommandStackManager implements CommandStackManager { | ||
|
||
@Inject | ||
CommandStackFactory factory; | ||
Check warning on line 31 in plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/command/DefaultCommandStackManager.java
|
||
|
||
// subclientId, CommandStack | ||
protected Map<String, CommandStack> commandStackMap = new HashMap<>(); | ||
|
||
@Override | ||
public CommandStack getOrCreateCommandStack(final String subclientId) { | ||
String subclientIdOrFallback = getSubclientIdOrFallback(subclientId); | ||
if (commandStackMap.containsKey(subclientIdOrFallback)) { | ||
return commandStackMap.get(subclientIdOrFallback); | ||
} | ||
|
||
CommandStack commandStack = factory.createCommandStack(); | ||
commandStackMap.put(subclientIdOrFallback, commandStack); | ||
return commandStack; | ||
} | ||
|
||
@Override | ||
public List<CommandStack> getAllCommandStacks() { return new ArrayList<>(commandStackMap.values()); } | ||
|
||
@Override | ||
public void setCommandStack(final CommandStack commandStack, final String subclientId) { | ||
String subclientIdOrFallback = getSubclientIdOrFallback(subclientId); | ||
if (commandStackMap.containsKey(subclientIdOrFallback)) { | ||
commandStackMap.get(subclientIdOrFallback).flush(); | ||
} | ||
commandStackMap.put(subclientIdOrFallback, commandStack); | ||
} | ||
|
||
private String getSubclientIdOrFallback(final String subclientId) { | ||
if (subclientId != null) { | ||
return subclientId; | ||
} | ||
return CollaborationUtil.FALLBACK_SUBCLIENT_ID; | ||
} | ||
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.