Code::Blocks
SVN r11506
|
Represents a Code::Blocks project. More...
#include <cbproject.h>
Classes | |
struct | Glob |
Public Member Functions | |
cbProject (const wxString &filename=wxEmptyString) | |
Constructor. More... | |
~cbProject () override | |
Destructor. More... | |
bool | IsLoaded () const |
void | ClearAllProperties () |
This resets the project to a clear state. More... | |
void | CalculateCommonTopLevelPath () |
Calculates the top-level path common to all project files. More... | |
wxString | GetCommonTopLevelPath () const |
bool | GetModified () const override |
void | SetModified (bool modified=true) override |
Mark the project as modified or not. More... | |
ProjectFile * | GetFile (int index) |
Access a file of the project. More... | |
ProjectFile * | GetFileByFilename (const wxString &filename, bool isRelative=true, bool isUnixFilename=false) |
Access a file of the project. More... | |
int | GetFilesCount () |
void | SetMakefile (const wxString &makefile) |
Set the Makefile filename used when exporting a Makefile for the project, or when using a custom Makefile to build the project. More... | |
const wxString & | GetMakefile () |
void | SetMakefileCustom (bool custom) |
Mark if the project should use a custom Makefile for compilation. More... | |
bool | IsMakefileCustom () |
void | SetMakefileExecutionDir (const wxString &dir) |
Allow the specification of specific execution directory if the project use a custom Makefile. More... | |
wxString | GetMakefileExecutionDir () |
wxString | GetExecutionDir () |
bool | BuildTargetValid (const wxString &name, bool virtuals_too=true) const |
Is there a build target (virtual or real) by name ? More... | |
wxString | GetFirstValidBuildTargetName (bool virtuals_too=true) const |
const wxString & | GetDefaultExecuteTarget () const |
void | SetDefaultExecuteTarget (const wxString &name) |
Set the build target index which will be pre-selected when the "Select target" dialog appears when running the project. More... | |
int | GetBuildTargetsCount () |
ProjectBuildTarget * | GetBuildTarget (int index) |
Access a build target. More... | |
ProjectBuildTarget * | GetBuildTarget (const wxString &targetName) |
Access a build target. More... | |
ProjectBuildTarget * | AddBuildTarget (const wxString &targetName) |
Add a new build target. More... | |
bool | RenameBuildTarget (int index, const wxString &targetName) |
Rename a build target. More... | |
bool | RenameBuildTarget (const wxString &oldTargetName, const wxString &newTargetName) |
Rename a build target. More... | |
ProjectBuildTarget * | DuplicateBuildTarget (int index, const wxString &newName=wxEmptyString) |
Duplicate a build target. More... | |
ProjectBuildTarget * | DuplicateBuildTarget (const wxString &targetName, const wxString &newName=wxEmptyString) |
Duplicate a build target. More... | |
bool | ExportTargetAsProject (int index) |
Export a target as a new project. More... | |
bool | ExportTargetAsProject (const wxString &targetName) |
Export a target as a new project. More... | |
bool | RemoveBuildTarget (int index) |
Remove a build target. More... | |
bool | RemoveBuildTarget (const wxString &targetName) |
Remove a build target. More... | |
void | ReOrderTargets (const wxArrayString &nameOrder) |
Reorder the list of build targets. More... | |
bool | SetActiveBuildTarget (const wxString &name) |
Set the active build target. More... | |
const wxString & | GetActiveBuildTarget () const |
PCHMode | GetModeForPCH () const |
void | SetModeForPCH (PCHMode mode) |
Set the mode to handle precompiled headers. More... | |
void | SetCompilerID (const wxString &id) override |
! Set the flag if the host app should be run in terminal More... | |
wxTreeItemId | GetProjectNode () |
void | SetProjectNode (wxTreeItemId node) |
Sets the root item of this item, should not be called by user's code! More... | |
bool | QueryCloseAllFiles () |
Act like closing all project files, but don't do it. More... | |
bool | CloseAllFiles (bool dontsave=false) |
Close all project files. More... | |
bool | SaveAllFiles () |
Save all project files. More... | |
bool | Save () |
Save the project. More... | |
bool | SaveAs () |
Save the project under a different name. More... | |
bool | SaveLayout () |
Save the project's layout. More... | |
bool | LoadLayout () |
Load the project's layout. More... | |
void | BeginAddFiles () |
Notify that file(s) will be added shortly. More... | |
void | EndAddFiles () |
Notify that file(s) addition finished. More... | |
void | BeginRemoveFiles () |
Notify that file(s) will be removed shortly. More... | |
void | EndRemoveFiles () |
Notify that file(s) removal finished. More... | |
ProjectFile * | AddFile (const wxString &targetName, const wxString &filename, bool compile=true, bool link=true, unsigned short int weight=50) |
Add a file to the project. More... | |
ProjectFile * | AddFile (int targetIndex, const wxString &filename, bool compile=true, bool link=true, unsigned short int weight=50) |
Add a file to the project. More... | |
bool | RemoveFile (ProjectFile *pf) |
Remove a file from the project. More... | |
void | SetGlobs (const std::vector< Glob > &globs) |
Set the globs to the project, this are directory paths do retrieve files from to be added to the project, the path can be searched recursively. More... | |
std::vector< Glob > | GetGlobs () const |
Retrieve the current globs from the project. More... | |
const wxArrayString & | ExpandedNodes () |
Convenience function for remembering the project's tree state when refreshing it. More... | |
void | AddExpandedNode (const wxString &path) |
Convenience function for remembering the project's tree state when refreshing it. More... | |
void | SaveTreeState (wxTreeCtrl *tree) |
Convenience function for remembering the project's tree state when refreshing it. More... | |
void | RestoreTreeState (wxTreeCtrl *tree) |
Convenience function for remembering the project's tree state when refreshing it. More... | |
int | SelectTarget (int initial=-1, bool evenIfOne=false) |
Displays a target selection dialog. More... | |
ProjectBuildTarget * | GetCurrentlyCompilingTarget () |
Get a pointer to the currently compiling target. More... | |
void | SetCurrentlyCompilingTarget (ProjectBuildTarget *bt) |
Set the currently compiling target. More... | |
bool | DefineVirtualBuildTarget (const wxString &alias, const wxArrayString &targets) |
Define a new virtual build target. More... | |
bool | HasVirtualBuildTarget (const wxString &alias) const |
Does a virtual build target exist? More... | |
bool | RemoveVirtualBuildTarget (const wxString &alias) |
Remove a virtual build target. More... | |
wxArrayString | GetVirtualBuildTargets () const |
Get a list of all defined virtual build targets. More... | |
const wxArrayString & | GetVirtualBuildTargetGroup (const wxString &alias) const |
Access a virtual build target's group of build targets. More... | |
wxArrayString | GetExpandedVirtualBuildTargetGroup (const wxString &alias) const |
Access a virtual build target's expanded group of build targets. More... | |
bool | CanAddToVirtualBuildTarget (const wxString &alias, const wxString &target) |
Checks if a build target (virtual or real) can be added to a virtual build target, without causing a circular-reference. More... | |
const wxArrayString & | GetVirtualFolders () const |
Get a list of the virtual folders. More... | |
void | SetVirtualFolders (const wxArrayString &folders) |
Set the virtual folders list. More... | |
bool | AppendUniqueVirtualFolder (const wxString &folder) |
Appends a new virtual folder to the end of the list only if it doesn't exists. More... | |
void | RemoveVirtualFolders (const wxString &folder) |
Remove all virtual folders starting with folder. More... | |
void | ReplaceVirtualFolder (const wxString &oldFolder, const wxString &newFolder) |
Replaced the oldFolder with newFolder or appends newFolder to the end of the list if oldFolder is not found. More... | |
wxDateTime | GetLastModificationTime () const |
Returns the last modification time for the file. More... | |
void | Touch () |
Sets the last modification time for the project to 'now'. More... | |
void | SetExtendedObjectNamesGeneration (bool ext) |
Sets object names generation to extended/normal mode. More... | |
bool | GetExtendedObjectNamesGeneration () const |
Gets object names generation mode (extended/normal). More... | |
void | SetNotes (const wxString ¬es) |
Set notes on the project. More... | |
const wxString & | GetNotes () const |
Get notes on the project. More... | |
void | SetShowNotesOnLoad (bool show) |
Set show project notes on load automatically. More... | |
bool | GetShowNotesOnLoad () const |
Get show project notes on load automatically. More... | |
void | SetCheckForExternallyModifiedFiles (bool check) |
Set check for externally modified files. More... | |
bool | GetCheckForExternallyModifiedFiles () const |
Get check for externally modified files. More... | |
void | ShowNotes (bool nonEmptyOnly, bool editable=false) |
Show project notes now. More... | |
void | SetTitle (const wxString &title) override |
Changes project title. More... | |
virtual TiXmlNode * | GetExtensionsNode () |
Access the <Extensions> XML node of this project. More... | |
virtual void | AddToExtensions (const wxString &stringDesc) |
Convenience function (mainly for scripts) to add nodes/attributes under the <Extensions> node. More... | |
virtual void | ProjectFileRenamed (ProjectFile *pf) |
Internal use only. More... | |
virtual FilesList & | GetFilesList () |
Provides an easy way to iterate all the files belonging in this target. More... | |
Public Member Functions inherited from CompileTargetBase | |
CompileTargetBase () | |
~CompileTargetBase () override | |
virtual void | SetTargetFilenameGenerationPolicy (TargetFilenameGenerationPolicy prefix, TargetFilenameGenerationPolicy extension) |
A target's filename can either be auto-generated based on the running platform, or completely specified by the user. More... | |
virtual void | GetTargetFilenameGenerationPolicy (TargetFilenameGenerationPolicy &prefixOut, TargetFilenameGenerationPolicy &extensionOut) const |
virtual const wxString & | GetFilename () const |
virtual const wxString & | GetTitle () const |
Read the target's title. More... | |
virtual void | SetOutputFilename (const wxString &filename) |
Set the target's output filename. More... | |
virtual void | SetImportLibraryFilename (const wxString &filename) |
Set the target's import library filename. More... | |
virtual void | SetDefinitionFileFilename (const wxString &filename) |
Set the target's definition file filename. More... | |
virtual void | SetWorkingDir (const wxString &dirname) |
Set the target's working dir on execution (valid only for executable targets) More... | |
virtual void | SetObjectOutput (const wxString &dirname) |
Set the target's objects output dir. More... | |
virtual void | SetDepsOutput (const wxString &dirname) |
Set the target's dependencies output dir. More... | |
virtual OptionsRelation | GetOptionRelation (OptionsRelationType type) const |
Read the target's options relation for type . More... | |
virtual void | SetOptionRelation (OptionsRelationType type, OptionsRelation rel) |
Set the target's options relation for type to rel . More... | |
virtual wxString | GetWorkingDir () |
Read the target's working dir for execution (valid only for executable targets) More... | |
virtual wxString | GetObjectOutput () const |
Read the target's objects output dir. More... | |
virtual wxString | GetDepsOutput () const |
Read the target's dependencies output dir. More... | |
virtual wxString | GetOutputFilename () |
Read the target's output filename. More... | |
virtual wxString | SuggestOutputFilename () |
Suggest a filename based on the target's type. More... | |
virtual wxString | GetExecutableFilename () const |
Read the target's executable filename (produced if target type is ttExecutable) More... | |
virtual wxString | GetDynamicLibFilename () |
Read the target's dynamic library filename (produced if target type is ttDynamicLib) More... | |
virtual wxString | GetDynamicLibImportFilename () |
Read the target's dynamic library import filename (produced if target type is ttDynamicLib) More... | |
virtual wxString | GetDynamicLibDefFilename () |
Read the target's dynamic library definition file filename (produced if target type is ttDynamicLib) More... | |
virtual wxString | GetStaticLibFilename () |
Read the target's static library filename (produced if target type is ttStaticLib) More... | |
virtual wxString | GetNativeFilename () |
Read the target's native filename (produced if target type is ttNative) More... | |
virtual wxString | GetBasePath () const |
Read the target's base path, e.g. if GetFilename() returns "/usr/local/bin/xxx", base path will return "/usr/local/bin". More... | |
virtual void | SetTargetType (TargetType pt) |
Set the target's type to pt . More... | |
virtual TargetType | GetTargetType () const |
Read the target's type. More... | |
virtual const wxString & | GetExecutionParameters () const |
Read the target's execution parameters. More... | |
virtual void | SetExecutionParameters (const wxString ¶ms) |
Set the target's execution parameters to params . More... | |
virtual const wxString & | GetHostApplication () const |
Read the target's host application. More... | |
virtual void | SetHostApplication (const wxString &app) |
Set the target's host application to app . More... | |
virtual bool | GetRunHostApplicationInTerminal () const |
Get the flag if the host app should be run in terminal. More... | |
virtual void | SetRunHostApplicationInTerminal (bool in_terminal) |
virtual const wxString & | GetCompilerID () const |
Read the target's compiler. More... | |
virtual wxString | GetMakeCommandFor (MakeCommand cmd) const |
Get the "make" command used for cmd . More... | |
virtual void | SetMakeCommandFor (MakeCommand cmd, const wxString &make) |
Set the "make" command used for cmd . More... | |
virtual bool | MakeCommandsModified () const |
True if any of the "make" commands is modified. More... | |
Public Member Functions inherited from CompileOptionsBase | |
CompileOptionsBase () | |
virtual | ~CompileOptionsBase () |
virtual void | AddPlatform (int platform) |
virtual void | RemovePlatform (int platform) |
virtual void | SetPlatforms (int platforms) |
virtual int | GetPlatforms () const |
virtual bool | SupportsCurrentPlatform () const |
virtual void | SetLinkerOptions (const wxArrayString &linkerOpts) |
virtual const wxArrayString & | GetLinkerOptions () const |
virtual void | AddLinkerOption (const wxString &option) |
virtual void | ReplaceLinkerOption (const wxString &option, const wxString &new_option) |
virtual void | RemoveLinkerOption (const wxString &option) |
virtual void | SetLinkLibs (const wxArrayString &linkLibs) |
virtual const wxArrayString & | GetLinkLibs () const |
virtual void | AddLinkLib (const wxString &option) |
virtual void | ReplaceLinkLib (const wxString &option, const wxString &new_option) |
virtual void | RemoveLinkLib (const wxString &option) |
virtual void | SetCompilerOptions (const wxArrayString &compilerOpts) |
virtual const wxArrayString & | GetCompilerOptions () const |
virtual void | AddCompilerOption (const wxString &option) |
virtual void | ReplaceCompilerOption (const wxString &option, const wxString &new_option) |
virtual void | RemoveCompilerOption (const wxString &option) |
virtual void | SetResourceCompilerOptions (const wxArrayString &resourceCompilerOpts) |
virtual const wxArrayString & | GetResourceCompilerOptions () const |
virtual void | AddResourceCompilerOption (const wxString &option) |
virtual void | ReplaceResourceCompilerOption (const wxString &option, const wxString &new_option) |
virtual void | RemoveResourceCompilerOption (const wxString &option) |
virtual void | SetIncludeDirs (const wxArrayString &includeDirs) |
virtual const wxArrayString & | GetIncludeDirs () const |
virtual void | AddIncludeDir (const wxString &option) |
virtual void | ReplaceIncludeDir (const wxString &option, const wxString &new_option) |
virtual void | RemoveIncludeDir (const wxString &option) |
virtual void | SetResourceIncludeDirs (const wxArrayString &resIncludeDirs) |
virtual const wxArrayString & | GetResourceIncludeDirs () const |
virtual void | AddResourceIncludeDir (const wxString &option) |
virtual void | ReplaceResourceIncludeDir (const wxString &option, const wxString &new_option) |
virtual void | RemoveResourceIncludeDir (const wxString &option) |
virtual void | SetLibDirs (const wxArrayString &libDirs) |
virtual const wxArrayString & | GetLibDirs () const |
virtual void | AddLibDir (const wxString &option) |
virtual void | ReplaceLibDir (const wxString &option, const wxString &new_option) |
virtual void | RemoveLibDir (const wxString &option) |
virtual void | SetCommandsBeforeBuild (const wxArrayString &commands) |
virtual const wxArrayString & | GetCommandsBeforeBuild () const |
virtual void | AddCommandsBeforeBuild (const wxString &command) |
virtual void | RemoveCommandsBeforeBuild (const wxString &command) |
virtual void | SetCommandsAfterBuild (const wxArrayString &commands) |
virtual const wxArrayString & | GetCommandsAfterBuild () const |
virtual void | AddCommandsAfterBuild (const wxString &command) |
virtual void | RemoveCommandsAfterBuild (const wxString &command) |
virtual void | SetBuildScripts (const wxArrayString &scripts) |
virtual const wxArrayString & | GetBuildScripts () const |
virtual void | AddBuildScript (const wxString &script) |
virtual void | RemoveBuildScript (const wxString &script) |
virtual bool | GetAlwaysRunPostBuildSteps () const |
virtual void | SetAlwaysRunPostBuildSteps (bool always) |
virtual bool | SetVar (const wxString &key, const wxString &value, bool onlyIfExists=false) |
virtual bool | UnsetVar (const wxString &key) |
virtual void | UnsetAllVars () |
virtual bool | HasVar (const wxString &key) const |
virtual const wxString & | GetVar (const wxString &key) const |
virtual const StringHash & | GetAllVars () const |
Private Member Functions | |
void | Open () |
void | ExpandVirtualBuildTargetGroup (const wxString &alias, wxArrayString &result) const |
ProjectBuildTarget * | AddDefaultBuildTarget () |
int | IndexOfBuildTargetName (const wxString &targetName) const |
wxString | CreateUniqueFilename () |
void | NotifyPlugins (wxEventType type, const wxString &targetName=wxEmptyString, const wxString &oldTargetName=wxEmptyString) |
Private Attributes | |
VirtualBuildTargetsMap | m_VirtualTargets |
BuildTargets | m_Targets |
wxString | m_ActiveTarget |
wxString | m_LastSavedActiveTarget |
wxString | m_DefaultExecuteTarget |
wxString | m_Makefile |
bool | m_CustomMakefile |
wxString | m_MakefileExecutionDir |
std::vector< Glob > | m_Globs |
FilesList | m_Files |
ProjectFileArray | m_FileArray |
wxArrayString | m_ExpandedNodes |
wxArrayString | m_SelectedNodes |
bool | m_Loaded |
wxTreeItemId | m_ProjectNode |
wxArrayString | m_VirtualFolders |
bool | m_CurrentlyLoading |
wxString | m_CommonTopLevelPath |
wxString | m_BasePath |
PCHMode | m_PCHMode |
ProjectFiles | m_ProjectFilesMap |
ProjectBuildTarget * | m_CurrentlyCompilingTarget |
wxDateTime | m_LastModified |
bool | m_ExtendedObjectNamesGeneration |
wxString | m_Notes |
bool | m_AutoShowNotesOnLoad |
bool | m_CheckForExternallyModifiedFiles |
TiXmlElement * | m_pExtensionsElement |
Represents a Code::Blocks project.
A project is a collection of build targets and files. Each project can contain any number of build targets and files.
Definition at line 96 of file cbproject.h.
cbProject::cbProject | ( | const wxString & | filename = wxEmptyString | ) |
Constructor.
Definition at line 55 of file cbproject.cpp.
References CreateUniqueFilename(), CompileTargetBase::GetBasePath(), CompilerFactory::GetDefaultCompilerID(), wxFileName::GetName(), wxFileName::GetPathSeparator(), wxString::IsEmpty(), m_BasePath, m_CommonTopLevelPath, m_FileArray, CompileTargetBase::m_Filename, m_Files, m_Loaded, CompileTargetBase::m_Title, Open(), realpath(), Save(), SaveAs(), SetCompilerID(), SetModified(), wxDirExists(), and wxFileExists().
|
override |
ProjectBuildTarget * cbProject::AddBuildTarget | ( | const wxString & | targetName | ) |
Add a new build target.
targetName | The build target name. |
Definition at line 1150 of file cbproject.cpp.
References _T, cbEVT_BUILDTARGET_ADDED, cbEVT_PROJECT_TARGETS_MODIFIED, F(), Manager::Get(), GetBuildTarget(), CompileTargetBase::GetCompilerID(), Manager::GetLogManager(), CompileTargetBase::GetOutputFilename(), HasVirtualBuildTarget(), LogManager::LogWarning(), CompileTargetBase::m_Filename, m_Targets, NotifyPlugins(), RemoveVirtualBuildTarget(), CompileTargetBase::SetCompilerID(), CompileTargetBase::SetDepsOutput(), SetModified(), CompileTargetBase::SetObjectOutput(), CompileTargetBase::SetOutputFilename(), CompileTargetBase::SetTitle(), CompileTargetBase::SetWorkingDir(), and wxString::wx_str().
Referenced by AddDefaultBuildTarget(), ProjectLoader::DoBuildTarget(), ProjectOptionsDlg::OnAddBuildTargetClick(), ScriptBindings::RegisterBindings(), Wiz::RunProjectWizard(), and Wiz::RunTargetWizard().
|
private |
Definition at line 1145 of file cbproject.cpp.
References _T, and AddBuildTarget().
|
inline |
Convenience function for remembering the project's tree state when refreshing it.
Adds an expanded node in this internal list.
path | The tree-path to add. |
Definition at line 451 of file cbproject.h.
References RestoreTreeState(), and SaveTreeState().
ProjectFile * cbProject::AddFile | ( | const wxString & | targetName, |
const wxString & | filename, | ||
bool | compile = true , |
||
bool | link = true , |
||
unsigned short int | weight = 50 |
||
) |
Add a file to the project.
This variation, takes a target name as first parameter.
targetName | The name of the build target to add this file to. |
filename | The file's filename. This must be a filename relative to the project's path. |
compile | If true this file is compiled when building the project. |
link | If true this file is linked when building the project. |
weight | A value between zero and 100 (defaults to 50). Smaller weight, makes the file compile earlier than those with larger weight. |
Definition at line 621 of file cbproject.cpp.
References _T, wxFile::Access(), ProjectFile::AddBuildTarget(), AddDefaultBuildTarget(), wxFileName::Assign(), FileFilters::C_EXT, wxString::c_str(), CalculateCommonTopLevelPath(), ProjectFile::compile, ProjectFile::compilerVar, ctCompileObjectCmd, ctCompileResourceCmd, LogManager::DebugLog(), ProjectFile::file, FileTypeOf(), ftObject, ftResource, ftResourceBin, ftSource, ftStaticLib, fvsMissing, fvsReadOnly, ProjectFile::generatedFiles, CompilerTool::generatedFiles, Manager::Get(), CompileTargetBase::GetBasePath(), wxString::GetChar(), CompilerFactory::GetCompiler(), CompileTargetBase::GetCompilerID(), Compiler::GetCompilerTool(), wxArrayString::GetCount(), wxFileName::GetExt(), GetFileByFilename(), wxFileName::GetFullName(), wxFileName::GetFullPath(), Manager::GetLogManager(), Manager::GetMacrosManager(), wxFileName::GetName(), wxFileName::GetPath(), wxFileName::GetVolume(), IndexOfBuildTargetName(), wxFileName::IsAbsolute(), wxString::IsSameAs(), wxString::Length(), ProjectFile::link, m_CommonTopLevelPath, m_CurrentlyLoading, m_FileArray, CompileTargetBase::m_Filename, m_Files, m_ProjectFilesMap, m_Targets, wxFileName::MakeRelativeTo(), wxFileName::Normalize(), realpath(), ProjectFile::relativeFilename, ProjectFile::relativeToCommonTopLevelPath, wxString::Replace(), MacrosManager::ReplaceMacros(), FileFilters::RESOURCE_EXT, wxString::Right(), ProjectFile::SetAutoGeneratedBy(), ProjectFile::SetFileState(), wxFileName::SetFullName(), SetModified(), wxString::StartsWith(), UnixFilename(), wxFile::write, wxFileExists(), wxPATH_NORM_DOTS, and wxPATH_NORM_TILDE.
Referenced by ScriptBindings::cbProject_AddFile(), ProjectManager::DoAddFileToProject(), and ProjectLoader::DoUnits().
ProjectFile* cbProject::AddFile | ( | int | targetIndex, |
const wxString & | filename, | ||
bool | compile = true , |
||
bool | link = true , |
||
unsigned short int | weight = 50 |
||
) |
Add a file to the project.
This variation, takes a target index as first parameter.
targetIndex | The index of the build target to add this file to. |
filename | The file's filename. This must be a filename relative to the project's path. |
compile | If true this file is compiled when building the project. |
link | If true this file is linked when building the project. |
weight | A value between zero and 100 (defaults to 50). Smaller weight, makes the file compile earlier than those with larger weight. |
|
virtual |
Convenience function (mainly for scripts) to add nodes/attributes under the <Extensions> node.
It is mainly useful for scripts that can't otherwise access the XML node. For C++ code, using GetExtensionsNode() is recommended instead (which is much faster).
stringDesc | A string representation of the nodes/attributes to add/edit under <Extensions>. stringDesc is a string of the form: "node/subnode/.../+subnode:attr=val" |
The ":attr=val" part is optional. The node/subnode structure will be created if not there. To set more than one attribute, call this function more than once, using the same node/subnode structure. If a node begins with the "plus" sign (+), then this forces adding a new node instead of re-using the existing one (if any).
Definition at line 1666 of file cbproject.cpp.
References _T, cbU2C(), wxString::GetChar(), GetExtensionsNode(), wxString::IsEmpty(), wxString::Length(), wxString::Mid(), wxString::Remove(), and SetModified().
Referenced by ScriptBindings::RegisterBindings().
bool cbProject::AppendUniqueVirtualFolder | ( | const wxString & | folder | ) |
Appends a new virtual folder to the end of the list only if it doesn't exists.
Definition at line 913 of file cbproject.cpp.
References wxArrayString::Index(), m_VirtualFolders, and wxNOT_FOUND.
Referenced by ProjectManagerUI::BuildProjectTree(), and ProjectManagerUI::CheckForExternallyModifiedProjects().
void cbProject::BeginAddFiles | ( | ) |
Notify that file(s) will be added shortly.
This function should be called before calling AddFile(). When done calling AddFile() as many times as needed, call EndAddFiles().
This sequence of function calls ensures proper events dispatching. This function broadcasts the cbEVT_PROJECT_BEGIN_ADD_FILES event.
Definition at line 593 of file cbproject.cpp.
References cbEVT_PROJECT_BEGIN_ADD_FILES, Manager::Get(), and Manager::ProcessEvent().
Referenced by ProjectManager::AddMultipleFilesToProject(), Wiz::CopyFiles(), ProjectLoader::DoUnits(), and Wiz::RunProjectWizard().
void cbProject::BeginRemoveFiles | ( | ) |
Notify that file(s) will be removed shortly.
This function should be called before calling RemoveFile(). When done calling RemoveFile() as many times as needed, call EndRemoveFiles().
This sequence of function calls ensures proper events dispatching. This function broadcasts the cbEVT_PROJECT_BEGIN_REMOVE_FILES event.
Definition at line 607 of file cbproject.cpp.
References cbEVT_PROJECT_BEGIN_REMOVE_FILES, Manager::Get(), and Manager::ProcessEvent().
Referenced by ProjectManagerUI::OnRemoveFileFromProject().
bool cbProject::BuildTargetValid | ( | const wxString & | name, |
bool | virtuals_too = true |
||
) | const |
Is there a build target (virtual or real) by name
?
name | The build target's name. |
virtuals_too | Include virtual build targets in query. |
Definition at line 1335 of file cbproject.cpp.
References HasVirtualBuildTarget(), and IndexOfBuildTargetName().
Referenced by DebuggerGDB::DoDebug(), DebuggerManager::FindTargetsDebugger(), ScriptBindings::RegisterBindings(), and SetActiveBuildTarget().
void cbProject::CalculateCommonTopLevelPath | ( | ) |
Calculates the top-level path common to all project files.
This is called automatically (no need for you to call it) and is used to find the top-level folder for building the tree.
Definition at line 319 of file cbproject.cpp.
References _T, cbC2U(), LogManager::DebugLog(), LogManager::DebugLogError(), F(), ProjectFile::file, Manager::Get(), CompileTargetBase::GetBasePath(), wxString::GetChar(), wxFileName::GetDirCount(), wxFileName::GetFullPath(), Manager::GetLogManager(), wxFileName::GetPath(), wxFileName::GetPathSeparator(), wxFileName::GetVolume(), wxString::IsSameAs(), wxString::Left(), wxString::Length(), m_BasePath, m_CommonTopLevelPath, m_Files, wxFileName::MakeRelativeTo(), wxFileName::Normalize(), ProjectFile::relativeFilename, ProjectFile::relativeToCommonTopLevelPath, HTMLTags::sep, ProjectFile::SetObjName(), wxString::StartsWith(), wxStopWatch::Time(), and wxPATH_NORM_DOTS.
Referenced by AddFile(), ProjectManagerUI::OnRemoveFileFromProject(), Open(), ProjectFile::Rename(), and SaveAs().
Checks if a build target (virtual or real) can be added to a virtual build target, without causing a circular-reference.
alias | The "parent" virtual build target to add the build target in. |
target | The build target to add in the alias virtual build target. |
Definition at line 1519 of file cbproject.cpp.
References wxArrayString::GetCount(), GetVirtualBuildTargetGroup(), HasVirtualBuildTarget(), wxArrayString::Index(), and wxNOT_FOUND.
Referenced by ScriptBindings::RegisterBindings().
void cbProject::ClearAllProperties | ( | ) |
This resets the project to a clear state.
Like it's just been new'ed.
Definition at line 236 of file cbproject.cpp.
References cbEVT_BUILDTARGET_SELECTED, wxArrayString::Clear(), Delete(), Manager::Get(), Manager::GetMacrosManager(), CompileOptionsBase::m_CompilerOptions, m_FileArray, m_Files, CompileOptionsBase::m_IncludeDirs, CompileOptionsBase::m_LibDirs, CompileOptionsBase::m_LinkerOptions, m_pExtensionsElement, m_Targets, NotifyPlugins(), MacrosManager::Reset(), and SetModified().
Referenced by ~cbProject().
bool cbProject::CloseAllFiles | ( | bool | dontsave = false | ) |
Close all project files.
dontsave | If true, no project file will be saved even if modified. If false, any modified file will be saved (default). |
Definition at line 1094 of file cbproject.cpp.
References EditorManager::Close(), ProjectFile::file, Manager::Get(), Manager::GetEditorManager(), wxFileName::GetFullPath(), EditorManager::HideNotebook(), m_FileArray, m_Files, QueryCloseAllFiles(), and EditorManager::ShowNotebook().
Referenced by ProjectManager::CloseProject(), and ScriptBindings::RegisterBindings().
|
private |
Definition at line 203 of file cbproject.cpp.
References _(), _T, wxString::Clear(), FileFilters::CODEBLOCKS_EXT, wxString::Format(), Manager::Get(), CompileTargetBase::GetFilename(), Manager::GetProjectManager(), and ProjectManager::GetProjects().
Referenced by cbProject().
bool cbProject::DefineVirtualBuildTarget | ( | const wxString & | alias, |
const wxArrayString & | targets | ||
) |
Define a new virtual build target.
A virtual build target is not really a build target itself but it is an alias for a group of other build targets, real or virtual. An example is the "All" virtual build target which means "all build targets".
alias | The virtual build target's name. |
targets | A list of build target names to include in this virtual build target. They can be real or other virtual build targets. |
alias
(or if you pass an empty targets
array). alias
parameter, the virtual build target is re-defined. In other words, it's not an error if alias
is already defined. Definition at line 1449 of file cbproject.cpp.
References _T, cbEVT_PROJECT_TARGETS_MODIFIED, F(), Manager::Get(), GetBuildTarget(), wxArrayString::GetCount(), Manager::GetLogManager(), LogManager::LogWarning(), m_VirtualTargets, NotifyPlugins(), SetModified(), and wxString::wx_str().
Referenced by ProjectLoader::DoVirtualTargets(), ProjectLoader::Open(), ScriptBindings::RegisterBindings(), and VirtualBuildTargetsDlg::SetVirtualTarget().
ProjectBuildTarget * cbProject::DuplicateBuildTarget | ( | int | index, |
const wxString & | newName = wxEmptyString |
||
) |
Duplicate a build target.
index | The index of the build target to duplicate. |
newName | The name for the new build target. If empty, it will be named like "Copy of <base_target_name>". |
index
was valid, NULL if not (or something went wrong). Definition at line 1216 of file cbproject.cpp.
References _(), ProjectFile::AddBuildTarget(), cbEVT_BUILDTARGET_ADDED, cbEVT_PROJECT_TARGETS_MODIFIED, GetBuildTarget(), ProjectBuildTarget::GetFilesList(), CompileTargetBase::GetTitle(), wxString::IsEmpty(), m_Targets, NotifyPlugins(), SetModified(), and CompileTargetBase::SetTitle().
Referenced by ScriptBindings::cbProject_DuplicateBuildTarget(), DuplicateBuildTarget(), and ProjectOptionsDlg::OnCopyBuildTargetClick().
ProjectBuildTarget * cbProject::DuplicateBuildTarget | ( | const wxString & | targetName, |
const wxString & | newName = wxEmptyString |
||
) |
Duplicate a build target.
targetName | The name of the build target to duplicate. |
newName | The name for the new build target. If empty, it will be named like "Copy of <base_target_name>". |
index
was valid, NULL if not (or something went wrong). Definition at line 1241 of file cbproject.cpp.
References DuplicateBuildTarget(), and IndexOfBuildTargetName().
void cbProject::EndAddFiles | ( | ) |
Notify that file(s) addition finished.
This function should be called when done calling AddFile() as many times as needed.
This sequence of function calls ensures proper events dispatching. This function broadcasts the cbEVT_PROJECT_END_ADD_FILES event.
Definition at line 600 of file cbproject.cpp.
References cbEVT_PROJECT_END_ADD_FILES, Manager::Get(), and Manager::ProcessEvent().
Referenced by ProjectManager::AddMultipleFilesToProject(), Wiz::CopyFiles(), ProjectLoader::DoUnits(), and Wiz::RunProjectWizard().
void cbProject::EndRemoveFiles | ( | ) |
Notify that file(s) removal finished.
This function should be called when done calling RemoveFile() as many times as needed.
This sequence of function calls ensures proper events dispatching. This function broadcasts the cbEVT_PROJECT_END_REMOVE_FILES event.
Definition at line 614 of file cbproject.cpp.
References cbEVT_PROJECT_END_REMOVE_FILES, Manager::Get(), and Manager::ProcessEvent().
Referenced by ProjectManagerUI::OnRemoveFileFromProject().
|
inline |
Convenience function for remembering the project's tree state when refreshing it.
Definition at line 445 of file cbproject.h.
Referenced by ProjectLayoutLoader::Save().
|
private |
Definition at line 1548 of file cbproject.cpp.
References wxArrayString::Add(), wxArrayString::GetCount(), GetVirtualBuildTargetGroup(), wxArrayString::Index(), IndexOfBuildTargetName(), and wxNOT_FOUND.
Referenced by GetExpandedVirtualBuildTargetGroup().
bool cbProject::ExportTargetAsProject | ( | int | index | ) |
Export a target as a new project.
In other words, save a copy of the project containing only the specified target. The user will be prompted with a dialog to select the new project name.
index | The index of the build target to export. |
Definition at line 1246 of file cbproject.cpp.
References GetBuildTarget(), and CompileTargetBase::GetTitle().
Referenced by ScriptBindings::cbProject_ExportTargetAsProject(), and ProjectOptionsDlg::OnExportTargetClick().
bool cbProject::ExportTargetAsProject | ( | const wxString & | targetName | ) |
Export a target as a new project.
In other words, save a copy of the project containing only the specified target. The user will be prompted with a dialog to select the new project name.
targetName | The name of the build target to export. |
Definition at line 1254 of file cbproject.cpp.
References _(), cbGetTextFromUser(), ProjectLoader::ExportTargetAsProject(), GetBuildTarget(), CompileTargetBase::GetFilename(), wxFileName::GetFullPath(), GetModified(), CompileTargetBase::GetTitle(), wxString::IsEmpty(), m_pExtensionsElement, Save(), SetModified(), wxFileName::SetName(), and SetTitle().
const wxString & cbProject::GetActiveBuildTarget | ( | ) | const |
Definition at line 1373 of file cbproject.cpp.
References m_ActiveTarget.
Referenced by NativeParser::AddProjectDefinedMacros(), CodeBlocksApp::BatchJob(), EditorManager::CollectDefines(), DebuggerGDB::Debug(), FilePathPanel::FilePathPanel(), FindReplaceDlg::FindReplaceDlg(), DebuggerManager::FindTargetsDebugger(), FindReplaceDlg::OnSearchProject(), ScriptBindings::RegisterBindings(), MacrosManager::ReplaceMacros(), and ProjectLayoutLoader::Save().
ProjectBuildTarget * cbProject::GetBuildTarget | ( | int | index | ) |
Access a build target.
index | The build target index. Must be greater or equal to zero and less than GetBuildTargetsCount(). |
Definition at line 1392 of file cbproject.cpp.
References m_Targets.
Referenced by ProjectFile::AddBuildTarget(), AddBuildTarget(), NativeParser::AddCompilerDirs(), NativeParser::AddProjectDefinedMacros(), ProjectManagerUI::AskForBuildTargetIndex(), ProjectManagerUI::AskForMultiBuildTargetIndex(), CodeBlocksApp::BatchJob(), ProjectOptionsDlg::BuildScriptsTree(), ScriptBindings::cbProject_GetBuildTarget(), VirtualBuildTargetsDlg::CheckTargets(), EditorManager::CollectDefines(), CompilerOptionsDlg::CompilerOptionsDlg(), ProjectLoader::ConvertVersion_Pre_1_1(), DefineVirtualBuildTarget(), ProjectManager::DoAddFileToProject(), ProjectOptionsDlg::DoBeforeTargetChange(), CompilerGCC::DoBuild(), DebuggerGDB::DoDebug(), CompilerOptionsDlg::DoFillTree(), ProjectOptionsDlg::DoTargetChange(), ProjectLoader::DoUnitOptions(), DuplicateBuildTarget(), CompilerGCC::ExpandTargets(), ProjectLoader::ExportTargetAsProject(), ExportTargetAsProject(), FilePathPanel::FilePathPanel(), ProjectOptionsDlg::FillBuildTargets(), ProjectOptionsDlg::FillScripts(), FindReplace::FindInFiles(), FindReplaceDlg::FindReplaceDlg(), DebuggerManager::FindTargetsDebugger(), GetBuildTarget(), DirectCommands::GetCleanCommands(), DirectCommands::GetCompileCommands(), NativeParser::GetCompilerStandardGCC(), DirectCommands::GetLinkCommands(), FindReplaceDlg::GetTarget(), CompilerGCC::GetTargetIndexFromName(), CompilerCommandGenerator::Init(), CompilerGCC::IsValidTarget(), DebuggerOptionsProjectDlg::LoadCurrentRemoteDebuggingRecord(), TemplateManager::NewProjectFromUserTemplate(), VirtualBuildTargetsDlg::OnAddClick(), ProjectOptionsDlg::OnAddScript(), ProjectOptionsDlg::OnBuildOrderClick(), DebuggerOptionsProjectDlg::OnBuildTargetAdded(), DebuggerOptionsProjectDlg::OnBuildTargetRemoved(), ProjectOptionsDlg::OnCheckScripts(), CompilerGCC::OnCompileFileRequest(), ProjectOptionsDlg::OnCopyBuildTargetClick(), CompilerOptionsDlg::OnCopyDirsClick(), CompilerOptionsDlg::OnCopyLibsClick(), ProjectOptionsDlg::OnCreateDefFileClick(), ProjectOptionsDlg::OnCreateImportFileClick(), ProjectOptionsDlg::OnEditBuildTargetClick(), VirtualBuildTargetsDlg::OnEditClick(), ProjectOptionsDlg::OnEditDepsClick(), ProjectOptionsDlg::OnExportTargetClick(), ProjectOptionsDlg::OnFileMarkOffClick(), ProjectOptionsDlg::OnFileMarkOnClick(), ProjectOptionsDlg::OnFileToggleMarkClick(), WizBuildTargetPanel::OnPageChanging(), CompilerGCC::OnProjectCompilerOptions(), DebuggerGDB::OnProjectLoadingHook(), ProjectOptionsDlg::OnProjectTypeChanged(), ProjectOptionsDlg::OnRemoveScript(), ProjectOptionsDlg::OnScriptMoveDown(), ProjectOptionsDlg::OnScriptMoveUp(), FindReplaceDlg::OnSearchProject(), FindReplaceDlg::OnSelectTarget(), ProjectOptionsDlg::OnTargetBuildOptionsClick(), ProjectLoader::Open(), CompilerGCC::PreprocessJob(), ProjectFileOptionsDlg::ProjectFileOptionsDlg(), MacrosManager::RecalcVars(), ProjectFile::RemoveBuildTarget(), RemoveBuildTarget(), RenameBuildTarget(), ReOrderTargets(), FindReplace::ReplaceInFiles(), MacrosManager::ReplaceMacros(), DebuggerOptionsProjectDlg::SaveCurrentRemoteDebuggingRecord(), EditorManager::SwapActiveHeaderSource(), CompilerOptionsDlg::UpdateCompilerForTargets(), ProjectFile::UpdateFileDetails(), CompilerGCC::UpdateProjectTargets(), and ProjectOptionsDlg::ValidateTargetName().
ProjectBuildTarget * cbProject::GetBuildTarget | ( | const wxString & | targetName | ) |
Access a build target.
targetName | The build target name. |
Definition at line 1399 of file cbproject.cpp.
References GetBuildTarget(), and IndexOfBuildTargetName().
|
inline |
Definition at line 200 of file cbproject.h.
References wxEmptyString.
Referenced by NativeParser::AddCompilerDirs(), ProjectManagerUI::AskForBuildTargetIndex(), ProjectManagerUI::AskForMultiBuildTargetIndex(), CodeBlocksApp::BatchJob(), ProjectOptionsDlg::BuildScriptsTree(), VirtualBuildTargetsDlg::CheckTargets(), CompilerOptionsDlg::CompilerOptionsDlg(), ProjectLoader::ConvertVersion_Pre_1_1(), Wiz::CopyFiles(), ProjectManager::DoAddFileToProject(), CompilerOptionsDlg::DoFillTree(), ProjectLoader::DoUnitOptions(), ProjectLoader::ExportTargetAsProject(), FilePathPanel::FilePathPanel(), ProjectOptionsDlg::FillBuildTargets(), FindReplaceDlg::FindReplaceDlg(), DirectCommands::GetCleanCommands(), DirectCommands::GetCompileCommands(), NativeParser::GetCompilerStandardGCC(), DirectCommands::GetLinkCommands(), FindReplaceDlg::GetTarget(), CompilerGCC::GetTargetIndexFromName(), CompilerCommandGenerator::Init(), TemplateManager::NewProjectFromUserTemplate(), ProjectManagerUI::OnAddFilesToProjectRecursively(), ProjectManagerUI::OnAddFileToProject(), ProjectOptionsDlg::OnBuildOrderClick(), ProjectOptionsDlg::OnCheckScripts(), CompilerOptionsDlg::OnCopyDirsClick(), CompilerOptionsDlg::OnCopyLibsClick(), FindReplaceDlg::OnSearchProject(), FindReplaceDlg::OnSelectTarget(), ProjectLoader::Open(), ProjectFileOptionsDlg::ProjectFileOptionsDlg(), MacrosManager::RecalcVars(), ScriptBindings::RegisterBindings(), Wiz::RunProjectWizard(), SelectTarget(), EditorManager::SwapActiveHeaderSource(), CompilerOptionsDlg::UpdateCompilerForTargets(), ProjectFile::UpdateFileDetails(), and CompilerGCC::UpdateProjectTargets().
bool cbProject::GetCheckForExternallyModifiedFiles | ( | ) | const |
Get check for externally modified files.
Definition at line 1628 of file cbproject.cpp.
References m_CheckForExternallyModifiedFiles.
Referenced by EditorManager::CheckForExternallyModifiedFiles(), ProjectLoader::ExportTargetAsProject(), and ScriptBindings::RegisterBindings().
wxString cbProject::GetCommonTopLevelPath | ( | ) | const |
Definition at line 423 of file cbproject.cpp.
References m_CommonTopLevelPath.
Referenced by ProjectManagerUI::CheckForExternallyModifiedProjects(), DebuggerGDB::DoDebug(), CompilerErrors::DoGotoError(), NativeParser::GetAllPathsByFilename(), CodeCompletion::GetSystemIncludeDirs(), CompilerCommandGenerator::Init(), ProjectManagerUI::OnRemoveFileFromProject(), ProjectFileOptionsDlg::ProjectFileOptionsDlg(), MacrosManager::RecalcVars(), ScriptBindings::RegisterBindings(), TemplateManager::SaveUserTemplate(), and ProjectManagerUI::ShowMenu().
|
inline |
Get a pointer to the currently compiling target.
Definition at line 478 of file cbproject.h.
Referenced by ProjectManager::CloseProject(), DirectCommands::GetPostBuildCommands(), DirectCommands::GetPreBuildCommands(), ProjectManagerUI::OnCloseProject(), MainFrame::OnFileMenuUpdateUI(), ProjectManagerUI::OnKeyDown(), ProjectManagerUI::OnRightClick(), DebuggerMenuHandler::OnUpdateUI(), DebuggerToolbarHandler::OnUpdateUI(), ProjectManagerUI::QueryCloseProject(), ScriptBindings::RegisterBindings(), MacrosManager::ReplaceMacros(), and cbDebuggerPlugin::ToolMenuEnabled().
const wxString & cbProject::GetDefaultExecuteTarget | ( | ) | const |
Definition at line 1387 of file cbproject.cpp.
References m_DefaultExecuteTarget.
Referenced by ProjectLoader::ExportTargetAsProject(), and ScriptBindings::RegisterBindings().
wxString cbProject::GetExecutionDir | ( | ) |
Definition at line 1023 of file cbproject.cpp.
References CompileTargetBase::GetBasePath(), GetMakefileExecutionDir(), and m_CustomMakefile.
Referenced by CompilerQueue::Add(), and CompilerGCC::AddOutputLine().
wxArrayString cbProject::GetExpandedVirtualBuildTargetGroup | ( | const wxString & | alias | ) | const |
Access a virtual build target's expanded group of build targets.
The difference from GetVirtualBuildTargetGroup() lies in that this function returns the full list of real build targets in this group (by recursively expanding virtual build targets in the group).
alias | The virtual build target's name. |
alias
. Definition at line 1507 of file cbproject.cpp.
References ExpandVirtualBuildTargetGroup(), and m_VirtualTargets.
Referenced by NativeParser::AddProjectDefinedMacros(), CompilerGCC::ExpandTargets(), and ScriptBindings::RegisterBindings().
bool cbProject::GetExtendedObjectNamesGeneration | ( | ) | const |
Gets object names generation mode (extended/normal).
Definition at line 1586 of file cbproject.cpp.
References m_ExtendedObjectNamesGeneration.
Referenced by ProjectLoader::ExportTargetAsProject(), ScriptBindings::RegisterBindings(), ProjectFile::SetObjName(), and pfDetails::Update().
|
virtual |
Access the <Extensions> XML node of this project.
This function is for advanced users only. Use at your own risk (and respect other plugins authors work under this node).
Definition at line 1659 of file cbproject.cpp.
References _T, cbU2C(), and m_pExtensionsElement.
Referenced by AddToExtensions().
ProjectFile * cbProject::GetFile | ( | int | index | ) |
Access a file of the project.
index | The index of the file. Must be greater or equal than zero and less than GetFilesCount(). |
Definition at line 1031 of file cbproject.cpp.
References m_FileArray, m_Files, and NULL.
Referenced by ScriptBindings::RegisterBindings().
ProjectFile * cbProject::GetFileByFilename | ( | const wxString & | filename, |
bool | isRelative = true , |
||
bool | isUnixFilename = false |
||
) |
Access a file of the project.
filename | The filename of the file. |
isRelative | True if filename is a relative filename, false if not. |
isUnixFilename | True if filename is already normalized with UnixFilename(), false if not. |
Definition at line 1049 of file cbproject.cpp.
References _T, CompileTargetBase::GetBasePath(), wxFileName::GetFullPath(), m_ProjectFilesMap, wxFileName::MakeRelativeTo(), realpath(), wxString::Remove(), wxString::StartsWith(), and UnixFilename().
Referenced by AddFile(), ProjectOptionsDlg::DoBeforeTargetChange(), CodeCompletion::DoCodeCompleteIncludes(), CompilerErrors::DoGotoError(), CodeRefactoring::DoRenameSymbols(), ProjectOptionsDlg::DoTargetChange(), ProjectManager::FindProjectForFile(), NativeParser::GetProjectByFilename(), EditorManager::OnAddFileToProject(), CompilerGCC::OnCompileFileRequest(), cbEditor::OnContextMenuEntry(), ProjectOptionsDlg::OnFileMarkOffClick(), ProjectOptionsDlg::OnFileMarkOnClick(), MainFrame::OnFileNewWhat(), ProjectOptionsDlg::OnFileOptionsClick(), ProjectOptionsDlg::OnFileToggleMarkClick(), CodeCompletion::OnRealtimeParsingTimer(), ProjectManagerUI::OnRemoveFileFromProject(), ProjectLayoutLoader::Open(), ScriptBindings::RegisterBindings(), Wiz::RunProjectWizard(), EditorManager::SwapActiveHeaderSource(), and cbDebuggerPlugin::SyncEditor().
|
inline |
Definition at line 142 of file cbproject.h.
Referenced by CodeCompletion::OnProjectActivated(), ScriptBindings::RegisterBindings(), and TemplateManager::SaveUserTemplate().
|
inlinevirtual |
Provides an easy way to iterate all the files belonging in this target.
Definition at line 685 of file cbproject.h.
References wxEmptyString.
Referenced by NativeParser::AddProjectToParser(), ProjectManagerUI::BuildProjectTree(), ProjectManagerUI::CheckForExternallyModifiedProjects(), EditorManager::CollectDefines(), CodeCompletion::DoCodeCompleteIncludes(), NativeParser::DoFullParsing(), CompilerErrors::DoGotoError(), MarkFileAsLocalThreadedTask::Execute(), ProjectLoader::ExportTargetAsProject(), FindReplace::FindInFiles(), CodeRefactoring::GetAllProjectFiles(), DirectCommands::GetProjectFilesSortedByWeight(), ClassBrowserBuilderThread::Init(), ProjectManagerUI::OnAddFileToProject(), ProjectManagerUI::OnGotoFile(), CodeCompletion::OnOpenIncludeFile(), MacrosManager::RecalcVars(), NativeParser::RemoveProjectFromParser(), FindReplace::ReplaceInFiles(), Wiz::RunTargetWizard(), ProjectLayoutLoader::Save(), TemplateManager::SaveUserTemplate(), CompilerMINGWGenerator::SetupIncludeDirs(), and EditorManager::SwapActiveHeaderSource().
wxString cbProject::GetFirstValidBuildTargetName | ( | bool | virtuals_too = true | ) | const |
Definition at line 1345 of file cbproject.cpp.
References CompileTargetBase::GetTitle(), m_Targets, m_VirtualTargets, and wxEmptyString.
Referenced by ProjectLoader::ExportTargetAsProject(), ScriptBindings::RegisterBindings(), and SetActiveBuildTarget().
std::vector< cbProject::Glob > cbProject::GetGlobs | ( | ) | const |
Retrieve the current globs from the project.
Definition at line 1750 of file cbproject.cpp.
References m_Globs.
Referenced by ProjectLoader::ExportTargetAsProject().
|
inline |
Returns the last modification time for the file.
Used to detect modifications outside the Program.
Definition at line 569 of file cbproject.h.
Referenced by ProjectManagerUI::CheckForExternallyModifiedProjects().
const wxString & cbProject::GetMakefile | ( | ) |
Definition at line 988 of file cbproject.cpp.
References _T, wxFileName::Assign(), CompileTargetBase::GetBasePath(), wxFileName::GetFullPath(), wxString::IsEmpty(), CompileTargetBase::m_Filename, m_Makefile, wxFileName::MakeRelativeTo(), wxFileName::SetExt(), and wxFileName::SetName().
Referenced by ProjectLoader::ExportTargetAsProject(), CompilerGCC::GetMakeCommandFor(), MacrosManager::RecalcVars(), and ScriptBindings::RegisterBindings().
wxString cbProject::GetMakefileExecutionDir | ( | ) |
Definition at line 1013 of file cbproject.cpp.
References CompileTargetBase::GetBasePath(), wxFileName::GetFullPath(), wxString::IsEmpty(), and m_MakefileExecutionDir.
Referenced by ProjectLoader::ExportTargetAsProject(), and GetExecutionDir().
|
inline |
Definition at line 301 of file cbproject.h.
Referenced by ProjectLoader::ExportTargetAsProject(), ScriptBindings::RegisterBindings(), ProjectFile::SetObjName(), CompilerMINGWGenerator::SetupIncludeDirs(), and pfDetails::Update().
|
overridevirtual |
Reimplemented from CompileOptionsBase.
Definition at line 162 of file cbproject.cpp.
References CompileOptionsBase::GetModified(), and m_Targets.
Referenced by CodeCompletion::DoCodeCompleteIncludes(), ExportTargetAsProject(), CompilerCommandGenerator::Init(), MainFrame::OnFileMenuUpdateUI(), ProjectManagerUI::QueryCloseProject(), ScriptBindings::RegisterBindings(), and ProjectManager::SaveAllProjects().
const wxString & cbProject::GetNotes | ( | ) | const |
Get notes on the project.
Definition at line 1600 of file cbproject.cpp.
References m_Notes.
Referenced by ProjectManager::EndLoadingWorkspace(), ProjectLoader::ExportTargetAsProject(), and ScriptBindings::RegisterBindings().
|
inline |
Definition at line 311 of file cbproject.h.
Referenced by ProjectManagerUI::BuildProjectTree(), ProjectManagerUI::CheckForExternallyModifiedProjects(), ProjectManagerUI::FinishLoadingProject(), ProjectManagerUI::FinishLoadingWorkspace(), ProjectManagerUI::MoveProjectDown(), ProjectManagerUI::MoveProjectUp(), ProjectOptionsDlg::OnCreateImportFileClick(), ProjectManagerUI::RemoveProject(), Wiz::RunProjectWizard(), and ProjectManagerUI::UpdateActiveProject().
bool cbProject::GetShowNotesOnLoad | ( | ) | const |
Get show project notes on load automatically.
Definition at line 1614 of file cbproject.cpp.
References m_AutoShowNotesOnLoad.
Referenced by ProjectManager::EndLoadingProject(), ProjectManager::EndLoadingWorkspace(), ProjectLoader::ExportTargetAsProject(), and ScriptBindings::RegisterBindings().
const wxArrayString & cbProject::GetVirtualBuildTargetGroup | ( | const wxString & | alias | ) | const |
Access a virtual build target's group of build targets.
alias | The virtual build target's name. |
alias
. Definition at line 1496 of file cbproject.cpp.
References m_VirtualTargets.
Referenced by CanAddToVirtualBuildTarget(), VirtualBuildTargetsDlg::CheckTargets(), ExpandVirtualBuildTargetGroup(), ProjectLoader::ExportTargetAsProject(), and ScriptBindings::RegisterBindings().
wxArrayString cbProject::GetVirtualBuildTargets | ( | ) | const |
Get a list of all defined virtual build targets.
Definition at line 1487 of file cbproject.cpp.
References wxArrayString::Add(), and m_VirtualTargets.
Referenced by ProjectLoader::ExportTargetAsProject(), ScriptBindings::RegisterBindings(), and CompilerGCC::UpdateProjectTargets().
const wxArrayString & cbProject::GetVirtualFolders | ( | ) | const |
Get a list of the virtual folders.
Normally used by the project loader only.
Definition at line 908 of file cbproject.cpp.
References m_VirtualFolders.
Referenced by ProjectManagerUI::BuildProjectTree(), ProjectManagerUI::CheckForExternallyModifiedProjects(), and ProjectLoader::ExportTargetAsProject().
bool cbProject::HasVirtualBuildTarget | ( | const wxString & | alias | ) | const |
Does a virtual build target exist?
alias | The virtual build target's name. |
Definition at line 1470 of file cbproject.cpp.
References m_VirtualTargets.
Referenced by AddBuildTarget(), BuildTargetValid(), CanAddToVirtualBuildTarget(), ProjectLoader::Open(), ScriptBindings::RegisterBindings(), and ProjectOptionsDlg::ValidateTargetName().
|
private |
Definition at line 1324 of file cbproject.cpp.
References CompileTargetBase::GetTitle(), m_Targets, and wxString::Matches().
Referenced by AddFile(), BuildTargetValid(), DuplicateBuildTarget(), ExpandVirtualBuildTargetGroup(), GetBuildTarget(), RemoveBuildTarget(), and RenameBuildTarget().
|
inline |
Definition at line 105 of file cbproject.h.
References CompileOptionsBase::GetModified(), and CompileOptionsBase::SetModified().
Referenced by ProjectManager::LoadProject().
|
inline |
Definition at line 159 of file cbproject.h.
Referenced by CompilerOptionsDlg::CompilerOptionsDlg(), ProjectLoader::ExportTargetAsProject(), CompilerOptionsDlg::OnTreeSelectionChange(), ScriptBindings::RegisterBindings(), and CompilerGCC::UseMake().
bool cbProject::LoadLayout | ( | ) |
Load the project's layout.
Definition at line 513 of file cbproject.cpp.
References _T, EditorBase::Activate(), LogManager::DebugLog(), ProjectFile::editorOpen, ProjectFile::editorTabPos, ProjectFile::file, Manager::Get(), Manager::GetConfigManager(), Manager::GetEditorManager(), Manager::GetFileManager(), wxFileName::GetFullPath(), Manager::GetLogManager(), ProjectLayoutLoader::GetTopProjectFile(), EditorManager::HideNotebook(), wxString::IsEmpty(), FileManager::Load(), ProjectLayoutLoader::LoadNotebookLayout(), CompileTargetBase::m_Filename, m_Files, ProjectLayoutLoader::Open(), EditorManager::Open(), ConfigManager::ReadBool(), ConfigManager::ReadInt(), wxFileName::SetExt(), cbEditor::SetProjectFile(), EditorManager::ShowNotebook(), and wxFileExists().
Referenced by ProjectManager::EndLoadingProject(), and ScriptBindings::RegisterBindings().
|
private |
Definition at line 120 of file cbproject.cpp.
References Manager::Get(), and Manager::ProcessEvent().
Referenced by AddBuildTarget(), ClearAllProperties(), DefineVirtualBuildTarget(), DuplicateBuildTarget(), RemoveBuildTarget(), RemoveVirtualBuildTarget(), RenameBuildTarget(), Save(), SaveAs(), SetActiveBuildTarget(), and SetTitle().
|
private |
Definition at line 264 of file cbproject.cpp.
References _(), AddDefaultBuildTarget(), wxString::c_str(), CalculateCommonTopLevelPath(), cbMessageBox(), Delete(), wxFileName::DirExists(), InfoWindow::Display(), wxFileName::FileExists(), ProjectLoader::FileModified(), FileTypeOf(), ProjectLoader::FileUpgraded(), ftCodeBlocksProject, Manager::Get(), Manager::GetLogManager(), wxFileName::GetModificationTime(), Manager::IsBatchBuild(), LogManager::Log(), m_CurrentlyLoading, CompileTargetBase::m_Filename, m_LastModified, m_Loaded, m_pExtensionsElement, m_ProjectFilesMap, m_Targets, CompileTargetBase::m_Title, ProjectLoader::Open(), wxString::Printf(), SetModified(), wxCENTRE, wxICON_ERROR, and wxOK.
Referenced by cbProject().
|
virtual |
Internal use only.
Updates the internal hashmap of project files.
Definition at line 1730 of file cbproject.cpp.
References m_ProjectFilesMap, ProjectFile::relativeFilename, and UnixFilename().
Referenced by ProjectFile::Rename().
bool cbProject::QueryCloseAllFiles | ( | ) |
Act like closing all project files, but don't do it.
Used to check if any of the project files need saving.
Definition at line 1078 of file cbproject.cpp.
References ProjectFile::file, Manager::Get(), Manager::GetEditorManager(), wxFileName::GetFullPath(), cbEditor::GetModified(), EditorManager::IsBuiltinOpen(), m_Files, and EditorManager::QueryClose().
Referenced by CloseAllFiles(), and ProjectManagerUI::QueryCloseProject().
bool cbProject::RemoveBuildTarget | ( | int | index | ) |
Remove a build target.
index | The index of the build target to remove. |
index
was valid, false if not. Definition at line 1284 of file cbproject.cpp.
References cbEVT_BUILDTARGET_REMOVED, cbEVT_PROJECT_TARGETS_MODIFIED, GetBuildTarget(), CompileTargetBase::GetTitle(), wxArrayString::Index(), m_Files, m_Targets, m_VirtualTargets, NotifyPlugins(), wxArrayString::RemoveAt(), ProjectFile::RemoveBuildTarget(), and SetModified().
Referenced by ScriptBindings::cbProject_RemoveBuildTarget(), ProjectOptionsDlg::OnRemoveBuildTargetClick(), and RemoveBuildTarget().
bool cbProject::RemoveBuildTarget | ( | const wxString & | targetName | ) |
Remove a build target.
targetName | The build target name. |
targetName
was valid, false if not. Definition at line 1319 of file cbproject.cpp.
References IndexOfBuildTargetName(), and RemoveBuildTarget().
bool cbProject::RemoveFile | ( | ProjectFile * | pf | ) |
Remove a file from the project.
pf | The pointer to ProjectFile. |
pf
was a valid project file, false if not. Definition at line 860 of file cbproject.cpp.
References _T, ProjectFile::AutoGeneratedBy(), EditorManager::Close(), LogManager::DebugLog(), ProjectFile::file, ProjectFile::generatedFiles, Manager::Get(), Manager::GetEditorManager(), wxFileName::GetFullPath(), Manager::GetLogManager(), m_FileArray, m_Files, m_ProjectFilesMap, m_Targets, ProjectFile::relativeFilename, SetModified(), and UnixFilename().
Referenced by ScriptBindings::cbProject_RemoveFile(), and ProjectManager::RemoveFileFromProject().
bool cbProject::RemoveVirtualBuildTarget | ( | const wxString & | alias | ) |
Remove a virtual build target.
alias | The virtual build target's name. |
Definition at line 1475 of file cbproject.cpp.
References cbEVT_PROJECT_TARGETS_MODIFIED, m_VirtualTargets, NotifyPlugins(), and SetModified().
Referenced by AddBuildTarget(), VirtualBuildTargetsDlg::OnEditClick(), VirtualBuildTargetsDlg::OnRemoveClick(), and ScriptBindings::RegisterBindings().
void cbProject::RemoveVirtualFolders | ( | const wxString & | folder | ) |
Remove all virtual folders starting with folder.
Definition at line 924 of file cbproject.cpp.
References wxString::Clear(), wxArrayString::GetCount(), wxString::IsEmpty(), m_Files, m_VirtualFolders, wxArrayString::RemoveAt(), SetModified(), wxString::StartsWith(), and ProjectFile::virtual_path.
Referenced by ProjectManagerUI::CheckForExternallyModifiedProjects().
bool cbProject::RenameBuildTarget | ( | int | index, |
const wxString & | targetName | ||
) |
Rename a build target.
index | The build target's index to rename. |
targetName | The new name for the build target. |
index
was valid, false if not. Definition at line 1178 of file cbproject.cpp.
References cbEVT_BUILDTARGET_RENAMED, cbEVT_PROJECT_TARGETS_MODIFIED, GetBuildTarget(), CompileTargetBase::GetTitle(), wxArrayString::Index(), m_Files, m_VirtualTargets, NotifyPlugins(), ProjectFile::RenameBuildTarget(), SetModified(), and CompileTargetBase::SetTitle().
Referenced by ScriptBindings::cbProject_RenameBuildTarget(), ProjectOptionsDlg::OnEditBuildTargetClick(), and RenameBuildTarget().
bool cbProject::RenameBuildTarget | ( | const wxString & | oldTargetName, |
const wxString & | newTargetName | ||
) |
Rename a build target.
oldTargetName | The build target's old name. |
newTargetName | The new name for the build target. |
oldTargetName
was valid, false if not. Definition at line 1211 of file cbproject.cpp.
References IndexOfBuildTargetName(), and RenameBuildTarget().
void cbProject::ReOrderTargets | ( | const wxArrayString & | nameOrder | ) |
Reorder the list of build targets.
This is useful, so that when the special build target "All" is being built targets are built in the desired order.
nameOrder | An array of strings containing build target names in the order you desire. The number of array elements must be equal to GetBuildTargetsCount(). |
Definition at line 1405 of file cbproject.cpp.
References _T, LogManager::DebugLog(), F(), Manager::Get(), GetBuildTarget(), wxArrayString::GetCount(), Manager::GetLogManager(), wxArrayString::Index(), wxArrayString::Insert(), m_Targets, m_VirtualTargets, wxArrayString::Remove(), SetModified(), and wxNOT_FOUND.
Referenced by ProjectOptionsDlg::OnBuildOrderClick().
Replaced the oldFolder with newFolder or appends newFolder to the end of the list if oldFolder is not found.
Definition at line 945 of file cbproject.cpp.
References wxArrayString::Add(), wxArrayString::Index(), wxString::IsEmpty(), m_Files, m_VirtualFolders, wxString::Replace(), SetModified(), wxString::StartsWith(), ProjectFile::virtual_path, and wxNOT_FOUND.
Referenced by ProjectManagerUI::CheckForExternallyModifiedProjects().
void cbProject::RestoreTreeState | ( | wxTreeCtrl * | tree | ) |
Convenience function for remembering the project's tree state when refreshing it.
tree | The tree control to restore its expanded state to a previously saved. |
Definition at line 983 of file cbproject.cpp.
References m_ExpandedNodes, m_ProjectNode, and m_SelectedNodes.
bool cbProject::Save | ( | ) |
Save the project.
Definition at line 482 of file cbproject.cpp.
References _(), cbEVT_PROJECT_SAVE, cbMessageBox(), wxFileName::GetModificationTime(), wxString::IsEmpty(), CompileTargetBase::m_Filename, m_LastModified, m_pExtensionsElement, NotifyPlugins(), ProjectLoader::Save(), SaveAs(), and wxICON_WARNING.
Referenced by cbProject(), ExportTargetAsProject(), MainFrame::OnFileNewWhat(), ProjectManagerUI::QueryCloseProject(), ScriptBindings::RegisterBindings(), Wiz::RunProjectWizard(), ProjectManager::SaveProject(), and TemplateManager::SaveUserTemplate().
bool cbProject::SaveAllFiles | ( | ) |
Save all project files.
Definition at line 1117 of file cbproject.cpp.
References ProjectFile::file, Manager::Get(), Manager::GetEditorManager(), wxFileName::GetFullPath(), m_Files, and EditorManager::Save().
Referenced by CompilerGCC::DoBuild(), CompilerGCC::DoWorkspaceBuild(), MainFrame::OnFileNewWhat(), ScriptBindings::RegisterBindings(), and TemplateManager::SaveUserTemplate().
bool cbProject::SaveAs | ( | ) |
Save the project under a different name.
A dialog pops up for the user to choose a new filename for the project.
Definition at line 433 of file cbproject.cpp.
References _(), _T, AddDefaultBuildTarget(), wxFileName::Assign(), CalculateCommonTopLevelPath(), cbEVT_PROJECT_SAVE, cbMessageBox(), FileFilters::CODEBLOCKS_EXT, Manager::Get(), wxFileName::GetExt(), FileFilters::GetFilterString(), wxFileName::GetFullName(), wxFileName::GetModificationTime(), wxFileName::GetPath(), wxString::IsSameAs(), CompileTargetBase::m_Filename, m_LastModified, m_Loaded, m_pExtensionsElement, wxString::Matches(), NotifyPlugins(), PlaceWindow(), ProjectLoader::Save(), wxFD_OVERWRITE_PROMPT, wxFD_SAVE, wxICON_WARNING, and wxID_OK.
Referenced by cbProject(), Save(), and ProjectManager::SaveProjectAs().
bool cbProject::SaveLayout | ( | ) |
Save the project's layout.
Layout is the list of open project files, which one is active, where the cursor is located on each one of those, etc.
Definition at line 499 of file cbproject.cpp.
References _T, Manager::Get(), Manager::GetConfigManager(), wxFileName::GetFullPath(), wxString::IsEmpty(), CompileTargetBase::m_Filename, ConfigManager::ReadBool(), ProjectLayoutLoader::Save(), and wxFileName::SetExt().
Referenced by ProjectManager::CloseProject(), and ScriptBindings::RegisterBindings().
void cbProject::SaveTreeState | ( | wxTreeCtrl * | tree | ) |
Convenience function for remembering the project's tree state when refreshing it.
tree | The tree control to save its expanded state. |
Definition at line 978 of file cbproject.cpp.
References m_ExpandedNodes, m_ProjectNode, and m_SelectedNodes.
int cbProject::SelectTarget | ( | int | initial = -1 , |
bool | evenIfOne = false |
||
) |
Displays a target selection dialog.
When invoked, a selection dialog is presented to the user so that he/she can select one target from the list of this project's targets.
initial | The index of the pre-selected target when the dialog is displayed. Defaults to none (-1). |
evenIfOne | If true, the dialog is still shown even if the project contains only one target. The default behaviour is to not show the dialog if the project has only one target. |
Definition at line 1130 of file cbproject.cpp.
References GetBuildTargetsCount(), SelectTargetDlg::GetSelection(), PlaceWindow(), wxDialog::ShowModal(), and wxID_OK.
Referenced by CodeBlocksApp::BatchJob(), DebuggerGDB::DoDebug(), ProjectManagerUI::OnExecParameters(), and ScriptBindings::RegisterBindings().
bool cbProject::SetActiveBuildTarget | ( | const wxString & | name | ) |
Set the active build target.
name | The build target name to set as active. If name does not exist, then the first virtual target is set or the first real target, depending which is valid. |
name
was valid, false if not. Definition at line 1355 of file cbproject.cpp.
References BuildTargetValid(), cbEVT_BUILDTARGET_SELECTED, GetFirstValidBuildTargetName(), m_ActiveTarget, and NotifyPlugins().
Referenced by ProjectLayoutLoader::Open(), and ScriptBindings::RegisterBindings().
void cbProject::SetCheckForExternallyModifiedFiles | ( | bool | check | ) |
Set check for externally modified files.
True | if check for externally modified files is set, false if not. |
Definition at line 1619 of file cbproject.cpp.
References m_CheckForExternallyModifiedFiles, and SetModified().
Referenced by ProjectLoader::DoProjectOptions(), ProjectOptionsDlg::EndModal(), and ScriptBindings::RegisterBindings().
|
overridevirtual |
! Set the flag if the host app should be run in terminal
Set the target's compiler
Reimplemented from CompileTargetBase.
Definition at line 129 of file cbproject.cpp.
References FileTypeOf(), ftResource, CompilerFactory::GetCompiler(), CompileTargetBase::GetCompilerID(), ProjectFile::GetObjName(), Compiler::GetSwitches(), m_Files, m_Targets, CompilerSwitches::objectExtension, ProjectFile::relativeFilename, CompileTargetBase::SetCompilerID(), wxFileName::SetExt(), and ProjectFile::SetObjName().
Referenced by cbProject(), ProjectLoader::DoProjectOptions(), CompilerOptionsDlg::ProjectTargetCompilerAdjust(), and Wiz::RunProjectWizard().
void cbProject::SetCurrentlyCompilingTarget | ( | ProjectBuildTarget * | bt | ) |
Set the currently compiling target.
bt | The build target that is currently building. |
Definition at line 1444 of file cbproject.cpp.
References m_CurrentlyCompilingTarget.
Referenced by ScriptBindings::RegisterBindings().
void cbProject::SetDefaultExecuteTarget | ( | const wxString & | name | ) |
Set the build target index which will be pre-selected when the "Select target" dialog appears when running the project.
name | The build target's name. |
Definition at line 1378 of file cbproject.cpp.
References m_DefaultExecuteTarget, and SetModified().
Referenced by ProjectLoader::DoProjectOptions(), ProjectLoader::Open(), and ScriptBindings::RegisterBindings().
void cbProject::SetExtendedObjectNamesGeneration | ( | bool | ext | ) |
Sets object names generation to extended/normal mode.
In normal mode (the default), the file foo.cpp
generates the foo.o
object file. In extended mode, the file foo.cpp
generates the foo.cpp.o
object file.
This option is useful for large projects containing similarly named files (in the same directory) differing only on their extensions. Using the extended mode with said projects guarantees that each object name will be unique.
ext | Set to true to switch to extended mode, false for normal mode. |
Definition at line 1565 of file cbproject.cpp.
References m_ExtendedObjectNamesGeneration, m_Files, ProjectFile::relativeToCommonTopLevelPath, SetModified(), ProjectFile::SetObjName(), and ProjectFile::UpdateFileDetails().
Referenced by ProjectLoader::DoProjectOptions(), ProjectOptionsDlg::EndModal(), and ScriptBindings::RegisterBindings().
void cbProject::SetGlobs | ( | const std::vector< Glob > & | globs | ) |
Set the globs to the project, this are directory paths do retrieve files from to be added to the project, the path can be searched recursively.
globs | the globs to add to the project. |
Definition at line 1745 of file cbproject.cpp.
References m_Globs.
Referenced by ProjectLoader::DoUnits().
|
inline |
Set the Makefile filename used when exporting a Makefile for the project, or when using a custom Makefile to build the project.
makefile | The filename for the Makefile. |
Definition at line 148 of file cbproject.h.
References CompileOptionsBase::SetModified().
Referenced by ProjectLoader::DoProjectOptions(), ProjectOptionsDlg::EndModal(), and ScriptBindings::RegisterBindings().
void cbProject::SetMakefileCustom | ( | bool | custom | ) |
Mark if the project should use a custom Makefile for compilation.
custom | If true, use a custom Makefile for compilation. If false, use direct C::B build mode. |
Definition at line 194 of file cbproject.cpp.
References m_CustomMakefile, and SetModified().
Referenced by ProjectLoader::DoProjectOptions(), ProjectOptionsDlg::EndModal(), and ScriptBindings::RegisterBindings().
void cbProject::SetMakefileExecutionDir | ( | const wxString & | dir | ) |
Allow the specification of specific execution directory if the project use a custom Makefile.
Defaults to the projects base path, if no custom makefile is used.
dir | The directory the custom Makefile should be executed from. |
Definition at line 1004 of file cbproject.cpp.
References m_MakefileExecutionDir, and SetModified().
Referenced by ProjectLoader::DoProjectOptions(), and ProjectOptionsDlg::EndModal().
|
inline |
Set the mode to handle precompiled headers.
mode | The desired PCH mode. |
Definition at line 306 of file cbproject.h.
References CompileTargetBase::SetCompilerID(), and CompileOptionsBase::SetModified().
Referenced by ProjectLoader::DoProjectOptions(), ProjectOptionsDlg::EndModal(), and ScriptBindings::RegisterBindings().
|
overridevirtual |
Mark the project as modified or not.
modified | If true, the project is marked as modified. If false, as not-modified. |
Reimplemented from CompileOptionsBase.
Definition at line 179 of file cbproject.cpp.
References m_ActiveTarget, m_LastSavedActiveTarget, m_Targets, and CompileOptionsBase::SetModified().
Referenced by AddBuildTarget(), AddFile(), AddToExtensions(), cbProject(), ProjectManagerUI::CheckForExternallyModifiedProjects(), ClearAllProperties(), DefineVirtualBuildTarget(), DuplicateBuildTarget(), ProjectFileOptionsDlg::EndModal(), ExportTargetAsProject(), CompilerCommandGenerator::Init(), Open(), ScriptBindings::RegisterBindings(), RemoveBuildTarget(), RemoveFile(), RemoveVirtualBuildTarget(), RemoveVirtualFolders(), ProjectFile::Rename(), RenameBuildTarget(), ReOrderTargets(), ReplaceVirtualFolder(), ProjectLoader::Save(), SetCheckForExternallyModifiedFiles(), SetDefaultExecuteTarget(), SetExtendedObjectNamesGeneration(), SetMakefileCustom(), SetMakefileExecutionDir(), SetNotes(), and SetShowNotesOnLoad().
void cbProject::SetNotes | ( | const wxString & | notes | ) |
Set notes on the project.
notes | Simple text notes about the project. |
Definition at line 1591 of file cbproject.cpp.
References m_Notes, and SetModified().
Referenced by ProjectLoader::DoProjectOptions(), ProjectOptionsDlg::EndModal(), ScriptBindings::RegisterBindings(), and ShowNotes().
|
inline |
Sets the root item of this item, should not be called by user's code!
Definition at line 314 of file cbproject.h.
References ScriptBindings::IOLib::RemoveFile().
Referenced by ProjectManagerUI::BuildProjectTree().
void cbProject::SetShowNotesOnLoad | ( | bool | show | ) |
Set show project notes on load automatically.
show | If true show project notes on load. |
Definition at line 1605 of file cbproject.cpp.
References m_AutoShowNotesOnLoad, and SetModified().
Referenced by ProjectLoader::DoProjectOptions(), ProjectOptionsDlg::EndModal(), and ScriptBindings::RegisterBindings().
|
overridevirtual |
Changes project title.
This function overrides CompileTargetBase::SetTitle. It sends additional notification event to plugins and than calls base function.
Reimplemented from CompileTargetBase.
Definition at line 1650 of file cbproject.cpp.
References cbEVT_PROJECT_RENAMED, CompileTargetBase::GetTitle(), NotifyPlugins(), and CompileTargetBase::SetTitle().
Referenced by ProjectLoader::DoProjectOptions(), ProjectOptionsDlg::EndModal(), ExportTargetAsProject(), TemplateManager::NewProjectFromUserTemplate(), ScriptBindings::RegisterBindings(), and Wiz::RunProjectWizard().
void cbProject::SetVirtualFolders | ( | const wxArrayString & | folders | ) |
Set the virtual folders list.
Normally used by the project loader only.
Definition at line 968 of file cbproject.cpp.
References _T, wxArrayString::GetCount(), and m_VirtualFolders.
Referenced by ProjectManagerUI::CheckForExternallyModifiedProjects(), and ProjectLoader::DoProjectOptions().
void cbProject::ShowNotes | ( | bool | nonEmptyOnly, |
bool | editable = false |
||
) |
Show project notes now.
nonEmptyOnly | If true, show notes only if non-empty. |
editable | If true, the notes will be editable. |
editable
is true, the nonEmptyOnly
parameter is ignored... Definition at line 1633 of file cbproject.cpp.
References _(), Manager::Get(), GenericMultiLineNotesDlg::GetNotes(), wxString::IsEmpty(), m_Notes, CompileTargetBase::m_Title, PlaceWindow(), SetNotes(), wxDialog::ShowModal(), and wxID_OK.
Referenced by ProjectManager::EndLoadingProject(), ProjectManager::EndLoadingWorkspace(), and ScriptBindings::RegisterBindings().
void cbProject::Touch | ( | ) |
Sets the last modification time for the project to 'now'.
Used to detect modifications outside the Program.
Definition at line 428 of file cbproject.cpp.
References m_LastModified, and wxDateTime::Now().
Referenced by ProjectManagerUI::CheckForExternallyModifiedProjects().
|
private |
Definition at line 698 of file cbproject.h.
Referenced by GetActiveBuildTarget(), SetActiveBuildTarget(), and SetModified().
|
private |
Definition at line 729 of file cbproject.h.
Referenced by GetShowNotesOnLoad(), and SetShowNotesOnLoad().
|
private |
Definition at line 717 of file cbproject.h.
Referenced by CalculateCommonTopLevelPath(), and cbProject().
|
private |
Definition at line 730 of file cbproject.h.
Referenced by GetCheckForExternallyModifiedFiles(), and SetCheckForExternallyModifiedFiles().
|
private |
Definition at line 716 of file cbproject.h.
Referenced by AddFile(), CalculateCommonTopLevelPath(), cbProject(), and GetCommonTopLevelPath().
|
private |
Definition at line 723 of file cbproject.h.
Referenced by SetCurrentlyCompilingTarget().
|
private |
Definition at line 715 of file cbproject.h.
|
private |
Definition at line 702 of file cbproject.h.
Referenced by GetExecutionDir(), and SetMakefileCustom().
|
private |
Definition at line 700 of file cbproject.h.
Referenced by GetDefaultExecuteTarget(), and SetDefaultExecuteTarget().
|
private |
Definition at line 708 of file cbproject.h.
Referenced by RestoreTreeState(), and SaveTreeState().
|
private |
Definition at line 727 of file cbproject.h.
Referenced by GetExtendedObjectNamesGeneration(), and SetExtendedObjectNamesGeneration().
|
private |
Definition at line 707 of file cbproject.h.
Referenced by AddFile(), cbProject(), ClearAllProperties(), CloseAllFiles(), GetFile(), and RemoveFile().
|
private |
Definition at line 706 of file cbproject.h.
Referenced by AddFile(), CalculateCommonTopLevelPath(), cbProject(), ClearAllProperties(), CloseAllFiles(), GetFile(), LoadLayout(), QueryCloseAllFiles(), RemoveBuildTarget(), RemoveFile(), RemoveVirtualFolders(), RenameBuildTarget(), ReplaceVirtualFolder(), SaveAllFiles(), SetCompilerID(), and SetExtendedObjectNamesGeneration().
|
private |
Definition at line 705 of file cbproject.h.
Referenced by GetGlobs(), and SetGlobs().
|
private |
|
private |
Definition at line 699 of file cbproject.h.
Referenced by SetModified().
|
private |
Definition at line 710 of file cbproject.h.
Referenced by cbProject(), Open(), and SaveAs().
|
private |
Definition at line 701 of file cbproject.h.
Referenced by GetMakefile().
|
mutableprivate |
Definition at line 703 of file cbproject.h.
Referenced by GetMakefileExecutionDir(), and SetMakefileExecutionDir().
|
private |
Definition at line 728 of file cbproject.h.
Referenced by GetNotes(), SetNotes(), and ShowNotes().
|
private |
Definition at line 719 of file cbproject.h.
|
private |
Definition at line 734 of file cbproject.h.
Referenced by ClearAllProperties(), ExportTargetAsProject(), GetExtensionsNode(), Open(), Save(), and SaveAs().
|
private |
Definition at line 722 of file cbproject.h.
Referenced by AddFile(), GetFileByFilename(), Open(), ProjectFileRenamed(), and RemoveFile().
|
private |
Definition at line 711 of file cbproject.h.
Referenced by RestoreTreeState(), and SaveTreeState().
|
private |
Definition at line 709 of file cbproject.h.
Referenced by RestoreTreeState(), and SaveTreeState().
|
private |
Definition at line 697 of file cbproject.h.
Referenced by AddBuildTarget(), AddFile(), ClearAllProperties(), DuplicateBuildTarget(), GetBuildTarget(), GetFirstValidBuildTargetName(), GetModified(), IndexOfBuildTargetName(), Open(), RemoveBuildTarget(), RemoveFile(), ReOrderTargets(), SetCompilerID(), and SetModified().
|
private |
Definition at line 713 of file cbproject.h.
Referenced by AppendUniqueVirtualFolder(), GetVirtualFolders(), RemoveVirtualFolders(), ReplaceVirtualFolder(), and SetVirtualFolders().
|
private |
Definition at line 696 of file cbproject.h.
Referenced by DefineVirtualBuildTarget(), GetExpandedVirtualBuildTargetGroup(), GetFirstValidBuildTargetName(), GetVirtualBuildTargetGroup(), GetVirtualBuildTargets(), HasVirtualBuildTarget(), RemoveBuildTarget(), RemoveVirtualBuildTarget(), RenameBuildTarget(), and ReOrderTargets().