Forums

IDE support - just to let you know

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

IDE support - just to let you know

Postby hopscc » Tue Nov 17, 2009 5:49 am

Just a heads up:
I've spent the last few days getting some measure of cobra support into an IDE.
The IDE is codeLite which is a multiplatform C/C++ IDE which has recently got some measure of multi language configuration.

I had a look at codesharp 3.0 earlier this year - It looked possible to provide support but the only configuration to do so was pounding on the (C#) source
I made a start at that but any slight motivation rapidly evaporated when making any changes to the c# source tree ( its built in a version of itself)
caused the (downloaded binary) version to barf (Exception dialog).

Recently some web trail led me to this IDE which looked attractive for an attempt because it used the SCiTE editor component so it should support
syntax coloring reasonably easily and it looked like it was built around a makefile system so should be reasonably configurable without source code changes...
It turns out it also uses XML files for config info so theres some additional non code beating possible there too...

So it turned out - so far I've got working project templates for building from cobra files for executables, executables with embedded RTL ( -ert) and libraries/Assemblies ( -t:lib)
in 3 build types ( debug, release and turbo).
Syntax colorisation is working (except for cobra block comments - that'll probably take a modified python lexer for SciTe ).
The builtin make based build doesnt look possible currently but they provide another
pathway that does work (with some small contortions).
I can build and run the cobra compiler from source via the IDE. ( still have to finish the stdlib build project)
All of which without touching their source code or rebuilding anything....

I've some questions to their forum.

I'll be beating on this a bit more then I'll probably post to the wiki what I've done to date
(the augmented/changed configuration files) in a form suitable for laying on top of a download cobraLite installation.
This will include instructions for the overlay install as well as some description of how to use cobra from the IDE.
No promises of when that will happen ;)


Just to set expectations : It looks like the non C++ language support is still a bit rough - there are small portions of the IDE capabilities that are currently C++ specific and its not clear that they can be made invisible for other languages with the current code ( or that the maintainers have any desire to do so).

Items that currently are not supported for cobra ( and probably will need source mods) include

    word completion, call completion (I think this is what msoft IDE users call 'intellisense' )

    Program structure- Outlines Tab (ctags capabilities) - class structure browser

    Cobra Gizmos ( fm c++ gizmos) - wizards for new class, newfile Template, ...

    Cobra cscope like support - symbol table viewer.

    Integrated debugger (thats another project perhaps - a cobra source code debugger)

So far for me, apart from the rich ( and pretty) syntax colorisation, it feels like the use of an IDE with cobra is less productive than my
current edit, compile-run cycles ....
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Re: IDE support - just to let you know

Postby Charles » Tue Nov 17, 2009 4:01 pm

That's fantastic that you're digging into this!

Random questions and thoughts:

-- When you said "codesharp" did you mean SharpDevelo?

-- I love that CodeLite runs on Mac, Windows and Linux.

-- Were you already targeting the 2.0 version that they released today?

-- In your current edit, compile-run cycles, do you have any short cut keys set up in your editor so that you can compile and run without switching to a command line?

-- Since no one is finding it easy to enhance the IDEs out there, would it be more sensible to simply roll our own using Cobra and a cross platform GUI such as GTK?
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: IDE support - just to let you know

Postby Charles » Tue Nov 17, 2009 4:01 pm

Btw there is also MonoDevelop from Novell which is already multi-language and .NET savvy.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: IDE support - just to let you know

Postby agustech » Tue Nov 17, 2009 4:13 pm

I have been trying with MonoDevelop and SharpDevelop 3 but my lack of knowledge about the innerworkings of both cobra compiler (AST) and those IDE plugings support have evaporated my motivation too. BTW MonoDevelop seems to be derived somehow from SharpDevelop
agustech
 
Posts: 37

Re: IDE support - just to let you know

Postby hopscc » Wed Nov 18, 2009 4:56 am

When you said "codesharp" did you mean SharpDevelop?

sorry yes - too much codelite/sharpdevelop swapping

Were you already targeting the 2.0 version that they released today?

o crap. No I wasnt - I've been working on the 1.0.35 version.
o well - I'll finish/cleanup, post that and refit it to the new version

That possibly explains why replies to my question posing have been a bit thin on the ground.

In your current edit, compile-run cycles, do you have any short cut keys set up in your editor so that you can compile and run without switching to a command line?

No - I've worked like that in big emacs on a linux box when I work there but on wdws (with cobra) I never bothered configuring my editor to do that.
I just run an editor window alongside compile+execute/other consoles running bash with the unix shell tools ( and whatever else I want ;graphical diff, web browser,...) avail
- for me it keeps the compile/execute state(s) all available in a local stream but segmented from the create/edit setup and whatever other streams I get drawn into.

Since no one is finding it easy to enhance the IDEs out there, would it be more sensible to simply roll our own using Cobra and a cross platform GUI such as GTK?

I doubt its sensible from a purely IDE perspective - its surely less effort to fold into an existing setup than reproduce all the framework base capabilities (workspace/project/editing/...)
from scratch then support cobra specifics.
I must admit tho I'm a little surprised that it is such a large task to enhance existing IDE's....
The codelite one is the first thats looked and been relatively approachable

From the perspective of testing and highlighting cobras cababilities though it might make a bit more sense, but its not a small effort and the web is littered with projects that started
in a like manner for good reasons that were never finished ( theres also the hijacking isssue
- seems codelite started off as a project to provide a completion lib for editors/IDE's to use - the IDE came about as a
demo/sample showing off the libs capabilities..... :) )

