Browse Source

Fix merge.

Bentley James Oakes 6 years ago
parent
commit
37fcf86fd8

+ 1 - 0
client/atompm.html

@@ -46,6 +46,7 @@
 		<script text="text/javascript" src="client/query_response.js"></script>
 		<script text="text/javascript" src="client/collaboration.js"></script>
 		<script text="text/javascript" src="client/layout.js"></script>
+		<script text="text/javascript" src="client/modelverse_connector.js"></script>
 		<script text="text/javascript" src="client/client.js"></script>
 		<script text="text/javascript" src="styleinfo.js"></script>
         <link rel="icon" href="favicon.png">

+ 1 - 1
client/data_utils.js

@@ -50,6 +50,7 @@ DataUtils = function(){
 	 * Request creation of an instance of __typeToCreate at the specified
 	 * x and y coordinates
 	 */
+
     this.create = function (x, y, callback) {
         if (__typeToCreate == undefined) {
             WindowManagement.openDialog(_ERROR, 'you must select a type to create');
@@ -62,7 +63,6 @@ DataUtils = function(){
         }
     };
 
-	
 	/**
 	 * Deletes the current selection entities
 	 */

+ 1 - 0
client/http_utils.js

@@ -68,6 +68,7 @@ HttpUtils = function(){
 				params = JSON.stringify(params);
 			}
 			req.send(params);
+
 		}
 	};
 	

+ 12 - 8
tests/99_ecore_toolbar_test.js

@@ -31,11 +31,13 @@ module.exports = {
         client.waitForElementPresent(dialog_btn, 2000, "Load MM Menu");
         client.click(dialog_btn);
 
-        client.pause(3000);
 
-        let ecore_path = ecore_dir + "autotestMetamodel.ecore";
-        client.verify.ok(fs.existsSync(ecore_dir), "Check folder existance: '" + ecore_dir + "'");
-        client.verify.ok(fs.existsSync(ecore_path), "Check file existance: '" + ecore_path + "'");
+        // client.pause(3000);
+
+        // let ecore_path = ecore_dir + "autotestMetamodel.ecore";
+        // client.verify.ok(fs.existsSync(ecore_dir), "Check folder existance: '" + ecore_dir + "'");
+        // client.verify.ok(fs.existsSync(ecore_path), "Check file existance: '" + ecore_path + "'");
+
 
     },
 
@@ -52,11 +54,13 @@ module.exports = {
         client.waitForElementPresent(dialog_btn, 2000, "Load M Menu");
         client.click(dialog_btn);
 
-        client.pause(3000);
 
-        let ecore_path = ecore_dir + "autotest_instanceModel.xmi";
-        client.verify.ok(fs.existsSync(ecore_dir), "Check folder existance: '" + ecore_dir + "'");
-        client.verify.ok(fs.existsSync(ecore_path), "Check file existance: '" + ecore_path + "'");
+        // client.pause(3000);
+        //
+        // let ecore_path = ecore_dir + "autotest_instanceModel.xmi";
+        // client.verify.ok(fs.existsSync(ecore_dir), "Check folder existance: '" + ecore_dir + "'");
+        // client.verify.ok(fs.existsSync(ecore_path), "Check file existance: '" + ecore_path + "'");
+
 
     },
 

+ 3 - 0
tests/model_building_utils.js

@@ -176,6 +176,7 @@ function navigate_to_folder(client, folder_name) {
             client.waitForElementPresent(folder_name_div, 2000, "Find folder: " + folder_name_div)
             .click(folder_name_div);
         });
+
     }
 
 }
