Jump to content
Sign in to follow this  
Clément

Project manager feature

Recommended Posts

Hi,

 

 I was wondering if there's a feature (or plugin) that would allow me to right click a folder and add a new unit direct in that folder.

For example:

image.png.8381fd34eb45cdd2504749536d6fb400.png

 

When I right-click "task.code" folder, I would like the context menu to display two new options  "add new unit" and "add new existing unit". When selecting "add new unit", "Unit1.pas" would be created under "task.code" allowing me to renaming that unit directly and start working on it.

 

Do you know if there's such a tool?

 

I'm using D11.1

TIA,

Clément

 

Edited by Clément

Share this post


Link to post

While I see what your getting at, this feature kind of already exists if you right click on the project, not the folder.  When you add a new unit, it creates a dirty buffer that has not yet been saved.  Saving it prompts you for the name, which defaults to unit1.pas (or next available number) in the project directory.  In the save dialog its trivial to click on a folder (or create a new one) and save it there instead.  The first thing I generally do when I create a new unit is save the file and give it a proper name and location.  The folders don't show up until you add a file that is in a folder other than the dproj project folder location.

 

As far as adding multiple existing units from a directory, I just drag and drop from explorer to the project and it "automagically" puts them in the appropriate folder (based on the existing location of course).  Much simpler than clicking the button or right clicking to add to the project, unless its a one off.

  • Like 2

Share this post


Link to post

Right-clicking on the project is what I do. Including the dragging part. This is a time saver. 
On the other hand working on bigger projects, right clicking on a folder and beeing able to add a new unit to the correct place would be great too.
I googled for some tools for that, but found nothing.
 I'm working on a plugin to add "New unit" and "Add existing" to the context menu at the folder level. 

Edited by Clément

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×