CMake Support

Request Features and Feature Changes

CMake Support

Postby imikejackson » Tue Nov 25, 2008 3:09 pm

Without even looking at the source code yet, what does it take to implement a new language? I would like to see Editra have support for CMake. I have implemented language modules for TextMate and also updated the Eclipse CMakeEd module so I have some tools available that help to get a list of all the keywords, predefined variables, keywords and other tokens that can be used for syntax highlighting and such.
If the implementation is just an xml file or other type of text file I can generate those files for you if needed. Just let me know.
_________________________________________________________
Mike Jackson mike.jackson@bluequartz.net
BlueQuartz Software www.bluequartz.net
Principal Software Engineer Dayton, Ohio
imikejackson
Limited User
 
Posts: 2
Joined: Tue Nov 25, 2008 2:55 pm

Re: CMake Support

Postby cody » Tue Nov 25, 2008 3:30 pm

Hello,

Scintilla 1.75 has a CMake lexer, I am planning to add support for this when wxPython2.9 comes out as it includes this newer version of Scintilla. It would be possible to add support before then if we where to either implement a lexer in python. Though this would be a lot of work when an up coming version of the library already has support builtin. (Though after taking a quick look at the c++ source of the CMake lexer in the new version of scintilla it would be pretty simple to port it to python if somebody wanted to.)

If you can prepare a list of keywords organized by type though it will greatly speed/ease the introduction of support for this when its available.


Thanks,

cody
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: CMake Support

Postby imikejackson » Wed Nov 26, 2008 3:09 pm

I have an XML file with everything pretty much laid out that goes with the Eclipse Plugin CMakeEd. You can look at it from the CMakeEd SVN repository. I can generate pretty much what ever you would like.

http://cmakeed.svn.sourceforge.net/view ... iew=markup


Mike Jackson
imikejackson
Limited User
 
Posts: 2
Joined: Tue Nov 25, 2008 2:55 pm

Re: CMake Support

Postby cody » Wed Nov 26, 2008 9:56 pm

Thanks,

The only other thing that would be good to have would be a file with some sample code in it to use for testing. It doesn't have to be functional just have some of the basic structures and keywords in it and preferably under 50 lines long (think Hello World).

If you could send something like this to me that would be great. (either post here using code tag or send to email listed on staff page, please don't PM).

Thanks,

Cody
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: CMake Support

Postby void.pointer » Wed Jun 10, 2009 6:19 pm

Hi Cody,

Just checking in on this feature. It's been over half a year since your last post and I still do not see CMake support in the latest build as of today. Where is CMake support? You mentioned that the lexers are defined in Scintilla. Is this correct? I suppose this includes CMake.
void.pointer
User
 
Posts: 5
Joined: Wed Jun 10, 2009 6:07 pm

Re: CMake Support

Postby cody » Wed Jun 10, 2009 7:38 pm

Hello,

The newer version of scintilla that is/will be included in wxPython2.9/3.0 has support for CMake so it will easily added when wxPython2.9+ is released.

2.9+ has not yet been released so I have not yet added the support for CMake as wxPython2.8 does not have a new enough scintilla to support it. wxWidgets2.9 was recently released so wxPython should not be too much longer out hopefully sometime this summer.

I have also not seen a sample cmake file added to this thread as requested earlier either so where is it? ;)


Cody
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: CMake Support

Postby void.pointer » Wed Jun 10, 2009 7:53 pm

cody wrote:Hello,

The newer version of scintilla that is/will be included in wxPython2.9/3.0 has support for CMake so it will easily added when wxPython2.9+ is released.

2.9+ has not yet been released so I have not yet added the support for CMake as wxPython2.8 does not have a new enough scintilla to support it. wxWidgets2.9 was recently released so wxPython should not be too much longer out hopefully sometime this summer.

I have also not seen a sample cmake file added to this thread as requested earlier either so where is it? ;)


Cody


I kind of don't want to give you one lol. I mean, honestly, the lexers should be defined by simple configuration files, not requiring any code touching.

If this were the case, I would be able to set up the lexer myself and submit it to the project instead of creating a test CMake script, giving it to you, and then have you touch some code.

