Hi ,
I have CodeEditor UserControl which contains XamSyntaxEditor on it .
I am loading VB file into syntax Editor ,Now on button 'Check Syntax' ,currently Errors are displayed /red sqiggly lines appear though logically file is correct .
Syntax editor is not considering supporting DLL which are required to recognize some classes etc.
Can we Import DLL /add files required to compile file which is loade in Syntax Editor like visual studio does ?
The syntax editor currently only checks for syntax errors (badly formed VB). It does not check for semantic errors (type or method names not being found, type mismatch errors, wrong number of arguments passed to a method, ...). So there are no errors currently being reported that loading a supporting DLL would help. The syntax editor is reporting syntax errors, meaning there is something wrong with the way it is reading the code. Are you using 13.1 or later? If not, try to upgrade. The 12.2 version of the parsing engine was a CTP and so it may have some bugs causing these issues for you. If not, could you send me a small portion of correct code for which the syntax editor is reporting errors?
Hi Mike ,
I have attached scrrenshot of my UI .
Where I am getting error "'Unexpected token 'Dim' ".
If I type Me.BOMs.Quantity ,Wheret 'Me' is reflecting particular Part class (eg : shown in Left side model trree 'NonConfigurablePart' class ),it does not give any error .
But even if I type something invalid like Me.XYZ ,which doesnot exist, I didnt get any error for that .
Where as I want to display error as : 'XYZ ' is not meber of .
Currently I am just loading Text into editor .
Due to which Classes like Part ,PropertySF are not recognized and displayed in black color (rather that using default VB highlight color for class)
I am not able to pull supporting classes DLL with SyntaxEditor ,Can I achieve that if I have DLL folder path ?
I have asked for approval for upgrading infragistics to 13.1 version ,and waiting for confirmation .
But is it possible to support above mentioned syntax check with 13.1 or onwards?
It looks like you are trying to support VB code fragments. Our VB language only supports parsing valid documents, which is the same thing that Visual Studio supports, by the way:
They just give a slightly different error. You may be able to create a modified grammar from the original VB grammar to support this.
Are there any plans to support "header" and "footer" properties for the editor control such that additional code is considered when doing the syntax check? The Actipro SyntaxEditor provides such functionality for ease in editing code fragments.
I don't believe there are any plans for that currently, but feel free to add this as a feature request here: http://ideas.infragistics.com/forums/192363-wpf.
I did submit this as a feature request, see http://ideas.infragistics.com/forums/192363-wpf/suggestions/4749954-support-header-and-footer-properties-in-syntaxedit.
is it possible to load the whole file but only show a code fragment in the syntax editor and hide the rest so that the visual feedback on error check is correct?
Thanks,
Maria
I don't believe that is possible, but I just took some time and was able to easily (8 lines of code) create a modified VB language which supports code blocks at the root of the file. Basically, it makes the "Block" symbol the start symbol of the grammar rather than the "CompilationUnit" symbol. See attached sample.