@@ -209,6 +210,7 @@ function save_model(client, folder_name, model_name) {
 
     navigate_to_folder(client, folder_name);
 
+
     let model_selector = "#" + model_name;
     client.element('css selector', model_selector, function (result) {
             if (result.status == -1) {
@@ -226,6 +228,7 @@ function save_model(client, folder_name, model_name) {
                 .click("#dialog_btn")
                 .pause(200)
                 .waitForElementNotPresent("#dialog_btn", 2000, "Save menu closes");
+
         }
     );
 }

+ 408 - 0
users/(default)/Toolbars/ModelVerse/ModelVerse.buttons.model

@@ -0,0 +1,408 @@
+{
+	"csm": {
+		"nodes": {
+			"0": {
+				"typename": {
+					"type": "string",
+					"value": "ButtonIcon"
+				},
+				"position": {
+					"type": "list<double>",
+					"value": [
+						499,
+						271
+					]
+				},
+				"orientation": {
+					"type": "double",
+					"value": 0
+				},
+				"scale": {
+					"type": "list<double>",
+					"value": [
+						1,
+						1
+					]
+				},
+				"mapper": {
+					"type": "code",
+					"value": ""
+				},
+				"parser": {
+					"type": "code",
+					"value": ""
+				},
+				"$contents": {
+					"type": "map<string,*>",
+					"value": {
+						"nodes": {
+							"1": {
+								"width": {
+									"type": "double",
+									"value": "120"
+								},
+								"height": {
+									"type": "double",
+									"value": "50"
+								},
+								"cornerRadius": {
+									"type": "double",
+									"value": "25"
+								},
+								"style": {
+									"type": "map<string,string>",
+									"value": {
+										"stroke": "#af0000",
+										"stroke-dasharray": "",
+										"fill": "#000000",
+										"fill-opacity": 0.05,
+										"stroke-width": 2
+									}
+								},
+								"mapper": {
+									"type": "code",
+									"value": ""
+								},
+								"parser": {
+									"type": "code",
+									"value": ""
+								},
+								"$type": "/Formalisms/__LanguageSyntax__/ConcreteSyntax/ConcreteSyntax/Rectangle",
+								"position": {
+									"type": "list<double>",
+									"value": [
+										0,
+										0
+									]
+								},
+								"orientation": {
+									"type": "double",
+									"value": 0
+								},
+								"scale": {
+									"type": "list<double>",
+									"value": [
+										1,
+										1
+									]
+								}
+							},
+							"2": {
+								"textContent": {
+									"type": "string",
+									"value": "connectMV"
+								},
+								"style": {
+									"type": "map<string,string>",
+									"value": {
+										"stroke": "#000000",
+										"stroke-dasharray": "",
+										"fill": "#ffffff",
+										"fill-opacity": 0.75,
+										"font-size": "13px",
+										"stroke-width": 1
+									}
+								},
+								"mapper": {
+									"type": "code",
+									"value": "({\"textContent\":getAttr(\"name\")})"
+								},
+								"parser": {
+									"type": "code",
+									"value": "({\"name\":getAttr(\"textContent\")})"
+								},
+								"$type": "/Formalisms/__LanguageSyntax__/ConcreteSyntax/ConcreteSyntax/Text",
+								"position": {
+									"type": "list<double>",
+									"value": [
+										10,
+										13
+									]
+								},
+								"orientation": {
+									"type": "double",
+									"value": 0
+								},
+								"scale": {
+									"type": "list<double>",
+									"value": [
+										1,
+										1
+									]
+								}
+							},
+							"3": {
+								"$type": "/Formalisms/__LanguageSyntax__/ConcreteSyntax/ConcreteSyntax/Contain",
+								"position": {
+									"type": "list<double>",
+									"value": [
+										17.74899850809561,
+										12.998998508095553
+									]
+								},
+								"orientation": {
+									"type": "double",
+									"value": 0
+								},
+								"scale": {
+									"type": "list<double>",
+									"value": [
+										1,
+										1
+									]
+								},
+								"link-style": {
+									"type": "map<string,string>",
+									"value": {
+										"stroke": "#00ffff",
+										"stroke-dasharray": "",
+										"stroke-opacity": 0.1,
+										"arrow-start": "none",
+										"arrow-end": "classic-wide-long"
+									}
+								}
+							}
+						},
+						"edges": [
+							{
+								"src": "1",
+								"dest": 3
+							},
+							{
+								"src": 3,
+								"dest": "2"
+							}
+						]
+					}
+				},
+				"$asuri": {
+					"type": "string",
+					"value": "/Formalisms/__Utilities__/Buttons/Buttons/Button/0.instance"
+				},
+				"$type": "/Formalisms/__Utilities__/Buttons/Buttons.defaultIcons/ButtonIcon"
+			},
+			"1": {
+				"typename": {
+					"type": "string",
+					"value": "ButtonIcon"
+				},
+				"position": {
+					"type": "list<double>",
+					"value": [
+						708,
+						315
+					]
+				},
+				"orientation": {
+					"type": "double",
+					"value": 0
+				},
+				"scale": {
+					"type": "list<double>",
+					"value": [
+						1,
+						1
+					]
+				},
+				"mapper": {
+					"type": "code",
+					"value": ""
+				},
+				"parser": {
+					"type": "code",
+					"value": ""
+				},
+				"$contents": {
+					"type": "map<string,*>",
+					"value": {
+						"nodes": {
+							"1": {
+								"width": {
+									"type": "double",
+									"value": "120"
+								},
+								"height": {
+									"type": "double",
+									"value": "50"
+								},
+								"cornerRadius": {
+									"type": "double",
+									"value": "25"
+								},
+								"style": {
+									"type": "map<string,string>",
+									"value": {
+										"stroke": "#af0000",
+										"stroke-dasharray": "",
+										"fill": "#000000",
+										"fill-opacity": 0.05,
+										"stroke-width": 2
+									}
+								},
+								"mapper": {
+									"type": "code",
+									"value": ""
+								},
+								"parser": {
+									"type": "code",
+									"value": ""
+								},
+								"$type": "/Formalisms/__LanguageSyntax__/ConcreteSyntax/ConcreteSyntax/Rectangle",
+								"position": {
+									"type": "list<double>",
+									"value": [
+										0,
+										0
+									]
+								},
+								"orientation": {
+									"type": "double",
+									"value": 0
+								},
+								"scale": {
+									"type": "list<double>",
+									"value": [
+										1,
+										1
+									]
+								}
+							},
+							"2": {
+								"textContent": {
+									"type": "string",
+									"value": "dumpModel"
+								},
+								"style": {
+									"type": "map<string,string>",
+									"value": {
+										"stroke": "#000000",
+										"stroke-dasharray": "",
+										"fill": "#ffffff",
+										"fill-opacity": 0.75,
+										"font-size": "13px",
+										"stroke-width": 1
+									}
+								},
+								"mapper": {
+									"type": "code",
+									"value": "({\"textContent\":getAttr(\"name\")})"
+								},
+								"parser": {
+									"type": "code",
+									"value": "({\"name\":getAttr(\"textContent\")})"
+								},
+								"$type": "/Formalisms/__LanguageSyntax__/ConcreteSyntax/ConcreteSyntax/Text",
+								"position": {
+									"type": "list<double>",
+									"value": [
+										10,
+										13
+									]
+								},
+								"orientation": {
+									"type": "double",
+									"value": 0
+								},
+								"scale": {
+									"type": "list<double>",
+									"value": [
+										1,
+										1
+									]
+								}
+							},
+							"3": {
+								"$type": "/Formalisms/__LanguageSyntax__/ConcreteSyntax/ConcreteSyntax/Contain",
+								"position": {
+									"type": "list<double>",
+									"value": [
+										17.74899850809561,
+										12.998998508095553
+									]
+								},
+								"orientation": {
+									"type": "double",
+									"value": 0
+								},
+								"scale": {
+									"type": "list<double>",
+									"value": [
+										1,
+										1
+									]
+								},
+								"link-style": {
+									"type": "map<string,string>",
+									"value": {
+										"stroke": "#00ffff",
+										"stroke-dasharray": "",
+										"stroke-opacity": 0.1,
+										"arrow-start": "none",
+										"arrow-end": "classic-wide-long"
+									}
+								}
+							}
+						},
+						"edges": [
+							{
+								"src": "1",
+								"dest": 3
+							},
+							{
+								"src": 3,
+								"dest": "2"
+							}
+						]
+					}
+				},
+				"$asuri": {
+					"type": "string",
+					"value": "/Formalisms/__Utilities__/Buttons/Buttons/Button/1.instance"
+				},
+				"$type": "/Formalisms/__Utilities__/Buttons/Buttons.defaultIcons/ButtonIcon"
+			}
+		},
+		"edges": [],
+		"metamodels": [
+			"/Formalisms/__Utilities__/Buttons/Buttons.defaultIcons"
+		]
+	},
+	"asm": {
+		"nodes": {
+			"0": {
+				"name": {
+					"type": "string",
+					"value": "connectMV"
+				},
+				"tooltip": {
+					"type": "string",
+					"value": "Connect to the ModelVerse"
+				},
+				"code": {
+					"type": "code",
+					"value": "new ModelVerseConnector();\nModelVerseConnector.connect();"
+				},
+				"$type": "/Formalisms/__Utilities__/Buttons/Buttons/Button"
+			},
+			"1": {
+				"name": {
+					"type": "string",
+					"value": "dumpModel"
+				},
+				"tooltip": {
+					"type": "string",
+					"value": ""
+				},
+				"code": {
+					"type": "code",
+					"value": "ModelVerseConnector.dump_model()"
+				},
+				"$type": "/Formalisms/__Utilities__/Buttons/Buttons/Button"
+			}
+		},
+		"edges": [],
+		"metamodels": [
+			"/Formalisms/__Utilities__/Buttons/Buttons"
+		]
+	}
+}

BIN
users/(default)/Toolbars/ModelVerse/connectMV.icon.png


BIN
users/(default)/Toolbars/ModelVerse/dumpModel.icon.png