This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 178987 - Language embedding does not work
Summary: Language embedding does not work
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal with 2 votes (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-22 13:01 UTC by Tim Lebedkov
Modified: 2012-05-30 05:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
JSNILanguageProvider (1.93 KB, text/plain)
2009-12-22 13:02 UTC, Tim Lebedkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Lebedkov 2009-12-22 13:01:36 UTC
I'm not quite sure whether this is a bug in lexer, but

http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-lexer/overview-summary.html

says:

Or it may be provided dynamically through the xml layer by using file named with the token-id's name with ".instance" suffix located in "Editors/language-mime-type/embed" folder. The file should instantiate the language description for the embedded language.

This is how I try to register my language provider (the source for the language provider is attached):

    <folder name="Editors">
        <folder name="text">
            <folder name="x-java">
                <folder name="embed">
                    <file name="BLOCK_COMMENT.instance">
                        <attr name="instanceCreate" newvalue="org.netbeans.modules.gwt4nb.JSNILanguageProvider"/>
                    </file>
                </folder>
            </folder>
        </folder>
    </folder>

But it does not work.
Comment 1 Tim Lebedkov 2009-12-22 13:02:54 UTC
Created attachment 92872 [details]
JSNILanguageProvider
Comment 2 Peter Pis 2009-12-23 01:26:37 UTC
Reassigning.
Comment 3 Tim Lebedkov 2010-01-27 03:17:04 UTC
-
Comment 4 Tim Lebedkov 2010-04-12 19:24:02 UTC
could somebody please at least confirm that this is a bug? A pointer to the module that is responsible for this would also be nice. I could try to provide a patch that fixes this.
Comment 5 Miloslav Metelka 2012-05-29 08:37:24 UTC
You're right there was an error. I have fixed the docs and provided an example.
The code that creates these embeddings is in lexer/nbbridge in MimeLookupFolderInfo.
http://hg.netbeans.org/jet-main/rev/c59f8a616040
Comment 6 Quality Engineering 2012-05-30 05:30:53 UTC
Integrated into 'main-golden', will be available in build *201205300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c59f8a616040
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #178987 - Language embedding does not work.