News:

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

Main Menu

File links in Codesnippets Plugin using File Browser

Started by mariocup, July 05, 2007, 11:16:07 PM

Previous topic - Next topic

mariocup

Hi CB team,

I am using codesnippets plugin and the file browser of (cbiplugin). As it is to easy navigate within the filesystem with the file explorer it would be time saving to add file links to the codesnippets plugin in the following manner.

1. Select a file in the file explorer or text within the cb editor an hold the left mouse button
2. Drag the file or text to a folder/subcategory of the codesnippets view
3. Generate an add snippet and pop up the properties dialog containing already the file link or text.

What do you think about that?

Bye,

Mario

dmoore

For right click on file/folders it would be easy for Pecan to add a context menu item to add the link.

For drag and drop I will need to do some more work on my end...
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

Pecan

Quote from: mariocup on July 05, 2007, 11:16:07 PM
Hi CB team,

I am using codesnippets plugin and the file browser of (cbiplugin). As it is to easy navigate within the filesystem with the file explorer it would be time saving to add file links to the codesnippets plugin in the following manner.

1. Select a file in the file explorer or text within the cb editor an hold the left mouse button
2. Drag the file or text to a folder/subcategory of the codesnippets view
3. Generate an add snippet and pop up the properties dialog containing already the file link or text.

What do you think about that?

Bye,

Mario


CodeSnippets already accepts dragged text or file lists when dragged on top of a category. It creates a new text snippet or fileLink by the name "new snippet".

Right click for the properties context menu and change the name, or left click and hold to edit the label.

dmoore

Pecan: Any interest in implementing the file explorer integration? it sounds like a reasonable thing to me (file explorer accepts multiple file/directory selections and passes a string containing the list of selections to each plugin's BuildModuleMenu). I could also add support for the drag and drop messaging...
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

Pecan

Quote from: dmoore on July 06, 2007, 05:31:48 AM
Pecan: Any interest in implementing the file explorer integration? it sounds like a reasonable thing to me (file explorer accepts multiple file/directory selections and passes a string containing the list of selections to each plugin's BuildModuleMenu). I could also add support for the drag and drop messaging...

I'm sorry. I don't understand.
Why would CodeSnippets want to present a list of files in it's context menus?


dmoore

other way round. fileexplorer passes the list of files to codesnippets, presumably to be stored as a snippet.
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

Pecan

Quote from: dmoore on July 07, 2007, 05:11:00 AM
other way round. fileexplorer passes the list of files to codesnippets, presumably to be stored as a snippet.

Does the user want to create an individual snippet (fileLink) for each file in the incomming list, or one snippet containing all the filenames?


mariocup

Hi Pecan,

I would prefer to create an individual snippet (fileLink) for each file in the incomming list.

I have different categories in the codesnippets view: documentation (file links to pdf files), hardware (files links to layouts), Headers (files links to general headers) etc.

These files are spread on different network drives, so it is easier to navigate with the file explorer to location of the files and drag the file to the codesnippets view than browsing the path with the properties dialog.