Thx Laszlo, I can have a look too, but again this is Java and for Java, we have 
this tutorial how to do that Right, like a documenation: 
https://platform.netbeans.org/tutorials/nbm-java-hint.html. So this is not the 
Problem to extend Java. Ok Maybe when I go deeper, I will have the same 
Problems with understanding the concepts behind Hints/Fixes/Suggestions etc. I 
collected my stuff, that I found out while Looking into the PR of Junichi for 
converting functions into arrow functions in PHP, in slack: 
https://netbeans.slack.com/archives/C2SJESNKD/p1568389036027100 



Von: Laszlo Kishalmi
Gesendet: Freitag, 13. September 2019 17:31
An: [email protected]
Betreff: Re: AW: Creating code hints, fixes, suggestions, rules, etc.

Check this PR for start, it seems really minimal, a complete new module 
for Ant error hint: https://github.com/apache/netbeans/pull/1487

On 9/13/19 6:02 AM, Christian Lenz wrote:
> This is a general question of how hints/fixes works and how to start. My 
> cases should be clear enough that „someone“ could help me here please who 
> created hints before for Editors that are not Java.
>
> Again, I would like to add hints to editors of HTML/CSS/SCSS/JS. Use cases 
> were also added. Let me be a person who is new to exact this topic (who I 
> am), only want to add hints to those editors those are not Java. For Java 
> there is a tutorial which is not working for others in exact the same way. So 
> how can I start to create hints for those other editors? Also hints for those 
> other editors are not working as 3rd Party w/o beeing friend or w/o using 
> yenta, just FYI. I need a step by step guide as we have it for the LSP 
> implementation and Textmate implementatiuon, that you wrote in the blog. That 
> was clear and easy to understand with provided steps to implement.
>
>
>
> Von: Geertjan Wielenga
> Gesendet: Freitag, 13. September 2019 14:55
> An: [email protected]
> Betreff: Re: Creating code hints, fixes, suggestions, rules, etc.
>
> It’s going to need to be a case of you reading the source code and taking
> it from there.
>
> Gj
>
> On Fri, 13 Sep 2019 at 14:53, Christian Lenz <[email protected]> wrote:
>
>> Hey all,
>>
>> would like to ping this topic up again, due to I think that some People
>> already knows the differences and can help here to help me, to contribute
>> more to NetBeans 😉. Otherwise please point me to the right person who can
>> help here.
>>
>>
>> Cheers
>>
>> Chris
>>
>>
>>
>> Von: Christian Lenz
>> Gesendet: Freitag, 6. September 2019 14:46
>> An: [email protected]
>> Betreff: Creating code hints, fixes, suggestions, rules, etc.
>>
>> Dear all,
>>
>> due to missing hints + fixes which makes the live easier for developers,
>> in editors which are not Java, I want to implement some HTML/CSS/SCSS/JS
>> hints.
>>
>> I looked into the netbeans code and there are Hint classes, Rule classes
>> and I think HintRule and Fix and Suggestion classes and I don't know how to
>> start and what the differences are between them.
>> I read this tutorial:
>> https://platform.netbeans.org/tutorials/nbm-java-hint.html but it seems
>> that hints/fixes for Java are bit different, there is a JavaFix class and
>> we use some annotations. So to tell you my story, I want to create hints +
>> fixes into the editor of HTML, CSS/SCSS/LESS and JS. I looked into the code
>> of existing CSS/HTML hints but they are not consistent, they are using
>> HintRule classes and sometimes other classes. So to start I need to know
>> what is a Hint, what is a Rule, what is a Fix, what is a Suggestion, etc.
>> So a clean tutorial about the differences of them and how which class is
>> the best to extend the functionality.
>>
>> Some more cases:
>> - sometimes hints w/o fixes doesn’t make sense.
>> - sometimes I want to have hints that are shown, when I open the file and
>> sometimes only at a specific context when my cursor is there to not
>> overload the whole file with hints/suggestions, etc.
>>
>> Concrete examples for JS:
>> - convert anonymous function into arrow function (hint + fix)
>> - change var to let or const (2 fixes, one hint)
>> - convert require to Import (hint + fix)
>> - convert strings to ES6 string literals (hint + fix)
>> - change order of Imports alphabetically or in an other order (hint + fix)
>> - etc.
>>
>> Concrete examples for scss (some of them are relevant for CSS too, but not
>> all):
>> - convert from px to em and vice versa (hint + fix where the Cursor is)
>> - convert selected value into a variable (hint + fix, when value is
>> selected)
>> - convert block into a mixin (hint + fix, when properties, code block and
>> values are selected)
>>
>> Concrete examples for (X)HTML:
>> - add missing width+height attributes of an img tag (hint + fix, maybe on
>> the same line, when I select the image tag, maybe not)
>> - add missing alt attribute of an img tag (hint + fix, Maybe on the same
>> line, when I select the image tag, Maybe not)
>> - etc.
>>
>> I don’t want to discuss wheter all of them are useful or not, in my case
>> they are and also very handy. So I only need help here to understand the
>> logic to create those missing features and a lot more.
>>
>>
>> Cheers
>>
>> Chris
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Reply via email to