This project is read-only.

Problems using ScintillaNET

Topics: Developer Forum, User Forum
Jun 10, 2010 at 5:37 AM

Hi!

I am using VS C# 2008 EE and I am trying to make an editor for my own needs. In fact I am trygin to prepare some kind of ide for coding in ColdFusion. Simple application - multiple files, projects, DB conectivity and the most importand - code completion, syntac highlighting and parsing. So here are my problems:

- I can't enforced the editor for displaying line numbers :( can you give an example how to enforced this on form loading?

- how to enforced opening code assistnat on chars <, ,#,(

- how to enforced editor to add closing tag if i hit the end of starting tag. for example thereis a tag <cffunction> so when i type > the editor should add automaticlly </cffunction>

- is there any option for example to make something like that:

 i am opening tag <cffun and the editor completing me <cffunftion and when I hit space it suggest me the list of parameters (name, returntype etc.) so I am choosing returntype and I've got tag <cffunction returntype="" and when I put cursor between quotations It should suggest me a list of availables values for this parameter. I know I want a lot but I hope that that is possible.

- how can i give users possibility to set their own line wrap

Thanks for anserws

regards

jmail

Jun 14, 2010 at 7:13 PM

I need help :( Please help me

Jun 15, 2010 at 6:04 AM

I would like help you but your questions are too broad and too many. I would suggest prioritizing your questions and then ask them one at a time. With that in mind: what is your most pressing question and what have you tried to do to resolve it?

 

Jacob

 

Jun 15, 2010 at 10:36 PM

Ok!

Thank you for helping me.

So my importnad thing is to build my own lexer. I would like to add support for ColdFusion into scintilla and I don't now how to do this. I need some help, pointing me into the right direction. Some example could be very helpful.

The ColdFusion syntax got two parts meta language and cfscript they are doing something similar but with other syntax. For example loop

in meta language this will be

<cfloop from="number" to="number" index="variable">

</cfloop>

in cfscript the same will be

<cfscript>

  for(i=number; i <number; i++){

  }

</cfscript>

First I would like to build lexer for meta language. Please tell where to find infromation about it

regards

jmail

 

Jun 16, 2010 at 4:00 AM
Edited Jun 16, 2010 at 4:02 AM

I should warn you that building your own lexer can be VERY challenging. The best source of documentation that we currently have is the INI lexer in the SCide application. Take a look at the IniLexer.cs file.

Also, a brief search of the Discussion boards also revealed information you might find helpful:

[discussion:34165] (http://scintillanet.codeplex.com/Thread/View.aspx?ThreadId=34165)
[discussion:29638] (http://scintillanet.codeplex.com/Thread/View.aspx?ThreadId=29638)
[discussion:204955] (http://scintillanet.codeplex.com/Thread/View.aspx?ThreadId=204955)
[discussion:72941] (http://scintillanet.codeplex.com/Thread/View.aspx?ThreadId=72941)
[discussion:42949] (http://scintillanet.codeplex.com/Thread/View.aspx?ThreadId=42949)
etc....

 

Jacob

 

 

Jun 16, 2010 at 9:13 AM

Where is SCide? I can't find it :(

Jun 16, 2010 at 6:55 PM
My bad... we removed it from the current release so you'll have to get it from source. From the "Source Code" tab at the top of our CodePlex project page, click the "Download" button. That will get you a snapshot of all our latest code. You can build SCide by compiling the ScintillaNET solution in the $/Releases/2.2/ folder. Jacob
Jun 16, 2010 at 10:05 PM

hmmmm. that is the second step. Sorry for my bad english - I had 7 years break in using english. So lexer isn't exactly what I need at first place. I have checked it and that is what I will need but not at the first place. At first place I need to build grammar file for ColdFusion. where can I define keyword etc etc

regards

jmail

 

 

 

Jun 17, 2010 at 5:30 AM

It looks like ColdFusion markup is similar to XML. I would therefore use the XML lexer and then specify some of your keywords. Study how SCide uses the XML configuration to do syntax highlighting and how Scintilla uses the embedded configuration files to set keywords.

I wish I had more documentation for this process, but for now the source code is the best documentation we have.

 

Jacob