deepsidhu1313 / SyntaxTextAreaFX

TextArea for JavaFX (based on RichTextFX) which supports Syntax Highlighting for various coding languages
Apache License 2.0
11 stars 5 forks source link

Documentation !! #3

Open robross0606 opened 7 years ago

robross0606 commented 7 years ago

Looking at this project structure, what is the point of all the JSON files? As far as I can tell, they aren't used at all in the code base. The only files that are syntax highlighted are the ones that have definitions defined in in.co.s13.langs.

robross0606 commented 7 years ago

There are also two sets of JSON files in the source (under "jsons" and "json2"). What is the purpose of each?

deepsidhu1313 commented 7 years ago

JSON directory in the root folder is the one with all the rules for different languages. And as you can see json2 directory is the derived from first one, latter contains only keywords to highlight . These directories and files are for development purpose only. These will be removed after addition of all rules in their corresponding Java files under in.co.s13.langs .

robross0606 commented 7 years ago

I thought the approach was to directly use the JSON files as the syntax definition. You're manually created Java files associated with each JSON file?

------ Original Message ------ From: "Navdeep Singh Sidhu" notifications@github.com To: "deepsidhu1313/SyntaxTextAreaFX" SyntaxTextAreaFX@noreply.github.com Cc: "robross0606" robross0606@gmail.com; "Author" author@noreply.github.com Sent: 2/23/2017 3:36:41 PM Subject: Re: [deepsidhu1313/SyntaxTextAreaFX] I don't get it (#3)

JSON directory in the root folder is the one with all the rules for different languages. And as you can see json2 https://github.com/deepsidhu1313/SyntaxTextAreaFX/blob/master/src/in/co/s13/res/json2/R.json directory is the derived from first one, latter contains only keywords to highlight . These directories and files are for development purpose only. These will be removed after addition of all rules in their corresponding Java files under in.co.s13.langs .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/deepsidhu1313/SyntaxTextAreaFX/issues/3#issuecomment-282113289, or mute the thread https://github.com/notifications/unsubscribe-auth/AC0_2yovMYlP9nMSvqI7qLJyYLbVV8eFks5rfe3ZgaJpZM4MKToT.


This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

deepsidhu1313 commented 7 years ago

Initially, i thought that will be good idea. But reading data from files will have (I/O) overhead associated with it. So for basic keywords we can use hard coded rules.

robross0606 commented 7 years ago

Do you plan on auto-generating the Java code?

------ Original Message ------ From: "Navdeep Singh Sidhu" notifications@github.com To: "deepsidhu1313/SyntaxTextAreaFX" SyntaxTextAreaFX@noreply.github.com Cc: "robross0606" robross0606@gmail.com; "Author" author@noreply.github.com Sent: 2/23/2017 3:44:43 PM Subject: Re: [deepsidhu1313/SyntaxTextAreaFX] I don't get it (#3)

Initially, i thought that will be good idea. But reading data from files will have (I/O) overhead associated with it. So for basic keywords we can use hard coded rules.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/deepsidhu1313/SyntaxTextAreaFX/issues/3#issuecomment-282115403, or mute the thread https://github.com/notifications/unsubscribe-auth/AC0_21vp1j2q-q3hm-JeDkjDCj7T_M8rks5rfe-7gaJpZM4MKToT.


This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

deepsidhu1313 commented 7 years ago

if you mean suggestions by Auto-generating, then Yes i am working on that. As richtextfx are working on their next release and i want my code to build on stable code. So i am waiting for the next stable release of RichTextFX.

robross0606 commented 7 years ago

I mean the java classes under in.co.s13.lang. Are those going to be manually created to auto-generated?

------ Original Message ------ From: "Navdeep Singh Sidhu" notifications@github.com To: "deepsidhu1313/SyntaxTextAreaFX" SyntaxTextAreaFX@noreply.github.com Cc: "robross0606" robross0606@gmail.com; "Author" author@noreply.github.com Sent: 2/23/2017 3:56:38 PM Subject: Re: [deepsidhu1313/SyntaxTextAreaFX] I don't get it (#3)

if you mean suggestions by Auto-generating, then Yes i am working on that. As richtextfx are working on their next release and i want my code to build on stable code. So i am waiting for the next stable release of RichTextFX.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/deepsidhu1313/SyntaxTextAreaFX/issues/3#issuecomment-282118538, or mute the thread https://github.com/notifications/unsubscribe-auth/AC0_2-Sg8sqc2zahRJkFa7b86Q3VL3gyks5rffKGgaJpZM4MKToT.


This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus

deepsidhu1313 commented 7 years ago

:smile: Can you provide more detail to your question ?? As currently it is very vague or i am unable to interpret it.

robross0606 commented 7 years ago

I mean are you intending to hand-write the .java files in the in.co.s13.lang package. Or are you intending to use the JSON files to run through a code generator and produce the JAVA files to handle the various types of Language interface implementations.

deepsidhu1313 commented 7 years ago

Yes i can do the code generation for that. But i rely on myself, to avoid bugs. As basic skeleton is ready one can just read files from JSON and JSON2 directory to create corresponding .java files under in.co.s13.syntaxtextareafx.langs and modify related css files in in.co.s13.syntaxtextareafx.res.css.default. I will try to post a developer guide soon.

deepsidhu1313 commented 7 years ago

Updated Wiki for syntax Highlighting support!!

For code suggestions we will have to wait for RichTextFX next stable release.