Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] Improve JSON API, Databinding to provide advanced PDE likeeditor



I recently looked at implementing Sapphire model binding for JSON and ran into the same issue. The JSON editor DOM has just enough to support the source editor and the outline, but not enough to support layered views. I think there are bugs open for this. If we can have a true JSON DOM with bi-directional update API (write through and events), implementing Sapphire model binding for JSON would be easy. With that in place, you would be able to leverage all of Sapphire’s advanced model and UI facilities to put sophisticated form and diagram UI on top of JSON files, like we can today for XML files.




- Konstantin



From: Angelo zerr
Sent: Friday, October 7, 2016 1:23 AM
To: General discussion of project-wide or architectural issues.
Subject: [wtp-dev] Improve JSON API, Databinding to provide advanced PDE likeeditor


Hi Guys,


I have developped an advanced editor inside for tsconfig.json. See


Here a demo:



The UI checboxes, text field, tables are bounded to the JSON Document.


There are several bugs with synch of IJSONModel so sometimes you could have some troubles with UI which is not synced. To bind UI to the JSON Model, I have implemented JFace Databinding for JSON. See


I think we should really improved JSON API to update the JSON document, because with the existing API, we cannot update easily the JSON (I had to update JSON with document.replace, so ugly code -()


IMHO, I thinlk package.json, bower.json should provide the same advanced editors. To do that we could:


 * improve synch of JSON model

 * provide a very clean API for update JSON document

 * provide JFace Databinding for JSON

 * provide Eclipse Forms utilities that we could use for any JSON editors which wish to provide advanced editors like I have done for tsconfig.json


What do you think about that?


Regard's Angelo




Back to the top