[commit] r1096 - in branches/ServiceReleases_for_10.8.18: . Doc GME/Core GME/Gme GME/Mga GME/ObjectInspector GME/Parser Install Tests/GPyUnit/GME-297

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Wed Nov 24 13:04:45 CST 2010


Author: volgy
Date: Wed Nov 24 13:04:45 2010
New Revision: 1096

Log:
Merging changes from the trunk and preparing release 10.11.24.

Added:
   branches/ServiceReleases_for_10.8.18/Tests/GPyUnit/GME-297/test5-correct.mga
      - copied unchanged from r1091, trunk/Tests/GPyUnit/GME-297/test5-correct.mga
   branches/ServiceReleases_for_10.8.18/Tests/GPyUnit/GME-297/test5.mga
      - copied unchanged from r1091, trunk/Tests/GPyUnit/GME-297/test5.mga
Modified:
   branches/ServiceReleases_for_10.8.18/   (props changed)
   branches/ServiceReleases_for_10.8.18/Doc/README_in.txt
   branches/ServiceReleases_for_10.8.18/GME/Core/CoreBinFile.cpp
   branches/ServiceReleases_for_10.8.18/GME/Gme/GMEVersion.h
   branches/ServiceReleases_for_10.8.18/GME/Gme/MgaOpenDlg.cpp
   branches/ServiceReleases_for_10.8.18/GME/Mga/MgaComplexOps.cpp
   branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/Attribute.cpp
   branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/ItemData.cpp
   branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/ItemData.h
   branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/Preference.cpp
   branches/ServiceReleases_for_10.8.18/GME/Parser/MgaParser.cpp
   branches/ServiceReleases_for_10.8.18/GME/Parser/MgaParser.h
   branches/ServiceReleases_for_10.8.18/Install/GME_dyn.wxi
   branches/ServiceReleases_for_10.8.18/Install/symbols.cmd
   branches/ServiceReleases_for_10.8.18/Tests/GPyUnit/GME-297/test.py

Modified: branches/ServiceReleases_for_10.8.18/Doc/README_in.txt
==============================================================================
--- branches/ServiceReleases_for_10.8.18/Doc/README_in.txt	Wed Nov 24 11:49:47 2010	(r1095)
+++ branches/ServiceReleases_for_10.8.18/Doc/README_in.txt	Wed Nov 24 13:04:45 2010	(r1096)
@@ -30,6 +30,19 @@
 1. Release Notes
 ************************************************
 
+Release Notes of Release r10.11.24
+----------------------------------
+  - This is a service release for r10.8.18
+    Hence, it is binary compatible with that.
+  - Fixing GME-316: autofill current filename 
+    in File>SaveAs
+  - Fixing GME-297: moving folder into folder
+  - Implementing GME-265: Description preference 
+    (multiline) of FCOs
+  - Fixing GME-313: Project "Version" value 
+    not imported from XME.
+  
+    
 Release Notes of Release r10.11.15
 ----------------------------------
   - This is a service release for r10.8.18

Modified: branches/ServiceReleases_for_10.8.18/GME/Core/CoreBinFile.cpp
==============================================================================
--- branches/ServiceReleases_for_10.8.18/GME/Core/CoreBinFile.cpp	Wed Nov 24 11:49:47 2010	(r1095)
+++ branches/ServiceReleases_for_10.8.18/GME/Core/CoreBinFile.cpp	Wed Nov 24 13:04:45 2010	(r1096)
@@ -536,7 +536,12 @@
 	if(ifs.eof()) COMTHROW(E_FILEOPEN);
 	ASSERT( len >= 0 );
 
-	b.resize(len);
+	try {
+		b.resize(len);
+	} catch (std::bad_alloc&) {
+		// KMS: could get here if the project is corrupt and len is incorrect
+		COMTHROW(E_OUTOFMEMORY);
+	}
 	if( len > 0 )
 		ifs.read( (char *) &b[0], len);
 }

