]> Creatis software - crea.git/commitdiff
Feature #1711 CreaDevManager application implementation
authorDaniel Gonzalez <daniel.gonzalez@creatis.insa-lyon.fr>
Wed, 24 Apr 2013 11:41:26 +0000 (13:41 +0200)
committerDaniel Gonzalez <daniel.gonzalez@creatis.insa-lyon.fr>
Wed, 24 Apr 2013 11:41:26 +0000 (13:41 +0200)
Neature: Now detecting included 3rd party libraries in Projects using Regular Expressions. Also including and excluding them with regex.

lib/creaDevManagerLib/modelCDMProject.cpp
lib/creaDevManagerLib/modelCDMProject.h
lib/creaDevManagerLib/wxCDMProjectConfigurationDialog.cpp [new file with mode: 0644]
lib/creaDevManagerLib/wxCDMProjectConfigurationDialog.h [new file with mode: 0644]
lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.cpp
lib/creaDevManagerLib/wxCDMProjectDescriptionPanel.h

index c39463376e247080cecea63f49a45723ac5e4de9..dff1b63728b2fe054d5514cd4d4e9d430b717a06 100644 (file)
@@ -40,6 +40,7 @@
 #include <algorithm>
 #include <fstream>
 #include <ctime>
+#include <boost/regex.hpp>
 
 #include "CDMUtilities.h"
 #include "creaWx.h"
@@ -1100,3 +1101,206 @@ bool modelCDMProject::SetPackageInclude(const std::string& package_name, const b
     }
   return false;
 }