If we go that way it'd probably make sense to use as much componentry as possibe ( SCiTE editing component).
Oh with that too the other candidate I was thinking of looking at at some stage is an IDE called sciboo - it uses the same editor component and its written in Boo - dunno (yet) what its
features are or how configurable/modifiable for other languages it is - skimming boo doc seems to indicate that Boo might be close enough syntax wise to cobra to be translatable using some form of automated tool - dunno what its multiplatform status is.....
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Re: IDE support - just to let you know

Postby hopscc » Sat Nov 21, 2009 7:23 am

Codelite IDE cobra support files uploaded to the wiki: IDE support

Includes tree of files to drop onto a codelite-1.0.35 installation and a workspace setup for building the cobra compiler src tree in the IDE.

Only tested on Win Xp.
Please beat on these ( particularly non winxp platforms ) and tweak fix/change wiki description/doc as needed.
If have problems please open a new discussion topic codelite-1.0.35 support or somesuch

Chuck: dunno what you want to do with these files long term ( into VCS under alongside cobra source ?, some other VCS?, ...).
This lot will probably have short shelf life cos I'll start looking at codelite-2 next.

I'm out of contact tomorrow and Mon ( our time) so play amongst yourselves till I get back :)
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Re: IDE support - just to let you know

Postby Charles » Sat Nov 21, 2009 1:38 pm

Thanks, hops. Here is my field report:

I tried CodeLite 1.x on Mac OS X 10.6, but it wouldn't effectively launch. This is prior to doing any mods on it. I tried CodeLite 2.x and it does launch.

I then tried your package against CodeLite 2 and while it didn't break anything, it didn't seem to convince CodeLite that Cobra existed. The commands I used to install were:

Code: Select all
cd codelite-1.0.35-cobra
cp -pr config/* /Applications/CodeLite.app/Contents/SharedSupport/config/
cp -pr lexers/* /Applications/CodeLite.app/Contents/SharedSupport/lexers/
cp -pr templates/* /Applications/CodeLite.app/Contents/SharedSupport/templates/

But I guess it's not surprise since it's a major version mismatch.

Re: source code, I think projects like this should be independent of Cobra so they can be managed separately with their own set of concerns, releases, etc. I'm a fan of http://bitbucket.org/ where we already have several Cobra projects from webnov8, gauthier and myself.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: IDE support - just to let you know

Postby hopscc » Mon Nov 23, 2009 11:59 pm

Thx for trying that out
Hm - Interesting codelite-1 didnt run at all.

One thing I thought of recently that I hadnt addressed/mentioned was that the modded config files were all MSWindows text so all have \r\n lineendings.
That may/might/will/(possibly could) confound use on other platforms (?) tho I'd expect if that was the case youd see some sort of diagnostic or at least failure of the config to be handled at all....

perhaps if you're feeling experimental you could try running the (fm wiki) download codelite config files through 'le' to change them to your platform defaults and copy them into codelite2 again..

I'll switch over to codelite2 as soon as I've finished doccing/chasing up what I''ve done so far and see what that changes the config files to...

Good idea about bitbucket - I'll get the files up there (eventually) and modify the wiki accordingly.
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Re: IDE support - just to let you know

Postby hopscc » Tue Nov 24, 2009 12:05 am

Whoops no belay that - most of the config files (ones copied fm codelite in some form originally) use unix line endings now according to 'le'.
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Re: IDE support - just to let you know

Postby hopscc » Sun Nov 29, 2009 11:44 pm

Codelite config files for Codelite2 uploaded to pages off IDESupport,
Notes etc on CodeLite2

Files repository on bitbucket/hops/cobra

Theres still some things to do but this gets you the basics going - color, edit, build

Once again this works on WinXp pro - not tried on any other platform.
Have at it - and post any outages back here.
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Next

Return to Discussion

Who is online

Users browsing this forum: No registered users and 103 guests