Supporting multiple languages in a single document

David Nolden zwabel at googlemail.com
Tue Jun 15 15:11:04 UTC 2010


The big question is whether we should create one TopDUContext for each
contained language, or whether we should create separate top-contexts for
the languaged.

The simpler approach would probably be to create multipe, which is guess is
what you're doing.

In general, after my porting to MovingRange is done, it will be possible for
multipe languages to highlight the same document through separate
top-contexts.

To make code-completion etc. work, we could simply add a cursor argument to
standardContextForUrl, and pick the correct context for the cursor.

Just fixing the outline might be more complicated (probably ugly), it would
be simplest to either only show the "master" language in the outline, or to
pick the language depending on the context.

Greetings, David

Am 07.06.2010 13:22 schrieb "Milian Wolff" <mail at milianw.de>:

Jonathan Schmidt-Dominé - Developer, 07.06.2010:

> Okay, that is right.
> So hints are definitely needed, but wouldn't it be still the best way to
do...
This is what I was talking about, look also at my patches ;-)

PHP e.g. already create a single token for the stuff outside it's <?php ...
?>
tokens. The PHP parsejob (either a designated visitor or inside one of the
existing visitors) would then create a parsejob for these tokens with the
new
method I added. The question is _again_: how to decide what language /
mimetype to use for the sourrounding stuff. I so far only hacked it in for
HTML since it's easy there:

<style type="text/css">
...
</style>

So you directly have the mimetype. Same for JavaScript.

Bye

-- 
Milian Wolff
mail at milianw.de
http://milianw.de

--
KDevelop-devel mailing list
KDevelop-devel at kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100615/96a6c7e4/attachment.html>


More information about the KDevelop-devel mailing list