#include <WWhizInterface2.h>
Public Types | |
typedef void (* | TagRefreshCallback )(const TagCallbackInfo &info) |
The definition of the callback called from the tag refresh. | |
Public Methods | |
virtual void | Reserved0 ()=0 |
Initializes the WWhizInterface. | |
virtual WWhizProjectList& | GetProjectList (void)const=0 |
virtual WWhizFileList& | GetFileList (void)const=0 |
virtual CString | GetWorkspaceName (void)const=0 |
virtual const CString& | GetWorkspaceLocation (void)const=0 |
virtual void | SetWorkspaceLocation (void)=0 |
DevStudio provides no function to return the location of the workspace, so WWhizInterface provides this functionality. More... | |
virtual const CString& | GetExtraFilename (void)=0 |
virtual bool | GetCurrentFilename (CString &filename)const=0 |
virtual WWhizProject* | GetCurrentProject ()const=0 |
virtual void | ResolveFilename (const CString &rootDir,CString &filename)=0 |
Resolves the filename when it contains environment variables and relative paths. More... | |
virtual bool | RefreshFileList (void)=0 |
It is wise to refresh the file list before using any file or tag commands. More... | |
virtual void | AddProject (CString projectName)=0 |
Adds a project to the list of WWhizInterface projects. More... | |
virtual void | RemoveAllFiles (void)=0 |
Performs a full cleanup of the WWhizInterface internal structures. | |
virtual void | Reserved1 ()=0 |
virtual const WWhizTag* | GetTagMatchHead (void)const=0 |
virtual const WWhizTag* | GetTagMatchTail (void)const=0 |
virtual int | GetTagMatchCount (void)const=0 |
virtual const WWhizTag* | GetLastMatchedTag (void)const=0 |
virtual const WWhizTagList& | GetTagList (void)const=0 |
virtual void | RemoveAllTags (void)=0 |
Performs a full cleanup of the WWhizInterface internal tag structures. | |
virtual void | MatchTag (const WWhizTagList &tags,LPCTSTR name,WWhizTag::Type forceType=WWhizTag::LAST_TYPE)const=0 |
Matches [name] against a tag list. More... | |
virtual bool | GotoTag (const WWhizTag *tag)const=0 |
If the WWhizReg registration interface exists and DevStudio is loaded, the appropriate source file is opened and the caret is positioned. More... | |
virtual void | SetTagCallback (TagRefreshCallback callback,void *userData)=0 |
Before calling RefreshTagList(), a tag callback may be set through this function. More... | |
virtual void | RefreshTagList (bool forceRefresh=false,bool forceSave=false)=0 |
Refreshes the tag list. More... | |
virtual void | LoadTags ()=0 |
Loads a list of saved tags from the disk. | |
virtual void | SaveTags ()=0 |
Saves the list of tags to the disk. More... | |
virtual bool | GetTagUseType (WWhizTag::Type type)=0 |
virtual void | SetTagUseType (WWhizTag::Type type,bool use)=0 |
Sets the tag types considered for the MatchTag() routine. More... | |
virtual WWhizFileList& | GetGlobalFileList (void)const=0 |
virtual bool | RefreshGlobalFileList (void)=0 |
Refreshes the global file list. | |
virtual WWhizConfig& | GetConfig ()=0 |
virtual CTime | GetLastFileRefreshTime ()const=0 |
virtual CTime | GetLastTagRefreshTime ()const=0 |
virtual void | SetWWhizReg (WWhizReg *wwhizReg)=0 |
Sets a pointer to the Workspace Whiz! registration module. More... | |
virtual WWhizFileList& | GetActiveFileList (void)const=0 |
virtual DWORD | GetVersion (void)const=0 |
virtual void | AddChangedFile (CString filename)=0 |
For better efficiency, WWhizInterface maintains a list of files to check for tag changes. More... | |
virtual void | CheckActiveFilesForChanges ()=0 |
After calling CheckActiveFilesForChanges(), the next tag refresh will check every file in the workspace for changes. | |
virtual const WWhizTag* | GetTagScope (const CString &filename,UINT lineNumber)=0 |
Retrieves the tag whose scope contains the specified line number. More... | |
virtual const CString& | GetWorkspaceFullPath (void)const=0 |
All facilities for project information, file lists, and tag lists are accessible from this interface.
Note: Any filename passed to any WWhizInterface function is passed through ResolveFilename().
|
The definition of the callback called from the tag refresh.
|
|
For better efficiency, WWhizInterface maintains a list of files to check for tag changes. If a file is modified, it should be added to WWhizInterface via the AddChangedFile() function.
|
|
Adds a project to the list of WWhizInterface projects. Projects (.dsp) or workspaces (.dsw) are the only file types that can be added.
|
|
After calling CheckActiveFilesForChanges(), the next tag refresh will check every file in the workspace for changes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Retrieves the tag whose scope contains the specified line number.
|
|
|
|
|
|
|
|
|
|
|
|
If the WWhizReg registration interface exists and DevStudio is loaded, the appropriate source file is opened and the caret is positioned.
|
|
Loads a list of saved tags from the disk.
|
|
Matches [name] against a tag list. The list of matched tags can be retrieved through GetTagMatchHead(), GetTagMatchTail(), and GetTagMatchCount(). Additionally, WWhizTag::GetMatchNext() and WWhizTag::GetMatchPrev() may be used for traversal.
|
|
It is wise to refresh the file list before using any file or tag commands. This is especially true when running in DevStudio. Since DevStudio provides no COM method of retrieving the list of files in a project, WWhizInterface is only able to retrieve its file list by parsing .dsp files. This has at least one primary disadvantage. If a change is made to the project in DevStudio, the project MUST be saved before WWhizInterface can process the change. RefreshFileList() does a scan of .dsp files to determine if updates are necessary. This scan is very quick, so it is advised the application calls RefreshFileList() before each set of file or tag commands. When in DevStudio, RefreshFileList() automatically adds any projects in the open workspace. If the Workspace Whiz! registration interface is available, ExtraFiles are added, also. |
|
Refreshes the global file list.
|
|
Refreshes the tag list. If WWhizConfig::GetAutoRefreshTags() is not set and [forceRefresh] is not set, then the tags aren't refreshed.
|
|
Performs a full cleanup of the WWhizInterface internal structures.
|
|
Performs a full cleanup of the WWhizInterface internal tag structures.
|
|
Initializes the WWhizInterface.
|
|
|
|
Resolves the filename when it contains environment variables and relative paths. Any filename can contain environment variables. This is especially true of DevStudio. Filenames containing environment variables are of the form: \CoolProject\Cool.dsw
|
|
Saves the list of tags to the disk. The tags are saved to the file Tags.WW in the directory specified by GetWorkspaceLocation(). |
|
Before calling RefreshTagList(), a tag callback may be set through this function.
|
|
Sets the tag types considered for the MatchTag() routine. By default, all tag types are on.
|
|
Sets a pointer to the Workspace Whiz! registration module.
|
|
DevStudio provides no function to return the location of the workspace, so WWhizInterface provides this functionality. SetWorkspaceLocation() obtains the workspace location through the WWhizInterfaceHelper.pkg file, installed via the WWhizInterfaceInstaller. If this is unavailable, then SetWorkspaceLocation() works by obtaining the current working directory when the workspace opens. This is best done by calling WWhizInterface's SetWorkspaceLocation() through the DevStudio automation function: HRESULT CCommands::XApplicationEvents::WorkspaceOpen(); If the WWhizInterface facilities are being used without DevStudio's assistance, then set the current working directory to the directory containing the workspace and call SetWorkspaceLocation().
_chdir("c:/Projects/MyProject"); g_wwhizInterface->SetWorkspaceLocation(); g_wwhizInterface->AddProject("c:/Projects/MyProject/MyProject.dsw"); Note: A call to SetWorkspaceLocation() is required, because Workspace Whiz! files, such as ExtraFiles.WW and Tags.WW, are stored in the directory returned via GetWorkspaceLocation(). |