Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Syntax Edit
  New Posts New Posts RSS Feed - A few questions
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

A few questions

 Post Reply Post Reply
Author
Message
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Topic: A few questions
    Posted: 25 February 2008 at 11:56am
a) Is it possible to draw a timestamp instead of the line number in front of the lines?

b) Does the control / schema support regex?

c) Is it possible to modify the schema at runtime?

d) Is it possible to set the background color for the lines?


Thanks Andre

Codejock support
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2008 at 10:09am
It seems to me that the SyntaxEdit control is the poor stepchild.

Codejock support
Back to Top
adrien View Drop Down
Senior Member
Senior Member


Joined: 30 April 2007
Location: New Zealand
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote adrien Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2008 at 6:17pm
it's a difficult problem:
 
deciding on a structure that can be used to describe any programming language.  Then coming up with a syntax to describe that structure, and a parser to decode schema files.  I can imagine there are lots of headaches with the initial structure.  For instance some languages are not easily described using such a structure (Lua for one).
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 29 February 2008 at 7:34am
I disagree. Scintilla solves this elegantly using tokenizers which give you full control of the coloring. Sometimes complicated, but still a robust solution.
 
I'm not going to use the SyntaxEdit until this is implemented.
 
PS. Funny you mention those functions. I needed the exact same things some months ago. I sense you're developing my application ;)
Back to Top
adrien View Drop Down
Senior Member
Senior Member


Joined: 30 April 2007
Location: New Zealand
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote adrien Quote  Post ReplyReply Direct Link To This Post Posted: 03 March 2008 at 9:42pm
scintilla uses C++ code to implement tokenising and structural analysis of each language.  They didn't try to create a meta language for all of this, they just have plugins to do it.  It is very effective, but it's totally different than trying to create a global syntax for a schema definition and only one parser for all languages.
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 04 March 2008 at 2:34am
That's true, but why not extend SyntaxEdit to allow for this approach too?
 
syntaxEdit.EnableTokenizer(TRUE);
 
CMySyntaxEdit::OnColorize(params) {...}
Back to Top
adrien View Drop Down
Senior Member
Senior Member


Joined: 30 April 2007
Location: New Zealand
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote adrien Quote  Post ReplyReply Direct Link To This Post Posted: 05 March 2008 at 11:13pm
sure, I've got nothing against the plugin approach.
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 16 March 2009 at 4:29pm

Please try current version of SyntaxControl - in Static app which

1. ask you to open file to parse and display

2. ask you to open syntax file

3. show you your syntax file and allow to change it on fly

https://forum.codejock.com/uploads/DemoVersion/MDITextEditorStatic.rar

Give me some feedback about the speed of current version.

Be also sure that YOU HAVE PROPER SYNTAX File - e.g. attach it to your post note so I can also try it  
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 16 March 2009 at 5:37pm
Originally posted by mdoubson mdoubson wrote:


Give me some feedback about the speed of current version.


Just tried it with XTToolkitPro.h and the C++ schema from 12.1.1:

- Scrolling is pretty slow

- Text selection is horribly slow

- Editing is slow

Bug: Window > Split, text selection no longer possible

Bottom line: SyntaxEdit is not useable for anything in its current state.


Also you haven't answered any of my initial questions. I'm waiting over A YEAR for a reply!!!

Codejock support
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 16 March 2009 at 6:06pm
Thanks for your reply. I repeat your steps in same static app and using SciTE. Timing very similar. I like to use some benchmarks instead of emotional terms.
Btw - window -> split is not for current test case (almost disable).
I am sorry about your questions - your asked another persons in the past. I see the use of CJ SyntaxEdit in the current architecture.
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 17 March 2009 at 7:01am
Originally posted by mdoubson mdoubson wrote:

I like to use some benchmarks instead of emotional terms.


Quite simple, put some test files together and then figure out the FPS. How long does it take to draw the view at the same size/lines?

And just because someone else isn't better it doesn't mean you're good!

SyntaxEdit is too slow and not flexible enough.

