From 9cfac00fd3dd8fa941a717d08afa25322a91a360 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Tue, 15 Dec 2015 06:33:33 +0100 Subject: [PATCH] Dub integration, better error handling + spotted issue with commas --- src/ce_dubproject.pas | 3 +++ wiki/wiki.txt | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ce_dubproject.pas b/src/ce_dubproject.pas index 64004ae4..8c0ae8ac 100644 --- a/src/ce_dubproject.pas +++ b/src/ce_dubproject.pas @@ -209,12 +209,15 @@ begin except if assigned(fJSON) then FreeAndNil(fJSON); + fFilename := ''; end; finally parser.Free; end; finally loader.Free; + if not assigned(fJSON) then + fJson := TJSONObject.Create(['name','invalid json']); updateFields; subjProjChanged(fProjectSubject, self); fModified := false; diff --git a/wiki/wiki.txt b/wiki/wiki.txt index bf1a4758..84cac54c 100644 --- a/wiki/wiki.txt +++ b/wiki/wiki.txt @@ -297,7 +297,10 @@ Even if designed upon _DMD_ options, it's also possible to compile a CE project # DUB projects. -Since the version 2 alpha 1, Coedit also handles DUB projects (JSON descriptions only). +Since the version 2 alpha 1, Coedit also handles DUB projects. + +DUB project description must be in JSON format. JSON format must be strictly compliant with RFC 4627. +For example, some descriptions that are well handled by DUB could fail to load in Coedit because of trailing commas. Dub projects are handled exactly as the native projects are. The _project_ menu proposes the same features. However the configuration is done in another widget, see the [dedicated paragraph][lnk_widg_dub]. @@ -719,7 +722,7 @@ Note that it's possible to specify which compiler DUB uses in the application op ### Editor -The second panel displays the list of the project properties. The can be modified in the field at the bottom. +The second panel displays the tree of the project properties. The can be modified in the field at the bottom. ![](https://raw.githubusercontent.com/BBasile/CoeditWikiData/master/dub_edit1.png)