Author Topic: Suggets of improvements to Code Snippets plugin  (Read 6078 times)

Offline drev

  • Multiple posting newcomer
  • *
  • Posts: 21
Suggets of improvements to Code Snippets plugin
« on: March 05, 2008, 08:45:29 pm »
Hello,
There is some suggets to improve the code snippets plugin.

* See the snippet in a text field at the bottom of the treeCtrl (instead of opening a new window)
* Always save/load to/from a .xml file (currently, they are saved in a sytem dir)
* Import/export eclipse xml snippets

I can code that in some weeks, what do you think of that ?

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2777
Re: Suggets of improvements to Code Snippets plugin
« Reply #1 on: March 06, 2008, 01:38:06 am »
Hello,
There is some suggets to improve the code snippets plugin.

* See the snippet in a text field at the bottom of the treeCtrl (instead of opening a new window)

Personally, my snippets are too large for a text field in a small window. And I often have multiple snippets open at the same time.
I usually keep snippets in a snippet file (FileLink) and would rather see them in an editor with all the facilities of an edtior.

But you/re most welcome to change my opinion with a demo.

* Always save/load to/from a .xml file (currently, they are saved in a sytem dir)

ummm, I don't understand. Snippets *are* loaded saved/from an .xml .

* Import/export eclipse xml snippets

I don't have an opinion. I have no experience with Eclipse.

I can code that in some weeks, what do you think of that ?

Good. A demo/prototype would be instructive.
« Last Edit: March 06, 2008, 01:44:48 am by Pecan »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Suggets of improvements to Code Snippets plugin
« Reply #2 on: March 06, 2008, 08:31:34 am »
* Import/export eclipse xml snippets
I wouldn't do that. It is not within the C::B focus to support each and every feature of other IDE's. Project importers are the only exception. If you want such funtionality it would be better to either write an(other) (own) plugin or a tiny (command line based) stand-alone converter. The latter should be *really* easy to implement.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline drev

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Suggets of improvements to Code Snippets plugin
« Reply #3 on: March 10, 2008, 01:45:35 pm »
Thanks for your answers,
It's a good idea to make a command line eclipse / snippet converter

The main problem for me with this snippet editor is :
When I use it on my USB key (or when i copy it to an another PC) the snippets are not copied too (it's like the appearance of codeblock) I don't know where they are saved... but i always must export/import

It would be better to always save snippets to an (relative path) xml file and automatically load it at the start-up of the editor.

mariocup

  • Guest
Re: Suggets of improvements to Code Snippets plugin
« Reply #4 on: March 10, 2008, 04:37:28 pm »
Hi,

the codesnippets plugins save the configuration in your APPDATA directory. The content of the codesnippets browser is saved in codesnippets.xml and the settings in codesnippets.ini. In the codesnippets.ini file you can change the location of the loaded content

Code
SnippetFile= <your path>/codesnippets.xml


You can also load a different snippets file via the context menu in the codesnippets browser within CodeBlocks.

Bye,

Mario

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2777
Re: Suggets of improvements to Code Snippets plugin
« Reply #5 on: March 10, 2008, 08:17:34 pm »
You can also set your snippet directory from within the settings menu. Right click on the root item and choose settings.
Note the "Snippets Folder" entry.

« Last Edit: March 12, 2008, 01:05:09 pm by Pecan »

Offline drev

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Suggets of improvements to Code Snippets plugin
« Reply #6 on: March 12, 2008, 11:05:12 am »
Ok, i did not know about application data.
« Last Edit: April 25, 2008, 11:38:02 pm by drev »