Author Topic: Code snippet plugin  (Read 32147 times)

Offline frankmail007

  • Multiple posting newcomer
  • *
  • Posts: 23
Code snippet plugin
« on: June 20, 2006, 05:51:44 pm »
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?

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Code snippet plugin
« Reply #1 on: June 20, 2006, 07:44:00 pm »
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.
« Last Edit: June 21, 2006, 04:17:48 am by Game_Ender »

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Code snippet plugin
« Reply #2 on: June 20, 2006, 07:47:14 pm »
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

Offline kidmosey

  • Multiple posting newcomer
  • *
  • Posts: 95
    • MUSITU International
Re: Code snippet plugin
« Reply #3 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.
3 years until google knows more than god.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: Code snippet plugin
« Reply #4 on: July 22, 2006, 04:58: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.

« Last Edit: July 22, 2006, 06:01:10 am by Pecan »

Offline mdelfede

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Code snippet plugin
« Reply #5 on: July 22, 2006, 12:57:25 pm »

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

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: Code snippet plugin
« Reply #6 on: July 22, 2006, 02:00:24 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".
« Last Edit: July 22, 2006, 02:02:10 pm by Pecan »

Offline mdelfede

  • Multiple posting newcomer
  • *
  • Posts: 84
Re: Code snippet plugin
« Reply #7 on: July 22, 2006, 02:20:31 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....

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: Code snippet plugin
« Reply #8 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.

Screenshot:


sethjackson

  • Guest
Re: Code snippet plugin
« Reply #9 on: August 08, 2006, 10:20:27 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
« Last Edit: August 09, 2006, 05:36:07 pm by sethjackson »

Offline Game_Ender

  • Lives here!
  • ****
  • Posts: 551
Re: Code snippet plugin
« Reply #10 on: August 08, 2006, 10:21:38 pm »
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.

Offline kidmosey

  • Multiple posting newcomer
  • *
  • Posts: 95
    • MUSITU International
Re: Code snippet plugin
« Reply #11 on: August 09, 2006, 04:52:41 am »
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.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5177
Re: Code snippet plugin
« Reply #12 on: August 09, 2006, 09:26:44 am »
sounds nice, me too : impatient to try it out ;-)

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Re: Code snippet plugin
« Reply #13 on: August 09, 2006, 09:29:54 am »
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~

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: Code snippet plugin
« Reply #14 on: August 09, 2006, 10:31:46 am »
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.

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.

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.