]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/modelCDMFolder.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / modelCDMFolder.cpp
index 73312b64fbae52a4c1c1fac588a8fcce733cb6c9..8122ebb063103d94cc23c4bf16b8008ab9e828db 100644 (file)
@@ -126,8 +126,18 @@ bool modelCDMFolder::CreateFolder(const std::string& name, std::string*& result,
 
 bool modelCDMFolder::OpenCMakeListsFile(std::string*& result)
 {
-  //TODO: implement method
-  return true;
+  if (this->CMakeLists == NULL)
+    {
+      result = new std::string("There's no CMakeLists file to open.");
+      return false;
+    }
+  if (!CDMUtilities::openTextEditor(this->CMakeLists->GetPath()))
+    return true;
+  else
+    {
+      result = new std::string("Couldn't open CMakeLists file.");
+      return false;
+    }
 }
 
 const bool modelCDMFolder::Refresh(std::string*& result)