redhat-developer / redhat-developer/vscode-java

How do I implement embedded Java language in XML document (in a vscode extension)?

Open
#1,955 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

I've read docs on https://code.visualstudio.com/api/language-extensions/embedded-languages but still wondering if it's possible to reuse vscode-java language server to provide intellisense/autocomplete features for Java/BeanShell code imbedded in XML like:

<!DOCTYPE Rule PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Rule language="beanshell" name="">
<Description></Description>
<Source><![CDATA[
  import java.util.Map;

  private Map putInMap(String s1, String s1){
    Map data = new HashMap();
    data.put("first", s1);
    data.put("second", s2);
    return data;
  }
  return putInMap("foo", "bar");
]]></Source>
</Rule>

I guess I don't need to reimplement my own language server from scratch (though BeanShell is not strictly Java, but some reduced version of it) and can refer to the existing Java server from vscode-java. Any suggestions/samples?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the embedded-languages documentation and the vscode-java language-server integration described in the issue. Determine whether the existing server can be reused for Java or BeanShell inside XML CDATA; done means a documented supported approach or a clear limitation, ideally with a sample.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.