Author Topic: New features suggestion  (Read 3918 times)

JL

  • Guest
New features suggestion
« on: May 11, 2006, 01:59:45 am »
Hello! I have two suggestions that would improve Code::Blocks:
1. Allow to navigate between the pieces of code you have seen before and after: two icon arrows, one for "backward" and another one for "forward", just like a web browser. I suppose it can be implemented easily, by storing a history list like (file name, line number).
2. Create a "context" window: when you place the cursor in a function name or variable name, the implementation/definition of the function/variable is shown in this windows. I think this should be hard to implement, but I have used this features in other proffesional editors and it improves readability of code very much.

Thank you.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9594
Re: New features suggestion
« Reply #1 on: May 11, 2006, 08:09:42 am »
Are you aware that there is a feature called "bookmarks" implemented in Code::Blocks. This will very much already do what you have proposed here. You can set bookmarks anywhere in your code (and within multiple files) and navigate though them up and downwards.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

JL

  • Guest
Re: New features suggestion
« Reply #2 on: May 11, 2006, 10:09:18 am »
Hi!
Thank you for your response. I'm aware of the "bookmarks" feature, but I think saving automatically the "state" (the portions of code you have been before) is more user friendly. It could be implemented also as a new menu item like "Automatically set bootmarks". In case this option is marked on, an "forward arrow" icon and "backward arrow" icon in the toolbar will be highlighted to allow an easy navigation between the bootmarks. As you have said, it is already implemented but not so much "user friendly".

On the other hand, the "context window" feature could be a new tab in the messages window. I think this would be difficult to implement because you should navigate automatically in the code files to find the point in which the funtion/variable is defined.

Thanks!

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2229
Re: New features suggestion
« Reply #3 on: May 11, 2006, 01:42:19 pm »
Sounds like a plugin to me.

I was working on an idea like this called ScrapList.
It saved all those little preferences, debugging marks, bookmarks, etc in an external xml. It represented all these settings in a drag'n'drop tree list.

For example, you could drag any filename out of the projects list into the Scaplist like a bookmark. You could even drag the name of the project. If the project name fell off the "recently used" list, you could just drag it back from the ScrapList into the project window. Same with book/debugger marklets.

It also saves scraps of code, etc. It's a "scrap list". I was gonna name it "ScatList", but my nerveless side wouldn't let me.


Alas, I got side tracked with crash bugs and patches.
Will get back to it soon.

Offline Ocelot

  • Single posting newcomer
  • *
  • Posts: 4
Re: New features suggestion
« Reply #4 on: May 15, 2006, 06:39:14 pm »
Hey, I just read this on gamedev forum  :D
Quote
I just love eclipse's refactoring capabilities (for example "rename variables/methods/classes" and "extract interface from class").

And the quickfixes are really great! For example, suppose you want to call a method on an object, but that method does not exist yet. Normally you'd go the corresponding class and add that method there, then go back and call that method.
With eclipse, you can "call" the method first, press Ctrl+1 and automagically create the method in the right class with the right parameter list.

It will be super to have thise functionalities in C::B

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: New features suggestion
« Reply #5 on: May 15, 2006, 07:07:12 pm »
Hey, I just read this on gamedev forum  :D
Quote
I just love eclipse's refactoring capabilities (for example "rename variables/methods/classes" and "extract interface from class").

And the quickfixes are really great! For example, suppose you want to call a method on an object, but that method does not exist yet. Normally you'd go the corresponding class and add that method there, then go back and call that method.
With eclipse, you can "call" the method first, press Ctrl+1 and automagically create the method in the right class with the right parameter list.

It will be super to have thise functionalities in C::B

Hello,

You might want to give a look at here:

http://forums.codeblocks.org/index.php?topic=2279.0

Best wishes,
Michael

Offline Ocelot

  • Single posting newcomer
  • *
  • Posts: 4
Re: New features suggestion
« Reply #6 on: May 15, 2006, 08:11:10 pm »
 :shock: I didn't know that it's so BIG work.

JL

  • Guest
Re: New features suggestion
« Reply #7 on: May 17, 2006, 11:31:31 am »
Sounds like a plugin to me.

I was working on an idea like this called ScrapList.
It saved all those little preferences, debugging marks, bookmarks, etc in an external xml. It represented all these settings in a drag'n'drop tree list.

For example, you could drag any filename out of the projects list into the Scaplist like a bookmark. You could even drag the name of the project. If the project name fell off the "recently used" list, you could just drag it back from the ScrapList into the project window. Same with book/debugger marklets.

It also saves scraps of code, etc. It's a "scrap list". I was gonna name it "ScatList", but my nerveless side wouldn't let me.


Alas, I got side tracked with crash bugs and patches.
Will get back to it soon.


I think the most user friendly approach is just to automatically save the last visited positions. I suggest to only save a list of (file, line number, character in line). If you erase a word in a line, only the last position of the cursor in that line should be saved. Same with words added. So, in the list, the previous and the following line numbers should be different than current line number. You can save the list in memory or in an  external XML file just as you said. Then, with a forward and a backward button, you should be able to navigate between the saved positions.

I have seen in other editors and it's really useful (Visual Studio, for example).