Open AndreasVolkmann opened 5 years ago
Sure, it would be possible.
What extension adds the X++ support to Visual Studio so that I can test it?
And do you have a reasonably comprehensive piece of X++ sample code that I could use for testing?
It seems the X++ environment is not available to the public.
Similarly, public code samples are sparse. https://github.com/TrudAX/XppTools/blob/master/DEVCommon/DEVCommon/AxClass/DEVFileReaderCSV.xml https://github.com/microsoft/FMLab/blob/master/FMLab/Lab10-2/FMBILabHelper.xml
It might still be possible for me to add some basic support without being able to test it locally.
At the very least, I would need to know the buffer content type used by X++ code windows (you can find it out by enabling the Developer Toolbar feature in Viasfora).
Yes, I was really just hoping for some of the basics :)
The buffer graph says: X++ (TextBuffer)
I've added some basic support in the current developer branch. Could you give it a try and let me know how it works for you?
Great, the rainbow braces work!
What is needed to get the other features, like keyword highlighting to work?
I saw you had already defined some of them, but they are not highlighted.
Interesting...... Two things could be happening here:
keyword
.These are the options for X++:
The problem is going to be what classifier name is behind that. If you're using VS2015/2017, could you try installing this extension, enable the editor margin, and then putting the caret on a keyword and see what classifier it reports?
Unfortunately it's not available for VS2019 at this time....
So for almost everything, example public
and class
, it says None
.
For custom types it says X++ Metadata Type
.
==
is X++ Operator
.
There's also literal strings and numbers.
Even though keywords are categorized as none, they are still highlighted as opposed to normal code.
That's not great.... not sure if I light up this feature given that (though it definitely seems kind of weird that you're seeing a mixture of both old classifications and new classifications).
I'd need to be able to run it locally to debug further, but it doesn't sound like there's much I can do here...
I wonder if viasfora could support X++?
For reference: X++ is similar to C# in syntax. https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/dev-ref/xpp-language-reference https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/dev-ref/xpp-cs-comparison