My open source project makes very good use of CMake and you are more than welcome to download those and test with them. Open each *.cmake file in here:
http://code.google.com/p/haresvn/source ... runk/cmake

Also, visit these files:
http://code.google.com/p/haresvn/source ... eLists.txt
http://code.google.com/p/haresvn/source ... eLists.txt

Also please see CMake syntax highlighting support in Notepad++ v5.4. It has very good syntax highlighting support for this language and I highly recommend you use this as a motivator/design guide.

If after reviewing all of this information you still require a CMake script (Perhaps to demonstrate every possible syntactical feature in the language) feel free to ask.

For a list of all possible keywords and identifiers in CMake, please see its documentation page.
void.pointer
User
 
Posts: 5
Joined: Wed Jun 10, 2009 6:07 pm

Re: CMake Support

Postby cody » Wed Jun 10, 2009 8:36 pm

Hello,

1) The sample file is for use in test cases and for the syntax highlighting configuration dialog's sample text. I will not add new support with out a test file, whether I have to write it myself or somebody provides it.

The way I look at it when I make these kinds of simple requests of people is that it shows they are actually interested in the feature and not just throwing it out there as a passing fancy. Because if the person who wants to use it cannot be bothered to provide something so simple, why should I be bothered to support the feature, right? This is reasonable thinking isn't it?

2) The lexers are configured via a file (for all the scintilla builtin ones anyway) under Editra/src/syntax. Its a Python file but not much different from a configuration file. Support to load user defined ones from outside the project is a planned feature but is not yet implemented.

3) Notepad++ uses the same editing component (Scintilla), they are using it directly though so they have the newest version in there release. The one in the wxPython2.8 library is a few years old now so it is missing out on some of the newer things. When its added it will be the same as what npp is using.
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: CMake Support

Postby void.pointer » Wed Jun 10, 2009 8:51 pm

cody wrote:1) The sample file is for use in test cases and for the syntax highlighting configuration dialog's sample text. I will not add new support with out a test file, whether I have to write it myself or somebody provides it.

The way I look at it when I make these kinds of simple requests of people is that it shows they are actually interested in the feature and not just throwing it out there as a passing fancy. Because if the person who wants to use it cannot be bothered to provide something so simple, why should I be bothered to support the feature, right? This is reasonable thinking isn't it?

And in my previous post that is exactly what I gave you... several samples to work with. Also, as I said in my previous post, if you require something more fine-grained or with different requirements, please do say so. Your request was very vague. Having said that, the CMake scripts I linked to you previously will meet your needs perfectly well.

To a point I agree that people who ask for a feature should contribute some effort to that. However, sometimes people can only contribute to a certain level before they require domain knowledge. For example, if someone asks you to implement a calculator app in your notepad, the person that asked for this may not be able to give you anything other than the mention of it, since they would require knowledge of Python and wxPython to be able to contribute any sort of code.

I'll most certainly contribute what and when I can, but for you to ask more than that is a bit unreasonable. There is a boundary between what we can ask for and what we can provide, and you must find and respect that.

cody wrote:2) The lexers are configured via a file (for all the scintilla builtin ones anyway) under Editra/src/syntax. Its a Python file but not much different from a configuration file. Support to load user defined ones from outside the project is a planned feature but is not yet implemented.

That's not the kind of configuration file I'm talking about. You should abstract the configuration as much as possible. I could just as easily say that my C++ application is configurable with more C++, but that doesn't make it very abstract or very "data-driven" by definition. Some good examples of ways to configuring syntax highlighting for a specific language:
  • A GUI tool that allows you to define the identifiers, syntax, and other relevant key items required for the lexer to do its job.
  • An XML file that defines the components/syntax of the language
  • Initialization files (INI), CSV, etc...

cody wrote:3) Notepad++ uses the same editing component (Scintilla), they are using it directly though so they have the newest version in there release. The one in the wxPython2.8 library is a few years old now so it is missing out on some of the newer things. When its added it will be the same as what npp is using.

I'm fully aware of this, which is why I'm not pressuring anyone for this to get done. I simply wanted to do a status check. Other than the obvious, I wanted to check to see that you didn't implement your own lexer for this while waiting on Scintilla to come around. Such stop-gap solutions are common and normally unannounced.