+
+std::map<std::string, bool> modelCDMProject::Get3rdPartyLibraries()
+{
+  std::map<std::string, std::string> correspondence;
+  correspondence["USE_CREA"] = "Crea";
+  correspondence["USE_GDCM"] = "GDCM";
+  correspondence["USE_GDCM_VTK"] = "GDCM_VTK";
+  correspondence["USE_GDCM2"] = "GDCM2";
+  correspondence["USE_WXWIDGETS"] = "WxWidgets";
+  correspondence["USE_KWWIDGETS"] = "KWWidgets";
+  correspondence["USE_VTK"] = "VTK";
+  correspondence["USE_ITK"] = "ITK";
+  correspondence["USE_BOOST"] = "Boost";
+
+  std::map<std::string, bool> res;
+  res["Crea"] = false;
+  res["GDCM"] = false;
+  res["GDCM_VTK"] = false;
+  res["GDCM2"] = false;
+  res["WxWidgets"] = false;
+  res["KWWidgets"] = false;
+  res["VTK"] = false;
+  res["ITK"] = false;
+  res["Boost"] = false;
+
+  if (this->HasCMakeLists())
+    {
+      std::string CMfile = CDMUtilities::readFile(this->CMakeLists->GetPath().c_str());
+
+      boost::regex expression("^\\h*SET([\\s]|#[^\\n]*\\n)*\\(([\\s]|#[^\\n]*\\n)*USE_\\w+\\s+ON");
+      std::string::const_iterator start, end;
+      start = CMfile.begin();
+      end = CMfile.end();
+      boost::match_results<std::string::const_iterator> what;
+      boost::match_flag_type flags = boost::match_default;
+      while(boost::regex_search(start, end, what, expression, flags))
+        {
+          std::cout << what[0].str() << std::endl;
+          boost::regex expression1 = boost::regex("USE_\\w+");
+          std::string::const_iterator start1, end1;
+          start1 = what[0].first;
+          end1 = what[0].second;
+          boost::match_results<std::string::const_iterator> what1;
+          if(boost::regex_search(start1, end1, what1, expression1, flags))
+            {
+              std::string dete = what1.str();
+              CDMUtilities::normalizeStr(dete);
+              std::cout << dete << std::endl;
+              if(correspondence.find(dete) != correspondence.end())
+                res[correspondence[dete]] = true;
+            }
+          start = what[0].second;
+        }
+    }
+
+  return res;
+}
+
+bool modelCDMProject::Set3rdPartyLibrary(const std::string& library_name,
+    const bool& toInclude)
+{
+  std::map<std::string, std::string> correspondence;
+  correspondence["Crea"] = "USE_CREA";
+  correspondence["GDCM"] = "USE_GDCM";
+  correspondence["GDCM_VTK"] = "USE_GDCM_VTK";
+  correspondence["GDCM2"] = "USE_GDCM2";
+  correspondence["WxWidgets"] = "USE_WXWIDGETS";
+  correspondence["KWWidgets"] = "USE_KWWIDGETS";
+  correspondence["VTK"] = "USE_VTK";
+  correspondence["ITK"] = "USE_ITK";
+  correspondence["Boost"] = "USE_BOOST";
+
+  if (correspondence.find(library_name) != correspondence.end())
+    {
+      std::string library_command = correspondence[library_name];
+
+      if (this->HasCMakeLists())
+        {
+          std::string CMfile = CDMUtilities::readFile(this->CMakeLists->GetPath().c_str());
+          std::string resCMfile = "";
+
+          std::string::const_iterator start, end;
+          boost::match_results<std::string::const_iterator> what, tmp;
+          boost::match_flag_type flags = boost::match_default;
+          bool found = false;
+
+          start = CMfile.begin();
+          end = CMfile.end();
+
+          //search for existing inclusions
+          boost::regex expression("^\\h*SET([\\s]|#[^\\n]*\\n)*\\(([\\s]|#[^\\n]*\\n)*" + library_command + "\\s+ON\\s*\\)");
+          while(boost::regex_search(start, end, what, expression, flags))
+            {
+              found = true;
+              resCMfile += what.prefix().str();
+              if(!toInclude)
+                {
+                  std::string dete = what.str();
+                  int pos = dete.find("ON",0);
+                  dete.replace(pos, 2, "OFF");
+                  resCMfile += dete;
+                }
+              else
+                resCMfile += what.str();
+              tmp = what;
+              start = what[0].second;
+            }
+
+          if (found)
+            resCMfile += tmp.suffix().str();
+          else
+            {
+              start = CMfile.begin();
+              end = CMfile.end();
+
+              //search for existing exclusions
+              boost::regex expression("^\\h*SET([\\s]|#[^\\n]*\\n)*\\(([\\s]|#[^\\n]*\\n)*" + library_command + "\\s+OFF\\s*\\)");
+              while(boost::regex_search(start, end, what, expression, flags))
+                {
+                  found = true;
+                  resCMfile += what.prefix().str();
+                  if(toInclude)
+                    {
+                      std::string dete = what.str();
+                      int pos = dete.find("OFF",0);
+                      dete.replace(pos, 3, "ON");
+                      resCMfile += dete;
+                    }
+                  else
+                    resCMfile += what.str();
+                  tmp = what;
+                  start = what[0].second;
+                }
+
+              if (found)
+                resCMfile += tmp.suffix().str();
+              else
+                {
+                  start = CMfile.begin();
+                  end = CMfile.end();
+
+                  //search for existing commented inclusions
+                  expression = boost::regex("^\\h*#+\\h*SET([\\s]|#[^\\n]*\\n)*\\(([\\s]|#[^\\n]*\\n)*" + library_command + "\\s+ON\\s*\\)");
+                  while(boost::regex_search(start, end, what, expression, flags))
+                    {
+                      found = true;
+                      resCMfile += what.prefix().str();
+                      if(toInclude)
+                        {
+                          std::string dete = what.str();
+                          for (int i = 0; i < dete.size(); ++i) {
+                            if(dete[i] == '#')
+                              {
+                                dete.erase(i,1);
+                                i--;
+                              }
+                          }
+                          resCMfile += dete;
+                        }
+                      else
+                        resCMfile += what.str();
+
+                      tmp = what;
+                      start = what[0].second;
+                    }
+
+                  if (found)
+                    resCMfile += tmp.suffix().str();
+                  else
+                    {
+                      if(toInclude)
+                        {
+                          start = CMfile.begin();
+                          end = CMfile.end();
+
+                          //search for position to insert
+                          expression = boost::regex("^\\h*#\\h*Libraries\\/tools used\\h*$");
+                          if(boost::regex_search(start, end, what, expression, flags))
+                            {
+                              found = true;
+                              resCMfile += what.prefix().str();
+                              resCMfile += what.str();
+                              resCMfile += "\nSET(" + library_command + " ON)";
+                              resCMfile += what.suffix().str();
+                            }
+                        }
+                      else
+                        {
+                          found = true;
+                        }
+                    }
+                }
+            }
+          if (!found) {
+            return false;
+          }
+          else
+            return CDMUtilities::writeFile(this->CMakeLists->GetPath().c_str(), resCMfile);
+        }
+    }
+
+  return false;
+}
index f354db9e51c6e3e56aa73f82a79a8b1204b93524..a3459d77dfb5a87753cfa5f0969493f932298422 100644 (file)
@@ -267,6 +267,18 @@ public:
    */
   bool SetPackageInclude(const std::string& package_name, const bool& toInclude);
 
