Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] JSON Editor contribution

It would be great if I can extend the JSON editor with code completion specific for Composer.

Yes it's possible. Please see exampel with bower at https://github.com/angelozerr/eclipse-wtp-json/blob/master/bower/org.eclipse.wst.json.bower.ui/plugin.xml#L28 which provides custom completion for bower dependencies.

I have started to implement JSON Schema Store (like XML Catalog) where you will be able to register a JSON Schema. By default, it hosts someJSON Schema of http://schemastore.org/json/  like bower, npm, etc
You can see that http://json.schemastore.org/composer exists :) With the JSON Schema for Composer, you will benefit with completion and validation when I will finish to implement JSON Schema features.

It would be great also if the JSON editor is designed for embedding in multi-tab editors.

It's the same thing than XML Editor, so perhaps syntaxic clororation will work, but I'm not sure with completion?

Could someone explain what it gives you?

At first please read https://github.com/angelozerr/eclipse-wtp-json#why-another-json-editor

SSE looks like XText. It provides the capability to implement editor for structured document like XML, DTD, JSP, HTML. XText is very great, but I have decided to implement the JSON Editor with WTP, because I would like to provide the same editor than XML but for JSON and provide the same extension point to extend it. At is based on WTP, we can implement sereval WTP features, like WTP Validator, WTP Format processor, WTP Outline, etc

I think XML & JSON are the same thing for editor. Eclipse IDE provides by default a XML Editor based on WTP, so IMHO I think WTP should provide too a JSON Editor today in 2015 which provides : 

 * a IJSONModel/IJSONDocument which can be updated by the editor or by a Java code (like IDOMModel/IDOMDocument for XML).
 * extensible to extends it with custom completion, hover, hyperlink, validation like XML.

Regard's Angelo

2015-07-06 1:39 GMT+02:00 Doug Schaefer <dschaefer@xxxxxxx>:
The dependency on SSE is an issue. I guess I don¹t know enough about it to
appreciate it. Could someone explain what it gives you?

I¹m also starting up a project to make it easier to add languages to
Eclipse. No promises of when that will land so I¹m not going to offer that
as an alternative at this time. But I would certainly consider doing a
JSON editor with it.

Doug.

On 2015-07-05, 5:02 PM, "wtp-dev-bounces@xxxxxxxxxxx on behalf of Gorkem
Ercan" <wtp-dev-bounces@xxxxxxxxxxx on behalf of gorkem.ercan@xxxxxxxxx>
wrote:

