How to config config.xml??
Hi!
I am trying to understand meaning of different tags in config.xml related to EditControl. The first thing I realized is very lack documentation about this question. The stunted acticle "Creating a Custom Language Configuration File" is all I have discovered. It's very disappointing since correct written config.xml may be all to need to use your wonderful control. Therefore developers that uses control must be confident with various tags/attributes from this file.
So - I just forced to ask couple of not so complicated questions because this is only way to study.
1. From my experiments I conclude that if we load and apply configuration
....
this.syEdit.Configurator.Open(@"..\..\config.xml");
this.syEdit.ApplyConfiguration("MyConfig");
...
then AutoIndentMode.Block just stop working. We have only None/Smart choices. Correct?
2. I have the follow fragment in my xml-file:
What does 'AutoFormatStartNewLine' attribute mean?
3. I have the same fragment. AutoIndentMode is Smart. When user of my application type.
{
AAA
BBB
ZZZ}
and press Enter closed brackets left on the same line as last symbol within {...} block(as shown above). Can I do automatically carrying over '}' on new line by user's Enter press or(even better) by press } itself? The correct paragraph will be like:
{
AAA
BBB
ZZZ
}
I thank in advance for your answers!
I am trying to understand meaning of different tags in config.xml related to EditControl. The first thing I realized is very lack documentation about this question. The stunted acticle "Creating a Custom Language Configuration File" is all I have discovered. It's very disappointing since correct written config.xml may be all to need to use your wonderful control. Therefore developers that uses control must be confident with various tags/attributes from this file.
So - I just forced to ask couple of not so complicated questions because this is only way to study.
1. From my experiments I conclude that if we load and apply configuration
....
this.syEdit.Configurator.Open(@"..\..\config.xml");
this.syEdit.ApplyConfiguration("MyConfig");
...
then AutoIndentMode.Block just stop working. We have only None/Smart choices. Correct?
2. I have the follow fragment in my xml-file:
What does 'AutoFormatStartNewLine' attribute mean?
3. I have the same fragment. AutoIndentMode is Smart. When user of my application type.
{
AAA
BBB
ZZZ}
and press Enter closed brackets left on the same line as last symbol within {...} block(as shown above). Can I do automatically carrying over '}' on new line by user's Enter press or(even better) by press } itself? The correct paragraph will be like:
{
AAA
BBB
ZZZ
}
I thank in advance for your answers!
SIGN IN To post a reply.
5 Replies
DE
Developer
February 27, 2007 12:14 PM UTC
Hmmm... Then xml-fragment for clause 2 didn't posted. I attached this couple stings as file. Sorry for inconvenience!
Fragment.zip
Fragment.zip
AD
Administrator
Syncfusion Team
February 27, 2007 10:20 PM UTC
Hi Developer,
Our apologies for the inconvenience caused, and thanks for your feedback on the Edit documentation. We do realize that the documentation for Essential Edit needs to be improved and I have conveyed this information to our documentation team.
1. It is possible to use AutoIndentMode.Block when Configurator.Open and ApplyConfiguration method is used. I have attached a sample that illustrates this.
sample
2. I have consulted the Edit development team regarding 'AutoFormatStartNewLine' attribute and will update you with more information within a day.
3. It is possible to insert '}' on new line when '}' is pressed using TextChanging event. I have attached a sample that illustrates this. Let me know if this meets your requirements.
sample
Thanks for your patience.
Regards,
Ebenezer.P
Our apologies for the inconvenience caused, and thanks for your feedback on the Edit documentation. We do realize that the documentation for Essential Edit needs to be improved and I have conveyed this information to our documentation team.
1. It is possible to use AutoIndentMode.Block when Configurator.Open and ApplyConfiguration method is used. I have attached a sample that illustrates this.
sample
2. I have consulted the Edit development team regarding 'AutoFormatStartNewLine' attribute and will update you with more information within a day.
3. It is possible to insert '}' on new line when '}' is pressed using TextChanging event. I have attached a sample that illustrates this. Let me know if this meets your requirements.
sample
Thanks for your patience.
Regards,
Ebenezer.P
DE
Developer
February 28, 2007 10:52 AM UTC
Thanks for you reply!
1. Hmmm... Interesting. Your example definitely work and mine definitely doesn't. I use almost the same code, but rather different config.xml.
When '...ApplyConfiguration(...)...' executed new string always begin in column 1. But if I commented 'ApplyConfiguration' out - AutoIndentMode.Block start works as expected.
Please, see attachment for my example with my config.xml.
2. OK, I see. I will be waiting...
3. Works like a dream, thanks a lot!
About_AutoIndentMode_Block.zip
1. Hmmm... Interesting. Your example definitely work and mine definitely doesn't. I use almost the same code, but rather different config.xml.
When '...ApplyConfiguration(...)...' executed new string always begin in column 1. But if I commented 'ApplyConfiguration' out - AutoIndentMode.Block start works as expected.
Please, see attachment for my example with my config.xml.
2. OK, I see. I will be waiting...
3. Works like a dream, thanks a lot!
About_AutoIndentMode_Block.zip
AD
Administrator
Syncfusion Team
February 28, 2007 11:32 PM UTC
Hi Developer,
AutoIndentMode.Block works correctly when the Whitespace lexem shown below is included in the config.xml file.
lexem BeginBlock="(\s(?
I have attached a sample that illustrates this. Let me know if this meets your requirements.
Thanks for your patience.
Regards,
Ebenezer.P
sample
AutoIndentMode.Block works correctly when the Whitespace lexem shown below is included in the config.xml file.
lexem BeginBlock="(\s(?
I have attached a sample that illustrates this. Let me know if this meets your requirements.
Thanks for your patience.
Regards,
Ebenezer.P
sample
DE
Developer
March 1, 2007 08:21 PM UTC
Yes, thanks a lot, I get the idea about this mandatory RegEx described whitespace.
Now we have left only the question about 'AutoFormatStartNewLine' attribute. So - I am still in waiting...
Now we have left only the question about 'AutoFormatStartNewLine' attribute. So - I am still in waiting...
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
DE Developer
- Feb 27, 2007 12:08 PM UTC
- Mar 1, 2007 08:21 PM UTC