This commit is contained in:
Vadim Lopatin 2015-02-06 16:54:46 +03:00
parent 42fb5cab8e
commit 1278b1c0e8
4 changed files with 56 additions and 10 deletions

View File

@ -1,20 +1,21 @@
Dlang IDE Dlang IDE
========= =========
Trying to write D language IDE using dlangUI library. D language IDE written using DlangUI library.
Currently supported features: Currently supported features:
* Can open DUB (dub.json) projects * Can open DUB (dub.json) projects
* Shows tree with project source files * Shows tree with project source files
* Can open source files from project or file system in multi-tab editor * Can open and edit source files from project or file system in multi-tab editor
* D language source code syntax highlight (basic) * D language source code syntax highlight (basic)
* Build and run project with DUB * Build and run project with DUB
TODO: ![screenshot](http://buggins.github.io/dlangui/screenshots/screenshot-dlangide.png "screenshot")
* Improve look and feel GitHub page: [https://github.com/buggins/dlangide](https://github.com/buggins/dlangide)
* Debugger support
DlangUI project GitHub page: [https://github.com/buggins/dlangui](https://github.com/buggins/dlangui)
Build and run with DUB: Build and run with DUB:
@ -23,8 +24,6 @@ Build and run with DUB:
cd dlangide cd dlangide
dub run dub run
Try to open sample project Tetris, from workspaces/tetris with DlangIDE. HINT: Try to open sample project Tetris, from workspaces/tetris with DlangIDE.
To develop in VisualD together with DlangUI, put this project on the same level as dlangui repository, and its dependencies. To develop in VisualD together with DlangUI, put this project on the same level as dlangui repository, and its dependencies.

View File

@ -31,7 +31,7 @@
<useArrayBounds>0</useArrayBounds> <useArrayBounds>0</useArrayBounds>
<noboundscheck>0</noboundscheck> <noboundscheck>0</noboundscheck>
<useSwitchError>0</useSwitchError> <useSwitchError>0</useSwitchError>
<useUnitTests>0</useUnitTests> <useUnitTests>1</useUnitTests>
<useInline>0</useInline> <useInline>0</useInline>
<release>0</release> <release>0</release>
<preservePaths>0</preservePaths> <preservePaths>0</preservePaths>

View File

@ -2826,11 +2826,13 @@ TEST"
]); ]);
} }
unittest { unittest {
version(DisableLexerTest) {
import std.stdio; import std.stdio;
import std.conv; import std.conv;
import std.utf; import std.utf;
import ddx.lexer.LineStream; import dlangui.core.linestream;
string fname = "/home/lve/src/d/ddc/ddclexer/tests/tokenizer_test.d"; string fname = "/home/lve/src/d/ddc/ddclexer/tests/tokenizer_test.d";
writeln("opening file"); writeln("opening file");
try { try {
@ -2857,4 +2859,5 @@ unittest {
} catch (Exception e) { } catch (Exception e) {
writeln("Exception " ~ e.toString); writeln("Exception " ~ e.toString);
} }
}
} }

View File

@ -13,6 +13,7 @@ mixin APP_ENTRY_POINT;
/// entry point for dlangui based application /// entry point for dlangui based application
extern (C) int UIAppMain(string[] args) { extern (C) int UIAppMain(string[] args) {
// embed non-standard resources listed in views/resources.list into executable // embed non-standard resources listed in views/resources.list into executable
embeddedResourceList.addResources(embedResourcesFromList!("resources.list")()); embeddedResourceList.addResources(embedResourcesFromList!("resources.list")());
@ -55,6 +56,49 @@ extern (C) int UIAppMain(string[] args) {
// show window // show window
window.show(); window.show();
//jsonTest();
// run message loop // run message loop
return Platform.instance.enterMessageLoop(); return Platform.instance.enterMessageLoop();
} }
unittest {
void jsonTest() {
import dlangui.core.settings;
Setting s = new Setting();
s["param1_ulong"] = cast(ulong)1543453u;
s["param2_long"] = cast(long)-22934;
s["param3_double"] = -39.123e-10;
s["param4_string"] = "some string value";
s["param5_bool_true"] = true;
s["param6_bool_false"] = false;
s["param7_null"] = new Setting();
Setting a = new Setting();
a[0] = cast(ulong)1u;
a[1] = cast(long)-2;
a[2] = 3.3;
a[3] = "some string value";
a[4] = true;
a[5] = false;
a[6] = new Setting();
Setting mm = new Setting();
mm["n"] = cast(ulong)5u;
mm["name"] = "test";
a[7] = mm;
s["param8_array"] = a;
Setting m = new Setting();
m["aaa"] = "bbb";
m["aaa2"] = cast(ulong)5u;
m["aaa3"] = false;
s["param9_object"] = m;
string json = s.toJSON(true);
s.save("test_file.json");
Setting loaded = new Setting();
loaded.load("test_file.json");
string json2 = loaded.toJSON(true);
loaded.save("test_file2.json");
}
}