You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Christian Lenz <ch...@gmx.net> on 2017/07/19 09:43:20 UTC

Please make more public APIs for 3rd-party-plugins available for languages NOT Java

Often I see tutorials about how I can add Hints for Java for example or how I can extend the Java Editor and so on, but when we want to extend JavaScript (I know the KendoNetbeans repo from Geertjan, which is not working anymore, because it is not a friend) we can’t extend this Editor. Or adding hints for CSS (Geertjan tried it too, but it was not possible). So everlaw, the guys from the TypeScript plugin has Problems to, to extend to have full power for TS (e.g. adding formatting optiosn to TypeScript, it is not possible because TS is not a friend of a specific package). So it is really a pain in the ass. NetBeans is not a Java IDE anymore, it has Support for a lot of languages so please make the APIs more public to the developers of 3rd-party-plugins.


Regards

Chris


Re: Please make more public APIs for 3rd-party-plugins available for languages NOT Java

Posted by Wade Chandler <wa...@apache.org>.
I think the problem with friend is it gets way over used, and thus those things remain closed, and using yenta to work around such things isn’t great if your argument that there is a reason for it is the answer as one is just working around the reason. So, either the reason isn’t as needed as we often assume, or use of workarounds not to be a friend module isn’t the answer for many questions. i.e. if there is logic where friend access has become the norm, and is used by N number of modules instead of just a couple, and for just a short period of time, then the API should not continue to be used in a friend manner, and should be flushed out. I feel there are plenty of APIs which have remained friend only for some time because it has been easy from the internal NB perspective to not support them because “they might change” or there wasn’t time to flush them out as public APIs, but they have limited 3rd party access to some things. I don’t have specifics up at the moment, but have answered enough questions over the years, to have had this gut feeling more than a few times.

Wade


===================

Wade Chandler
e: consult@wadechandler.com



> On Jul 19, 2017, at 09:53, Emilian Bold <em...@gmail.com> wrote:
> 
> Please read about http://wiki.netbeans.org/API_Stability and
> http://wiki.netbeans.org/API_Design
> 
> We can't just make everything well by making everything public APIs.
> Because on the next update a small refactoring will break all the
> modules.
> 
> Note the clever hack this module does
> https://bitbucket.org/jglick/yenta if it's just a matter of "friend"
> access. Still, friend access has a reason and 3rd party modules will
> break if they don't keep up.
> 
> --emi
> 
> 
> On Wed, Jul 19, 2017 at 12:43 PM, Christian Lenz <ch...@gmx.net> wrote:
>> Often I see tutorials about how I can add Hints for Java for example or how I can extend the Java Editor and so on, but when we want to extend JavaScript (I know the KendoNetbeans repo from Geertjan, which is not working anymore, because it is not a friend) we can’t extend this Editor. Or adding hints for CSS (Geertjan tried it too, but it was not possible). So everlaw, the guys from the TypeScript plugin has Problems to, to extend to have full power for TS (e.g. adding formatting optiosn to TypeScript, it is not possible because TS is not a friend of a specific package). So it is really a pain in the ass. NetBeans is not a Java IDE anymore, it has Support for a lot of languages so please make the APIs more public to the developers of 3rd-party-plugins.
>> 
>> 
>> Regards
>> 
>> Chris
>> 


Re: Please make more public APIs for 3rd-party-plugins available for languages NOT Java

Posted by Emilian Bold <em...@gmail.com>.
Please read about http://wiki.netbeans.org/API_Stability and
http://wiki.netbeans.org/API_Design

We can't just make everything well by making everything public APIs.
Because on the next update a small refactoring will break all the
modules.

Note the clever hack this module does
https://bitbucket.org/jglick/yenta if it's just a matter of "friend"
access. Still, friend access has a reason and 3rd party modules will
break if they don't keep up.

--emi


