redhat-developer / redhat-developer/vscode-java
How do I implement embedded Java language in XML document (in a vscode extension)?
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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