| Several questions about LDT [message #927939] |
Sun, 30 September 2012 01:44  |
Denis Artemov Messages: 19 Registered: September 2012 |
Junior Member |
|
|
Hi,
I'm trying LDT right now (0.8 and 0.9 versions). Can't make outlining working. It shows only local variables. How to make it to show more members?
Also if to add any russian comment or text into source, variable highliting, syntax coloring, code assistant become broken. How to fix it?
And how to make code folding to work? It sometimes shows (-) for folding randomly in sources, but folds erroneous block if to click on (-).
PS: Sorry for my English 
PPS: standalone LDT 32 bit 0.8 and 0.9
[Updated on: Sun, 30 September 2012 02:25] Report message to a moderator
|
|
|
|
|
| Re: Several questions about LDT [message #929539 is a reply to message #929450] |
Mon, 01 October 2012 10:51   |
Denis Artemov Messages: 19 Registered: September 2012 |
Junior Member |
|
|
Looks like it is enough to change non ASCII-charasters in sources into any ASCII-charaster before creating AST.
I added this to LuaSourceParser.java:
private static String prepareSourceTextForMetaLua(String text)
{
char[] chars = text.toCharArray();
for (int i = 0; i < chars.length; i++) if (chars[i] >= 128) chars[i] = '?';
return new String(chars);
}
and did this:
public IModuleDeclaration parse(IModuleSource input, IProblemReporter reporter) {
LuaSourceRoot module = new LuaSourceRoot(input.getSourceContents().length());
synchronized (LuaSourceParser.class) {
try {
String preparedSource = prepareSourceTextForMetaLua(input.getSourceContents()); // change non ASCII charasters to '?'
module = astBuilder.buildAST(preparedSource); // and then create AST
} catch (LuaException e) {
Activator.logError("Unable to load metalua ast builder :" + input.getFileName(), e); //$NON-NLS-1$
}
...
and my problems with syntax coloring, variables highliting and folding have gone
[Updated on: Mon, 01 October 2012 11:00] Report message to a moderator
|
|
|
|
| Re: Several questions about LDT [message #932835 is a reply to message #930542] |
Thu, 04 October 2012 09:34   |
Simon Bernard Messages: 104 Registered: July 2009 |
Senior Member |
|
|
Hi Denis,
I have some precision/correction about your problems :
1) We currently (v0.8.x) don't support UTF8 encoding, we only support ascii (one byte character exactly).
2) As you found by yourself, all problems about syntax coloring, variables highlighting and folding come from non ascii character in your source file. If you want to follow this problem, a bug is opened.
As you could see, it's a serious problem and we plan to fix it for the v0.9.0, but we did not found a good solution for now.
Your proposition is interesting but this means if there are non ascii character in code, outline content-assist and documentation will contains "?" char instead of the right one :/.
If we don't find a better solution, this could be the lesser evil.
Thx denis for your feedback and the code you post.
|
|
|
|
|
|
|
|
| Re: Several questions about LDT [message #949128 is a reply to message #948704] |
Thu, 18 October 2012 14:18   |
Denis Artemov Messages: 19 Registered: September 2012 |
Junior Member |
|
|
With "mvn clean install -P build-product" it stops on
[INFO] org.eclipse.koneki.ldt.metalua.tests .............. SUCCESS [12.808s]
[INFO] org.eclipse.koneki.ldt.core.tests ................. SUCCESS [14.976s]
[INFO] org.eclipse.koneki.ldt.ui.tests ................... FAILURE [13.837s]
[INFO] org.eclipse.koneki.ldt.product-product ............ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:24.857s
[INFO] Finished at: Fri Oct 19 00:16:07 YEKT 2012
[INFO] Final Memory: 90M/237M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.15.0:test (default-test) on project org.eclipse.koneki.ldt.ui.tests:
There are test failures.
[ERROR]
[ERROR] Please refer to D:\java\LDT\tests\org.eclipse.koneki.ldt.ui.tests\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[Updated on: Thu, 18 October 2012 14:19] Report message to a moderator
|
|
|
|
| Re: Several questions about LDT [message #949281 is a reply to message #949173] |
Thu, 18 October 2012 17:43   |
|
Denis Artemov wrote on Thu, 18 October 2012 21:23The highliting bug gone after updating of LDT from repository. Thanks! 
Excellent! 
Please keep on sharing your experience with LDT, and feel free to discuss enhancement requests or bugs along the way
Benjamin
|
|
|
|
|
|
|
|
| Re: Several questions about LDT [message #998237 is a reply to message #990133] |
Wed, 09 January 2013 11:20  |
Marc Aubry Messages: 37 Registered: August 2012 |
Member |
|
|
Sorry, for the late response, but we still don't reproduce on our side.
Maybe, you reproduce the bug in a 0.9 release ?
And if you copy the content in a new file, do you have the same behavior on opening ?
Marc
|
|
|
Powered by
FUDForum. Page generated in 0.07534 seconds