mirror of https://github.com/buggins/dlangide.git
parent
e7d58c9750
commit
251fd6b8f7
2
dub.json
2
dub.json
|
@ -12,7 +12,7 @@
|
|||
"stringImportPaths": ["views", "views/res", "views/res/i18n", "views/res/mdpi", "views/res/hdpi"],
|
||||
|
||||
"dependencies": {
|
||||
"dlangui": "==0.9.123",
|
||||
"dlangui": "==0.9.124",
|
||||
"dsymbol": "~>0.2.9",
|
||||
"dcd": "~>0.9.1"
|
||||
},
|
||||
|
|
|
@ -1256,6 +1256,7 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
|
|||
ProjectFolder folder;
|
||||
if (cast(Project)obj) {
|
||||
project = cast(Project)obj;
|
||||
folder = project.firstSourceFolder;
|
||||
} else if (cast(ProjectFolder)obj) {
|
||||
folder = cast(ProjectFolder)obj;
|
||||
project = folder.project;
|
||||
|
|
|
@ -246,12 +246,18 @@ class NewFileDlg : Dialog {
|
|||
return setError("Invalid file name");
|
||||
_moduleName = filename;
|
||||
char[] buf;
|
||||
foreach(ch; relativePath) {
|
||||
foreach(c; relativePath) {
|
||||
char ch = c;
|
||||
if (ch == '/' || ch == '\\')
|
||||
buf ~= '.';
|
||||
else
|
||||
buf ~= ch;
|
||||
ch = '.';
|
||||
else if (ch == '.')
|
||||
ch = '_';
|
||||
if (ch == '.' && (buf.length == 0 || buf[$-1] == '.'))
|
||||
continue; // skip duplicate .
|
||||
buf ~= ch;
|
||||
}
|
||||
if (buf.length && buf[$-1] == '.')
|
||||
buf.length--;
|
||||
_packageName = buf.dup;
|
||||
string m;
|
||||
if (_currentTemplate.kind == FileKind.MODULE) {
|
||||
|
@ -281,7 +287,7 @@ class NewFileDlg : Dialog {
|
|||
string txt = "module " ~ _packageName ~ ";\n\n" ~ _currentTemplate.srccode;
|
||||
write(_fullPathName, txt);
|
||||
} else if (_currentTemplate.kind == FileKind.PACKAGE) {
|
||||
string txt = "package " ~ _packageName ~ ";\n\n" ~ _currentTemplate.srccode;
|
||||
string txt = "module " ~ _packageName ~ ";\n\n" ~ _currentTemplate.srccode;
|
||||
write(_fullPathName, txt);
|
||||
} else {
|
||||
write(_fullPathName, _currentTemplate.srccode);
|
||||
|
|
|
@ -270,6 +270,10 @@ class OutputPanel : DockWindow {
|
|||
return null;
|
||||
}
|
||||
|
||||
void onTabClose(string tabId) {
|
||||
Log.d("OutputPanel onTabClose ", tabId);
|
||||
}
|
||||
|
||||
override protected Widget createBodyWidget() {
|
||||
layoutWidth(FILL_PARENT).layoutHeight(FILL_PARENT);
|
||||
_tabs = new TabWidget("OutputPanelTabs", Align.Bottom);
|
||||
|
@ -277,6 +281,7 @@ class OutputPanel : DockWindow {
|
|||
_tabs.setStyles(STYLE_DOCK_WINDOW, STYLE_TAB_DOWN_DARK, STYLE_TAB_DOWN_BUTTON_DARK, STYLE_TAB_UP_BUTTON_DARK_TEXT, STYLE_DOCK_HOST_BODY);
|
||||
_tabs.layoutWidth(FILL_PARENT).layoutHeight(FILL_PARENT);
|
||||
_tabs.tabHost.layoutWidth(FILL_PARENT).layoutHeight(FILL_PARENT);
|
||||
_tabs.tabClose = &onTabClose;
|
||||
|
||||
_logWidget = new CompilerLogWidget("logwidget");
|
||||
_logWidget.readOnly = true;
|
||||
|
@ -285,7 +290,7 @@ class OutputPanel : DockWindow {
|
|||
_logWidget.styleId = "EDIT_BOX_NO_FRAME";
|
||||
|
||||
//_tabs.tabHost.styleId = STYLE_DOCK_WINDOW_BODY;
|
||||
_tabs.addTab(_logWidget, "Compiler Log"d);
|
||||
_tabs.addTab(_logWidget, "Compiler Log"d, null, true);
|
||||
_tabs.selectTab("logwidget");
|
||||
|
||||
static if (ENABLE_INTERNAL_TERMINAL) {
|
||||
|
|
|
@ -483,6 +483,15 @@ class Project : WorkspaceItem {
|
|||
return _builderSourcePaths;
|
||||
}
|
||||
|
||||
/// returns first source folder for project or null if not found
|
||||
ProjectFolder firstSourceFolder() {
|
||||
for(int i = 0; i < _items.childCount; i++) {
|
||||
if (_items.child(i).isFolder)
|
||||
return cast(ProjectFolder)_items.child(i);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
ProjectSourceFile findSourceFile(string projectFileName, string fullFileName) {
|
||||
return _items ? _items.findSourceFile(projectFileName, fullFileName) : null;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
v0.7.72
|
||||
v0.7.74
|
Loading…
Reference in New Issue