19#ifndef DEPENDENCYDIALOG_HPP
20#define DEPENDENCYDIALOG_HPP
26#include "../controls/treelistctrl.h"
27#include "../../kernel/core/procedure/procedurelibrary.hpp"
28#include "../../kernel/core/procedure/dependency.hpp"
29#include "../../common/datastructures.h"
41 std::map<std::string, DependencyList>
m_deps;
45 void insertChilds(wxTreeItemId item,
const std::string& sParentProcedure);
46 bool findInParents(wxTreeItemId item,
const std::string& sCurrProc);
49 std::vector<std::string>
parseNameSpace(std::string sNameSpace)
const;
50 int calculateClusterLevel(
const std::vector<std::string>& sCurrentNameSpace,
const std::vector<std::string>& sNewNameSpace);
58 DependencyDialog(wxWindow* parent, wxWindowID
id,
const wxString& title,
const std::string& mainfile,
ProcedureLibrary& lib,
long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
This class represents a dialog showing the dependencies of a selected procedure file.
std::string m_mainProcedure
DependencyDialog(wxWindow *parent, wxWindowID id, const wxString &title, const std::string &mainfile, ProcedureLibrary &lib, long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Constructor. Creates the UI elements and calls the dependency walker.
void OnMenuEvent(wxCommandEvent &event)
This private member function handles all menu events yielded by clicking on an item of the popup menu...
wxTreeItemId m_selectedItem
void OnItemRightClick(wxTreeEvent &event)
This private member function shows the popup menu on a right click on any tree item.
std::map< std::string, DependencyList > m_deps
void calculateDependencies(ProcedureLibrary &lib, const std::string &mainfile)
This private member function calculates the dependencies of the current selected main file....
std::vector< std::string > parseNameSpace(std::string sNameSpace) const
Convert a name space into a vector of single namespaces for easier comparison.
void CreateDotFile()
This member function handles the creation of GraphViz DOT files.
void CollapseAll(wxTreeItemId item)
This private member function will collapse the current item and all corresponding subitems.
void OnItemActivate(wxTreeEvent &event)
This private member function is the event handler for double clicking on an item in the dependency tr...
int calculateClusterLevel(const std::vector< std::string > &sCurrentNameSpace, const std::vector< std::string > &sNewNameSpace)
This private member function calculates the level of nested clusters needed to correctly visualize th...
void fillDependencyTree()
This private member function fills the tree in the UI with the calculated dependencies....
wxcode::wxTreeListCtrl * m_dependencyTree
bool findInParents(wxTreeItemId item, const std::string &sCurrProc)
This private member function searches the procedure call in the parents of the current branch.
void insertChilds(wxTreeItemId item, const std::string &sParentProcedure)
This private member function is called recursively to fill the childs of a procedure call....
This class manages all already read and possibly pre-parsed procedure files for easier and faster acc...