On Wed, Jul 19, 2017 at 12:43 PM, Christian Lenz <ch...@gmx.net> wrote:
> Often I see tutorials about how I can add Hints for Java for example or how I can extend the Java Editor and so on, but when we want to extend JavaScript (I know the KendoNetbeans repo from Geertjan, which is not working anymore, because it is not a friend) we can’t extend this Editor. Or adding hints for CSS (Geertjan tried it too, but it was not possible). So everlaw, the guys from the TypeScript plugin has Problems to, to extend to have full power for TS (e.g. adding formatting optiosn to TypeScript, it is not possible because TS is not a friend of a specific package). So it is really a pain in the ass. NetBeans is not a Java IDE anymore, it has Support for a lot of languages so please make the APIs more public to the developers of 3rd-party-plugins.
>
>
> Regards
>
> Chris
>

AW: Please make more public APIs for 3rd-party-plugins availableforlanguages NOT Java

Posted by Christian Lenz <ch...@gmx.net>.
And here is the correct drive link to my example: https://drive.google.com/open?id=0B_NSXWv7nY6oVnEyenRFRExYQWM

Sry copy and paste wasn’t correct.

Gesendet von Mail für Windows 10

Von: Christian Lenz
Gesendet: Mittwoch, 19. Juli 2017 15:02
An: dev@netbeans.incubator.apache.org
Betreff: AW: Please make more public APIs for 3rd-party-plugins availableforlanguages NOT Java

Yes afak it is not possible like in this tutorial: https://drive.google.com/open?id=0B_NSXWv7nY6oRVYtLUo0YmlBbkE to create hints +  fixes for JavaScript, less/sass/scss, css, html, php(I don’t know it atm). If it is possible, please give a hint or a working example for css, js and html. I tried it for JS and I didn’t get it running. Don’t have a example atm, but Geertjan tried it with CSS hints too and I think he didn’t get it working too: https://github.com/GeertjanWielenga/DemoCSSHint.

The other part is the Tokens for creating embedded languages for e.g. JavaScript „strings could be html or SQL“ You can’t get Access to the JSTokenId classes which are part of the javascript2.editor if your plugin is not a friend of it. I created a working/non-working example: https://pastebin.com/sLE9V0Ta. Here is the full netbeans maven module: https://drive.google.com/open?id=0B_NSXWv7nY6oVnEyenRFRExYQWM

When I hit run, I got this message: 

Failed to execute goal org.codehaus.mojo:nbm-maven-plugin:3.13:manifest (default-manifest) on project SQLEmbedderForJsStrings: Module has friend dependency on org.netbeans.modules.javascript2.editor but is not listed as a friend. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:nbm-maven-plugin:3.13:manifest (default-manifest) on project SQLEmbedderForJsStrings: Module has friend dependency on org.netbeans.modules.javascript2.editor but is not listed as a friend.

This is why the KendoNetbeans plugin doesn’t run anymore from Geertjan, because it is not a friend anymore: https://github.com/GeertjanWielenga/kendonetbeans

So everyone who is trying to extend the JS Editor (I mean adding hints, using the JsTokenId classes) or other languages except from Java, Fails by this message of the missing friend. Above you have 2 examples. Please bring working examples if you think this should work.


Regards

Chris

Von: Sven Reimers
Gesendet: Mittwoch, 19. Juli 2017 14:29
An: dev@netbeans.incubator.apache.org
Betreff: Re: Please make more public APIs for 3rd-party-plugins available forlanguages NOT Java

Hi all,

what is the exact problem? AFAIK all the languages you mentioned are based
on CSL API's/SPI's which support hints etc. What is needed beyond this? Do
you need access to the editor internals?

Sven

Am 19.07.2017 14:39 schrieb "Geertjan Wielenga" <
geertjan.wielenga@googlemail.com>:

