Slide 1

Slide 1 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Refactor Eclipse-specific tooling into language servers Martin Lippert @martinlippert

Slide 2

Slide 2 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Language Server Protocol 2

Slide 3

Slide 3 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 3 https://code.visualstudio.com/images/2016_06_27_language-server-protocol.png

Slide 4

Slide 4 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 4 https://code.visualstudio.com/images/2016_06_27_language-server-sequence.png

Slide 5

Slide 5 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Our Background 5

Slide 6

Slide 6 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 6 at least 2 more… Cloud Foundry Manifest Files Concourse CI Pipeline Manifests BOSH Deployment Manifest Files

Slide 7

Slide 7 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Refactoring existing plugins for Eclipse 7

Slide 8

Slide 8 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Plugin 8 My Plugin JVM Equinox OSGi Runtime Eclipse UI Plugin JDT Core JDT UI Core Resources Plugin Server Core

Slide 9

Slide 9 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ My Language Server JVM Equinox OSGi Runtime Eclipse UI JDT Core JDT UI Core Resources JVM (?) Files LSP

Slide 10

Slide 10 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 0 My Language Server Files

Slide 11

Slide 11 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Strategy A 11

Slide 12

Slide 12 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Plugin 12 My Plugin JVM Equinox OSGi Runtime Eclipse UI Plugin JDT Core JDT UI Core Resources Plugin Server Core

Slide 13

Slide 13 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 13 My Plugin JVM Equinox OSGi Runtime JDT Core Core Resources Server Core Language Server LSP Connector

Slide 14

Slide 14 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Strategy A • used by jdt.js (the Java Language Server) • pros: • re-use as much as possible • easy to adopt fixes/changes in components • same structure than before • cons: • probably more heavyweight • need to replace dependencies to UI 14

Slide 15

Slide 15 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Strategy B 15

Slide 16

Slide 16 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Plugin 16 My Plugin JVM Equinox OSGi Runtime Eclipse UI Plugin JDT Core JDT UI Core Resources Plugin Server Core

Slide 17

Slide 17 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Third Party Lib Third Party Lib 17 My Plugin JVM Language Server LSP Connector

Slide 18

Slide 18 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Strategy B • used by our language servers • pros: • more lightweight • use small third-party libs of your choice • cons: • most likely re-write code • need to replace dependencies to UI • you “own“ probably more code 18

Slide 19

Slide 19 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ What about the client side? 19

Slide 20

Slide 20 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Strategy A 20

Slide 21

Slide 21 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Plugin 21 My Plugin JVM Equinox OSGi Runtime Eclipse UI Plugin JDT Core JDT UI Core Resources Plugin Server Core

Slide 22

Slide 22 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 2 JVM Equinox OSGi Runtime Eclipse UI JDT Core JDT UI Core Resources JVM Files My Plugin

Slide 23

Slide 23 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Core 3 JVM Equinox OSGi Runtime Eclipse UI JDT Core JDT UI Core Resources JVM Files UI

Slide 24

Slide 24 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Core 4 JVM Equinox OSGi Runtime Eclipse UI JDT Core JDT UI Core Resources JVM Files LSP UI

Slide 25

Slide 25 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Strategy A • pros: • frond-end experience close to before the refactoring • re-use of UI-specific code of the plugin • cons: • need to write glue code on the client side • take async nature into account might be different, if UI was not designed for that before • you have to keep implementing the client and the server side 25

Slide 26

Slide 26 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Strategy B 26

Slide 27

Slide 27 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Plugin 27 My Plugin JVM Equinox OSGi Runtime Eclipse UI Plugin JDT Core JDT UI Core Resources Plugin Server Core

Slide 28

Slide 28 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 8 JVM Equinox OSGi Runtime Eclipse UI JDT Core JDT UI Core Resources JVM Files My Plugin

Slide 29

Slide 29 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 9 JVM Equinox OSGi Runtime Eclipse UI JDT Core JDT UI Core Resources JVM Files Core UI

Slide 30

Slide 30 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 0 JVM Equinox OSGi Runtime Eclipse UI JDT Core JDT UI Core Resources JVM Files LSP LSP4E Core

Slide 31

Slide 31 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 1 JVM Equinox OSGi Runtime Eclipse UI JDT Core JDT UI Core Resources JVM Files Generic Editor LSP4E Core

Slide 32

Slide 32 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Strategy B • pros: • nearly no work on the UI side • generic editor and LSP4E is a great combination • cons: • less control over the UX • things might look different • if you need extra UI, you end up with a combination of A & B 32

Slide 33

Slide 33 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Some final thoughts • great to have separate language server features • update language servers individually is awesome • separation might be hard • quite a bit of work without short-term value • pays off in the long-term 33

Slide 34

Slide 34 text

Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Thanks!!! 34 Download STS from: https://spring.io/tools Ask questions on Stack Overflow: http://stackoverflow.com/questions/tagged/spring-tool-suite Report issues: https://github.com/spring-projects/spring-ide