Codejock support
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 19 March 2009 at 7:27am
Regarding text selection: Scintilla is several magnitudes faster, period. At least this is true for SyntaxEdit 12.
PokerMemento - http://www.pokermemento.com/
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 19 March 2009 at 1:28pm
Originally posted by znakeeye znakeeye wrote:

Regarding text selection: Scintilla is several magnitudes faster, period. At least this is true for SyntaxEdit 12.


Did you try the updated exe Mark posted?

As far as speed, what files are you guys opening?  For example I can open XTPSyntaxEditCtrl.cpp (one of the largest files in the toolkit) and editing\text selection seems OK.

Using Mark's exe can you test that file and give us the results?
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 25 March 2009 at 10:57pm
>> Is it possible to modify the schema at runtime?
 
Yes you can do it. We have architecture to use only memory-located syntax and color schemes - so you can modify it on fly
Back to Top
adrien View Drop Down
Senior Member
Senior Member


Joined: 30 April 2007
Location: New Zealand
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote adrien Quote  Post ReplyReply Direct Link To This Post Posted: 29 March 2009 at 6:02am
in my tests speed was not a factor of the source file you look at, but was a factor of the complexity of the schema file.
 
I tried many times to get a lua parser going which would allow outlining.  I'd make small(?) changes in the schema file, and there would be a huge variation in the runtime speed to parse the same simple lua file (it was a single function if I remember correctly).
 
