Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Refactor Eclipse-specific tooling into language...

Refactor Eclipse-specific tooling into language servers

Martin Lippert

October 25, 2017
Tweet

More Decks by Martin Lippert

Other Decks in Programming

Transcript

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. 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
  33. 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
  34. 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