Current status

The Sling IDE tooling project has been restructured from an Eclipse-only build with Tycho to a build that holds several subtrees:

  • shared ( code that is reusable in multiple environments )
  • eclipse ( code that is specific to Eclipse )
  • cli ( code that is specific to a CLI-only sync tool )

More details are found in the Sling IDE Tooling README file.

The current tooling has proof-of-concept status. Although it is known to work for basic use cases, it lacks in-depth testing and also is able to work only with in-place sync, and should get at least import and export commands.

Comparison to vlt

Vlt is a CLI-focused tool modeled after SCM clients ( checkin/checkout operations ) and works with only a single format ( the canonical FileVault representation ). The Sling content sync CLI tool works on incremental changes for all change types ( as opposed to vlt sync ) and is able to support other serialization formats ( even though none is present yet ). Additionally, using a common code base in multiple environments allow consistency and has more chances to flesh out bugs.

Proposals (old)

Sling IDE tooling for other IDEs, especially IntelliJ, is often requested ( see also SLING-5268 - Getting issue details... STATUS ). So far there has been little progress since the build tooling is centered around Maven/Tycho and there is no immediate way of sharing the results. This page lists the possible approaches we can take in making the IDE tooling usable in other IDEs.

Build a single reactor with p2 and non-p2 projects

It may be possible to have a single reactor with p2 and non-p2 projects. Projects such as EGit/JGit have a split build, ( JGit is plain Java, EGit is p2/Tycho ) so we might find some ideas there.

Evaluation

Not possible due to Tycho limitations, see https://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts .

Switch the build to plain Maven

Not everyone builds with Tycho. Bndtools for instance are built with gradle, so no p2 AFAICT. Some resources:

Evaluation

Build a Language Server Protocol implementation and reuse it in other IDEs

The Language Server Protocol is an IDE-agnostic way of implementing tooling for programming languages. The content sync part can be thought of as a 'language' itself, while the 'compilation' is publishing on the server.

Having the content sync part implemented as a LSP plug-in would mean much easier re-use in all supported IDEs ( see https://langserver.org/#implementations-client for canonical listing ):

  • Eclipse
  • Eclipse Che
  • IntelliJ ( with plugin )
  • Visual Studio Code
  • Sublime Text 3
  • vim

Notably missing is Netbeans ( NETBEANS-180 - Getting issue details... STATUS ) unfortunately.

Also of interest would be building a LSP plug-in for HTL, which would be much better suited for the task.

Evaluation

I've done a quick spike and implemented a LSP client and server using LSP4J. The implementation was relatively straightforward and allowed me to explore the implications of going the LSP route. Currently LSP is very much geared towards implementing generic editor services, with some additions used for running workspace-wide operations. There is no support for defining IDE models which we can use for the content navigator and the properties views. Therefore the LSP route is not viable for our current needs. Also there is little to be gained by reusing the LSP4J runtime to create a client-server split, since we would have to implement the client part for each IDE.

Update: as of 2019-02-07 I was made aware via email that there is a way to add navigator support with the LSP, quoting:

The JDT-LS does this in VSCode: they implemented some specific URIs patterns that the send as documentSymbols or workspaceSymbols through LSP to populate the navigator. AFAIK, this would require some development in Eclipse LSP4E to support similar patterns, but if it happens to be generic and reusable enough, it'd be a good addition to Eclipse LSP4E and other clients.

 

  • No labels