Well, here is what I think happens:
JsEmbeddingProvider calls:
WebUtils.getResultIterator(resultIterator, "text/html")
to find the HTML part of the given code. But (inside of that), it does:
if (ri.getSnapshot().getMimeType().equals(mimetype)) {
but the top-level mimetype (ri.getSnapshot().getMimeType()) is
(unsurprisingly) "text/vue+html", which obviously does not match
"text/html", so it tries to find "text/html" in embeddings, which will in
turn call JsEmbeddingProvider, etc.
So roughly/probably what is needed is to allow "text/vue+html" to be
accepted as "text/html". I guess there are many ways to do it, one of them
would be to replace the "if" above with something like:
MimePath topLevelPath = ri.getSnapshot().getMimePath();
String generalized = topLevelPath.getInheritedType();
if (generalized == null || "".equals(generalized)) {
generalized = topLevelPath.getPath();
}
if (generalized.equals(mimetype)) {
But not an expert in the WebUtils stuff, and I probably don't have time to
investigate very deeply. Might also be needed on the other place that
compares mimetypes. But with this, I got the syntax highlighting working,
but not HTML code completion, which is suspicious.
(I suspect a more proactive approach might be needed - if something does
not work, put a breakpoint at an interesting place and see what happens.)
Jan
On Wed, Jan 16, 2019 at 5:07 PM Christian Lenz <[email protected]>
wrote:
> Hi,
>
> please have a look into this ticket. I got several SOE, when I create a
> new filetype which is text/vue+html or text/whatever+html.
> https://issues.apache.org/jira/browse/NETBEANS-88 Unfortunately, I don’t
> have much experience with that Code so a more advanced dev should have a
> look into this. Thx.
>
>
> Cheers
>
> Chris
>