+  /**
+   * Checks the project folder's CMakeLists file to check which third party libraries are enabled.
+   * @return A map with the name of the library and if it's included in the CMakeLists file.
+   */
+  std::map<std::string, bool> Get3rdPartyLibraries();
+
+  /**
+   * Sets the 3rd party library inclusion in the CMakeLists file.
+   * @return if the operation was successful.
+   */
+  bool Set3rdPartyLibrary(const std::string& library_name, const bool& toInclude);
+
 
 private:
 
diff --git a/lib/creaDevManagerLib/wxCDMProjectConfigurationDialog.cpp b/lib/creaDevManagerLib/wxCDMProjectConfigurationDialog.cpp
new file mode 100644 (file)
index 0000000..d26fbb3
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
+#                        pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and 
+#  abiding by the rules of distribution of free software. You can  use, 
+#  modify and/ or redistribute the software under the terms of the CeCILL-B 
+#  license as circulated by CEA, CNRS and INRIA at the following URL 
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability. 
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ 
+ */
+
+
+/*
+ * wxCDMProjectConfigurationDialog.cpp
+ *
+ *  Created on: 6/4/2013
+ *      Author: Daniel Felipe Gonzalez Obando
+ */
+
+#include "wxCDMProjectConfigurationDialog.h"
+
+#include "creaDevManagerIds.h"
+
+BEGIN_EVENT_TABLE(wxCDMProjectConfigurationDialog, wxDialog)
+EVT_BUTTON(wxID_OK, wxCDMProjectConfigurationDialog::OnFinish)
+EVT_CHECKBOX(ID_CHECK_INCLUDE_3RDLIBRARY, wxCDMProjectConfigurationDialog::On3rdLibraryIncludeChange)
+END_EVENT_TABLE()
+
+wxCDMProjectConfigurationDialog::wxCDMProjectConfigurationDialog(
+    wxWindow* parent,
+    modelCDMProject* project,
+    wxWindowID id,
+    const wxString& caption,
+    const wxPoint& position,
+    const wxSize& size,
+    long style
+)
+{
+  this->project = project;
+  wxCDMProjectConfigurationDialog::Create(parent, id, caption, position, size, style);
+}
+
+wxCDMProjectConfigurationDialog::~wxCDMProjectConfigurationDialog()
+{
+}
+
+bool wxCDMProjectConfigurationDialog::Create(
+    wxWindow* parent,
+    wxWindowID id,
+    const wxString& caption,
+    const wxPoint& position,
+    const wxSize& size,
+    long int style
+)
+{
+  wxDialog::Create(parent, id, caption, position, size, style);
+
+  this->CreateControls();
+
+  return TRUE;
+}
+
+void wxCDMProjectConfigurationDialog::CreateControls()
+{
+
+  wxBoxSizer* v_sizer1 = new wxBoxSizer(wxVERTICAL);
+
+
+  wxStaticText* title = new wxStaticText(this, wxID_ANY, wxT("Please select the libraries that are used in this project."), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);//new wxRichTextCtrl(this,wxID_ANY, wxString("Create a new project"), wxDefaultPosition, wxDefaultSize, wxRE_READONLY);
+  v_sizer1->Add(title, 0, wxEXPAND | wxALIGN_LEFT | wxALL, 5);
+
+  wxScrolledWindow* includesPanel = new wxScrolledWindow(this);
+  includesPanel->FitInside();
+  includesPanel->SetScrollRate(5,5);
+
+  wxBoxSizer* includesPanelSizer = new wxBoxSizer(wxVERTICAL);
+
+  //Third Party Libraries
+  wxStaticText* Title1 = new wxStaticText(includesPanel, wxID_ANY, wxT("Third Party Libraries:"));
+  wxFont font = Title1->GetFont();
+  font.SetWeight(wxFONTWEIGHT_BOLD);
+  Title1->SetFont(font);
+  includesPanelSizer->Add(Title1, 0, wxEXPAND);
+
+  //inclusion data
+  std::map<std::string, bool> inclusions = this->project->Get3rdPartyLibraries();
+  //includesGrid Sizer
+  wxFlexGridSizer* includesGridSizer = new wxFlexGridSizer(inclusions.size()+1, 2, 0, 5);
+
+  wxStaticText* ChBTitle = new wxStaticText(
+      includesPanel,
+      wxID_ANY,
+      wxT("Included"),
+      wxDefaultPosition,
+      wxDefaultSize,
+      wxALIGN_CENTER
+    );
+  wxStaticText* LNmTitle = new wxStaticText(
+      includesPanel,
+      wxID_ANY,
+      wxT("Library Name"),
+      wxDefaultPosition,
+      wxDefaultSize,
+      wxALIGN_LEFT
+    );
+
+  includesGridSizer->Add(ChBTitle, 1, wxEXPAND);
+  includesGridSizer->Add(LNmTitle, 1, wxEXPAND);
+
+  for (std::map<std::string, bool>::iterator it = inclusions.begin(); it != inclusions.end(); ++it) {
+    wxCheckBox* ChBIncl = new wxCheckBox(
+        includesPanel, ID_CHECK_INCLUDE_3RDLIBRARY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT
+      );
+    ChBIncl->SetToolTip(crea::std2wx(
+        "When this box is checked the " + it->first + " library\n"
+        "is included in the project configuration for\n"
+        "this package including the following instruction\n"
+        "in the package's folder CMakeLists.txt file:\n"
+        "SET(${BBTK_PACKAGE_NAME}_USE_" + it->first+ "  ON)\n"
+        ));
+    ChBIncl->SetName(crea::std2wx(it->first));
+    ChBIncl->SetValue(it->second);
+    includesGridSizer->Add(ChBIncl, 0, wxEXPAND);
+
+    wxStaticText* LNmIncl = new wxStaticText(includesPanel, wxID_ANY, crea::std2wx(it->first));
+    includesGridSizer->Add(LNmIncl, 1, wxEXPAND);
+  }
+
+  includesGridSizer->AddGrowableCol(1,1);
+
+  includesPanelSizer->Add(includesGridSizer, 1, wxEXPAND | wxLEFT, 5);
+
+  includesPanel->SetSizer(includesPanelSizer);
+
+  v_sizer1->Add(includesPanel, 1, wxEXPAND | wxALL, 10);
+
+  v_sizer1->Add(new wxButton(this, wxID_OK, wxT("Close")), 0, wxALIGN_CENTER | wxRIGHT | wxBOTTOM, 30);
+
+  SetSizer(v_sizer1);
+}
+
+void wxCDMProjectConfigurationDialog::OnFinish(wxCommandEvent& event)
+{
+  this->EndModal(wxID_OK);
+}
+
+void wxCDMProjectConfigurationDialog::On3rdLibraryIncludeChange(
+    wxCommandEvent& event)
+{
+  if(this->project->Set3rdPartyLibrary(crea::wx2std(((wxCheckBox*)event.GetEventObject())->GetName()), ((wxCheckBox*)event.GetEventObject())->GetValue()))
+    ((wxCheckBox*)event.GetEventObject())->SetValue(((wxCheckBox*)event.GetEventObject())->GetValue());
+  else
+    ((wxCheckBox*)event.GetEventObject())->SetValue(!((wxCheckBox*)event.GetEventObject())->GetValue());
+}
diff --git a/lib/creaDevManagerLib/wxCDMProjectConfigurationDialog.h b/lib/creaDevManagerLib/wxCDMProjectConfigurationDialog.h
new file mode 100644 (file)
index 0000000..b500412
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
+#                        pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+#  This software is governed by the CeCILL-B license under French law and 
+#  abiding by the rules of distribution of free software. You can  use, 
+#  modify and/ or redistribute the software under the terms of the CeCILL-B 
+#  license as circulated by CEA, CNRS and INRIA at the following URL 
+#  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
+#  or in the file LICENSE.txt.
+#
+#  As a counterpart to the access to the source code and  rights to copy,
+#  modify and redistribute granted by the license, users are provided only
+#  with a limited warranty  and the software's author,  the holder of the
+#  economic rights,  and the successive licensors  have only  limited
+#  liability. 
+#
+#  The fact that you are presently reading this means that you have had
+#  knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ 
+*/ 
+
+
+/*
+ * wxCDMProjectConfigurationDialog.h
+ *
+ *  Created on: 24/4/2013
+ *      Author: Daniel Felipe Gonzalez Obando
+ */
+
+#ifndef WXCDMPROJECTCONFIGURATIONDIALOG_H_
+#define WXCDMPROJECTCONFIGURATIONDIALOG_H_
+
+#include <creaWx.h>
+#include <wx/dialog.h>
+
+#include "modelCDMProject.h"
+
+/**
+ * Project Configuration Dialog
+ */
+class wxCDMProjectConfigurationDialog : public wxDialog
+{
+  DECLARE_EVENT_TABLE()
+public:
+  /**
+   * Project Configuration Dialog Constructor.
+   * @param parent Parent window.
+   * @param project Project Description reference.
+   * @param id Dialog ID. By default wxID_ANY.
+   * @param caption Dialog label. By default "Project Library Configuration".
+   * @param position Dialog position. By default wxDefaultPosition.
+   * @param size Dialog size. By default 350, 370.
+   * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE.
+   */
+  wxCDMProjectConfigurationDialog(
+      wxWindow* parent,
+      modelCDMProject * project,
+      wxWindowID id = wxID_ANY,
+      const wxString& caption = wxT("Project Library Configuration"),
+      const wxPoint& position = wxDefaultPosition,
+      const wxSize& size = wxSize(350,370),
+      long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
+  );
+  /**
+   * Destructor.
+   */
+  ~wxCDMProjectConfigurationDialog();
+  /**
+   * Project Configuration Dialog Creator.
+   * @param parent Parent window.
+   * @param id Dialog ID. By default wxID_ANY.
+   * @param caption Dialog label. By default "Project Library Configuration".
+   * @param position Dialog position. By default wxDefaultPosition.
+   * @param size Dialog size. By default 350, 370.
+   * @param style Dialog style. By default wxDEFAULT_DIALOG_STYLE.
+   * @return if the creation was successful.
+   */
+  bool Create(
+      wxWindow* parent,
+      wxWindowID id = wxID_ANY,
+      const wxString& caption = wxT("Project Library Configuration"),
+      const wxPoint& position = wxDefaultPosition,
+      const wxSize& size = wxSize(350,370),
+      long style = wxDEFAULT_DIALOG_STYLE
+  );
+
+protected:
+  /**
+   * Creates the help controls (text and buttons).
+   */
+  void CreateControls();
+
+//attributes
+private:
+  /**
+   * Project model reference.
+   */
+  modelCDMProject* project;
+
+//handlers
+protected:
+  /**
+   * Handler to close configuration dialog.
+   * @param event Unused.
+   */
+  void OnFinish(wxCommandEvent& event);
+
+  /**
+   * Handler when a third party library include is pressed.
+   * @param event checkbox event.
+   */
+  void On3rdLibraryIncludeChange(wxCommandEvent& event);
+
+};
+
+#endif /* WXCDMPROJECTCONFIGURATIONDIALOG_H_ */
index a6f121b7d02b26c624475e9c5260efd2b5b8a4e1..ac170e0a7f41b9defd3bbe360445678115f6a7ed 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "wxCDMMainFrame.h"
 #include "wxCDMNewPackageDialog.h"
