Mercurial > cgi-bin > hgwebdir.cgi > POP > oldRepo
changeset 7:20a1407463a0
sort of working with view sets -- does restore, (not tested) have to chg Display to handle view sets
author | Sean Halle <seanhalle@yahoo.com> |
---|---|
date | Thu, 07 Aug 2014 00:10:50 -0700 |
parents | d18eee376f45 |
children | cc10d99e3f83 |
files | 1__Development/0__Code_Dev/Javascript_approach/.idea/workspace.xml 1__Development/0__Code_Dev/Javascript_approach/MVDM_implementation/app/GabePatternSrcHolder.js 1__Development/0__Code_Dev/Javascript_approach/MVDM_implementation/app/POPDisplay.js 1__Development/0__Code_Dev/Javascript_approach/MVDM_implementation/app/POPSyntaxGraphVisualizer.js 1__Development/6__Website/POPBottleServer/POPBottleServer.py 1__Development/6__Website/POPBottleServer/syntaxGraph.json |
diffstat | 6 files changed, 714 insertions(+), 218 deletions(-) [+] |
line diff
1.1 --- a/1__Development/0__Code_Dev/Javascript_approach/.idea/workspace.xml Wed Aug 06 00:16:19 2014 -0700 1.2 +++ b/1__Development/0__Code_Dev/Javascript_approach/.idea/workspace.xml Thu Aug 07 00:10:50 2014 -0700 1.3 @@ -4,7 +4,6 @@ 1.4 <list default="true" id="96358ab2-8688-4c45-a3ad-51ca6e0c841b" name="Default" comment=""> 1.5 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/MVDM_implementation/app/GabePatternSrcHolder.js" afterPath="$PROJECT_DIR$/MVDM_implementation/app/GabePatternSrcHolder.js" /> 1.6 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/MVDM_implementation/app/POPDisplay.js" afterPath="$PROJECT_DIR$/MVDM_implementation/app/POPDisplay.js" /> 1.7 - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/MVDM_implementation/app/POPSyntaxGraphModifier.js" afterPath="$PROJECT_DIR$/MVDM_implementation/app/POPSyntaxGraphModifier.js" /> 1.8 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/MVDM_implementation/app/POPSyntaxGraphVisualizer.js" afterPath="$PROJECT_DIR$/MVDM_implementation/app/POPSyntaxGraphVisualizer.js" /> 1.9 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/MVDM_implementation/app/buildGabePatternSyntaxGraph.js" afterPath="$PROJECT_DIR$/MVDM_implementation/app/buildGabePatternSyntaxGraph.js" /> 1.10 </list> 1.11 @@ -32,10 +31,10 @@ 1.12 <splitter split-orientation="horizontal" split-proportion="0.5"> 1.13 <split-first> 1.14 <leaf> 1.15 - <file leaf-file-name="startUpApp.js" pinned="false" current="false" current-in-tab="true"> 1.16 + <file leaf-file-name="startUpApp.js" pinned="false" current="false" current-in-tab="false"> 1.17 <entry file="file://$PROJECT_DIR$/MVDM_implementation/startUpApp.js"> 1.18 <provider selected="true" editor-type-id="text-editor"> 1.19 - <state vertical-scroll-proportion="0.0389016" vertical-offset="0" max-vertical-offset="437"> 1.20 + <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="357"> 1.21 <caret line="1" column="0" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" /> 1.22 <folding /> 1.23 </state> 1.24 @@ -56,29 +55,17 @@ 1.25 <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/POPApp.js"> 1.26 <provider selected="true" editor-type-id="text-editor"> 1.27 <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="918"> 1.28 - <caret line="11" column="43" selection-start-line="11" selection-start-column="43" selection-end-line="11" selection-end-column="43" /> 1.29 + <caret line="17" column="14" selection-start-line="17" selection-start-column="14" selection-end-line="17" selection-end-column="14" /> 1.30 <folding /> 1.31 </state> 1.32 </provider> 1.33 </entry> 1.34 </file> 1.35 - <file leaf-file-name="POPDisplay.js" pinned="false" current="false" current-in-tab="false"> 1.36 - <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/POPDisplay.js"> 1.37 - <provider selected="true" editor-type-id="text-editor"> 1.38 - <state vertical-scroll-proportion="0.0" vertical-offset="518" max-vertical-offset="3162"> 1.39 - <caret line="62" column="0" selection-start-line="62" selection-start-column="0" selection-end-line="62" selection-end-column="0" /> 1.40 - <folding> 1.41 - <marker date="1407272064822" expanded="false" signature="6247:6295" placeholder="..." /> 1.42 - </folding> 1.43 - </state> 1.44 - </provider> 1.45 - </entry> 1.46 - </file> 1.47 <file leaf-file-name="POPSyntaxGraphVisualizer.js" pinned="false" current="false" current-in-tab="false"> 1.48 <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/POPSyntaxGraphVisualizer.js"> 1.49 <provider selected="true" editor-type-id="text-editor"> 1.50 - <state vertical-scroll-proportion="0.0" vertical-offset="415" max-vertical-offset="4165"> 1.51 - <caret line="56" column="46" selection-start-line="56" selection-start-column="46" selection-end-line="56" selection-end-column="46" /> 1.52 + <state vertical-scroll-proportion="0.0" vertical-offset="807" max-vertical-offset="4131"> 1.53 + <caret line="56" column="0" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" /> 1.54 <folding /> 1.55 </state> 1.56 </provider> 1.57 @@ -97,24 +84,46 @@ 1.58 <file leaf-file-name="GabePatternSrcHolder.js" pinned="false" current="false" current-in-tab="false"> 1.59 <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/GabePatternSrcHolder.js"> 1.60 <provider selected="true" editor-type-id="text-editor"> 1.61 - <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="7072"> 1.62 - <caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" /> 1.63 + <state vertical-scroll-proportion="-5.2" vertical-offset="4188" max-vertical-offset="7310"> 1.64 + <caret line="254" column="0" selection-start-line="254" selection-start-column="0" selection-end-line="254" selection-end-column="0" /> 1.65 <folding /> 1.66 </state> 1.67 </provider> 1.68 </entry> 1.69 </file> 1.70 + <file leaf-file-name="require.js" pinned="false" current="false" current-in-tab="false"> 1.71 + <entry file="file://$PROJECT_DIR$/MVDM_implementation/lib/require.js"> 1.72 + <provider selected="true" editor-type-id="text-editor"> 1.73 + <state vertical-scroll-proportion="0.0" vertical-offset="27963" max-vertical-offset="35309"> 1.74 + <caret line="1657" column="0" selection-start-line="1657" selection-start-column="0" selection-end-line="1658" selection-end-column="0" /> 1.75 + <folding /> 1.76 + </state> 1.77 + </provider> 1.78 + </entry> 1.79 + </file> 1.80 + <file leaf-file-name="POPDisplay.js" pinned="false" current="true" current-in-tab="true"> 1.81 + <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/POPDisplay.js"> 1.82 + <provider selected="true" editor-type-id="text-editor"> 1.83 + <state vertical-scroll-proportion="0.3112128" vertical-offset="1360" max-vertical-offset="3162"> 1.84 + <caret line="88" column="36" selection-start-line="88" selection-start-column="36" selection-end-line="88" selection-end-column="36" /> 1.85 + <folding> 1.86 + <marker date="1407395337135" expanded="true" signature="6283:6331" placeholder="..." /> 1.87 + </folding> 1.88 + </state> 1.89 + </provider> 1.90 + </entry> 1.91 + </file> 1.92 </leaf> 1.93 </split-first> 1.94 <split-second> 1.95 <leaf> 1.96 - <file leaf-file-name="buildGabePatternSyntaxGraph.js" pinned="false" current="true" current-in-tab="true"> 1.97 + <file leaf-file-name="buildGabePatternSyntaxGraph.js" pinned="false" current="false" current-in-tab="false"> 1.98 <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/buildGabePatternSyntaxGraph.js"> 1.99 <provider selected="true" editor-type-id="text-editor"> 1.100 - <state vertical-scroll-proportion="-2.0" vertical-offset="2957" max-vertical-offset="14195"> 1.101 - <caret line="125" column="18" selection-start-line="125" selection-start-column="14" selection-end-line="125" selection-end-column="18" /> 1.102 + <state vertical-scroll-proportion="-5.76" vertical-offset="944" max-vertical-offset="10098"> 1.103 + <caret line="66" column="0" selection-start-line="66" selection-start-column="0" selection-end-line="66" selection-end-column="0" /> 1.104 <folding> 1.105 - <marker date="1407309167348" expanded="false" signature="25274:25330" placeholder="..." /> 1.106 + <marker date="1407386727801" expanded="false" signature="24156:24212" placeholder="..." /> 1.107 </folding> 1.108 </state> 1.109 </provider> 1.110 @@ -123,18 +132,18 @@ 1.111 <file leaf-file-name="POPBottleServer.py" pinned="false" current="false" current-in-tab="false"> 1.112 <entry file="file://$PROJECT_DIR$/../../6__Website/POPBottleServer/POPBottleServer.py"> 1.113 <provider selected="true" editor-type-id="text-editor"> 1.114 - <state vertical-scroll-proportion="0.0" vertical-offset="444" max-vertical-offset="1513"> 1.115 - <caret line="50" column="16" selection-start-line="50" selection-start-column="16" selection-end-line="50" selection-end-column="16" /> 1.116 + <state vertical-scroll-proportion="0.0" vertical-offset="165" max-vertical-offset="1173"> 1.117 + <caret line="28" column="0" selection-start-line="28" selection-start-column="0" selection-end-line="28" selection-end-column="0" /> 1.118 <folding /> 1.119 </state> 1.120 </provider> 1.121 </entry> 1.122 </file> 1.123 - <file leaf-file-name="GabePatternSrcHolder.js" pinned="false" current="false" current-in-tab="false"> 1.124 + <file leaf-file-name="GabePatternSrcHolder.js" pinned="false" current="false" current-in-tab="true"> 1.125 <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/GabePatternSrcHolder.js"> 1.126 <provider selected="true" editor-type-id="text-editor"> 1.127 - <state vertical-scroll-proportion="-9.08" vertical-offset="1796" max-vertical-offset="7072"> 1.128 - <caret line="119" column="13" selection-start-line="119" selection-start-column="13" selection-end-line="119" selection-end-column="13" /> 1.129 + <state vertical-scroll-proportion="0.33187774" vertical-offset="4166" max-vertical-offset="7310"> 1.130 + <caret line="254" column="0" selection-start-line="254" selection-start-column="0" selection-end-line="254" selection-end-column="0" /> 1.131 <folding /> 1.132 </state> 1.133 </provider> 1.134 @@ -161,13 +170,14 @@ 1.135 <option value="$PROJECT_DIR$/Display/app/buildGabePatternSyntaxGraph.js" /> 1.136 <option value="$PROJECT_DIR$/Display/app/GabePatternSrcHolder.js" /> 1.137 <option value="/vm:94" /> 1.138 + <option value="$PROJECT_DIR$/MVDM_implementation/app/POPSyntaxGraphModifier.js" /> 1.139 + <option value="$PROJECT_DIR$/MVDM_implementation/startUpApp.js" /> 1.140 + <option value="$PROJECT_DIR$/MVDM_implementation/app/POPSyntaxGraphVisualizer.js" /> 1.141 + <option value="$PROJECT_DIR$/MVDM_implementation/app/buildGabePatternSyntaxGraph.js" /> 1.142 + <option value="$PROJECT_DIR$/../../6__Website/POPBottleServer/POPBottleServer_test.py" /> 1.143 <option value="$PROJECT_DIR$/../../6__Website/POPBottleServer/POPBottleServer.py" /> 1.144 - <option value="$PROJECT_DIR$/MVDM_implementation/app/POPSyntaxGraphModifier.js" /> 1.145 - <option value="$PROJECT_DIR$/MVDM_implementation/app/POPSyntaxGraphVisualizer.js" /> 1.146 + <option value="$PROJECT_DIR$/MVDM_implementation/app/GabePatternSrcHolder.js" /> 1.147 <option value="$PROJECT_DIR$/MVDM_implementation/app/POPDisplay.js" /> 1.148 - <option value="$PROJECT_DIR$/MVDM_implementation/app/GabePatternSrcHolder.js" /> 1.149 - <option value="$PROJECT_DIR$/MVDM_implementation/startUpApp.js" /> 1.150 - <option value="$PROJECT_DIR$/MVDM_implementation/app/buildGabePatternSyntaxGraph.js" /> 1.151 </list> 1.152 </option> 1.153 </component> 1.154 @@ -213,6 +223,12 @@ 1.155 <property name="options.splitter.details.proportions" value="0.2" /> 1.156 <property name="options.searchVisible" value="true" /> 1.157 <property name="last_opened_file_path" value="$PROJECT_DIR$/../../6__Website/POPBottleServer/POPBottleServer.py" /> 1.158 + <property name="LayoutCode.rearrangeEntriesPlain text" value="false" /> 1.159 + </component> 1.160 + <component name="RecentsManager"> 1.161 + <key name="CopyFile.RECENT_KEYS"> 1.162 + <recent name="C:\D\2__Work\8__POP\1__Development\6__Website\POPBottleServer" /> 1.163 + </key> 1.164 </component> 1.165 <component name="RunManager" selected="JavaScript Debug.POPDisplay.html"> 1.166 <configuration default="false" name="POPDisplay.html" type="JavascriptDebugType" factoryName="JavaScript Debug" temporary="true" uri="http://localhost:63342/Javascript_approach/MVDM_implementation/POPDisplay.html"> 1.167 @@ -335,15 +351,10 @@ 1.168 <line-breakpoint enabled="true" type="javascript"> 1.169 <url>file://$PROJECT_DIR$/MVDM_implementation/app/POPSyntaxGraphVisualizer.js</url> 1.170 <line>56</line> 1.171 - <option name="timeStamp" value="35" /> 1.172 - </line-breakpoint> 1.173 - <line-breakpoint enabled="true" type="javascript"> 1.174 - <url>file://$PROJECT_DIR$/MVDM_implementation/app/buildGabePatternSyntaxGraph.js</url> 1.175 - <line>67</line> 1.176 - <option name="timeStamp" value="36" /> 1.177 + <option name="timeStamp" value="63" /> 1.178 </line-breakpoint> 1.179 </breakpoints> 1.180 - <option name="time" value="44" /> 1.181 + <option name="time" value="79" /> 1.182 </breakpoint-manager> 1.183 </component> 1.184 <component name="XPathView.XPathProjectComponent"> 1.185 @@ -382,7 +393,7 @@ 1.186 <state vertical-scroll-proportion="0.0" vertical-offset="518" max-vertical-offset="3162"> 1.187 <caret line="62" column="0" selection-start-line="62" selection-start-column="0" selection-end-line="62" selection-end-column="0" /> 1.188 <folding> 1.189 - <marker date="1407272064822" expanded="false" signature="6247:6295" placeholder="..." /> 1.190 + <marker date="1407395337135" expanded="true" signature="6283:6331" placeholder="..." /> 1.191 </folding> 1.192 </state> 1.193 </provider> 1.194 @@ -416,7 +427,7 @@ 1.195 <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="12597"> 1.196 <caret line="9" column="0" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" /> 1.197 <folding> 1.198 - <marker date="1407309167348" expanded="false" signature="25274:25330" placeholder="..." /> 1.199 + <marker date="1407386727801" expanded="false" signature="24156:24212" placeholder="..." /> 1.200 </folding> 1.201 </state> 1.202 </provider> 1.203 @@ -458,7 +469,7 @@ 1.204 <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="3043"> 1.205 <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> 1.206 <folding> 1.207 - <marker date="1407272064822" expanded="false" signature="6247:6295" placeholder="..." /> 1.208 + <marker date="1407395337135" expanded="true" signature="6283:6331" placeholder="..." /> 1.209 </folding> 1.210 </state> 1.211 </provider> 1.212 @@ -484,7 +495,7 @@ 1.213 <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="12648"> 1.214 <caret line="267" column="0" selection-start-line="267" selection-start-column="0" selection-end-line="267" selection-end-column="0" /> 1.215 <folding> 1.216 - <marker date="1407309167348" expanded="false" signature="25274:25330" placeholder="..." /> 1.217 + <marker date="1407386727801" expanded="false" signature="24156:24212" placeholder="..." /> 1.218 </folding> 1.219 </state> 1.220 </provider> 1.221 @@ -518,7 +529,7 @@ 1.222 <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="3043"> 1.223 <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> 1.224 <folding> 1.225 - <marker date="1407272064822" expanded="false" signature="6247:6295" placeholder="..." /> 1.226 + <marker date="1407395337135" expanded="true" signature="6283:6331" placeholder="..." /> 1.227 </folding> 1.228 </state> 1.229 </provider> 1.230 @@ -544,7 +555,7 @@ 1.231 <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="12070"> 1.232 <caret line="59" column="21" selection-start-line="59" selection-start-column="21" selection-end-line="59" selection-end-column="21" /> 1.233 <folding> 1.234 - <marker date="1407309167348" expanded="false" signature="25274:25330" placeholder="..." /> 1.235 + <marker date="1407386727801" expanded="false" signature="24156:24212" placeholder="..." /> 1.236 </folding> 1.237 </state> 1.238 </provider> 1.239 @@ -587,22 +598,6 @@ 1.240 </state> 1.241 </provider> 1.242 </entry> 1.243 - <entry file="file://$PROJECT_DIR$/MVDM_implementation/lib/require.js"> 1.244 - <provider selected="true" editor-type-id="text-editor"> 1.245 - <state vertical-scroll-proportion="0.0" vertical-offset="27949" max-vertical-offset="35309"> 1.246 - <caret line="1657" column="33" selection-start-line="1657" selection-start-column="33" selection-end-line="1657" selection-end-column="33" /> 1.247 - <folding /> 1.248 - </state> 1.249 - </provider> 1.250 - </entry> 1.251 - <entry file="file://$PROJECT_DIR$/../../6__Website/POPBottleServer/POPBottleServer.py"> 1.252 - <provider selected="true" editor-type-id="text-editor"> 1.253 - <state vertical-scroll-proportion="0.0" vertical-offset="444" max-vertical-offset="1513"> 1.254 - <caret line="50" column="16" selection-start-line="50" selection-start-column="16" selection-end-line="50" selection-end-column="16" /> 1.255 - <folding /> 1.256 - </state> 1.257 - </provider> 1.258 - </entry> 1.259 <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/POPSyntaxGraphModifier.js"> 1.260 <provider selected="true" editor-type-id="text-editor"> 1.261 <state vertical-scroll-proportion="0.0" vertical-offset="530" max-vertical-offset="1003"> 1.262 @@ -611,54 +606,86 @@ 1.263 </state> 1.264 </provider> 1.265 </entry> 1.266 - <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/POPDisplay.js"> 1.267 + <entry file="file://$PROJECT_DIR$/MVDM_implementation/lib/require.js"> 1.268 <provider selected="true" editor-type-id="text-editor"> 1.269 - <state vertical-scroll-proportion="0.0" vertical-offset="518" max-vertical-offset="3162"> 1.270 - <caret line="62" column="0" selection-start-line="62" selection-start-column="0" selection-end-line="62" selection-end-column="0" /> 1.271 - <folding> 1.272 - <marker date="1407272064822" expanded="false" signature="6247:6295" placeholder="..." /> 1.273 - </folding> 1.274 - </state> 1.275 - </provider> 1.276 - </entry> 1.277 - <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/POPSyntaxGraphVisualizer.js"> 1.278 - <provider selected="true" editor-type-id="text-editor"> 1.279 - <state vertical-scroll-proportion="0.0" vertical-offset="415" max-vertical-offset="4165"> 1.280 - <caret line="56" column="46" selection-start-line="56" selection-start-column="46" selection-end-line="56" selection-end-column="46" /> 1.281 + <state vertical-scroll-proportion="0.0" vertical-offset="27963" max-vertical-offset="35309"> 1.282 + <caret line="1657" column="0" selection-start-line="1657" selection-start-column="0" selection-end-line="1658" selection-end-column="0" /> 1.283 <folding /> 1.284 </state> 1.285 </provider> 1.286 </entry> 1.287 <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/POPApp.js"> 1.288 <provider selected="true" editor-type-id="text-editor"> 1.289 - <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="918"> 1.290 - <caret line="11" column="43" selection-start-line="11" selection-start-column="43" selection-end-line="11" selection-end-column="43" /> 1.291 + <state vertical-scroll-proportion="0.0" vertical-offset="139" max-vertical-offset="918"> 1.292 + <caret line="17" column="14" selection-start-line="17" selection-start-column="14" selection-end-line="17" selection-end-column="14" /> 1.293 + <folding /> 1.294 + </state> 1.295 + </provider> 1.296 + </entry> 1.297 + <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/buildGabePatternSyntaxGraph.js"> 1.298 + <provider selected="true" editor-type-id="text-editor"> 1.299 + <state vertical-scroll-proportion="-5.76" vertical-offset="944" max-vertical-offset="10098"> 1.300 + <caret line="66" column="0" selection-start-line="66" selection-start-column="0" selection-end-line="66" selection-end-column="0" /> 1.301 + <folding> 1.302 + <marker date="1407386727801" expanded="false" signature="24156:24212" placeholder="..." /> 1.303 + </folding> 1.304 + </state> 1.305 + </provider> 1.306 + </entry> 1.307 + <entry file="file://$PROJECT_DIR$/GabePattern/GabePattern_data_structs.js"> 1.308 + <provider selected="true" editor-type-id="text-editor"> 1.309 + <state vertical-scroll-proportion="0.49880096" vertical-offset="217" max-vertical-offset="7548"> 1.310 + <caret line="25" column="18" selection-start-line="25" selection-start-column="18" selection-end-line="25" selection-end-column="18" /> 1.311 + <folding /> 1.312 + </state> 1.313 + </provider> 1.314 + </entry> 1.315 + <entry file="file://$PROJECT_DIR$/../../6__Website/POPBottleServer/POPBottleServer_test.py"> 1.316 + <provider selected="true" editor-type-id="text-editor"> 1.317 + <state vertical-scroll-proportion="0.92444444" vertical-offset="94" max-vertical-offset="663"> 1.318 + <caret line="30" column="0" selection-start-line="30" selection-start-column="0" selection-end-line="30" selection-end-column="0" /> 1.319 + <folding /> 1.320 + </state> 1.321 + </provider> 1.322 + </entry> 1.323 + <entry file="file://$PROJECT_DIR$/../../6__Website/POPBottleServer/POPBottleServer.py"> 1.324 + <provider selected="true" editor-type-id="text-editor"> 1.325 + <state vertical-scroll-proportion="0.0" vertical-offset="165" max-vertical-offset="1173"> 1.326 + <caret line="28" column="0" selection-start-line="28" selection-start-column="0" selection-end-line="28" selection-end-column="0" /> 1.327 <folding /> 1.328 </state> 1.329 </provider> 1.330 </entry> 1.331 <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/GabePatternSrcHolder.js"> 1.332 <provider selected="true" editor-type-id="text-editor"> 1.333 - <state vertical-scroll-proportion="-9.08" vertical-offset="1796" max-vertical-offset="7072"> 1.334 - <caret line="119" column="13" selection-start-line="119" selection-start-column="13" selection-end-line="119" selection-end-column="13" /> 1.335 + <state vertical-scroll-proportion="-5.2" vertical-offset="4188" max-vertical-offset="7310"> 1.336 + <caret line="254" column="0" selection-start-line="254" selection-start-column="0" selection-end-line="254" selection-end-column="0" /> 1.337 <folding /> 1.338 </state> 1.339 </provider> 1.340 </entry> 1.341 <entry file="file://$PROJECT_DIR$/MVDM_implementation/startUpApp.js"> 1.342 <provider selected="true" editor-type-id="text-editor"> 1.343 - <state vertical-scroll-proportion="0.0389016" vertical-offset="0" max-vertical-offset="437"> 1.344 + <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="357"> 1.345 <caret line="1" column="0" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" /> 1.346 <folding /> 1.347 </state> 1.348 </provider> 1.349 </entry> 1.350 - <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/buildGabePatternSyntaxGraph.js"> 1.351 + <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/POPSyntaxGraphVisualizer.js"> 1.352 <provider selected="true" editor-type-id="text-editor"> 1.353 - <state vertical-scroll-proportion="-2.0" vertical-offset="2957" max-vertical-offset="14195"> 1.354 - <caret line="125" column="18" selection-start-line="125" selection-start-column="14" selection-end-line="125" selection-end-column="18" /> 1.355 + <state vertical-scroll-proportion="0.0" vertical-offset="807" max-vertical-offset="4131"> 1.356 + <caret line="56" column="0" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" /> 1.357 + <folding /> 1.358 + </state> 1.359 + </provider> 1.360 + </entry> 1.361 + <entry file="file://$PROJECT_DIR$/MVDM_implementation/app/POPDisplay.js"> 1.362 + <provider selected="true" editor-type-id="text-editor"> 1.363 + <state vertical-scroll-proportion="0.3112128" vertical-offset="1360" max-vertical-offset="3162"> 1.364 + <caret line="88" column="36" selection-start-line="88" selection-start-column="36" selection-end-line="88" selection-end-column="36" /> 1.365 <folding> 1.366 - <marker date="1407309167348" expanded="false" signature="25274:25330" placeholder="..." /> 1.367 + <marker date="1407395337135" expanded="true" signature="6283:6331" placeholder="..." /> 1.368 </folding> 1.369 </state> 1.370 </provider>
2.1 --- a/1__Development/0__Code_Dev/Javascript_approach/MVDM_implementation/app/GabePatternSrcHolder.js Wed Aug 06 00:16:19 2014 -0700 2.2 +++ b/1__Development/0__Code_Dev/Javascript_approach/MVDM_implementation/app/GabePatternSrcHolder.js Thu Aug 07 00:10:50 2014 -0700 2.3 @@ -3,11 +3,33 @@ 2.4 //Make a SrcHolder object 2.5 define( function( require, exports, module ) { 2.6 2.7 +//bookkeeping, setup 2.8 var visualizer = require('./POPSyntaxGraphVisualizer'); 2.9 var commander = require('./POPSyntaxGraphCommander'); 2.10 var modifier = require('./POPSyntaxGraphModifier'); 2.11 var syntaxGraph = require('./buildGabePatternSyntaxGraph'); 2.12 2.13 +var theObjColl = syntaxGraph.rootElem.__proto__.__proto__; 2.14 +function ConstructorBuffer(){ 2.15 +} 2.16 + 2.17 +function ShadowGraphElem() { 2.18 + this.portsInShadows = []; 2.19 + this.portsOutShadows = []; 2.20 + this.portsIn = []; 2.21 + this.portsOut = []; 2.22 + this.linkedElems = []; 2.23 + this.viewSet = {}; 2.24 +}; 2.25 +var shadowGraphElemProto = new ConstructorBuffer(); 2.26 +shadowGraphElemProto.__proto__ = theObjColl; 2.27 +ShadowGraphElem.prototype = shadowGraphElemProto; 2.28 +ShadowGraphElem.prototype.constructor = ShadowGraphElem; 2.29 + 2.30 +//================================================== 2.31 +//== 2.32 +//================================================== 2.33 + 2.34 //The src holder has to serialize the syntax graph out to persistent 2.35 // storage, and bring it back in, converting back to javascript objects 2.36 //JSON can stringify and then parse back, but it can't handle circuits 2.37 @@ -40,11 +62,7 @@ 2.38 // return to the position were in just before visiting this element 2.39 //-] when no where to return to, then done! 2.40 var persistTheGraph = function( theGraphRoot ) { 2.41 - var shadowGraphRoot = { rootElem: {}, rootViewSet: {} }; 2.42 - var shadowRootElem = makeShadowElem(); 2.43 - var shadowRootViewSet = { syntaxElem: {}, elemViewTree: {}, viewSetLinks: [] }; 2.44 - shadowGraphRoot.rootElem = shadowRootElem; 2.45 - shadowGraphRoot.rootViewSet = shadowRootViewSet; 2.46 + var shadowGraphRoot = {}; 2.47 2.48 startPersisting(); //send notice to web server that persist protocol is starting 2.49 //save out the top level object that has the handles to the view hierarchy root 2.50 @@ -54,12 +72,12 @@ 2.51 // clean up. Any view stuff will be reached from that element 2.52 var rootElem = theGraphRoot.rootElem; //save 'cause pointers about to be replaced 2.53 persistAnchorAndViewSetRoot( theGraphRoot, shadowGraphRoot ); 2.54 - visitNextElemAndPersistIt( rootElem, shadowRootElem ); 2.55 - endPersisting(); //tell web server that persist protocol ended 2.56 + visitNextElemAndPersistIt( rootElem ); 2.57 +// endPersisting(); //tell web server that persist protocol ended 2.58 2.59 //now, restore all the pointers, replacing the IDs with pointer to object 2.60 restoreAnchorAndViewSetRoot( theGraphRoot, shadowGraphRoot ); 2.61 - visitNextElemAndRestoreIt( rootElem, shadowRootElem ); 2.62 + visitNextElemAndRestoreIt( rootElem ); 2.63 } 2.64 2.65 function persistAnchorAndViewSetRoot( theGraphRoot, shadowGraphRoot ) { 2.66 @@ -89,94 +107,75 @@ 2.67 } 2.68 2.69 //Contract: have already verified that this elem has not been visited before calling 2.70 -var visitNextElemAndPersistIt = function( elem, shadowElem ) { 2.71 +var visitNextElemAndPersistIt = function( elem ) { 2.72 //mark the element as having been visited 2.73 elem.isAlreadyVisited = true; 2.74 2.75 //cut the back link going from the view set to the elem node 2.76 - if(elem.viewSet.syntaxElem) { 2.77 - shadowElem.viewSet.syntaxElem = elem.viewSet.syntaxElem; 2.78 + if((elem.viewSet||{}).syntaxElem) { 2.79 elem.viewSet.syntaxElem = elem.viewSet.syntaxElem.ID; 2.80 } 2.81 2.82 - //visit each port (save this position before visiting!) 2.83 + //visit each port 2.84 var elemToVisit = {}; var i = 0; var j = 0; var inPort = {}; 2.85 var ports = elem.portsIn; var numPorts = ports.length; var numPairedPorts = 0; 2.86 - //as go along, save pointers into shadow element.. 2.87 for( j = 0; j < numPorts; j++ ) { 2.88 inPort = ports[j]; 2.89 numPairedPorts = inPort.pairedPorts.length; 2.90 - //shadowElem may not have enough positions in portsIn array.. 2.91 - shadowElem.portsIn.push({pairedPorts: []}); 2.92 //follow each pairedPort link 2.93 for( i = 0; i < numPairedPorts; i++ ) { 2.94 //process element linked to the paired port 2.95 elemToVisit = inPort.pairedPorts[i].element; 2.96 if( !elemToVisit.isAlreadyVisited ) { 2.97 - //not visited yet, so doesn't have a shadow elem 2.98 - var newShadowElem = makeShadowElem(); 2.99 - fixthis shadowElem.portsIn[j].pairedPortShadows[i] = newShadowElem; 2.100 - visitNextElemAndPersistIt(elemToVisit, newShadowElem ); 2.101 + visitNextElemAndPersistIt( elemToVisit ); 2.102 } 2.103 //back from visit, replace pointer with ID of pointed to port 2.104 - shadowElem.portsIn[j].pairedPorts[i] = inPort.pairedPorts[i]; //first save it! 2.105 inPort.pairedPorts[i] = inPort.pairedPorts[i].ID; 2.106 } 2.107 - //save and replace the element back-pointer in the port object 2.108 - shadowElem.portsIn[j].element = inPort.element; 2.109 + //replace the element back-pointer in the port object 2.110 inPort.element = inPort.element.ID; 2.111 } 2.112 ports = elem.portsOut; numPorts = ports.length; var outPort = {}; 2.113 for( j = 0; j < numPorts; j++ ) { 2.114 outPort = ports[j]; 2.115 numPairedPorts = outPort.pairedPorts.length; 2.116 - shadowElem.portsOut.push({pairedPorts: []}); 2.117 //follow each pairedPort link 2.118 for( i = 0; i < numPairedPorts; i++ ) { 2.119 //process element linked to the paired port 2.120 elemToVisit = outPort.pairedPorts[i].element; 2.121 if( !elemToVisit.isAlreadyVisited ) { 2.122 - var newShadowElem = { portsIn: [], portsOut: [], linkedElems: [] }; 2.123 - shadowElem.portsOut[j].pairedPorts.push(newShadowElem); 2.124 - visitNextElemAndPersistIt(elemToVisit, newShadowElem ); 2.125 + visitNextElemAndPersistIt( elemToVisit ); 2.126 } 2.127 //when come back, replace pointer with ID of pointed to port 2.128 outPort.pairedPorts[i] = outPort.pairedPorts[i].ID; 2.129 } 2.130 - //save and replace the element back-pointer in the port object 2.131 - shadowElem.portsOut[j].element = outPort.element; 2.132 + //replace the element back-pointer in the port object 2.133 outPort.element = outPort.element.ID; 2.134 } 2.135 var numLinkedElems = elem.linkedElems.length; 2.136 for( i = 0; i < numLinkedElems; i++ ) { 2.137 if( !(elem.linkedElems[i].isAlreadyVisited) ) { 2.138 - var newShadowElem = { portsIn: [], portsOut: [], linkedElems: [] }; 2.139 - shadowElem.linkedElems.push(newShadowElem); 2.140 - visitNextElemAndPersistIt(elem.linkedElems[i], newShadowElem ); 2.141 + visitNextElemAndPersistIt( elem.linkedElems[i] ); 2.142 } 2.143 //back from visit, replace pointer with ID of pointed to elem 2.144 - shadowElem.linkedElems[i] = elem.linkedElems[i]; 2.145 elem.linkedElems[i] = elem.linkedElems[i].ID; 2.146 } 2.147 2.148 //cut links to the view sets embedded within view set link objects 2.149 - if(elem.viewSet.viewSetLinks) { 2.150 + if((elem.viewSet||{}).viewSetLinks) { 2.151 var viewSet = elem.viewSet; 2.152 var numLinked = viewSet.viewSetLinks.length; 2.153 var viewSetLink = {}; 2.154 for (i = 0; i < numLinked; i++) { 2.155 viewSetLink = viewSet.viewSetLinks[i]; 2.156 - if (viewSetLink) { 2.157 - var shadowLink = { referenceViewSet: {}, subordinateViewSet: {} }; 2.158 - shadowLink.referenceViewSet = viewSetLink.referenceViewSet; 2.159 - shadowLink.subordinateViewSet = viewSetLink.subordinateViewSet; 2.160 + if( viewSetLink ) { 2.161 viewSetLink.referenceViewSet = viewSetLink.referenceViewSet.ID; 2.162 viewSetLink.subordinateViewSet = viewSetLink.subordinateViewSet.ID; 2.163 } 2.164 } 2.165 } 2.166 //cut back-links to parent view boxes within view set tree 2.167 - if(elem.viewSet.rootViewBox) { 2.168 + if((elem.viewSet||{}).rootViewBox ) { 2.169 walkViewTree( elem.viewSet.rootViewBox ); 2.170 } 2.171 2.172 @@ -189,6 +188,7 @@ 2.173 2.174 //now that the graph, with its view sets, has been written out to JSON, 2.175 // go back and restore the pointers, replacing the IDs with actual pointer. 2.176 +//Replace top pointers from a shadow, then after this can lookup pointers by ID 2.177 function restoreAnchorAndViewSetRoot( theGraphRoot, shadowGraphRoot ) { 2.178 //just copy the above code and reverse the direction of the assignments! 2.179 theGraphRoot.rootElem = shadowGraphRoot.rootElem; 2.180 @@ -201,108 +201,104 @@ 2.181 } 2.182 2.183 //Contract: have already verified that this elem has not been visited before calling 2.184 -var visitNextElemAndRestoreIt = function( elem, shadowElem ) { 2.185 +var visitNextElemAndRestoreIt = function( elem ) { 2.186 //mark the element as having been visited 2.187 elem.isAlreadyVisited = false; //all start at true, making false marks as restored 2.188 2.189 //restore the back link going from the view set to the elem node 2.190 - if(elem.viewSet.syntaxElem) { 2.191 - elem.viewSet.syntaxElem = shadowElem.viewSet.syntaxElem; 2.192 + if((elem.viewSet||{}).syntaxElem) { //idiom makes safe when viewset undefined 2.193 + elem.viewSet.syntaxElem = elem.getByID(elem.viewSet.syntaxElem); 2.194 } 2.195 2.196 //restore each port 2.197 var elemToVisit = {}; var i = 0; var j = 0; var inPort = {}; 2.198 - var ports = elem.portsIn; var numPorts = ports.length; var numPairedPorts = 0; 2.199 - //as go along, restore pointers from shadow element.. 2.200 + var portsIn = elem.portsIn; var numPorts = portsIn.length; var numPairedPorts = 0; 2.201 + //as go along, restore pointers by looking them up 2.202 for( j = 0; j < numPorts; j++ ) { 2.203 - inPort = ports[j]; 2.204 + inPort = portsIn[j]; 2.205 + 2.206 + //restore the element back-pointer in the port object 2.207 + inPort.element = inPort.getByID(inPort.element); 2.208 + 2.209 + //follow each pairedPort link 2.210 numPairedPorts = inPort.pairedPorts.length; 2.211 - //follow each pairedPort link 2.212 - //restore the element back-pointer in the port object 2.213 - inPort.element = shadowElem.portsIn[j].element; 2.214 for( i = 0; i < numPairedPorts; i++ ) { 2.215 //process element linked to the paired port 2.216 //first, replace pointer to port 2.217 - inPort.pairedPorts[i] = shadowElem.portsIn[j].pairedPorts[i]; 2.218 -//verify this is right order -- do rest of restore on tis one before visit? 2.219 + inPort.pairedPorts[i] = inPort.getByID(inPort.pairedPorts[i]); 2.220 elemToVisit = inPort.pairedPorts[i].element; 2.221 - if( elemToVisit.isAlreadyVisited ) { //if still marked from before 2.222 - visitNextElemAndPersistIt(elemToVisit, shadowElem.portsIn[j].pairedPorts[i] ); 2.223 + if( typeof elemToVisit == 'number' ) { 2.224 + //means the element back-pointer inside the port on the other end 2.225 + // is still the ID.. IE, that port and its element not restored yet 2.226 + visitNextElemAndRestoreIt( outPort.getByID(elemToVisit) ); 2.227 + } 2.228 + else if( elemToVisit.isAlreadyVisited ) { //if still marked from before 2.229 + //don't think this case will ever come up! if elem not restored, 2.230 + // then the elem's port's back pointer will still be an ID and above 2.231 + // if() will catch it.. 2.232 + visitNextElemAndRestoreIt( elemToVisit ); 2.233 } 2.234 } 2.235 } 2.236 - ports = elem.portsOut; numPorts = ports.length; var outPort = {}; 2.237 + var outPorts = elem.portsOut; numPorts = outPorts.length; var outPort = {}; 2.238 for( j = 0; j < numPorts; j++ ) { 2.239 - outPort = ports[j]; 2.240 + outPort = outPorts[j]; 2.241 + //restore back link from outPort to its element 2.242 + outPort.element = outPort.getByID(outPort.element); 2.243 numPairedPorts = outPort.pairedPorts.length; 2.244 - shadowElem.portsOut.push({pairedPorts: []}); 2.245 - //follow each pairedPort link 2.246 + //visit each pairedPort link 2.247 for( i = 0; i < numPairedPorts; i++ ) { 2.248 + //restore the pointer to the paired port 2.249 + outPort.pairedPorts[i] = outPort.getByID(outPort.pairedPorts[i]); 2.250 //process element linked to the paired port 2.251 elemToVisit = outPort.pairedPorts[i].element; 2.252 - if( !elemToVisit.isAlreadyVisited ) { 2.253 - var newShadowElem = { portsIn: [], portsOut: [], linkedElems: [] }; 2.254 - shadowElem.portsOut[j].pairedPorts.push(newShadowElem); 2.255 - visitNextElemAndPersistIt(elemToVisit, newShadowElem ); 2.256 + if( typeof elemToVisit == 'number' ) { 2.257 + //means the element back-pointer inside the port on the other end 2.258 + // is still the ID.. IE, that port and its element not restored yet 2.259 + visitNextElemAndRestoreIt( outPort.getByID(elemToVisit) ); 2.260 } 2.261 - //when come back, replace pointer with ID of pointed to port 2.262 - outPort.pairedPorts[i] = outPort.pairedPorts[i].ID; 2.263 + else if( elemToVisit.isAlreadyVisited ) { //if needs restoring 2.264 + //don't think this case will ever come up! if not restored, 2.265 + // then the elem back pointer will still be an ID and above 2.266 + // if() will catch it.. 2.267 + visitNextElemAndRestoreIt( elemToVisit ); 2.268 + } 2.269 } 2.270 - //save and replace the element back-pointer in the port object 2.271 - shadowElem.portsOut[j].element = outPort.element; 2.272 - outPort.element = outPort.element.ID; 2.273 } 2.274 var numLinkedElems = elem.linkedElems.length; 2.275 for( i = 0; i < numLinkedElems; i++ ) { 2.276 - if( !(elem.linkedElems[i].isAlreadyVisited) ) { 2.277 - var newShadowElem = { portsIn: [], portsOut: [], linkedElems: [] }; 2.278 - shadowElem.linkedElems.push(newShadowElem); 2.279 - visitNextElemAndPersistIt(elem.linkedElems[i], newShadowElem ); 2.280 + //restore linked elem first, then process that restored elem 2.281 + elem.linkedElems[i] = elem.getByID( elem.linkedElems[i] ); 2.282 + if( elem.linkedElems[i].isAlreadyVisited ) { 2.283 + visitNextElemAndRestoreIt( elem.linkedElems[i] ); 2.284 } 2.285 - //back from visit, replace pointer with ID of pointed to elem 2.286 - shadowElem.linkedElems[i] = elem.linkedElems[i]; 2.287 - elem.linkedElems[i] = elem.linkedElems[i].ID; 2.288 } 2.289 2.290 - //cut links to the view sets embedded within view set link objects 2.291 - if(elem.viewSet.viewSetLinks) { 2.292 + //restore links to the view sets embedded within view set link objects 2.293 + if( (elem.viewSet||{}).viewSetLinks ) { 2.294 var viewSet = elem.viewSet; 2.295 - var numLinked = viewSet.viewSetLinks.length; 2.296 + var numLinked = viewSet.viewSetLinks.length; //array always exists 2.297 var viewSetLink = {}; 2.298 for (i = 0; i < numLinked; i++) { 2.299 viewSetLink = viewSet.viewSetLinks[i]; 2.300 if (viewSetLink) { 2.301 - var shadowLink = { referenceViewSet: {}, subordinateViewSet: {} }; 2.302 - shadowLink.referenceViewSet = viewSetLink.referenceViewSet; 2.303 - shadowLink.subordinateViewSet = viewSetLink.subordinateViewSet; 2.304 - viewSetLink.referenceViewSet = viewSetLink.referenceViewSet.ID; 2.305 - viewSetLink.subordinateViewSet = viewSetLink.subordinateViewSet.ID; 2.306 + viewSetLink.referenceViewSet = elem.getByID(viewSetLink.referenceViewSet); 2.307 + viewSetLink.subordinateViewSet = elem.getByID(viewSetLink.subordinateViewSet); 2.308 } 2.309 } 2.310 } 2.311 - //cut back-links to parent view boxes within view set tree 2.312 - if(elem.viewSet.rootViewBox) { 2.313 - walkViewTree( elem.viewSet.rootViewBox ); 2.314 + //restore back-links to parent view boxes within view set tree 2.315 + if( (elem.viewSet||{}).rootViewBox ) { //idiom that's safe when viewSet undefine 2.316 + walkViewTreeAndRestore( elem.viewSet.rootViewBox ); 2.317 } 2.318 - 2.319 - //this elem, and all objects reachable from it are now safe to be 2.320 - // stringified with JSON.. so do it! 2.321 - var stringOfElemNode = JSON.stringify( elem, null, '\t' ); 2.322 - console.log("JSON of elem: " + stringOfElemNode ); 2.323 - persistString( stringOfElemNode ); 2.324 } 2.325 2.326 - persistTheGraph( syntaxGraph ); 2.327 +persistTheGraph( syntaxGraph ); 2.328 2.329 console.log("\npersisting graph done!\n") 2.330 2.331 //retrievePersistedString(); 2.332 2.333 -function makeShadowElem(){ 2.334 - return { portsIn: [], portsOut: [], linkedElems: [], portsInShadows: [], portsOutShadows [] }; 2.335 - 2.336 -} 2.337 - 2.338 //walk the tree, replacing all parent pointers with ID 2.339 // dont bother keeping shadow copy, easily restored without copy 2.340 function walkViewTree( viewBox ) { 2.341 @@ -320,12 +316,30 @@ 2.342 // persistString( JSON.stringify(viewBox)) 2.343 console.log("done recursing viewBox: " + viewBox.ID) 2.344 } 2.345 +//walk the tree, restoring all IDs with parent and children pointers 2.346 +function walkViewTreeAndRestore( viewBox ) { 2.347 + //replace ID that's in the parent field with looked up object pointer 2.348 + if(viewBox.parent) viewBox.parent = viewBox.getByID(viewBox.parent); 2.349 + if(viewBox.children.length > 0) { //all view boxes should have array! 2.350 + var childBox = {}; 2.351 + var numChildren = viewBox.children.length; 2.352 + for (i = 0; i < numChildren; i++) { 2.353 + viewBox.children[i] = viewBox.getByID(viewBox.children[i]); 2.354 + childBox = viewBox.children[i]; 2.355 + if( childBox ) { 2.356 + walkViewTree( childBox ); 2.357 + } 2.358 + } 2.359 + } 2.360 + console.log("done restoring viewBox: " + viewBox.ID) 2.361 +} 2.362 2.363 function startPersisting() { 2.364 //bottle server 2.365 var theUrl = "http://localhost:8080/startsavinggraph"; 2.366 var xmlHttp = new XMLHttpRequest(); 2.367 xmlHttp.open( "GET", theUrl, false ); 2.368 + console.log("about to send start persisting command"); 2.369 xmlHttp.send( null ); 2.370 console.log("started persisting: " + xmlHttp.responseText ); 2.371 } 2.372 @@ -366,7 +380,7 @@ 2.373 var xmlHttp = new XMLHttpRequest(); 2.374 xmlHttp.open( "GET", theUrl, false ); 2.375 xmlHttp.send( null ); 2.376 - console.log("started persisting: " + xmlHttp.responseText ); 2.377 + console.log("end persisting: " + xmlHttp.responseText ); 2.378 } 2.379 2.380 //================================
3.1 --- a/1__Development/0__Code_Dev/Javascript_approach/MVDM_implementation/app/POPDisplay.js Wed Aug 06 00:16:19 2014 -0700 3.2 +++ b/1__Development/0__Code_Dev/Javascript_approach/MVDM_implementation/app/POPDisplay.js Thu Aug 07 00:10:50 2014 -0700 3.3 @@ -86,7 +86,7 @@ 3.4 var viewBox = {}; var newSurface = {}; var newSurfMod = {}; 3.5 var newContainer = {}; var newContMod = {}; 3.6 var i = 0; var numChildren = 0; 3.7 - 3.8 +rewrite display to handle view sets! 3.9 var nextGenParents = []; var parentContainer = {}; var viewBoxChildren = []; 3.10 nextGenParents.push( {viewBox: rootViewSet, container: rootContainer}); 3.11 //loop, getting oldest parent pair in queue each time 3.12 @@ -173,7 +173,7 @@ 3.13 init: init, 3.14 connectToCommander: connectToCommander, 3.15 handleGesture: handleGesture, 3.16 - acceptViewList: acceptRootViewSet 3.17 + acceptRootViewSet: acceptRootViewSet 3.18 }; 3.19 }); 3.20
4.1 --- a/1__Development/0__Code_Dev/Javascript_approach/MVDM_implementation/app/POPSyntaxGraphVisualizer.js Wed Aug 06 00:16:19 2014 -0700 4.2 +++ b/1__Development/0__Code_Dev/Javascript_approach/MVDM_implementation/app/POPSyntaxGraphVisualizer.js Thu Aug 07 00:10:50 2014 -0700 4.3 @@ -3,8 +3,6 @@ 4.4 //Make a Visualizer object, and a number of functions that operate on it. 4.5 // One of the functions accepts 4.6 define(function(require, exports, module) { 4.7 -//Create the famous infrastructure, which is used for rendering on screen 4.8 - 4.9 var srcHolder = {}; 4.10 var DisplayToSendTo = {}; 4.11
5.1 --- a/1__Development/6__Website/POPBottleServer/POPBottleServer.py Wed Aug 06 00:16:19 2014 -0700 5.2 +++ b/1__Development/6__Website/POPBottleServer/POPBottleServer.py Thu Aug 07 00:10:50 2014 -0700 5.3 @@ -3,40 +3,18 @@ 5.4 5.5 graphFile = None 5.6 5.7 -@route('/') 5.8 -def index(): 5.9 - return '<b>Hello</b>!' 5.10 +#============== 5.11 5.12 -@route('/<name>') 5.13 -@route('/hello/<name>') 5.14 -def nameroute(name): 5.15 - return template('<b>Hello {{name}}</b>!', name=name) 5.16 - 5.17 -@route('/savejson/<thejson>') 5.18 -def savejson(thejson): 5.19 - text_file = open("syntaxGraph.json", "w") 5.20 - text_file.write("%s" % thejson) 5.21 - text_file.close() 5.22 - print "hello" 5.23 - response.set_header('Access-Control-Allow-Origin', '*') 5.24 -# return 'Got JSON!' 5.25 -# return template('Got JSON! {{printjson}}</b>!', printjson = thejson) 5.26 - 5.27 -@route('/getjson') 5.28 -def getjson(): 5.29 - text_file = open("syntaxGraph.json", "r") 5.30 - returnjson = text_file.read() 5.31 - text_file.close() 5.32 - response.set_header('Access-Control-Allow-Origin', '*') 5.33 - return returnjson 5.34 - 5.35 -#=============== 5.36 @route('/startsavinggraph') 5.37 def startsavinggraph(): 5.38 - global graphFile 5.39 - graphFile = open("syntaxGraph.json", "w") 5.40 - response.set_header('Access-Control-Allow-Origin', '*') 5.41 - return 'ACK' 5.42 + global graphFile 5.43 + graphFile = open("syntaxGraph.json", "w") 5.44 + print "opened graph file " 5.45 + print "Name of the file: ", graphFile.name 5.46 + print "Closed or not : ", graphFile.closed 5.47 + print "Opening mode : ", graphFile.mode 5.48 + print "Softspace flag : ", graphFile.softspace 5.49 + response.set_header('Access-Control-Allow-Origin', '*') 5.50 5.51 @route('/save1elem/<thejson>') 5.52 def save1elem(thejson): 5.53 @@ -44,11 +22,10 @@ 5.54 thejson = thejson.replace('%N', '\n') 5.55 thejson = thejson.replace('%H', '\\') 5.56 thejson = thejson.replace('%S', '/') 5.57 - print thejson 5.58 +# print thejson 5.59 global graphFile 5.60 - graphFile.write("%s\n<end elem>\n" % thejson) 5.61 + graphFile.write("%s\nend elem\n" % thejson) 5.62 response.set_header('Access-Control-Allow-Origin', '*') 5.63 - return 'ACK' 5.64 5.65 @route('/endsavinggraph') 5.66 def endsavinggraph(): 5.67 @@ -80,4 +57,7 @@ 5.68 graphFile.close() 5.69 return 'ACK' 5.70 5.71 +#================ 5.72 + 5.73 run(host='localhost', port=8080) 5.74 +
6.1 --- a/1__Development/6__Website/POPBottleServer/syntaxGraph.json Wed Aug 06 00:16:19 2014 -0700 6.2 +++ b/1__Development/6__Website/POPBottleServer/syntaxGraph.json Thu Aug 07 00:10:50 2014 -0700 6.3 @@ -0,0 +1,477 @@ 6.4 +{ 6.5 + "rootElem": 1, 6.6 + "rootViewSet": { 6.7 + "ID": 2, 6.8 + "viewSetLinks": [ 6.9 + { 6.10 + "ID": 3, 6.11 + "referenceViewSet": 2, 6.12 + "subordinateViewSet": 4, 6.13 + "xOffset": 0, 6.14 + "yOffset": 0, 6.15 + "scale": 1 6.16 + } 6.17 + ] 6.18 + } 6.19 +} 6.20 +end elem 6.21 +{ 6.22 + "ID": 31, 6.23 + "properties": [ 6.24 + { 6.25 + "ID": 32, 6.26 + "propertyName": "TypeOfElement", 6.27 + "propertyValue": "Command", 6.28 + "subProperties": [ 6.29 + { 6.30 + "ID": 33, 6.31 + "propertyName": "CommandID", 6.32 + "propertyValue": "GabePattPop", 6.33 + "subProperties": [] 6.34 + } 6.35 + ] 6.36 + }, 6.37 + { 6.38 + "ID": 34, 6.39 + "propertyName": "TypeOfSyntacticStructure", 6.40 + "propertyValue": "syntacticPatternRoot", 6.41 + "subProperties": [] 6.42 + } 6.43 + ], 6.44 + "portsIn": [ 6.45 + { 6.46 + "ID": 35, 6.47 + "element": 31, 6.48 + "properties": [ 6.49 + { 6.50 + "ID": 36, 6.51 + "propertyName": "TypeOfPort", 6.52 + "propertyValue": "dataComm", 6.53 + "subProperties": [ 6.54 + { 6.55 + "ID": 37, 6.56 + "propertyName": "TypeOfCommData", 6.57 + "propertyValue": "GabePattStack", 6.58 + "subProperties": [] 6.59 + } 6.60 + ] 6.61 + } 6.62 + ], 6.63 + "pairedPorts": [ 6.64 + 28 6.65 + ] 6.66 + } 6.67 + ], 6.68 + "portsOut": [ 6.69 + { 6.70 + "ID": 38, 6.71 + "element": 31, 6.72 + "properties": [ 6.73 + { 6.74 + "ID": 39, 6.75 + "propertyName": "TypeOfPort", 6.76 + "propertyValue": "dataComm", 6.77 + "subProperties": [ 6.78 + { 6.79 + "ID": 40, 6.80 + "propertyName": "TypeOfCommData", 6.81 + "propertyValue": "GabePattStack", 6.82 + "subProperties": [] 6.83 + } 6.84 + ] 6.85 + } 6.86 + ], 6.87 + "pairedPorts": [] 6.88 + }, 6.89 + { 6.90 + "ID": 41, 6.91 + "element": 31, 6.92 + "properties": [ 6.93 + { 6.94 + "ID": 42, 6.95 + "propertyName": "TypeOfPort", 6.96 + "propertyValue": "dataComm", 6.97 + "subProperties": [ 6.98 + { 6.99 + "ID": 43, 6.100 + "propertyName": "TypeOfCommData", 6.101 + "propertyValue": "float", 6.102 + "subProperties": [] 6.103 + } 6.104 + ] 6.105 + } 6.106 + ], 6.107 + "pairedPorts": [] 6.108 + } 6.109 + ], 6.110 + "linkedElems": [], 6.111 + "isAlreadyVisited": true 6.112 +} 6.113 +end elem 6.114 +{ 6.115 + "ID": 18, 6.116 + "properties": [ 6.117 + { 6.118 + "ID": 19, 6.119 + "propertyName": "TypeOfElement", 6.120 + "propertyValue": "Command", 6.121 + "subProperties": [ 6.122 + { 6.123 + "ID": 20, 6.124 + "propertyName": "CommandID", 6.125 + "propertyValue": "GabePattPush", 6.126 + "subProperties": [] 6.127 + } 6.128 + ] 6.129 + }, 6.130 + { 6.131 + "ID": 21, 6.132 + "propertyName": "TypeOfSyntacticStructure", 6.133 + "propertyValue": "syntacticPatternRoot", 6.134 + "subProperties": [] 6.135 + } 6.136 + ], 6.137 + "portsIn": [ 6.138 + { 6.139 + "ID": 22, 6.140 + "element": 18, 6.141 + "properties": [ 6.142 + { 6.143 + "ID": 23, 6.144 + "propertyName": "TypeOfPort", 6.145 + "propertyValue": "dataComm", 6.146 + "subProperties": [ 6.147 + { 6.148 + "ID": 24, 6.149 + "propertyName": "TypeOfCommData", 6.150 + "propertyValue": "GabePattStack", 6.151 + "subProperties": [] 6.152 + } 6.153 + ] 6.154 + } 6.155 + ], 6.156 + "pairedPorts": [] 6.157 + }, 6.158 + { 6.159 + "ID": 25, 6.160 + "element": 18, 6.161 + "properties": [ 6.162 + { 6.163 + "ID": 26, 6.164 + "propertyName": "TypeOfPort", 6.165 + "propertyValue": "dataComm", 6.166 + "subProperties": [ 6.167 + { 6.168 + "ID": 27, 6.169 + "propertyName": "TypeOfCommData", 6.170 + "propertyValue": "float", 6.171 + "subProperties": [] 6.172 + } 6.173 + ] 6.174 + } 6.175 + ], 6.176 + "pairedPorts": [] 6.177 + } 6.178 + ], 6.179 + "portsOut": [ 6.180 + { 6.181 + "ID": 28, 6.182 + "element": 18, 6.183 + "properties": [ 6.184 + { 6.185 + "ID": 29, 6.186 + "propertyName": "TypeOfPort", 6.187 + "propertyValue": "dataComm", 6.188 + "subProperties": [ 6.189 + { 6.190 + "ID": 30, 6.191 + "propertyName": "TypeOfCommData", 6.192 + "propertyValue": "GabePattStack", 6.193 + "subProperties": [] 6.194 + } 6.195 + ] 6.196 + } 6.197 + ], 6.198 + "pairedPorts": [ 6.199 + 35 6.200 + ] 6.201 + } 6.202 + ], 6.203 + "linkedElems": [], 6.204 + "isAlreadyVisited": true 6.205 +} 6.206 +end elem 6.207 +{ 6.208 + "ID": 12, 6.209 + "properties": [ 6.210 + { 6.211 + "ID": 13, 6.212 + "propertyName": "TypeOfElement", 6.213 + "propertyValue": "GabeQueryPattern", 6.214 + "subProperties": [] 6.215 + }, 6.216 + { 6.217 + "ID": 14, 6.218 + "propertyName": "TypeOfSyntacticStructure", 6.219 + "propertyValue": "syntacticHierarchy", 6.220 + "subProperties": [] 6.221 + } 6.222 + ], 6.223 + "portsIn": [], 6.224 + "portsOut": [], 6.225 + "linkedElems": [ 6.226 + 18, 6.227 + 31 6.228 + ], 6.229 + "isAlreadyVisited": true 6.230 +} 6.231 +end elem 6.232 +{ 6.233 + "ID": 44, 6.234 + "properties": [ 6.235 + { 6.236 + "ID": 45, 6.237 + "propertyName": "TypeOfElement", 6.238 + "propertyValue": "Command", 6.239 + "subProperties": [ 6.240 + { 6.241 + "ID": 46, 6.242 + "propertyName": "CommandID", 6.243 + "propertyValue": "GabePassThrough", 6.244 + "subProperties": [] 6.245 + } 6.246 + ] 6.247 + }, 6.248 + { 6.249 + "ID": 47, 6.250 + "propertyName": "TypeOfSyntacticStructure", 6.251 + "propertyValue": "syntacticPatternRoot", 6.252 + "subProperties": [] 6.253 + } 6.254 + ], 6.255 + "portsIn": [ 6.256 + { 6.257 + "ID": 48, 6.258 + "element": 44, 6.259 + "properties": [ 6.260 + { 6.261 + "ID": 49, 6.262 + "propertyName": "TypeOfPort", 6.263 + "propertyValue": "dataComm", 6.264 + "subProperties": [ 6.265 + { 6.266 + "ID": 50, 6.267 + "propertyName": "TypeOfCommData", 6.268 + "propertyValue": "GabePattStack", 6.269 + "subProperties": [] 6.270 + } 6.271 + ] 6.272 + } 6.273 + ], 6.274 + "pairedPorts": [] 6.275 + }, 6.276 + { 6.277 + "ID": 51, 6.278 + "element": 44, 6.279 + "properties": [ 6.280 + { 6.281 + "ID": 52, 6.282 + "propertyName": "TypeOfPort", 6.283 + "propertyValue": "dataComm", 6.284 + "subProperties": [ 6.285 + { 6.286 + "ID": 53, 6.287 + "propertyName": "TypeOfCommData", 6.288 + "propertyValue": "float", 6.289 + "subProperties": [] 6.290 + } 6.291 + ] 6.292 + } 6.293 + ], 6.294 + "pairedPorts": [] 6.295 + } 6.296 + ], 6.297 + "portsOut": [ 6.298 + { 6.299 + "ID": 54, 6.300 + "element": 44, 6.301 + "properties": [ 6.302 + { 6.303 + "ID": 55, 6.304 + "propertyName": "TypeOfPort", 6.305 + "propertyValue": "dataComm", 6.306 + "subProperties": [ 6.307 + { 6.308 + "ID": 56, 6.309 + "propertyName": "TypeOfCommData", 6.310 + "propertyValue": "GabePattStack", 6.311 + "subProperties": [] 6.312 + } 6.313 + ] 6.314 + } 6.315 + ], 6.316 + "pairedPorts": [] 6.317 + }, 6.318 + { 6.319 + "ID": 57, 6.320 + "element": 44, 6.321 + "properties": [ 6.322 + { 6.323 + "ID": 58, 6.324 + "propertyName": "TypeOfPort", 6.325 + "propertyValue": "dataComm", 6.326 + "subProperties": [ 6.327 + { 6.328 + "ID": 59, 6.329 + "propertyName": "TypeOfCommData", 6.330 + "propertyValue": "float", 6.331 + "subProperties": [] 6.332 + } 6.333 + ] 6.334 + } 6.335 + ], 6.336 + "pairedPorts": [] 6.337 + } 6.338 + ], 6.339 + "linkedElems": [], 6.340 + "isAlreadyVisited": true 6.341 +} 6.342 +end elem 6.343 +{ 6.344 + "ID": 15, 6.345 + "properties": [ 6.346 + { 6.347 + "ID": 16, 6.348 + "propertyName": "TypeOfElement", 6.349 + "propertyValue": "GabeReplacePattern", 6.350 + "subProperties": [] 6.351 + }, 6.352 + { 6.353 + "ID": 17, 6.354 + "propertyName": "TypeOfSyntacticStructure", 6.355 + "propertyValue": "syntacticHierarchy", 6.356 + "subProperties": [] 6.357 + } 6.358 + ], 6.359 + "portsIn": [], 6.360 + "portsOut": [], 6.361 + "linkedElems": [ 6.362 + 44 6.363 + ], 6.364 + "isAlreadyVisited": true 6.365 +} 6.366 +end elem 6.367 +{ 6.368 + "ID": 1, 6.369 + "properties": [ 6.370 + { 6.371 + "ID": 10, 6.372 + "propertyName": "TypeOfElement", 6.373 + "propertyValue": "GabeTransformRule", 6.374 + "subProperties": [] 6.375 + }, 6.376 + { 6.377 + "ID": 11, 6.378 + "propertyName": "TypeOfSyntacticStructure", 6.379 + "propertyValue": "syntacticHierarchy", 6.380 + "subProperties": [] 6.381 + } 6.382 + ], 6.383 + "portsIn": [], 6.384 + "portsOut": [], 6.385 + "linkedElems": [ 6.386 + 12, 6.387 + 15 6.388 + ], 6.389 + "viewSet": { 6.390 + "ID": 4, 6.391 + "syntaxElem": 1, 6.392 + "rootViewBox": { 6.393 + "ID": 5, 6.394 + "shape": "<svg width=\"68\" height=\"88\"><rect x=\"1\" y=\"1\" rx=\"20\" ry=\"20\" width=\"66\" height=\"86\" style=\"fill:none;stroke:red;stroke-width:2;opacity:1\" vector-effect=\"non-scaling-stroke\">", 6.395 + "width": 1000, 6.396 + "height": 700, 6.397 + "xOffset": 0, 6.398 + "yOffset": 0, 6.399 + "scale": 1, 6.400 + "parent": 4, 6.401 + "children": [ 6.402 + { 6.403 + "ID": 6, 6.404 + "shape": "<svg> <text x=\"0\" y=\"9\" style=\"font-family: Arial; font-size: 11;fill:black;stroke:none\" id=\"svgText\">properties</text> </svg>", 6.405 + "width": 49, 6.406 + "height": 14, 6.407 + "xOffset": 8, 6.408 + "yOffset": 8, 6.409 + "scale": 1, 6.410 + "parent": 5, 6.411 + "children": [], 6.412 + "handlers": [ 6.413 + { 6.414 + "type": "key" 6.415 + } 6.416 + ] 6.417 + }, 6.418 + { 6.419 + "ID": 7, 6.420 + "shape": "<svg> <text x=\"0\" y=\"9\" style=\"font-family: Arial; font-size: 11;fill:black;stroke:none\" id=\"svgText\">portsIn</text> </svg>", 6.421 + "width": 33, 6.422 + "height": 14, 6.423 + "xOffset": 8, 6.424 + "yOffset": 25, 6.425 + "scale": 1, 6.426 + "parent": 5, 6.427 + "children": [], 6.428 + "handlers": [ 6.429 + { 6.430 + "type": "key" 6.431 + } 6.432 + ] 6.433 + }, 6.434 + { 6.435 + "ID": 8, 6.436 + "shape": "<svg> <text x=\"0\" y=\"9\" style=\"font-family: Arial; font-size: 11;fill:black;stroke:none\" id=\"svgText\">portsOut</text> </svg>", 6.437 + "width": 42, 6.438 + "height": 14, 6.439 + "xOffset": 8, 6.440 + "yOffset": 42, 6.441 + "scale": 1, 6.442 + "parent": 5, 6.443 + "children": [], 6.444 + "handlers": [ 6.445 + { 6.446 + "type": "key" 6.447 + } 6.448 + ] 6.449 + }, 6.450 + { 6.451 + "ID": 9, 6.452 + "shape": "<svg> <text x=\"0\" y=\"9\" style=\"font-family: Arial; font-size: 11;fill:black;stroke:none\" id=\"svgText\">linkedElems</text> </svg>", 6.453 + "width": 55, 6.454 + "height": 14, 6.455 + "xOffset": 8, 6.456 + "yOffset": 59, 6.457 + "scale": 1, 6.458 + "parent": 5, 6.459 + "children": [], 6.460 + "handlers": [ 6.461 + { 6.462 + "type": "key" 6.463 + } 6.464 + ] 6.465 + } 6.466 + ], 6.467 + "handlers": [ 6.468 + { 6.469 + "type": "key" 6.470 + }, 6.471 + { 6.472 + "type": "key" 6.473 + } 6.474 + ] 6.475 + }, 6.476 + "viewSetLinks": [] 6.477 + }, 6.478 + "isAlreadyVisited": true 6.479 +} 6.480 +end elem