mirror of https://github.com/buggins/dlangide.git
workspace stub
This commit is contained in:
parent
9d5db4e971
commit
d6faa69274
|
@ -1,11 +1,14 @@
|
|||
module dlangide.ui.commands;
|
||||
|
||||
import dlangui.core.events;
|
||||
|
||||
enum IDEActions : int {
|
||||
None = 0,
|
||||
FileOpen = 10000,
|
||||
ProjectOpen = 1010000,
|
||||
FileOpen,
|
||||
FileClose,
|
||||
FileExit,
|
||||
EditCopy = 11000,
|
||||
EditCopy = 1011000,
|
||||
EditPaste,
|
||||
EditCut,
|
||||
EditUndo,
|
||||
|
|
|
@ -116,7 +116,7 @@ class IDEFrame : VerticalLayout, MenuItemClickHandler {
|
|||
UIString caption;
|
||||
caption = "Open Text File"d;
|
||||
FileDialog dlg = new FileDialog(caption, window, null);
|
||||
dlg.onDialogResult = delegate(Dialog dlg, Action result) {
|
||||
dlg.onDialogResult = delegate(Dialog dlg, const Action result) {
|
||||
//
|
||||
};
|
||||
dlg.show();
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
module dlangide.workspace.project;
|
||||
|
||||
/// DLANGIDE D project
|
||||
class Project {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
module dlangide.workspace.workspace;
|
||||
|
||||
import dlangide.workspace.project;
|
||||
|
||||
/// DlangIDE workspace
|
||||
class Workspace {
|
||||
protected string _dir;
|
||||
protected dstring _name;
|
||||
protected dstring _description;
|
||||
protected Project[] _projects;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"name": "sample1",
|
||||
"description": "Sample workspace 1 for testing of DLANG IDE",
|
||||
"projects": {
|
||||
"sampleproject1": "./sampleproject1",
|
||||
"sampleproject2": "./sampleproject2",
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"dub": "dub"
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "sampleproject1",
|
||||
"description": "dlangide sample project 1",
|
||||
"homepage": "https://github.com/buggins/dlangide",
|
||||
"license": "Boost",
|
||||
"authors": ["Vadim Lopatin"],
|
||||
|
||||
"targetName": "sample1",
|
||||
"targetPath": "bin",
|
||||
"targetType": "executable",
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
{
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env rdmd
|
||||
// Computes average line length for standard input.
|
||||
import std.stdio;
|
||||
|
||||
void main()
|
||||
{
|
||||
ulong lines = 0;
|
||||
double sumLength = 0;
|
||||
foreach (line; stdin.byLine())
|
||||
{
|
||||
++lines;
|
||||
sumLength += line.length;
|
||||
}
|
||||
writeln("Average line length: ",
|
||||
lines ? sumLength / lines : 0);
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "sampleproject2",
|
||||
"description": "dlangide sample project 2",
|
||||
"homepage": "https://github.com/buggins/dlangide",
|
||||
"license": "Boost",
|
||||
"authors": ["Vadim Lopatin"],
|
||||
|
||||
"targetName": "sample2",
|
||||
"targetPath": "bin",
|
||||
"targetType": "executable",
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
{
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env rdmd
|
||||
// Computes average line length for standard input.
|
||||
import std.stdio;
|
||||
|
||||
void main()
|
||||
{
|
||||
ulong lines = 0;
|
||||
double sumLength = 0;
|
||||
foreach (line; stdin.byLine())
|
||||
{
|
||||
++lines;
|
||||
sumLength += line.length;
|
||||
}
|
||||
writeln("Average line length: ",
|
||||
lines ? sumLength / lines : 0);
|
||||
}
|
Loading…
Reference in New Issue