Modified: branches/ServiceReleases_for_10.8.18/GME/Gme/GMEVersion.h
==============================================================================
--- branches/ServiceReleases_for_10.8.18/GME/Gme/GMEVersion.h	Wed Nov 24 11:49:47 2010	(r1095)
+++ branches/ServiceReleases_for_10.8.18/GME/Gme/GMEVersion.h	Wed Nov 24 13:04:45 2010	(r1096)
@@ -3,7 +3,7 @@
 
 #define GME_VERSION_MAJOR	10		// MAJOR = Last two digits of Year
 #define GME_VERSION_MINOR	11		// MINOR = Month
-#define GME_VERSION_PLEVEL	15		// PATCH LEVEL = Day
+#define GME_VERSION_PLEVEL	24		// PATCH LEVEL = Day
 
 #define _VERSION_STRING2(x)	#x 
 #define _VERSION_STRING(x)	_VERSION_STRING2(x)

Modified: branches/ServiceReleases_for_10.8.18/GME/Gme/MgaOpenDlg.cpp
==============================================================================
--- branches/ServiceReleases_for_10.8.18/GME/Gme/MgaOpenDlg.cpp	Wed Nov 24 11:49:47 2010	(r1095)
+++ branches/ServiceReleases_for_10.8.18/GME/Gme/MgaOpenDlg.cpp	Wed Nov 24 13:04:45 2010	(r1096)
@@ -112,8 +112,21 @@
 		filters.Insert( 0, spec_filter);
 	}
 
+	const char* initialFile = NULL; // NULL or points into currentMgaPath
+	char currentMgaPath[MAX_PATH];
+	if (theApp.isMgaProj()) {
+		CString conn = theApp.connString();
+		const char* zsConn = conn;
+		zsConn += 4; // skip MGA=
+		char* filename;
+		if (!GetFullPathName(zsConn, MAX_PATH, currentMgaPath, &filename) || filename == 0) {
+		} else {
+			initialFile = filename;
+		}
+	}
+
 	CString conn;
-	CFileDialog dlg(flag_isopen ? TRUE : FALSE, NULL, NULL, 
+	CFileDialog dlg(flag_isopen ? TRUE : FALSE, NULL, initialFile, 
 			OFN_EXPLORER | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | 
 			0, filters);
 

Modified: branches/ServiceReleases_for_10.8.18/GME/Mga/MgaComplexOps.cpp
==============================================================================
--- branches/ServiceReleases_for_10.8.18/GME/Mga/MgaComplexOps.cpp	Wed Nov 24 11:49:47 2010	(r1095)
+++ branches/ServiceReleases_for_10.8.18/GME/Mga/MgaComplexOps.cpp	Wed Nov 24 13:04:45 2010	(r1096)
@@ -174,25 +174,25 @@
 	}
 
 	// Notification