Thanks for taking the time to be so open about my status check and requests. Please let me know if the CMake scripts I linked you to will be sufficient for testing. If not, please provide explicit requirements as to what you need and I will see if I can help you out further.
void.pointer
User
 
Posts: 5
Joined: Wed Jun 10, 2009 6:07 pm

Re: CMake Support

Postby cody » Wed Jun 10, 2009 10:17 pm

void.pointer wrote:And in my previous post that is exactly what I gave you... several samples to work with. Also, as I said in my previous post, if you require something more fine-grained or with different requirements, please do say so. Your request was very vague. Having said that, the CMake scripts I linked to you previously will meet your needs perfectly well.


Seems to be some level of miss communication here. Yes I saw the cmake files you linked to, yes I could probably piece a hello world cmake file together from them.

What would be optimal though is for someone with cmake knowledge to make a 50 line or less (as mentioned earlier in this thread) simple sample file that has some random snippets of different language features in it (i.e comments, functions, classes, etc...), if I do it from random full blown files in other projects its likely that I will miss some things as I don't know anything about cmake.

Thats all that is being asked for, just a minimal cmake file (does not need to even be functional) nothing else. Actually I am not even really asking for it, just saying it would make my life easier, would be nice to have, would ultimately speed up the chances of this being added sooner, and would likely lead to a higher quality finished product.

void.pointer wrote:To a point I agree that people who ask for a feature should contribute some effort to that. However, sometimes people can only contribute to a certain level before they require domain knowledge. For example, if someone asks you to implement a calculator app in your notepad, the person that asked for this may not be able to give you anything other than the mention of it, since they would require knowledge of Python and wxPython to be able to contribute any sort of code.

I'll most certainly contribute what and when I can, but for you to ask more than that is a bit unreasonable. There is a boundary between what we can ask for and what we can provide, and you must find and respect that.


Yes, I think that this is perfectly clear and that we are on the same page. In this case, cmake support was asked for, all I queried for in return was a hello world like cmake file. It seems reasonable that somebody that asks about adding cmake support could make a simple cmake file. Nothing else was asked for. So I think we are saying the same thing here?

For the example of a calculator, if I didn't know what a calculator was. I would ask for references and links to documentation/articles about what a calculator is so that I would know what to implement. If the person that asked for the calculator could not tell me what a calculator was or point me to where to get information about calculators then I would not be able to work on the request and would thus not do it.

Anyway I think this has moved beyond what we were initially talking about because I replied too verbosely in explaining my intentions as an example to others as I felt I needed to in response to reading the below comment.

I kind of don't want to give you one lol. I mean, honestly, the lexers should be defined by simple configuration files, not requiring any code touching.


I don't think we are in any kind of disagreement so lets quit disagreeing ;)


void.pointer wrote:
cody wrote:2) The lexers are configured via a file (for all the scintilla builtin ones anyway) under Editra/src/syntax. Its a Python file but not much different from a configuration file. Support to load user defined ones from outside the project is a planned feature but is not yet implemented.

That's not the kind of configuration file I'm talking about. You should abstract the configuration as much as possible. I could just as easily say that my C++ application is configurable with more C++, but that doesn't make it very abstract or very "data-driven" by definition. Some good examples of ways to configuring syntax highlighting for a specific language:
  • A GUI tool that allows you to define the identifiers, syntax, and other relevant key items required for the lexer to do its job.
  • An XML file that defines the components/syntax of the language
  • Initialization files (INI), CSV, etc...


Yes, I fully understand this and doing this requires having a generic container lexer that can construct and define the lexers identifiers from the text defined in an xml file or what not. As mentioned this is not implemented yet.

Making use of the specialized lexers that scintilla has built in support for requires scintilla knowledge and likely code changes, there is no way around this.

However until this is implemented the python files currently used for the specialized built in lexers are not so different or anymore difficult to use than any other type of config file. They just have a list of words in them and a mapping of style types to lexer identifiers.

There are a number of things I want to come back and rework in this area that I have plans to do but just have other project priorities at the moment that need to come first.


cody
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States


Return to Feature Requests

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron