News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Code snippet plugin

Started by frankmail007, June 20, 2006, 05:51:44 PM

Previous topic - Next topic

frankmail007

Have you ever used wxCRP or Code snippet management in VC Express 2005? I think a Code Snippet Plugin will be a good feature for CodeBlocks. It should have the following features:

1. Code Snippet management
2. Save as a template which can be used by new project.

What do you think?

Game_Ender

#1
How about a real description of number 1.  We don't all use VS 2005.  There are several dozen other platforms and many IDEs out there.

EDIT: I exaggerated, if I had to take a rough guess I would say there are about a dozen other major platforms out there.

David Perfors

good idea ;) saves a lot of time searching the right peace of code...
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

kidmosey

Essentially, wxCRP is a repository (searchable) for all of your code/files that you think you will reuse.

You might be able to use C::B's project templates for this... although that might be overkill for smaller code snippets.

Personally, I just use a snippet directory for all of my reusable code.  Seems to work just as well.
3 years until google knows more than god.

Pecan

#4
Quote from: kidmosey on July 22, 2006, 03:48:49 AM
Essentially, wxCRP is a repository (searchable) for all of your code/files that you think you will reuse.

You might be able to use C::B's project templates for this... although that might be overkill for smaller code snippets.

Personally, I just use a snippet directory for all of my reusable code.  Seems to work just as well.


wxCRP does not appear to be cross-platform capable. The author's last update indicates he was working on a linux port, and there is no mention of Mac support.

The last update was 2 1/2 yrs ago and no source is available. So I don't think it's possible to adapt for CodeBlocks.


mdelfede

Quote from: Pecan on July 22, 2006, 04:58:49 AM

wxCRP does not appear to be cross-platform capable. The author's last update indicates he was working on a linux port, and there is no mention of Mac support.

The last update was 2 1/2 yrs ago and no source is available. So I don't think it's possible to adapt for CodeBlocks.



The source is indeed available through cvs.

Ciao

Max

Pecan

#6
Quote from: mdelfede on July 22, 2006, 12:57:25 PM

The source is indeed available through cvs.

Ciao

Max


Thanks, that escaped me for the moment. I was looking in the files section and it was late at night. I'll have a "look see".

mdelfede

Quote from: Pecan on July 22, 2006, 02:00:24 PM

Thanks, that escaped me for the moment. I was looking in the files section and it was late at night. I'll have a "look see".

Yes, it took me a while to fnd it, too  :)
It seems be using wxwidgets 2.4....

artoj

Well, I decided to create a Code Snippets plugin and it's almost ready.

Things that I'm proud of:
- Custom artwork by me (I like green :( )
- Unoptimized find-as-you-type search
- It integrates with C::B (creates a docking window)
- It's simple

There are some things that I must do before I release it tough, e.g. testing on Linux and some code cleanup.

Screenshot:


sethjackson

#9
Quote from: artoj on August 08, 2006, 10:07:17 PM
Well, I decided to create a Code Snippets plugin and it's almost ready.

Things that I'm proud of:
- Custom artwork by me (I like green :( )
- Unoptimized find-as-you-type search
- It integrates with C::B (creates a docking window)
- It's simple

There are some things that I must do before I release it tough, e.g. testing on Linux and some code cleanup.

Sweet. :D

Game_Ender

Very cool, does it have multiple language support?

On a side note, I think it clutters a thread when people quote posts that have long code segments or imags inlined.

kidmosey

Quote from: artoj on August 08, 2006, 10:07:17 PM
Well, I decided to create a Code Snippets plugin and it's almost ready.

Things that I'm proud of:
- Custom artwork by me (I like green :( )
- Unoptimized find-as-you-type search
- It integrates with C::B (creates a docking window)
- It's simple

There are some things that I must do before I release it tough, e.g. testing on Linux and some code cleanup.

Can't wait to try it out... resembles my present "directory" method, except it's integrated! :D

btw, how are snippets stored?
3 years until google knows more than god.

killerbot

sounds nice, me too : impatient to try it out ;-)

Vampyre_Dark

Quote from: artoj on August 08, 2006, 10:07:17 PM
Things that I'm proud of:
- Custom artwork by me (I like green :( )
- Unoptimized find-as-you-type search
- It integrates with C::B (creates a docking window)
- It's simple
But does it do Tetris?

Very interested in this. Also want to know how the snippets are stored. I think they should be easily retriveable without going through the plugin, so they can be easily backed up, or used elsewhere without C::B
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

artoj

Quote from: Game_Ender on August 08, 2006, 10:21:38 PM
Very cool, does it have multiple language support?

If you create C/C++, Python, Ruby etc. category you have multiple languages support I guess. The number of subcategories is not limited or atleast it's not limited in my code.

Quote from: kidmosey on August 09, 2006, 04:52:41 AM
btw, how are snippets stored?

Currently they're in the main Code::Blocks' configuration file because it was the easiest to implement. However, creating export/import to xml would be easy, though I'm not planning it to the first release.

Quote from: Vampyre_Dark on August 09, 2006, 09:29:54 AM
But does it do Tetris?
Actually, I'm thinking more about Quake III, it's GPL so why not 8)

Quote
Very interested in this. Also want to know how the snippets are stored. I think they should be easily retriveable without going through the plugin, so they can be easily backed up, or used elsewhere without C::B

If you backup the Code::Blocks' config file the snippets are backed up too, though, a more separate solution would be indeed better. I guess the XML import/export would be the best solution.