[Mobies-commit] [commit] r3749 - UDM/trunk/src/UML GME/Interpreter
ksmyth at redhat1.isis.vanderbilt.edu
ksmyth at redhat1.isis.vanderbilt.edu
Mon May 16 14:37:07 CDT 2011
Author: ksmyth
Date: Mon May 16 14:37:07 2011
New Revision: 3749
Log:
Start file picker next to currently-open file
Modified:
UDM/trunk/src/UML GME/Interpreter/BONComponent.cpp
UDM/trunk/src/UML GME/Interpreter/BONComponent.h
Modified: UDM/trunk/src/UML GME/Interpreter/BONComponent.cpp
==============================================================================
--- UDM/trunk/src/UML GME/Interpreter/BONComponent.cpp Mon May 16 10:09:09 2011 (r3748)
+++ UDM/trunk/src/UML GME/Interpreter/BONComponent.cpp Mon May 16 14:37:07 2011 (r3749)
@@ -153,6 +153,7 @@
{
CBuilderFolder *root = builder.GetRootFolder();
IMgaProject *proj = builder.GetProject();
+ COMVERIFY(proj->get_ProjectConnStr(m_strConnection.GetAddress()));
CComPtr<IMgaMetaProject> mproj;
COMVERIFY( proj->get_RootMeta(&mproj));
CBstr pn;
@@ -1667,6 +1668,16 @@
{ //static char UDM_FILTER[] = "XML files (*.xml)|*.xml";
CFileDialog cfdlg(false, FILE_EXT, root->GetName(), OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, UDM_FILTER);
cfdlg.m_ofn.lpstrTitle = "UDM Meta File Location";
+ TCHAR currentMgaPath[MAX_PATH];
+ if (m_strConnection.length() > 4 && wcsnicmp(static_cast<const wchar_t*>(m_strConnection), L"MGA=", 4) == 0) {
+ std::string zsConn = static_cast<const char*>(m_strConnection);
+ TCHAR* filename;
+ if (!GetFullPathName(zsConn.c_str() + 4 /* skip MGA= */, MAX_PATH, currentMgaPath, &filename) || filename == 0) {
+ } else {
+ *filename = _T('\0');
+ cfdlg.GetOFN().lpstrInitialDir = currentMgaPath;
+ }
+ }
if (cfdlg.DoModal() != IDOK)
{ throw int_exception("");
}
Modified: UDM/trunk/src/UML GME/Interpreter/BONComponent.h
==============================================================================
--- UDM/trunk/src/UML GME/Interpreter/BONComponent.h Mon May 16 10:09:09 2011 (r3748)
+++ UDM/trunk/src/UML GME/Interpreter/BONComponent.h Mon May 16 14:37:07 2011 (r3749)
@@ -48,6 +48,8 @@
#include "Uml.h"
+#include "Comdef.h"
+
class CClassDiagramBuilder;
class CClassBuilder;
@@ -101,6 +103,7 @@
//CBuilderFolderList packageList;
CPackageBuilderList packageList;
::Uml::Diagram cross_uml_dgr;
+ _bstr_t m_strConnection;
public:
static CComponent *theInstance;
More information about the Mobies-commit
mailing list