EmEditor (text editor) Forum Index
   Enhancement Suggestions about Plug-ins
     Projects plugin - one more subargument to get file name
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
spectre
Posted on: 2/2/2009 10:47 pm
Just popping in
Joined: 2/2/2009
From:
Posts: 2
Projects plugin - one more subargument to get file name
I would like to make a suggestion to enhance Projects plugin.

Currently, a predefined argument of a tool (like $(Solution) or $(Project)) can also have one of 3 subarguments ('f', 'd', 'x'). This allows to get the full path, the directory or the extension of the corresponding file, respectively.

I would suggest to add one more subargument, say, 'n', to get only the name of that file (without extension). This can be very convenient. It is not quite rare that the application built in a project has the same name as the project file. To provide custom tools to execute or debug the application from EmEditor, one needs to extract the respective name.

Or assume one has created a solution template for Qt applications. It seems reasonable to give the same name as for the solution to some of Qt specific files - Qt project (.pro) file and may be others.

Of course, there are ways to get around this like passing the full path to a .cmd-script or some program to extract the file name there. But having to write just $(Solution,n) would probably be much more convenient.
Yutaka
Posted on: 2/3/2009 9:46 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2398
Re: Projects plugin - one more subargument to get file name
Quote:

spectre wrote:
I would like to make a suggestion to enhance Projects plugin.

Currently, a predefined argument of a tool (like $(Solution) or $(Project)) can also have one of 3 subarguments ('f', 'd', 'x'). This allows to get the full path, the directory or the extension of the corresponding file, respectively.

I would suggest to add one more subargument, say, 'n', to get only the name of that file (without extension). This can be very convenient. It is not quite rare that the application built in a project has the same name as the project file. To provide custom tools to execute or debug the application from EmEditor, one needs to extract the respective name.

Or assume one has created a solution template for Qt applications. It seems reasonable to give the same name as for the solution to some of Qt specific files - Qt project (.pro) file and may be others.

Of course, there are ways to get around this like passing the full path to a .cmd-script or some program to extract the file name there. But having to write just $(Solution,n) would probably be much more convenient.


I am sorry, but there was a mistake in the Help file. 'f' desginates the file name (without extension). I will correct the information in the Help. Thank you!


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

spectre
Posted on: 2/3/2009 10:22 pm
Just popping in
Joined: 2/2/2009
From:
Posts: 2
Re: Projects plugin - one more subargument to get file name
Thank you for the clarification.

I probably did not explain my point right. Let's consider a following example.

Assume we have a solution, say, D:\xwork\samples\my_solution.eesln
$(Solution) gives
D:\xwork\samples\my_solution.eesln
as it should.

I tried $(Solution,f) and it gave
D:\xwork\samples\my_solution

But what I would like to have is just
my_solution

That is, just file name, no path.

I mostly need this to construct the paths like the following:
D:\xwork\samples\debug\my_solution.smth
( $(Solution,d)\debug\$(Solution,<???>).smth )
Yutaka
Posted on: 2/4/2009 10:33 am
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2398
Re: Projects plugin - one more subargument to get file name
Quote:

spectre wrote:
Thank you for the clarification.

I probably did not explain my point right. Let's consider a following example.

Assume we have a solution, say, D:\xwork\samples\my_solution.eesln
$(Solution) gives
D:\xwork\samples\my_solution.eesln
as it should.

I tried $(Solution,f) and it gave
D:\xwork\samples\my_solution

But what I would like to have is just
my_solution

That is, just file name, no path.

I mostly need this to construct the paths like the following:
D:\xwork\samples\debug\my_solution.smth
( $(Solution,d)\debug\$(Solution,<???>).smth )



You are right. It was a bug in the Projects plug-in. I will fix this issue before the next release. Thank you.


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

Threaded | Newest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文