[x3d-public] NppX3D syntax coloring and autocompletion for Notepad++

Don Brutzman brutzman at nps.edu
Sat Jan 23 16:05:40 PST 2021


Hi Jordi.  I was able to follow the rest of your instructions and these both worked fine.

Notepad++ also recognized the XML nature of .x3d files and provided color coding for elements and attributes (X3D nodes and fields) as well.

I think I see the patterns needed for your files
* autoCompletion/x3dv.xml and Syntax/X3DV.xml
* autoCompletion/vrml.xml and Syntax/VRML.xml

However some questions remain.  Might we discuss on Web3D Zoom next week?  30-60 minutes should be sufficient, might one of these available time windows work?

* Monday    08-1100 pacific
* Wednesday 10-1100 pacific

Once we get autogeneration of those files working for Notepad++, I think it will be straightforward to add UltraEdit and vim as well.

Having all three tools (plus perhaps more in the future) getting 100% correct versions of their X3D4 configuration files will be a good thing. This simplifies future adjustments as well.  Am expecting that each tool maintainer (Notepad++ UltraEdit vim) will be willing to integrate these products into their source trees as well, so that end users don't have to do any configuration.

Thanks for your efforts.  Looking forward to reducing the time it took for you to create these, improving Quality Assurance (QA) of multiple tool configurations as we go.

v/r Don



