Page 1 of 1

Possible Feature Request: $WorkspaceName

Posted: Wed Feb 17, 2010 4:06 am
by marvin_littlewood
Hi!

I have a workspace (lst) with multiple projects (st, libLst & test) and have set up Doxygen to work through them all, using a configuration file based on the name of the workspace (lst.cfg).

In order to avoid having to switch applications, I wanted to set up Doxygen as an external tool which used "lst.cfg". Unfortunately there was no macro that expanded to the workspace name, although there was one for the project name.

For now, I renamed the Doxygen configuration file to that of the active project (test) and used the $ProjectName macro, but I wondered if there was any value to extending the set of macros to include one that expanded to the workspace name?

Many thanks

Marv

Re: Possible Feature Request: $WorkspaceName

Posted: Thu Feb 18, 2010 4:35 pm
by eranif
I added new macro in trunk: $(WorkspaceName)

Eran

Re: Possible Feature Request: $WorkspaceName

Posted: Sat Feb 20, 2010 3:01 am
by marvin_littlewood
Hi Eran

Many thanks...

I look forward to using it on the next published update.

Marv

Re: Possible Feature Request: $WorkspaceName

Posted: Sat Feb 20, 2010 4:15 pm
by kspes
I took a look at what you made in revision 3771 and have a question: why do you have macros defined at two separate locations? one in globals.cpp:DoExpandAllVariables() and one in macromanager.cpp: MacroManager::Expand()

Re: Possible Feature Request: $WorkspaceName

Posted: Sat Feb 20, 2010 5:14 pm
by eranif
This is from the methods in the 'globals.h':

Code: Select all

/**
 * [DEPRECATED] DONT USE THIS METHOD ANYMORE - USE IMacroManager
 * Expand variables to their real value, if expanding fails
 * the return value is same as input. The variable is expanded
 * in the project context
 */
wxString ExpandVariables(const wxString &expression, ProjectPtr proj, IEditor *editor);

/**
 * * [DEPRECATED] DONT USE THIS METHOD ANYMORE - USE IMacroManager
 * \brief accepts expression string and expand all known marcos (e.g. $(ProjectName))
 * \param expression expression
 * \param projectName project name (to be used for $(ProjectName) macro)
 * \param fileName file name, to help expand the $(CurrentFile) macro family
 * \return an expanded string. If a macro is unknown it is replaced by empty string
 */
wxString ExpandAllVariables(const wxString &expression, Workspace *workspace, const wxString &projectName, const wxString &selConf, const wxString &fileName);
Note the deprecated part.
Those functions are deprecated and wont get extend in the future. However, they are in use in several location in the code which currently to remove them completely needs some refactoring.

Since adding $(WorksapceName) involved in 1 line, I did not mind adding to the old methods as well. However, plugins are encouraged to use the new interface (it was introduced a week ago)

Eran

Re: Possible Feature Request: $WorkspaceName

Posted: Sun Jun 23, 2013 2:49 am
by petah
Btw an optional, non-disruptive $TaskbarTitle macro would be great, esp. to identify multiple opened CL proects.

The default value would be "($CurrentFileFullPath) CodeLite $(CodeLiteGitRevision)$(DirtyFileChar)" so the current behavior applies unless the user overrides it, f.ex. $TaskbarTitle="CL: $(ProjectName) - $(CurrentFileName)$(DirtyFileChar)".

-- p