Forums

Editor

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

Editor

Postby torial » Tue Mar 01, 2011 9:31 pm

I wished to move the discussion about any editor changes into its own thread, and not take over the Folding thread.

My short term plan has been:
a) To eventually release a Cobra Editor / minimalist IDE under an MIT license after I get very basic project support implemented.
b) Add GUI support to take advantage of the test mechanism of Cobra.
c) Add a configuration panel for various compiler switches. Definitely thinking of a VS-like interface for that.
d) Possibly add WinFroms designer logic (this may be a longer term goal, but a year ago I found a sample app that implemented this in C#, and I would probably just make available hooks)

Per the feedback from Charles in the Folding thread, I am considering the following order:
a) Release the Cobra Editor once I've got basic project support implemented. (same as above). Convert the editor to use the ICSharpEditor to leverage any of RIGHT_THEN's work for the earlier SharpDevelop plugin.
b) Add GUI support to take advantage of the test mechanism of Cobra (same as above). Also add solution support.
c) Refactor the code-base to support the multiple layer approach to make it easier to re-use key logic despite a different UI front end.
d) Add a configuration panel for various compiler switches. Definitely thinking of a VS-like interface for that. (same as the original c)
e) Setup a plugin interface to make it easy to extend the application without having to get deep into the codebase.
f) Possibly add WinFroms designer logic (this may be a longer term goal, but a year ago I found a sample app that implemented this in C#, and I would probably just make hooks into that logic) (same as original d)

Essentially, my goal would be able to completely replace Scite as my editor after the initial release, and then do all improvements to this project with the code.

I am open to discussion / suggestions, and at some point help. But I will be time constrained, and probably only able to work on this project intermittently.
torial
 
Posts: 229
Location: IA

Re: Editor

Postby torial » Tue Mar 01, 2011 9:32 pm

Current screenshot. At this point, just a colorized text editor with Compiler calls (via command line) built in.
IDE.png
Current IDE
IDE.png (83.66 KiB) Viewed 24934 times
torial
 
Posts: 229
Location: IA

Re: Editor

Postby hopscc » Wed Mar 02, 2011 12:08 am

Sounds great.

At this point the only suggestion I have would be to also provide some aids (or hooks) for ad-hoc navigation/traversal support for larger codebases

  • Code structure editor/explorer ( GUI Panel and tree of contents)
  • ctags like jump navigation and return (stacking the point on each jump) - keybd based
Both of these probably fit somewhere after Project support.

Looking forward to code availability
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Re: Editor

Postby Charles » Wed Mar 02, 2011 12:09 am

Looks like a great start. Do you want to generalize it to handle both C# and Cobra? Could be a generic IDE that also comes with Cobra conveniences out of the box. Just a thought.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Editor

Postby torial » Wed Mar 02, 2011 7:40 am

Ok, we'll add large code traversal mechanisms... CTags, don't know much about the mechanism... but definitely want contextual autocompletion ... which I believe is what they allow (is that correct?)

C# support is built-in w/ (I'll probably also want to support SQL / XML since they are so common interchange formats) by virtue of either editor control that would be used. So yeah, I'm definitely planning to allow C#.
torial
 
Posts: 229
Location: IA

Re: Editor

Postby hopscc » Wed Mar 02, 2011 8:24 am

No, autocompletion is a different feature.

The ctags support in editors is along the lines of hitting a key over a piece of code and it takes you to the place that token in the code is declared/defined,
ideally it stacks the leaving and target points so you can jump right back to where you came from.

for example
( _*_ indicates the cursor position)
Code: Select all
branch last
   ...
   on 'HAS'
      attribs = ._*_hasAttribs
   on 'WHERE'


pressing the goto-tag key jumps you to the place that '.hasAttribs' is defined if it can be determined.
pops up a menu selection if theres multiple possibilities or beeps (or something) if it cant find a matching tag
So you jump to here say in your editing screen
Code: Select all
   def _*_hasAttribs as AttributeList
      attribs = AttributeList()
      if .optional('HAS')
         while true
            isReturnTarget = .optional('RETURN') is not nil
            expr = .attribExpr(0)
            attribs.add(AttributeDecl(expr, isReturnTarget))
            if not .optional('COMMA'), break
         .endOfTypeSpecClause
      return attribs


You look at what you want, browse around, whatever, then hit the pop-tag key and it returns you to the last place you did a goto-tag from.

The traditiional mechanism was a program called ctags you ran periodically on your (originally C) source files that made a table of 'interesting' structure tags, file and line numbers and search expressions - the editor used this file once it had grabbed a tag token from under the cursor to determine the file+line or file + search pattern to jump to and look for.
Modern tools have the capability available builtin if they have any minimal ability to tokenise+parse a particular language.

The description doesnt sound like much but its extremely powerful with adequate tag generation and editor support.
Its easy enough to provide as described above given reasonable editor capability and exuberant ctags (which works with cobra).

Do a search for 'ctags' ( exuberant ctags) and 'ctags emacs' for more detail than you ever want or need
hopscc
 
Posts: 632
Location: New Plymouth, Taranaki, New Zealand

Re: Editor

Postby torial » Wed Mar 02, 2011 9:04 am

Oh I get it now, VS (especially when coupled with ReSharper) has that. Thanks for the clarification. Definitely want that feature!
torial
 
Posts: 229
Location: IA

Re: Editor

Postby torial » Wed Mar 02, 2011 9:41 am

One other area that I'd mid-term planning to support would a GUI for the documentation mechanism of Cobra, and auto-updating it for easy reference.
torial
 
Posts: 229
Location: IA

Re: Editor

Postby Charles » Wed Mar 02, 2011 7:38 pm

Another idea is TextMate-like file switching, also found as SonicFileFinder in the Visual Studio community.

I have more ideas too as I'm sure others do, but that's enough for now. :-D

Are you planning to share this through a particular source code control system? I would be interested in seeing it available via Mercurial or Git.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Editor

Postby torial » Wed Mar 02, 2011 8:23 pm

I setup the project (not published yet) on CodePlex with Mercurial support. When I get that public, I'll post a link. Trying to organize my thoughts, as there is a lot to do, and don't want to re-think everything each time I find some time to work on the project.

Btw, am not familiar with TextMate.. but if you have screenshots or know of a video that illustrates the features, I'm happy to look. The cool thing about the feedback from everyone is learning things.... And I've also got brainstormitis as well... like examining code for contract promotion (ie ascertaining when a require can also be applied to the calling function [this presumes a small scope, but I would definitely benefit from it], or even analysis of contracts to recommend merged ones for the parent fxn.. but just ideas.. with little thought as to implications)
torial
 
Posts: 229
Location: IA

Next

Return to Discussion

Who is online

Users browsing this forum: No registered users and 15 guests

cron