> I'm not sure who you're asking this to. I agree we should together discuss
> new Netbeans APIs. Do you want to make a start and make specific proposals
> or outlines of specific areas where new APIs should be introduced?
>
> Gj
>
> On Wednesday, July 19, 2017, Christian Lenz <ch...@gmx.net>
> wrote:
>
> > Often I see tutorials about how I can add Hints for Java for example or
> > how I can extend the Java Editor and so on, but when we want to extend
> > JavaScript (I know the KendoNetbeans repo from Geertjan, which is not
> > working anymore, because it is not a friend) we can’t extend this Editor.
> > Or adding hints for CSS (Geertjan tried it too, but it was not possible).
> > So everlaw, the guys from the TypeScript plugin has Problems to, to
> extend
> > to have full power for TS (e.g. adding formatting optiosn to TypeScript,
> it
> > is not possible because TS is not a friend of a specific package). So it
> is
> > really a pain in the ass. NetBeans is not a Java IDE anymore, it has
> > Support for a lot of languages so please make the APIs more public to the
> > developers of 3rd-party-plugins.
> >
> >
> > Regards
> >
> > Chris
> >
> >
>



AW: Please make more public APIs for 3rd-party-plugins availableforlanguages NOT Java

Posted by Christian Lenz <ch...@gmx.net>.
Correction for: Yes afak it is not possible like in this tutorial: https://drive.google.com/open?id=0B_NSXWv7nY6oRVYtLUo0YmlBbkE to create hints +  fixes for JavaScript, less/sass/scss, css, html, php(I don’t know it atm). If it is possible, please give a hint or a working example for css, js and html. I tried it for JS and I didn’t get it running. Don’t have a example atm, but Geertjan tried it with CSS hints too and I think he didn’t get it working too: https://github.com/GeertjanWielenga/DemoCSSHint.

I mean: „https://platform.netbeans.org/tutorials/nbm-java-hint.html to create hints + fixes“ instead of „https://drive.google.com/open?id=0B_NSXWv7nY6oRVYtLUo0YmlBbkE to create hints +  fixes“

Gesendet von Mail für Windows 10

Von: Christian Lenz
Gesendet: Mittwoch, 19. Juli 2017 15:02
An: dev@netbeans.incubator.apache.org
Betreff: AW: Please make more public APIs for 3rd-party-plugins availableforlanguages NOT Java

Yes afak it is not possible like in this tutorial: https://drive.google.com/open?id=0B_NSXWv7nY6oRVYtLUo0YmlBbkE to create hints +  fixes for JavaScript, less/sass/scss, css, html, php(I don’t know it atm). If it is possible, please give a hint or a working example for css, js and html. I tried it for JS and I didn’t get it running. Don’t have a example atm, but Geertjan tried it with CSS hints too and I think he didn’t get it working too: https://github.com/GeertjanWielenga/DemoCSSHint.

The other part is the Tokens for creating embedded languages for e.g. JavaScript „strings could be html or SQL“ You can’t get Access to the JSTokenId classes which are part of the javascript2.editor if your plugin is not a friend of it. I created a working/non-working example: https://pastebin.com/sLE9V0Ta. Here is the full netbeans maven module: https://drive.google.com/open?id=0B_NSXWv7nY6oVnEyenRFRExYQWM

When I hit run, I got this message: 

Failed to execute goal org.codehaus.mojo:nbm-maven-plugin:3.13:manifest (default-manifest) on project SQLEmbedderForJsStrings: Module has friend dependency on org.netbeans.modules.javascript2.editor but is not listed as a friend. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:nbm-maven-plugin:3.13:manifest (default-manifest) on project SQLEmbedderForJsStrings: Module has friend dependency on org.netbeans.modules.javascript2.editor but is not listed as a friend.

This is why the KendoNetbeans plugin doesn’t run anymore from Geertjan, because it is not a friend anymore: https://github.com/GeertjanWielenga/kendonetbeans

So everyone who is trying to extend the JS Editor (I mean adding hints, using the JsTokenId classes) or other languages except from Java, Fails by this message of the missing friend. Above you have 2 examples. Please bring working examples if you think this should work.


Regards

Chris

Von: Sven Reimers
Gesendet: Mittwoch, 19. Juli 2017 14:29
An: dev@netbeans.incubator.apache.org
Betreff: Re: Please make more public APIs for 3rd-party-plugins available forlanguages NOT Java