+#include "wxCDMProjectConfigurationDialog.h"
 
 #include "wxCDMProjectHelpDialog.h"
 
@@ -47,6 +48,7 @@ BEGIN_EVENT_TABLE(wxCDMProjectDescriptionPanel, wxPanel)
 EVT_BUTTON(ID_BUTTON_GOTO_PACKAGE_MANAGER, wxCDMProjectDescriptionPanel::OnBtnManagePackages)
 EVT_BUTTON(ID_BUTTON_GOTO_LIB_MANAGER, wxCDMProjectDescriptionPanel::OnBtnManageLibraries)
 EVT_BUTTON(ID_BUTTON_GOTO_APPLI_MANAGER, wxCDMProjectDescriptionPanel::OnBtnManageApplications)
+EVT_BUTTON(ID_BUTTON_CHOOSE, wxCDMProjectDescriptionPanel::OnBtnConfigProject)
 EVT_BUTTON(ID_BUTTON_EDIT_CMAKELISTSFILE, wxCDMProjectDescriptionPanel::OnBtnEditCMakeLists)
 EVT_BUTTON(ID_BUTTON_SET_BUILD_PATH, wxCDMProjectDescriptionPanel::OnBtnSetBuildPath)
 EVT_BUTTON(ID_BUTTON_OPEN_BUILD_PATH, wxCDMProjectDescriptionPanel::OnBtnOpenBuild)