-	
-	try 
-	{
-		long chmask = OBJEVENT_PRE_DESTROYED;
-		
+	PreNotify(OBJEVENT_PRE_DESTROYED, CComVariant());
+}
+
+// Added by lph (Taken from PreDeleteNotify) Notification service for precursory object events
+HRESULT FCO::PreNotify(unsigned long changemask, CComVariant param) {
+	COMTRY {
 		CMgaProject::addoncoll::iterator ai, abeg = mgaproject->alladdons.begin(), aend = mgaproject->alladdons.end();
 		if(abeg != aend) 
 		{
-			CComVariant nil;
 			COMTHROW(mgaproject->pushterr(*mgaproject->reserveterr));
 			for(ai = abeg; ai != aend; ) 
 			{
 				CComPtr<CMgaAddOn> t = *ai++;	
 				unsigned long mmask;
-				if((mmask = (t->eventmask & chmask)) != 0) {
+				if((mmask = (t->eventmask & changemask)) != 0) {
 					CComPtr<IMgaObject> tt;
 					getinterface(&tt);
 
-					if(t->handler->ObjectEvent(tt, mmask, nil) != S_OK) {
+					if(t->handler->ObjectEvent(tt, mmask, param) != S_OK) {
 						ASSERT(("Notification failed", false));
 					}
 				    t->notified = true;
@@ -200,11 +200,7 @@
 			}
 			COMTHROW(mgaproject->popterr());
 		}
-	} 
-	catch(hresult_exception&)
-	{
-		ASSERT(0);
-	}
+	} COMCATCH(;)
 }
 
 HRESULT FCO::DeleteObject() { 
@@ -765,7 +761,7 @@
 ///////////////////
 // !!! RECURSIVE 
 ///////////////////
-void ObjTreeCheckINTORelations(CMgaProject *mgaproject, CoreObj &self, coreobjhash &internals) {
+void ObjCheckINTORelations(CMgaProject* mgaproject, CoreObj& self, coreobjhash& internals) {
 	metaid_type n = GetMetaID(self);
 	ASSERT(n >= DTID_MODEL && n <= DTID_SET);
 	if (n == DTID_REFERENCE) {
@@ -865,6 +861,13 @@
 		}
 	}
 	}
+}
+
+
+void ObjTreeCheckINTORelations(CMgaProject *mgaproject, CoreObj &self, coreobjhash &internals) {
+	metaid_type n = GetMetaID(self);
+	ASSERT(n >= DTID_MODEL && n <= DTID_SET);
+	ObjCheckINTORelations(mgaproject, self, internals);
 	
 	if(n == DTID_MODEL) {
 		CoreObjs children = self[ATTRID_FCOPARENT + ATTRID_COLLECTION];
@@ -874,106 +877,13 @@
 	}
 }
 
+
 void ObjTreeCheckINTORelationsFoldersToo(CMgaProject *mgaproject, CoreObj &self, coreobjhash &internals) {
 	metaid_type n = GetMetaID(self);
 	ASSERT(n >= DTID_MODEL && n <= DTID_FOLDER);
 	if ( n >= DTID_MODEL && n <= DTID_SET)
 	{
-
-		if (n == DTID_REFERENCE) {
-			// GME-311: need to delete connections into refport 'conn_seg' iff 
-			//   connection 'rel_owner' is not in internals and 'conn_seg' is the actual connection end (not an intermediary)
-			CoreObjs conn_segs = self[ATTRID_SEGREF + ATTRID_COLLECTION];
-			ITERATE_THROUGH(conn_segs) {
-				CoreObj conn_seg = ITER;
-				metaid_type st = GetMetaID(conn_seg);
-				ASSERT(st == DTID_CONNROLESEG);
-				if (st != DTID_CONNROLESEG) {
-					continue;
-				}
-				CoreObj rel_owner = conn_seg.GetMgaObj();
-				if (!rel_owner) {
-					continue;	// connection might be deleted due to a previous relation
-				}
-				ASSERT(GetMetaID(rel_owner) == DTID_CONNECTION);
-				#ifdef _DEBUG
-				CoreObj role = conn_seg[ATTRID_CONNSEG];
-				CComBSTR conn_name = rel_owner[ATTRID_NAME], role_name = role[ATTRID_NAME];
-				#endif
-				ASSERT(ObjForCore(rel_owner)->simpleconn()); // KMS: don't think we can get here without a simpleconn
-				if (internals.find(rel_owner) == internals.end() && ObjForCore(rel_owner)->simpleconn()) {
-					setcheck(mgaproject, rel_owner, CHK_CHANGED);
-					switch(MODEMASK(MM_CONN, MM_INTO)) {
-					case MM_ERROR: COMTHROW(E_MGA_OP_REFUSED);
-						break;
-					case MM_CLEAR:
-						if (conn_seg[ATTRID_SEGORDNUM] == 1) {
-							ObjForCore(rel_owner)->inDeleteObject();
-							break;
-						}
-					}
-				}
-			}
-		}
-
-
-
-		CoreObjs xrefs = self[ATTRID_XREF + ATTRID_COLLECTION]; 
-		ITERATE_THROUGH(xrefs) {
-			metaid_type st = GetMetaID(ITER);
-			if(st == DTID_SETNODE || st == DTID_CONNROLE) {
-				CoreObj rel_owner = ITER.GetMgaObj();
-				if(internals.find(rel_owner) == internals.end()) {
-					int ttt = st == DTID_CONNROLE ? MM_CONN : MM_SET;
-					setcheck(mgaproject, rel_owner, CHK_CHANGED);
-					switch(MODEMASK(ttt, MM_INTO)) {
-					case MM_ERROR: COMTHROW(E_MGA_OP_REFUSED);
-						break;
-					case MM_CLEAR: 
-						if (st == DTID_CONNROLE && ObjForCore(rel_owner)->simpleconn()) {
-							// GME-297: don't delete connections connecting to refports
-							// (outside connections to inside refports are deleted above)
-							long count = 0;
-							CoreObjs refport_refs = ITER[ATTRID_CONNSEG+ATTRID_COLLECTION]; // i.e. refport containers
-							COMTHROW(refport_refs->get_Count(&count));
-							if (count == 0) {
-								// this connection role is connected directly; it is not connected to a refport
-								ObjForCore(rel_owner)->inDeleteObject();
-							}
-						} else if (MODEFLAG(ttt, MM_FULLDELETE)) {
-							ObjForCore(rel_owner)->inDeleteObject();
-						} 
-						else {
-							CoreObjMark(self, st == DTID_CONNROLE ? OBJEVENT_DISCONNECTED : OBJEVENT_SETEXCLUDED);
-							CoreObjMark(rel_owner, OBJEVENT_RELATION);
-							SingleObjTreeDelete(ITER);
-						}
-						break;
-					}
-				}	
-			}
-		}
-		{
-			CoreObjs refs = self[ATTRID_REFERENCE + ATTRID_COLLECTION]; 
-			ITERATE_THROUGH(refs) {
-				CoreObj rel_owner = ITER;
-				if(internals.find(rel_owner) == internals.end()) {
-					setcheck(mgaproject, rel_owner, CHK_CHANGED);
-					switch(MODEMASK(MM_REF, MM_INTO)) {
-					case MM_ERROR: COMTHROW(E_MGA_OP_REFUSED);
-					case MM_CLEAR: 
-						if(MODEFLAG(MM_REF, MM_FULLDELETE)) {
-							ObjForCore(rel_owner)->inDeleteObject();
-						}
-						else { 
-							rel_owner[ATTRID_REFERENCE] = NULLCOREOBJ;
-							CoreObjMark(self, OBJEVENT_REFRELEASED);
-							CoreObjMark(rel_owner, OBJEVENT_RELATION);
-						}
-					}
-				}
-			}
-		}
+		ObjCheckINTORelations(mgaproject, self, internals);
 	}
 	if(n == DTID_MODEL || n == DTID_FOLDER) {
 		CoreObjs children = self[ATTRID_FCOPARENT + ATTRID_COLLECTION];
@@ -1132,6 +1042,7 @@
 		std::vector<CoreObj> nobjs(cnt);
 		MGACOLL_ITERATE(IMgaFCO, copylist) {
 			CoreObj oldobj = CoreObj(MGACOLL_ITER);
+			ObjForCore(oldobj)->SelfMark(OBJEVENT_COPIED);
 			int derdist = GetRealSubtypeDist(oldobj);
 			ObjTreeCopy(mgaproject, oldobj, nobjs[i], crealist);  // copy
 			if(derdist) ObjTreeDist(nobjs[i], derdist);

Modified: branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/Attribute.cpp
==============================================================================
--- branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/Attribute.cpp	Wed Nov 24 11:49:47 2010	(r1095)
+++ branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/Attribute.cpp	Wed Nov 24 13:04:45 2010	(r1096)
@@ -20,26 +20,7 @@
 	_T("Current version string"),
 	_T("Arbitrary comments"),
 };
-// Split Function
-inline void str_split( CString str, CStringArray &returnArray)
-{
-   int  iNum     = 0;
-   int  iCurrPos = 0;
-   while( -1 != (iCurrPos = str.FindOneOf(_T("\n"))))
-   {
-       returnArray.Add(str.Left(iCurrPos));
-       returnArray[iNum].TrimRight("\r\n");
-       str = str.Right(str.GetLength() - iCurrPos - 1);
-       iNum++;
-   }
-
-   if (str.GetLength() > 0)      // the last one...
-   {
-       returnArray.Add(str);
-       returnArray[iNum].TrimRight("\r\n");
-       iNum++;
-   }
-}
+
 
 //////////////////////////////////////////////////////////////////////
 // Construction/Destruction

Modified: branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/ItemData.cpp
==============================================================================
--- branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/ItemData.cpp	Wed Nov 24 11:49:47 2010	(r1095)
+++ branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/ItemData.cpp	Wed Nov 24 13:04:45 2010	(r1096)
@@ -12,6 +12,27 @@
 #define new DEBUG_NEW
 #endif
 
+// Split Function
+void str_split( CString str, CStringArray &returnArray)
+{
+   int  iNum     = 0;
+   int  iCurrPos = 0;
+   while( -1 != (iCurrPos = str.FindOneOf(_T("\n"))))
+   {
+       returnArray.Add(str.Left(iCurrPos));
+       returnArray[iNum].TrimRight("\r\n");
+       str = str.Right(str.GetLength() - iCurrPos - 1);
+       iNum++;
+   }
+
+   if (str.GetLength() > 0)      // the last one...
+   {
+       returnArray.Add(str);
+       returnArray[iNum].TrimRight("\r\n");
+       iNum++;
+   }
+}
+
 /*static*/ const char * CItemData::m_defFMTSTR = "%.12g";
 /*static*/ CString      CItemData::m_fmtStr    = "%.12g";
 //////////////////////////////////////////////////////////////////////

Modified: branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/ItemData.h
==============================================================================
--- branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/ItemData.h	Wed Nov 24 11:49:47 2010	(r1095)
+++ branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/ItemData.h	Wed Nov 24 13:04:45 2010	(r1096)
@@ -11,6 +11,8 @@
 
 #include "CompassData.h"
 
+void str_split( CString str, CStringArray &returnArray);
+
 enum itemdata_enum
 {
 	ITEMDATA_NULL			= 0,

Modified: branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/Preference.cpp
==============================================================================
--- branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/Preference.cpp	Wed Nov 24 11:49:47 2010	(r1095)
+++ branches/ServiceReleases_for_10.8.18/GME/ObjectInspector/Preference.cpp	Wed Nov 24 13:04:45 2010	(r1096)
@@ -40,6 +40,7 @@
 	{"COLOR",				"color",			"0x000000",		"Color",								"Connection line color. Set this value to change the connection line color."},
 	{"COLOR",				"nameColor",		"0x000000",		"Name color",							"Connection label color. Set this value to change the connection label color."},
 	{"STRING",				"help",				"",				"Help URL",								"Sets this value to specify the URL containig the help information belonging to the connection."},
+	{"MULTISTRING",		    "description",		"",				"Description",							"Free format description of the model element for documentation purposes."},
 	{"LINE_STYLE_LIST",		"srcStyle",			"butt",			"Source end style",						"Sets this value to specify the source end style of the connection. Eg. Arrow."},
 	{"LINE_STYLE_LIST",		"dstStyle",			"butt",			"Destination end style",				"Sets this value to specify the destination end style of the connection. Eg. Arrow."},
 	{"LINE_TYPE_LIST",		"lineType",			"solid",		"Line type",							"Sets this value to specify the connection line type. Eg. Dashed."},
@@ -69,6 +70,7 @@
 	{"BOOLEAN_LIST",	"roundCornerRect",	"false",		"Round rectangle corner enabled","Is rounding of rectangle corner feature enabled."},
 	{"STRING",			"roundCornerRadius","9",			"Round rectangle corner radius","Radius of round rectangle corner."},
 	{"STRING",			"help",				"",				"Help URL",						"Sets this value to specify the URL containig the help information belonging to the atom."},
+	{"MULTISTRING",		"description",		"",				"Description",					"Free format description of the model element for documentation purposes."},
 	{"COMPASS_OPTION",	"namePosition",		"4",			"Name Location",				"Sets the name label location relative to the atom icon. Eg. North."},
 	{"STRING",			"nameWrap",			"0",			"NameWrap number",				"Sets the number of characters in a line of the name. If it is 0, then wrapping is disabled."},
 	{"BOOLEAN_LIST",	"isNameEnabled",	"true",			"Name enabled",					"Displays the name."},
@@ -103,6 +105,7 @@
 	{"STRING",			"roundCornerRadius","9",			"Round rectangle corner radius",		"Radius of round rectangle corner."},
 	{"COLOR",			"portColor",		"0x000000",		"Port name color",						"Port name color for the displayed ports of this model."},
 	{"STRING",			"help",				"",				"Help URL",								"Sets this value to specify the URL containig the help information belonging to the model."},
+	{"MULTISTRING",		"description",		"",				"Description",							"Free format description of the model element for documentation purposes."},
 	{"COMPASS_OPTION",	"namePosition",		"4",			"Name Location",						"Sets the name label location relative to the atom icon. Eg. North."},
 	{"STRING",			"nameWrap",			"0",			"NameWrap number",						"Sets the number of characters in a line of the name. If it is 0, then wrapping is disabled."},
 	{"BOOLEAN_LIST",	"isNameEnabled",	"true",			"Name enabled",							"Displays the name."},
@@ -138,6 +141,7 @@
 	{"BOOLEAN_LIST",	"roundCornerRect",	"false",		"Round rectangle corner enabled",		"Is rounding of rectangle corner feature enabled."},
 	{"STRING",			"roundCornerRadius","9",			"Round rectangle corner radius",		"Radius of round rectangle corner."},
 	{"STRING",			"help",				"",				"Help URL",								"Sets this value to specify the URL containig the help information belonging to the proxy."},
+	{"MULTISTRING",		"description",		"",				"Description",							"Free format description of the model element for documentation purposes."},
 	{"COMPASS_OPTION",	"namePosition",		"4",			"Name Location",						"Sets the name label location relative to the proxy icon. Eg. North."},
 	{"STRING",			"nameWrap",			"0",			"NameWrap number",						"Sets the number of characters in a line of the name. If it is 0, then wrapping is disabled."},
 	{"BOOLEAN_LIST",	"isNameEnabled",	"true",			"Name enabled",							"Displays the name."},
@@ -170,6 +174,7 @@
 	{"BOOLEAN_LIST",	"roundCornerRect",	"false",		"Round rectangle corner enabled","Is rounding of rectangle corner feature enabled."},
 	{"STRING",			"roundCornerRadius","9",			"Round rectangle corner radius","Radius of round rectangle corner."},
 	{"STRING",			"help",				"",				"Help URL",						"Sets this value to specify the URL containig the help information belonging to the set."},
+	{"MULTISTRING",		"description",		"",				"Description",					"Free format description of the model element for documentation purposes."},
 	{"COMPASS_OPTION",	"namePosition",		"4",			"Name Location",				"Sets the name label location relative to the set icon. Eg. North."},
 	{"STRING",			"nameWrap",			"0",			"NameWrap number",				"Sets the number of characters in a line of the name. If it is 0, then wrapping is disabled."},
 	{"BOOLEAN_LIST",	"isNameEnabled",	"true",			"Name enabled",					"Displays the name."},
@@ -792,6 +797,20 @@
 		ListItems.Add(ListItem);
 	}
 
+	else if(strEntryType=="MULTISTRING")
+	{
+		CStringArray strValueArray;
+		str_split(strValue, strValueArray);
+		ListItem.Value.SetStringValue(strValueArray,3);
+
+		CString strDefValue = (*pTableRow)[2];
+		CStringArray strDefValueArray;
+		str_split(strDefValue, strDefValueArray);
+		ListItem.DefValue.SetStringValue(strDefValueArray,3);
+		
+		ListItems.Add(ListItem);
+	}
+
 	else if(strEntryType=="COMPASS_OPTION")
 	{
 		UINT uCompassValue= CCompassData::ParseMgaCompassValueOption(strValue);

Modified: branches/ServiceReleases_for_10.8.18/GME/Parser/MgaParser.cpp
==============================================================================
--- branches/ServiceReleases_for_10.8.18/GME/Parser/MgaParser.cpp	Wed Nov 24 11:49:47 2010	(r1095)
+++ branches/ServiceReleases_for_10.8.18/GME/Parser/MgaParser.cpp	Wed Nov 24 13:04:45 2010	(r1096)
@@ -262,6 +262,9 @@
 		libstodo.clear();
 		
 		COMTHROW( project->put_GUID(projectguid) );
+		if (projectversion) {
+			COMTHROW( project->put_Version(projectversion) );
+		}
 
 		COMTHROW( project->CommitTransaction() );
 		COMTHROW( project->Notify(APPEVENT_XML_IMPORT_END));
@@ -770,6 +773,14 @@
 
 			CopyTo(guid, projectguid);
 		}
+		else if( i->first == "version" )
+		{	
+			CComBSTR currversion;
+			COMTHROW( project->get_Version(&currversion) );
+			if (currversion.Length() == 0) {
+				CopyTo(i->second, &projectversion); 
+			}
+		}
 		else if( i->first == "metaname")
 		{
 			// if host paradigm != imported project's paradigm

Modified: branches/ServiceReleases_for_10.8.18/GME/Parser/MgaParser.h
==============================================================================
--- branches/ServiceReleases_for_10.8.18/GME/Parser/MgaParser.h	Wed Nov 24 11:49:47 2010	(r1095)
+++ branches/ServiceReleases_for_10.8.18/GME/Parser/MgaParser.h	Wed Nov 24 13:04:45 2010	(r1096)
@@ -96,6 +96,7 @@
 	typedef std::vector<librecord> librecords;
 	librecords libstodo;
 	CComVariant projectguid;
+	CComBSTR	projectversion;
 
 // ------- Logging
 

Modified: branches/ServiceReleases_for_10.8.18/Install/GME_dyn.wxi
==============================================================================
--- branches/ServiceReleases_for_10.8.18/Install/GME_dyn.wxi	Wed Nov 24 11:49:47 2010	(r1095)
+++ branches/ServiceReleases_for_10.8.18/Install/GME_dyn.wxi	Wed Nov 24 13:04:45 2010	(r1096)
@@ -1,6 +1,6 @@
 <!-- DO NOT EDIT THIS FILE. WILL BE REGENERATED BY THE BUILD SCRIPTS -->
 <Include>
-   <?define VERSIONSTR='10.11.15' ?>
+   <?define VERSIONSTR='10.11.24' ?>
    <?define GUIDSTRMETAGME='{9D3F9884-FE60-409C-8FC1-45789193989B}' ?>
    <?define GUIDSTRHFSM='{757682DE-E57F-4003-9A7E-8EE5C0368980}' ?>
    <?define GUIDSTRSF='{A47F17D5-E360-4395-8351-AE3A1A843468}' ?>

Modified: branches/ServiceReleases_for_10.8.18/Install/symbols.cmd
==============================================================================
--- branches/ServiceReleases_for_10.8.18/Install/symbols.cmd	Wed Nov 24 11:49:47 2010	(r1095)
+++ branches/ServiceReleases_for_10.8.18/Install/symbols.cmd	Wed Nov 24 13:04:45 2010	(r1096)
@@ -1,3 +1,3 @@
-set VERSION=10.11.15
+set VERSION=10.11.24
 set DBGTOOLS=C:\Program Files\Debugging Tools for Windows (x64)
 "%DBGTOOLS%\symstore.exe" add /f %GME_ROOT%/Install/GME-%VERSION%-symbols /s \\atlantis\project\GME\symbols /r /t GME /v %VERSION% /c "GME Release %VERSION% symbols added" /compress
\ No newline at end of file

Modified: branches/ServiceReleases_for_10.8.18/Tests/GPyUnit/GME-297/test.py
==============================================================================
--- branches/ServiceReleases_for_10.8.18/Tests/GPyUnit/GME-297/test.py	Wed Nov 24 11:49:47 2010	(r1095)
+++ branches/ServiceReleases_for_10.8.18/Tests/GPyUnit/GME-297/test.py	Wed Nov 24 13:04:45 2010	(r1096)
@@ -29,11 +29,19 @@
         self.project.Open("MGA=" + self.input_file)
         self.territory = self.project.BeginTransactionInNewTerr()
 
-        modelb = self.project.ObjectByPath(self.fco_to_move)
-        modelb.Name
-        tomove = win32com.client.DispatchEx("Mga.MgaFCOs")
-        tomove.Append(modelb)
-        self.project.ObjectByPath(self.destination_model).MoveFCOs(tomove, None, None)
+        fco_to_move = self.project.ObjectByPath(self.fco_to_move)
+        OBJTYPE_FOLDER = 6
+        if fco_to_move.ObjType == OBJTYPE_FOLDER:
+            tomove = win32com.client.DispatchEx("Mga.MgaFolders")
+        else:
+            tomove = win32com.client.DispatchEx("Mga.MgaFCOs")
+        tomove.Append(fco_to_move)
+
+        destination = self.project.ObjectByPath(self.destination_model)
+        if destination.ObjType == OBJTYPE_FOLDER:
+            destination.MoveFolders(tomove, None)
+        else:
+            destination.MoveFCOs(tomove, None, None)
 
         self.project.CommitTransaction()
         self.project.Save("MGA=" + self.output_file)
@@ -51,6 +59,7 @@
     suite.addTest(TestRefportConnectionInvariantUnderMoves(input_file="test2.mga", fco_to_move="/Test2/Subtypes/A/BSubtypeRef", destination_model="/Test2/Destination/Destination"))
     suite.addTest(TestRefportConnectionInvariantUnderMoves(input_file="test1.mga", fco_to_move="/Test1/Folder1/A/RefB", destination_model="/Test1/Folder2/C", name="test3"))
     suite.addTest(TestRefportConnectionInvariantUnderMoves(input_file="test4.mga", fco_to_move="/Test4/Folder1/A/RefRefB", destination_model="/Test4/Folder2/C"))
+    suite.addTest(TestRefportConnectionInvariantUnderMoves(input_file="test5.mga", fco_to_move="/Test4/Folder2", destination_model="/Test4/Folder3"))
     return suite
 
 if __name__ == "__main__":

Copied: branches/ServiceReleases_for_10.8.18/Tests/GPyUnit/GME-297/test5-correct.mga (from r1091, trunk/Tests/GPyUnit/GME-297/test5-correct.mga)
==============================================================================
Binary file (source and/or target). No diff available.

Copied: branches/ServiceReleases_for_10.8.18/Tests/GPyUnit/GME-297/test5.mga (from r1091, trunk/Tests/GPyUnit/GME-297/test5.mga)
==============================================================================
Binary file (source and/or target). No diff available.


More information about the gme-commit mailing list