On 1/21/2021 12:11 PM, jordircardona at yahoo.com wrote:
> 
> Hi Don,
> 
> Thank you so much for your appreciation.
> 
> 1-Yes it's Notepad++. I have installed the last release and checked, and it works in that release too. What happens is that there has been a confusion, probably I did not explain it well, so I think I have to provide better install instructions.
> 
> I think you installed the two files of autocompletion right, but there is a problem with the other two for syntax coloring.
> 
> I have attached two screenshots.
> NppX3D has two folders: Syntax and Autocompletion. You have installed the Autocompletion one right, it's ok.
> 
> But there are also two other different xml files for the syntax coloring that are in a folder called "Syntax". Those two files have to be loaded from inside Notepad++. The process is in the screenshots I attached:
> Step1 - open the dialog for Custom language
> Step 2- use the Import button, import the VRML one, and after that one, the one for X3DV
> Notepad++ should give you a message box that says "Import successful" on each one.
> 
> Then close, and open Notepad++ again, and load an .wrl or .x3dv file. It should show syntax coloring. If you type something, it will also suggest commands if the auto completion was installed right.
> 
> 2- I am not sure if I understand what is X3DUOM. Is it an interface for programming the SAI in X3D in different languages? Or is it a way of using not only ECMAScript but C++ and others for the scripts in X3D files?
> How can it generate the files for syntax coloring and autocompletion by itself? Or it can give me a list of the nodes and I can make them?
> Anyway, I would love to have a way o get a list of the nodes, fields and components, so I can add them to  my project. It would be fantastic that they are up to date with the latest additions to X3D. If I had a text file or an xml file, I can also build my own tool to make the files for Notepad++
> 
> 3- Many people also use Code:Blocks. Not sure how they do this, though.
> 
> Notepad++ includes built in syntax highlight for some computer languages. The problem with that is that it is hard to customize them. It is the disadvantage. Providing them separately is good for people who want to customize them. And programmers love to customize everything. That is why I did not tell Notepad++ myself to include this one.
> 
> It may be good if they provide means of editing the coloring of the languages they include. It would be a nice way of promoting the use of X3D. It is also not contrary of having a separate project, because I think you can overwrite an already existing coloring with yours if you include one with the same name. Not sure of this, though. But if it can be done, it has all advantages.
> 
> If they don't, what I can do or you can do too is to see where they include the plugins. In the past there was an index or several ones. I may try to ask them to include mine so people may reach it easier.
> 
> Thanks again!
> 
> -Jordi
> 
> 
> On Thursday, January 21, 2021, 6:55:37 PM GMT+1, Don Brutzman <brutzman at nps.edu> wrote:
> 
> 
> Hi Jordi, sounds like a great idea.  Thanks for this effort
> 
> ---
> 
> 1. Presumably Notepad++ that you refer to is available at
> 
> * https://notepad-plus-plus.org/downloads/v7.9.2/ <https://notepad-plus-plus.org/downloads/v7.9.2/>
> 
> I installed, copied files as indicated and tried to import.  Screenshot attached.
> 
> Unfortunately it then said "failed to import" without indicating why.
> 
> Any ideas on what to try next?  I will also try rebooting in case that clears some post-install permissions.
> 
> 2. Looking ahead, we can autogenerate your files using X3D Unified Object Model (X3DUOM).
> 
> X3DUOM input plus example conversion stylesheet and conversion output:
> 
> [2.1]    X3D Unified Object Model (X3DUOM)
> https://www.web3d.org/specifications/X3DUOM.html <https://www.web3d.org/specifications/X3DUOM.html>
> 
> [2.2] https://www.web3d.org/specifications/X3dUnifiedObjectModel-4.0.xml <https://www.web3d.org/specifications/X3dUnifiedObjectModel-4.0.xml>
> https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/specifications/X3dUnifiedObjectModel-4.0.xml <https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/specifications/X3dUnifiedObjectModel-4.0.xml>
> 
> [2.3] https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/AllX3dElementsAttributesTextTemplate.xslt <https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/AllX3dElementsAttributesTextTemplate.xslt>
> 
> [2.4] https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/AllX3dElementsAttributes4.0.txt <https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/AllX3dElementsAttributes4.0.txt>
> https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/AllX3dElementsAttributes4.0.xml <https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/AllX3dElementsAttributes4.0.xml>
> 
> It will be straightforward to adapt this to your syntax for each conversion.  We can add that automation to the regular X3D specifications build too.  X3D4 draft is now pretty stable, so this will make it easy to track along with any small future changes.
> 
> Presumably we can check that into the Notepad++ official build, once tested satisfactorily.  Whatever you think best.
> 
> ---
> 
> 3. I'd be interested in next pursuing the same technique for UltraEdit as well.
> 
> [3.1]    User-submitted wordfiles for UltraEdit/UEStudio
> https://www.ultraedit.com/downloads/extras/wordfiles.html <https://www.ultraedit.com/downloads/extras/wordfiles.html>
> 
> ---
> 
> 4. Of note is that XMLSpy already includes such support as well (we should send them an X3D4 update).
> 
> [4.1]    "XML development environment @XMLSpy by @Altova is a useful tool for modeling, editing, debugging and transforming
>      XML technologies. Latest release adds native support for #X3D Graphics international standard."
>      "Altova reports 5,367,804 users worldwide who have XMLSpy"
>      21 March 2020
> https://twitter.com/web3dconsortium/status/1245453673523638272 <https://twitter.com/web3dconsortium/status/1245453673523638272>
> 
> Am happy to have a teleconference sometime if that might assist in your efforts.
> 
> Thanks again.  Having fun with X3D!  8)
> 
> 
> On 1/21/2021 2:13 AM, jordircardona at yahoo.com <mailto:jordircardona at yahoo.com> wrote:
>  >
>  > Hi. I updated the files for my syntax coloring and autocompletion for Notepad++. It is updated for the current way of installing in Notepad++ and has install instructions.
>  >
>  > Feel free to report any improvement or bug.
>  >
>  > https://sourceforge.net/projects/nppx3d/ <https://sourceforge.net/projects/nppx3d/>
> 
>  >
>  >
>  >
>  > _______________________________________________
>  > x3d-public mailing list
>  > x3d-public at web3d.org <mailto:x3d-public at web3d.org>
>  > http://web3d.org/mailman/listinfo/x3d-public_web3d.org <http://web3d.org/mailman/listinfo/x3d-public_web3d.org>
>  >
> 
> all the best, Don
> -- 
> Don Brutzman  Naval Postgraduate School, Code USW/Br brutzman at nps.edu <mailto:brutzman at nps.edu>
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA  +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman <http://faculty.nps.edu/brutzman>
> 

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list