@@ -188,7 +190,7 @@ void wxCDMProjectDescriptionPanel::CreateControls()
   wxBoxSizer* actionsPanelSizer = new wxBoxSizer(wxHORIZONTAL);
 
   //actionsGrid Sizer
-  wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(2, 2, 9, 15);
+  wxFlexGridSizer* actionsGridSizer = new wxFlexGridSizer(3, 2, 9, 15);
   //buttons
   // lib manager
   //   show only if there is a lib folder
@@ -215,6 +217,11 @@ void wxCDMProjectDescriptionPanel::CreateControls()
       appliMgrbt->Connect(wxEVT_LEAVE_WINDOW, (wxObjectEventFunction)(wxEventFunction)(wxMouseEventFunction)&wxCDMProjectDescriptionPanel::OnAppliMouseExit,NULL,this);
       actionsGridSizer->Add(appliMgrbt, 1, wxALL | wxEXPAND, 5);
     }
+  // edit 3rd Party libraries
+  wxButton* configPrjbt = new wxButton(actionsPanel, ID_BUTTON_CHOOSE, _T("D. 3rd Party Libraries Manager"));
+  configPrjbt->SetToolTip(wxT("Select which third party libraries will be used in this project."));
+  actionsGridSizer->Add(configPrjbt, 1, wxALL | wxEXPAND, 5);
+
   // edit CMakeLists file
   wxButton* editCMakebt = new wxButton(actionsPanel, ID_BUTTON_EDIT_CMAKELISTSFILE, _T("Edit CMakeLists File"));
   editCMakebt->SetToolTip(wxT("Edit the CMakeLists.txt file of this project."));
@@ -297,6 +304,13 @@ void wxCDMProjectDescriptionPanel::OnBtnManageApplications(wxCommandEvent& event
   event.Skip();
 }
 
+void wxCDMProjectDescriptionPanel::OnBtnConfigProject(wxCommandEvent& event)
+{
+  wxCDMProjectConfigurationDialog* dialog = new wxCDMProjectConfigurationDialog(this,this->project);
+  long userResponse;
+  userResponse = dialog->ShowModal();
+}
+
 void wxCDMProjectDescriptionPanel::OnBtnEditCMakeLists(wxCommandEvent& event)
 {
   std::string* result;
index d210e32ac2281dc941a888c27a1f01d9f5bc1bc0..1b7972670f621b527249e78e0f76472f0f2d8bdc 100644 (file)
@@ -136,6 +136,10 @@ protected:
    * Handles when the manage applications button is pressed.
    */
   void OnBtnManageApplications(wxCommandEvent& event);
+  /**
+   * Handles when the 3rd party libraries manager button is pressed.
+   */
+  void OnBtnConfigProject(wxCommandEvent& event);
   /**
    * Handles when the open cmakelists file button is pressed.
    */