Forums

Editor

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

Re: Editor

Postby Charles » Thu Mar 03, 2011 8:20 pm

As a developer, whether using TextMate or Visual Studio, it's very common to know the name (or part of the name) of a file you want to switch to. TextMate has a built-in feature for this that cuts down the amount of time to get to that file as compared to an "open file" dialog or drilling down in a treeview for the project. It works like so:
-- you hit Command+T (which is touch type-able on a Mac keyboard)
-- a modal dialog comes up with a list of all project files sorted in MRU order
-- you immediately type a few letters of the filename
-- as you type each letter, the list is slimmed down to only those files that match
-- often you get down to the file you want with just 3 - 5 letters
-- you hit Enter when the first match is what you want
-- or you hit down arrow one or more times if you see what you want further down and you just want to pick it
-- you can use the mouse too but the keyboard is faster

So, for example, if I'm working on Cobra and I want to open CobraWorkspace/Source/BackEndClr/ScanClrType.cobra, I will just touch type:

Command+T scan Enter

It's very fast.

Since the list is sorted by MRU order, you can also switch to your last file with Command+T Enter.

A key point is that the list is slimmed down with each keystroke in real time so that you can see at what point you have zeroed in on what you are looking for.

They also put emphasis on the capital letters of the base name which would be "sct" for "ScanClrType". I didn't learn about this until I was already using the feature and tend not to make use of it, but maybe it's useful.

The menu item is called "Go to File...". You can find docs and a screen shot in section 2.3 at the end of http://manual.macromates.com/en/working_with_multiple_files.

This is a favorite feature among TextMate users.

In Visual Studio land, someone finally got around to producing a well executed version of this called SonicFileFinder.

My post here is primarily for future efforts. I hope I don't distract you from more core tasks that come before this.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Editor

Postby Charles » Thu Mar 03, 2011 8:21 pm

So what's the name going to be called? And are we billing this as an IDE or Editor?

Possible names that come to mind:
-- Fang
-- Naja (suggested by someone in the web framework discussion)
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Editor

Postby torial » Thu Mar 03, 2011 8:58 pm

I'm billing it as an IDE. Don't have a name, so have registered it as "Cobra IDE" :?

I'm definitely open to suggestions. I've always been tempted by something like CobraCommander, but I'll refrain from GI Joe references. :D
torial
 
Posts: 229
Location: IA

Re: Editor

Postby Charles » Thu Mar 03, 2011 10:40 pm

Well plus that's my nick on IRC. :-D
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Editor

Postby torial » Fri Mar 04, 2011 9:52 am

I'll go with "Naja". I will make a wiki entry after I've published the project on Codeplex.
torial
 
Posts: 229
Location: IA

Re: Editor

Postby torial » Thu Mar 10, 2011 9:06 pm

This is highly experimental, and only one-way (ie, I can't load anything). Doesn't support complex controls, or events yet. But thought it'd be fun to show. (I'll focus more on project support now ;) )

IDE_Designer.png
IDE Forms Designer
IDE_Designer.png (62.56 KiB) Viewed 12562 times


Notice that the properties are not yet Cobra cased. That still needs to happen. But here's the generated code...

IDE_Designer_Output.png
Forms Designer Output
IDE_Designer_Output.png (66.99 KiB) Viewed 12562 times
torial
 
Posts: 229
Location: IA

Re: Editor

Postby RIGHT_THEN » Thu Mar 10, 2011 10:33 pm

torial wrote:But thought it'd be fun to show.


it is fun to see :P

Thanking_You
RIGHT_THEN
RIGHT_THEN
 
Posts: 99

Re: Editor

Postby Charles » Fri Mar 11, 2011 2:28 am

Definitely interesting stuff. I have some Cobra-casing code for members in the compiler or lying around somewhere. I'll see about pushing it to the std lib so it can simple by reused.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Editor

Postby Charles » Sat Mar 12, 2011 11:48 pm

The code I'm referring to is in the compiler under CobraWorkspace/Source/Utils.cobra. It's not as trivial as just lower casing the first letter.

If you're referencing Cobra.Lang.Compiler.dll, you should be able to invoke it with:
trace Utils.cobraNameForSharpMemberName(memberName)


Let me know if you have any problems or questions.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: Editor

Postby torial » Tue Mar 15, 2011 2:21 pm

Thanks - I've incorporated that function, and now just have general Forms Generation issues to resolve :-) Although it will take a back seat to Project support... hopefully will have that done in the next 10 days or so.

The two forefront issues left with the Forms Designer (one-way):
* Complex Controls like Tabs
* Color settings are not staying

I also need to evaluate enums handling, to make sure I'm doing that correctly.
torial
 
Posts: 229
Location: IA

PreviousNext

Return to Discussion

Who is online

Users browsing this forum: No registered users and 3 guests