Hi all,

what is the exact problem? AFAIK all the languages you mentioned are based
on CSL API's/SPI's which support hints etc. What is needed beyond this? Do
you need access to the editor internals?

Sven

Am 19.07.2017 14:39 schrieb "Geertjan Wielenga" <
geertjan.wielenga@googlemail.com>:

> I'm not sure who you're asking this to. I agree we should together discuss
> new Netbeans APIs. Do you want to make a start and make specific proposals
> or outlines of specific areas where new APIs should be introduced?
>
> Gj
>
> On Wednesday, July 19, 2017, Christian Lenz <ch...@gmx.net>
> wrote:
>
> > Often I see tutorials about how I can add Hints for Java for example or
> > how I can extend the Java Editor and so on, but when we want to extend
> > JavaScript (I know the KendoNetbeans repo from Geertjan, which is not
> > working anymore, because it is not a friend) we can’t extend this Editor.
> > Or adding hints for CSS (Geertjan tried it too, but it was not possible).
> > So everlaw, the guys from the TypeScript plugin has Problems to, to
> extend
> > to have full power for TS (e.g. adding formatting optiosn to TypeScript,
> it
> > is not possible because TS is not a friend of a specific package). So it
> is
> > really a pain in the ass. NetBeans is not a Java IDE anymore, it has
> > Support for a lot of languages so please make the APIs more public to the
> > developers of 3rd-party-plugins.
> >
> >
> > Regards
> >
> > Chris
> >
> >
>



AW: Please make more public APIs for 3rd-party-plugins available forlanguages NOT Java

Posted by Christian Lenz <ch...@gmx.net>.
Yes afak it is not possible like in this tutorial: https://drive.google.com/open?id=0B_NSXWv7nY6oRVYtLUo0YmlBbkE to create hints +  fixes for JavaScript, less/sass/scss, css, html, php(I don’t know it atm). If it is possible, please give a hint or a working example for css, js and html. I tried it for JS and I didn’t get it running. Don’t have a example atm, but Geertjan tried it with CSS hints too and I think he didn’t get it working too: https://github.com/GeertjanWielenga/DemoCSSHint.

The other part is the Tokens for creating embedded languages for e.g. JavaScript „strings could be html or SQL“ You can’t get Access to the JSTokenId classes which are part of the javascript2.editor if your plugin is not a friend of it. I created a working/non-working example: https://pastebin.com/sLE9V0Ta. Here is the full netbeans maven module: https://drive.google.com/open?id=0B_NSXWv7nY6oVnEyenRFRExYQWM

When I hit run, I got this message: 

Failed to execute goal org.codehaus.mojo:nbm-maven-plugin:3.13:manifest (default-manifest) on project SQLEmbedderForJsStrings: Module has friend dependency on org.netbeans.modules.javascript2.editor but is not listed as a friend. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:nbm-maven-plugin:3.13:manifest (default-manifest) on project SQLEmbedderForJsStrings: Module has friend dependency on org.netbeans.modules.javascript2.editor but is not listed as a friend.

This is why the KendoNetbeans plugin doesn’t run anymore from Geertjan, because it is not a friend anymore: https://github.com/GeertjanWielenga/kendonetbeans

So everyone who is trying to extend the JS Editor (I mean adding hints, using the JsTokenId classes) or other languages except from Java, Fails by this message of the missing friend. Above you have 2 examples. Please bring working examples if you think this should work.


Regards

Chris

Von: Sven Reimers
Gesendet: Mittwoch, 19. Juli 2017 14:29
An: dev@netbeans.incubator.apache.org
Betreff: Re: Please make more public APIs for 3rd-party-plugins available forlanguages NOT Java

Hi all,

what is the exact problem? AFAIK all the languages you mentioned are based
on CSL API's/SPI's which support hints etc. What is needed beyond this? Do
you need access to the editor internals?

Sven

Am 19.07.2017 14:39 schrieb "Geertjan Wielenga" <
geertjan.wielenga@googlemail.com>:

> I'm not sure who you're asking this to. I agree we should together discuss
> new Netbeans APIs. Do you want to make a start and make specific proposals
> or outlines of specific areas where new APIs should be introduced?
>
> Gj
>
> On Wednesday, July 19, 2017, Christian Lenz <ch...@gmx.net>
> wrote:
>
> > Often I see tutorials about how I can add Hints for Java for example or
> > how I can extend the Java Editor and so on, but when we want to extend
> > JavaScript (I know the KendoNetbeans repo from Geertjan, which is not
> > working anymore, because it is not a friend) we can’t extend this Editor.
> > Or adding hints for CSS (Geertjan tried it too, but it was not possible).
> > So everlaw, the guys from the TypeScript plugin has Problems to, to
> extend
> > to have full power for TS (e.g. adding formatting optiosn to TypeScript,
> it
> > is not possible because TS is not a friend of a specific package). So it
> is
> > really a pain in the ass. NetBeans is not a Java IDE anymore, it has
> > Support for a lot of languages so please make the APIs more public to the
> > developers of 3rd-party-plugins.
> >
> >
> > Regards
> >
> > Chris
> >
> >
>


Re: Please make more public APIs for 3rd-party-plugins available for languages NOT Java

Posted by Sven Reimers <sv...@gmail.com>.
Hi all,

what is the exact problem? AFAIK all the languages you mentioned are based
on CSL API's/SPI's which support hints etc. What is needed beyond this? Do
you need access to the editor internals?

Sven

Am 19.07.2017 14:39 schrieb "Geertjan Wielenga" <
geertjan.wielenga@googlemail.com>:

> I'm not sure who you're asking this to. I agree we should together discuss
> new Netbeans APIs. Do you want to make a start and make specific proposals
> or outlines of specific areas where new APIs should be introduced?
>
> Gj
>
> On Wednesday, July 19, 2017, Christian Lenz <ch...@gmx.net>
> wrote:
>
> > Often I see tutorials about how I can add Hints for Java for example or
> > how I can extend the Java Editor and so on, but when we want to extend
> > JavaScript (I know the KendoNetbeans repo from Geertjan, which is not
> > working anymore, because it is not a friend) we can’t extend this Editor.
> > Or adding hints for CSS (Geertjan tried it too, but it was not possible).
> > So everlaw, the guys from the TypeScript plugin has Problems to, to
> extend
> > to have full power for TS (e.g. adding formatting optiosn to TypeScript,
> it
> > is not possible because TS is not a friend of a specific package). So it
> is
> > really a pain in the ass. NetBeans is not a Java IDE anymore, it has
> > Support for a lot of languages so please make the APIs more public to the
> > developers of 3rd-party-plugins.
> >
> >
> > Regards
> >
> > Chris
> >
> >
>

Re: Please make more public APIs for 3rd-party-plugins available for languages NOT Java

Posted by Geertjan Wielenga <ge...@googlemail.com>.
I'm not sure who you're asking this to. I agree we should together discuss
new Netbeans APIs. Do you want to make a start and make specific proposals
or outlines of specific areas where new APIs should be introduced?

Gj

On Wednesday, July 19, 2017, Christian Lenz <ch...@gmx.net> wrote:

> Often I see tutorials about how I can add Hints for Java for example or
> how I can extend the Java Editor and so on, but when we want to extend
> JavaScript (I know the KendoNetbeans repo from Geertjan, which is not
> working anymore, because it is not a friend) we can’t extend this Editor.
> Or adding hints for CSS (Geertjan tried it too, but it was not possible).
> So everlaw, the guys from the TypeScript plugin has Problems to, to extend
> to have full power for TS (e.g. adding formatting optiosn to TypeScript, it
> is not possible because TS is not a friend of a specific package). So it is
> really a pain in the ass. NetBeans is not a Java IDE anymore, it has
> Support for a lot of languages so please make the APIs more public to the
> developers of 3rd-party-plugins.
>
>
> Regards
>
> Chris
>
>