I think I suggested it before, but have you considered the gold parser approach?
 
 
Then your schema file would be in BNF (a standard, and many existing BNF specs for popular languages).  Then just assign colours etc to BNF productions.
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 30 March 2009 at 6:30pm
I also found that old CJ VB syntax not properly supported different case of outlinening (collapsed blocks) but I improved it recently and publish somewhere in Forum (may be in ActiveX zone?). It now supported recursive and non recursive collapsed blocks (e.g. for "Region ----- "End region" vs "Private Sub ---- End Sub")
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2009 at 8:56pm

Mr ABuenger I am ready to use your help to improve our SyntaxEdit in the direction you describe as promisable -

add Assembler support with extra columns to visual data such as timestamps, hex data display and so on
but need some real input from your side - not just critics and ref on SciTE.
If you ready - open the Issue for SyntaxEdit modification steps and we can work together
Back to Top
tobi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 September 2004
Location: Germany
Status: Offline
Points: 451
Post Options Post Options   Thanks (0) Thanks(0)   Quote tobi Quote  Post ReplyReply Direct Link To This Post Posted: 28 April 2009 at 3:28am
Hi Mark,

please try to add line modification markers to the control if possible ...





Thanks a lot

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 29 April 2009 at 2:03pm
More details, Tobi, please
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 29 April 2009 at 8:10pm
Originally posted by mdoubson mdoubson wrote:

Mr ABuenger I am ready to use your help to improve our SyntaxEdit in the direction you describe as promisable -

add Assembler support with extra columns to visual data such as timestamps, hex data display and so on
but need some real input from your side - not just critics and ref on SciTE.
If you ready - open the Issue for SyntaxEdit modification steps and we can work together


Thanks, I'll open a support ticket tomorrow.

Codejock support
Back to Top
tobi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 09 September 2004
Location: Germany
Status: Offline
Points: 451
Post Options Post Options   Thanks (0) Thanks(0)   Quote tobi Quote  Post ReplyReply Direct Link To This Post Posted: 30 April 2009 at 8:43am
Hi Mark,
 
just have a look at the website of Actipro Software ( http://www.actiprosoftware.com ) - in my opinion the best syntax editor control currently available !
 
For me the following features have to be implemented to use CJ SyntaxEditor in our applications:
 
- possibility to edit language definitions at runtime by code
 
Would be great if these feature could make it in one of the next releases ...
 
Let me know if you need further information
 
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 2009 at 11:51am
Hi, we already have code in current version of SyntaxEdit for language definitions modification runtime by code.
 
Are you ready to participate in SyntaxEdit extention project? Write the spec you consider have potential and we can discuss it (foreign links as actiprosoftware is not enough!).
 
Even LineModificationMarking need to have all-cases-covered spec (e.g. delete line  - undelete line and so on)
Back to Top
robin_l View Drop Down
Senior Member
Senior Member


Joined: 15 October 2006
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote robin_l Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2009 at 5:02am
Originally posted by mdoubson mdoubson wrote:

Hi, we already have code in current version of SyntaxEdit for language definitions modification runtime by code.
 
 
Hi Mark,
One  of the big problems is that the documentation for SyntaxEdit is almost completely unusable--it is hard to know what is and is not there as there are so few examples.
 
A real limitation is that there seems to be only one sample program (SyntaxEdit.MDITextEditor). It would really help to have a few more!
Can I make a suggestion: why not rewrite MarkupPad to use SyntaxEdit for showing the Markup? It would be an ideal use for it....
Product: Xtreme ToolkitPro 2009 (13.4.1)
Platform: Windows 7 Ultimate(64bit)
Language: Visual Studio 2010 (C++)
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2009 at 7:38am
Originally posted by robin_l robin_l wrote:

Can I make a suggestion: why not rewrite MarkupPad to use SyntaxEdit for showing the Markup? It would be an ideal use for it....



Codejock support
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2009 at 5:27pm
Requst tp rewrite MarkUp should be directed to Oleg. About SyntaxEdit current version info: If you are using MFC - you have all source code recent so just take your time and analyze it. If you are using SyntaxEdit ActiveX version - you can always open VB6 ObjectBrowser and see all properties and method - up to date (I understand very well that CJ help is obsolete)
Back to Top
robin_l View Drop Down
Senior Member
Senior Member


Joined: 15 October 2006
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote robin_l Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2009 at 6:39pm
Hi Mark,
 
With all due respect, the idea behind using commercial code libraries is that there should be sufficient documentation and examples to allow us to implement things WITHOUT having to pick through the raw source code. The SyntaxEdit control, after lots of initial adverse comments, now seems to me to be sufficiently stable and robust that I'd really like to use it. BUT... it is one of the most complex CodeJock components and having a single example file, plus rather terse and (by your own admission) incomplete documentation makes this more of a struggle than it should be.
 
For my purposes, I still feel that the reliance on an immutable external config file is too limiting and I echo the comments made earlier about the need to allow language definitions to be changed at runtime. I'd also prefer the option of NOT using a configuration file, but instead of passing the information direct (including the .schclass information as a resource would be my first choice--I don't like the idea of "magic" configuration files that users could alter).
 
Product: Xtreme ToolkitPro 2009 (13.4.1)
Platform: Windows 7 Ultimate(64bit)
Language: Visual Studio 2010 (C++)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2009 at 6:52pm
You right about help-support but what can we do in this life? I already implement String (not-file) based Syntax scheme which can be changed on fly.
There is function to Get and Set Syntax operated with strings run-time any moment.
 
But I don't agree that our SyntaxEdit MFC Sample is not enough to understand SyntaxEdit features - it can be used as good start point for custom solutions. This is MDI project but it is very simple to convert it to SDI or Multi_SDI or Dialog or FormView.
 
VB SyntaxEdit Sample are similar (MDI Forms) and can be easy convert to other achitectures. Am I missing something? What are you like to see as a sample?
Back to Top
robin_l View Drop Down
Senior Member
Senior Member


Joined: 15 October 2006
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote robin_l Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2009 at 6:59pm
Is that in 13.0?
Product: Xtreme ToolkitPro 2009 (13.4.1)
Platform: Windows 7 Ultimate(64bit)
Language: Visual Studio 2010 (C++)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2009 at 7:07pm
No - for 13.1 but some of our clients already use and like it in beta-version.
Back to Top
robin_l View Drop Down
Senior Member
Senior Member


Joined: 15 October 2006
Status: Offline
Points: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote robin_l Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2009 at 7:23pm
Well in that case I look forward to seeing it in 13.1
Product: Xtreme ToolkitPro 2009 (13.4.1)
Platform: Windows 7 Ultimate(64bit)
Language: Visual Studio 2010 (C++)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.187 seconds.