>
>
>On 5 Jul 2015, at 17:11, Kaloyan Raev wrote:
>
>> Hi,
>>
>> Let me chime in with my wishes :-)
>>
>> It would be really great to have JSON editor developed and maintained
>> under
>> Eclipse Foundation. My use case is around Composer. Composer is a
>> dependency manager for PHP - very similar to what Bower is for
>> _javascript_.
>> The configuration file is called composer.json. So, a JSON editor
>> would be
>> helpful for editing the composer.json file as a source file. It would
>> be
>> great if I can extend the JSON editor with code completion specific
>> for
>> Composer.
>>
>> The main difference with Bower is that Composer is a pure PHP
>> technology
>> with no relationship to _javascript_. Therefore, it would be great if
>> the
>> JSON editor has no dependency to the rest of JSDT and is available as
>> a
>> separate Eclipse feature.
>>
>
>JSON editor contribution only has SSE dependency. There are no JSDT
>dependencies. I agree that
>we should not introduce JSDT (or any other similar) dependency to it and
>I do not think we need to.
>
>Because we want to have bower and npm etc. have better support on JSDT I
>think can have a dependency
>to JSON editor.
>
>
>> It would be great also if the JSON editor is designed for embedding in
>> multi-tab editors.
>>
>> Greetings,
>> Kaloyan
>>
>> On Sat, Jul 4, 2015 at 5:53 PM, Angelo zerr <angelo.zerr@xxxxxxxxx>
>> wrote:
>>
>>>> That's pretty good news!
>>>> Thanks Angelo for submitting, and Gorkem for the follow-up.
>>>
>>> Glad Eclipse WTP JSON contribution please you! But there a lot of
>>> work
>>> again to stablize it (I mean sync of IJSONModel with editor).
>>>
>>>> Is this really WTP?
>>>
>>> Yes, because Eclipse WTP JSON is based on WTP and I have tried to
>>> follow
>>> the same architecture than WTP XML Editor :
>>>
>>> * JFlex grammar
>>> * the JSON editor maintain a IJSONModel (like IDOMModel for XML)
>>> which
>>> implements SSE model (IStructuredModel, etc).
>>> * the JSON Editor is a StructuredTextEditor, which can be extended
>>> with
>>> WTP extension points.
>>> * it provides completion (for npm, bower depdencies) like XML editor.
>>>
>>>> JSON is a very common data format that's used in many places,
>>>> especially
>>> with config files.
>>>
>>> Right, I think we should have a new component called "wst.json" like
>>> we
>>> have "wst.html", "wst.xml", etc. This component provides only the
>>> core/ui
>>> of JSON Editor. In other word, those projects
>>> https://github.com/angelozerr/eclipse-wtp-json/tree/master/core
>>>
>>> The JSON Editor can be extended for instance to provide custom
>>> completion.
>>> I have done that for npm and bower dependencies. So I think JSDT
>>> should
>>> host https://github.com/angelozerr/eclipse-wtp-json/tree/master/bower
>>> and
>>> https://github.com/angelozerr/eclipse-wtp-json/tree/master/npm
>>>
>>> Regard's Angelo
>>>
>>> 2015-07-04 14:49 GMT+02:00 Gorkem Ercan <gorkem.ercan@xxxxxxxxx>:
>>>
>>>>
>>>>
>>>> On 4 Jul 2015, at 4:17, Mickael Istria wrote:
>>>>
>>>> On 07/04/2015 09:10 AM, Konstantin Komissarchik wrote:
>>>>>
>>>>>> From the process side, the main thing you loose is ability to
>>>>>> control
>>>>>> your releases. Only a project can release. If you a part of WTP,
>>>>>> you are
>>>>>> tied to WTP release schedule, which may be a problem for some
>>>>>> adopters that
>>>>>> are on a faster release cycle. For instance, you would not be able
>>>>>> to do
>>>>>> the first release until June of next year, unless you can convince
>>>>>> WTP
>>>>>> leadership to allow this feature into a service release.
>>>>>>
>>>>> The effort we've made in making JSDT easy to build locally and by
>>>>> providing an additional dedicated build and p2 repo for JSDT
>>>>> snapshots goes
>>>>> in the direction of allowing it to deliver faster than WTP, and if
>>>>> not
>>>>> releasing it, to allow users and integrators to get access to more
>>>>> recent
>>>>> builds more easily.
>>>>> In that context, I believe it would be totally do-able to make a
>>>>> JSDT
>>>>> release for SR1 or SR2 if we want to (and it seems more and more
>>>>> likely).
>>>>> As long as JSDT relies on stable APIs of WTP, it shouldn't cause
>>>>> any issue.
>>>>> Such a release could include a JSON editor.
>>>>>
>>>>> In the end, I (and some others) don't believe in the concept of a
>>>>> simultaneous build/release for WTP. There are too many things in it
>>>>> that
>>>>> don't evolve at the same time at all, and the benefit of a
>>>>> simultaneous
>>>>> build/release is quite questionable since the Eclipse release train
>>>>> already
>>>>> takes care of that.
>>>>> The next step for WTP seems to turn into a container project, just
>>>>> like
>>>>> Tools or Technology, and to let individual projects live their own
>>>>> lifecycle (but still discuss together via mailing-list) rather than
>>>>> adding
>>>>> constraints that are clearly not in sync with nowadays needs in
>>>>> adoption of
>>>>> technologies.
>>>>>
>>>>
>>>> +1 WTP subprojects should do independent releases. Especially
>>>> projects
>>>> like SSE and JSDT that are be consumed independent of most of WTP.
>>>>
>>>> --
>>>>> Mickael Istria
>>>>> Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
>>>>> My blog <http://mickaelistria.wordpress.com> - My Tweets <
>>>>> http://twitter.com/mickaelistria>
>>>>> _______________________________________________
>>>>> wtp-dev mailing list
>>>>> wtp-dev@xxxxxxxxxxx
>>>>> To change your delivery options, retrieve your password, or
>>>>> unsubscribe
>>>>> from this list, visit
>>>>> https://dev.eclipse.org/mailman/listinfo/wtp-dev
>>>>>
>>>> _______________________________________________
>>>> wtp-dev mailing list
>>>> wtp-dev@xxxxxxxxxxx
>>>> To change your delivery options, retrieve your password, or
>>>> unsubscribe
>>>> from this list, visit
>>>> https://dev.eclipse.org/mailman/listinfo/wtp-dev
>>>>
>>>
>>>
>>> _______________________________________________
>>> wtp-dev mailing list
>>> wtp-dev@xxxxxxxxxxx
>>> To change your delivery options, retrieve your password, or
>>> unsubscribe
>>> from this list, visit
>>> https://dev.eclipse.org/mailman/listinfo/wtp-dev
>>>
>> _______________________________________________
>> wtp-dev mailing list
>> wtp-dev@xxxxxxxxxxx
>> To change your delivery options, retrieve your password, or
>> unsubscribe from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/wtp-dev
>_______________________________________________
>wtp-dev mailing list
>wtp-dev@xxxxxxxxxxx
>To change your delivery options, retrieve your password, or unsubscribe
>from this list, visit
>https://dev.eclipse.org/mailman/listinfo/wtp-dev

_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/wtp-dev


Back to the top