diff --git a/dub.json b/dub.json index 32326f8..9a3cdbe 100644 --- a/dub.json +++ b/dub.json @@ -12,7 +12,7 @@ "stringImportPaths": ["views", "views/res", "views/res/i18n", "views/res/mdpi", "views/res/hdpi"], "dependencies": { - "dlangui": "==0.9.33", + "dlangui": "==0.9.36", "dcd": "~>0.9.0-alpha4" }, diff --git a/src/dlangide/ui/frame.d b/src/dlangide/ui/frame.d index 88a9fb5..b316b84 100644 --- a/src/dlangide/ui/frame.d +++ b/src/dlangide/ui/frame.d @@ -50,7 +50,7 @@ immutable dstring DLANGIDE_VERSION = "v0.6.19"d; bool isSupportedSourceTextFileFormat(string filename) { return (filename.endsWith(".d") || filename.endsWith(".txt") || filename.endsWith(".cpp") || filename.endsWith(".h") || filename.endsWith(".c") - || filename.endsWith(".json") || filename.endsWith(".dd") || filename.endsWith(".ddoc") || filename.endsWith(".xml") || filename.endsWith(".html") + || filename.endsWith(".json") || filename.endsWith(".sdl") || filename.endsWith(".dd") || filename.endsWith(".ddoc") || filename.endsWith(".xml") || filename.endsWith(".html") || filename.endsWith(".html") || filename.endsWith(".css") || filename.endsWith(".log") || filename.endsWith(".hpp")); } @@ -861,6 +861,7 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL FileDialog dlg = new FileDialog(caption, window, null); dlg.filetypeIcons[".d"] = "text-d"; dlg.filetypeIcons["dub.json"] = "project-d"; + dlg.filetypeIcons["dub.sdl"] = "project-d"; dlg.filetypeIcons["package.json"] = "project-d"; dlg.filetypeIcons[".dlangidews"] = "project-development"; return dlg; @@ -888,7 +889,7 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL UIString caption; caption = "Open Text File"d; FileDialog dlg = createFileDialog(caption); - dlg.addFilter(FileFilterEntry(UIString("Source files"d), "*.d;*.dd;*.ddoc;*.di;*.dh;*.json;*.xml;*.ini")); + dlg.addFilter(FileFilterEntry(UIString("Source files"d), "*.d;*.dd;*.ddoc;*.di;*.dh;*.json;*.sdl;*.xml;*.ini")); dlg.addFilter(FileFilterEntry(UIString("All files"d), "*.*")); dlg.path = _settings.getRecentPath("FILE_OPEN_PATH"); dlg.dialogResult = delegate(Dialog d, const Action result) { @@ -966,7 +967,7 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL UIString caption; caption = "Open Workspace or Project"d; FileDialog dlg = createFileDialog(caption); - dlg.addFilter(FileFilterEntry(UIString("Workspace and project files"d), "*.dlangidews;dub.json;package.json")); + dlg.addFilter(FileFilterEntry(UIString("Workspace and project files"d), "*.dlangidews;dub.json;dub.sdl;package.json")); dlg.path = _settings.getRecentPath("FILE_OPEN_WORKSPACE_PATH"); dlg.dialogResult = delegate(Dialog d, const Action result) { if (result.id == ACTION_OPEN.id) { diff --git a/src/dlangide/workspace/project.d b/src/dlangide/workspace/project.d index 7ab43f1..cf6a273 100644 --- a/src/dlangide/workspace/project.d +++ b/src/dlangide/workspace/project.d @@ -14,7 +14,8 @@ import std.utf; /// return true if filename matches rules for workspace file names bool isProjectFile(in string filename) pure nothrow { - return filename.baseName.equal("dub.json") || filename.baseName.equal("package.json"); + return filename.baseName.equal("dub.json") || filename.baseName.equal("DUB.JSON") || filename.baseName.equal("package.json") || + filename.baseName.equal("dub.sdl") || filename.baseName.equal("DUB.SDL"); } string toForwardSlashSeparator(in string filename) pure nothrow { @@ -824,6 +825,9 @@ class DubPackageFinder { /// find package file (dub.json, package.json) in specified dir; returns absoulute path to found file or null if not found static string findPackageFile(string pathName) { string fn = buildNormalizedPath(pathName, "dub.json"); + if (fn.exists && fn.isFile) + return fn; + fn = buildNormalizedPath(pathName, "dub.sdl"); if (fn.exists && fn.isFile) return fn; fn = buildNormalizedPath(pathName, "package.json");