Skip to content

Commit 4a400c9

Browse files
authored
Merge pull request #36 from EdoFro/WIP
v0.0.13
2 parents 57e36ec + 1fb85fe commit 4a400c9

File tree

9 files changed

+2409
-3281
lines changed

9 files changed

+2409
-3281
lines changed

MapDriveInator project.mm

Lines changed: 2062 additions & 3082 deletions
Large diffs are not rendered by default.

MapDriveInator/MapDriveInator.mm

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<node TEXT="MapDriveInator" LOCALIZED_STYLE_REF="AutomaticLayout.level.root" FOLDED="false" ID="ID_696401721" LINK="https://github.com/EdoFro/Freeplane_Map-Drive-Inator">
1717
<attribute_layout NAME_WIDTH="99.75 pt" VALUE_WIDTH="228.74999 pt"/>
1818
<attribute NAME="name" VALUE="mapDriveInator"/>
19-
<attribute NAME="version" VALUE="v0.0.12"/>
19+
<attribute NAME="version" VALUE="v0.0.13"/>
2020
<attribute NAME="author" VALUE="EdoFro"/>
2121
<attribute NAME="freeplaneVersionFrom" VALUE="v1.9.0"/>
2222
<attribute NAME="freeplaneVersionTo" VALUE=""/>
@@ -255,9 +255,19 @@
255255
<node TEXT="added getFileFromLink(n) to get to the real file if it is in another drive and link is relative" ID="ID_143420426"/>
256256
<node TEXT="umweg to get canonicalPaths from files that are in other drives and have relative links" ID="ID_1146418895"/>
257257
</node>
258-
<node TEXT="v0.0.12" ID="ID_1823296301">
258+
<node TEXT="v0.0.12" FOLDED="true" ID="ID_1823296301">
259259
<node TEXT="MapDriveInator: Logs MDI version, Map path, baseFolderNode properties" ID="ID_299612617"/>
260260
</node>
261+
<node TEXT="v.0.0.13" FOLDED="true" ID="ID_1424599841">
262+
<node TEXT="Refactoring MapDriveInator for future changes" ID="ID_1154677857"/>
263+
<node TEXT="Now it marks fileNodes that couldn&apos;t be moved in drive" ID="ID_465948501"/>
264+
<node TEXT="Added &apos;notMovedRenamed&apos; style to template mindmap" ID="ID_1688035947"/>
265+
<node TEXT="Now it controls if the MDI template used in the map is up to date" ID="ID_1895041994"/>
266+
<node TEXT="It logs which files were moved/renamed and which couldn&apos;t be moved/renamed&#xa;(in log.0 file)" ID="ID_1258770961"/>
267+
<node TEXT="Now newImportsNode &apos;s note can show different levels of logging:&#xa; - (0) no log at all&#xa; - (1) Legacy message&#xa; - (2) + Failed actions in drive (default)&#xa; - (3) + Moved/renamed files in drive&#xa; - (4) + Changes made to mindMap&#xa; - (5) + MDI debug info&#xa; - (6) + Elapsed times&#xa; - (7) + Lists calculated to MD-inate" ID="ID_1752132670"/>
268+
<node TEXT="Correction: MDI doesn&apos;t mark already marked nodes to not raise false &apos;node changed&apos; events in Freeplane" ID="ID_835803694"/>
269+
<node TEXT="Better information about new created folders" ID="ID_678080904"/>
270+
</node>
261271
</node>
262272
<node TEXT="license" FOLDED="true" POSITION="top_or_left" ID="ID_1028448710">
263273
<edge COLOR="#00ff00"/>
@@ -947,7 +957,7 @@ For each menu item with an icon add an attribute with the icon key (use develope
947957
</richcontent>
948958
<node TEXT="Build add-on" ID="ID_14185460" LINK="menuitem:_addons.devtools.checkAddOn_on_single_node"/>
949959
<node TEXT="revisar MDI.version" ID="ID_561101604" LINK="menuitem:_ExecuteScriptForSelectionAction">
950-
<attribute NAME="script1" VALUE="import org.freeplane.main.addons.AddOnProperties;&#xd;&#xa;import org.freeplane.main.addons.AddOnsController;&#xd;&#xa;&#xd;&#xa;&#xd;&#xa;&#xd;&#xa;List&lt;AddOnProperties&gt; installedAddOns = AddOnsController.getController().getInstalledAddOns()&#xd;&#xa;&#xd;&#xa;def installedVersion = installedAddOns.find{it.name == &apos;mapDriveInator&apos;}.version&#xd;&#xa;def mdiVersion = MDI.version&#xd;&#xa;def addonMapVersion = node.mindMap.root[&apos;version&apos;]&#xd;&#xa;&#xd;&#xa;def MDIactualizada = installedVersion == mdiVersion&#xd;&#xa;MDIactualizada &amp;= addonMapVersion == mdiVersion&#xd;&#xa;&#xd;&#xa;if (!MDIactualizada){&#xd;&#xa; def msg = &quot;&quot;&quot;&#xd;&#xa; Ojo, las versiones del addon son differentes&#xd;&#xa; &#xd;&#xa; addon actualmente instalado : ${installedVersion}&#xd;&#xa; Librería MDI (MDI.version) : ${mdiVersion}&#xd;&#xa; mapa addon (este mapa) : ${addonMapVersion}&#xd;&#xa; &#xd;&#xa; &quot;&quot;&quot;&#xd;&#xa; ui.showMessage(msg,2)&#xd;&#xa;} else {&#xd;&#xa; ui.informationMessage(&apos;Todo ok&apos;)&#xd;&#xa; c.select(node.next)&#xd;&#xa;}"/>
960+
<attribute NAME="script1" VALUE="import org.freeplane.main.addons.AddOnProperties;&#xd;&#xa;import org.freeplane.main.addons.AddOnsController;&#xd;&#xa;&#xd;&#xa;&#xd;&#xa;&#xd;&#xa;List&lt;AddOnProperties&gt; installedAddOns = AddOnsController.getController().getInstalledAddOns()&#xd;&#xa;&#xd;&#xa;def installedVersion = installedAddOns.find{it.name == &apos;mapDriveInator&apos;}.version&#xd;&#xa;def mdiVersion = MDI.version&#xd;&#xa;def mdiMinTemplateVersion = MDI.minTemplateVersion&#xd;&#xa;def addonMapVersion = node.mindMap.root[&apos;version&apos;]&#xd;&#xa;def sep = File.separator&#xd;&#xa;def pathName = c.userDirectory.path + sep + &quot;templates&quot; + sep + &quot;MapDriveInator&quot; + sep + &quot;MDI styles template.mm&quot;&#xd;&#xa;def templateMap = getMapFromPath(pathName, false)&#xd;&#xa;def templateVersion = templateMap.storage[MDI.MapTemplateVersionStorage]//.toString()&#xd;&#xa;&#xd;&#xa;def MDIactualizada = installedVersion == mdiVersion&#xd;&#xa;MDIactualizada &amp;= addonMapVersion == mdiVersion&#xd;&#xa;MDIactualizada &amp;= MDI.mapHasMinTemplate(templateMap)&#xd;&#xa;//return MDIactualizada&#xd;&#xa;&#xd;&#xa;def msg = &quot;&quot;&quot;&#xd;&#xa; addon actualmente instalado : ${installedVersion}&#xd;&#xa; Librería MDI (MDI.version) : ${mdiVersion}&#xd;&#xa; mapa addon (este mapa) : ${addonMapVersion}&#xd;&#xa; &#xd;&#xa; min Template version : ${mdiMinTemplateVersion}&#xd;&#xa; Template version : ${templateVersion}&#xd;&#xa; &quot;&quot;&quot;&#xd;&#xa;&#xd;&#xa;if (!MDIactualizada){&#xd;&#xa; msg = &apos;Ojo, las versiones del addon son differentes\n&apos; + msg&#xd;&#xa; ui.showMessage(msg, 2)&#xd;&#xa;} else {&#xd;&#xa; ui.showMessage(&apos;Todo ok\n&apos; + msg, 1)&#xd;&#xa; c.select(node.next)&#xd;&#xa;}&#xd;&#xa;&#xd;&#xa;// region: --------------------------- help methods ------------------------&#xd;&#xa;&#xd;&#xa; def getMapFromPath(filePath, withView){&#xd;&#xa; if(exists(filePath)){&#xd;&#xa; def m = c.mapLoader(filePath)&#xd;&#xa; if(withView) m.withView()&#xd;&#xa; return m.getMindMap()&#xd;&#xa; }&#xd;&#xa; }&#xd;&#xa;&#xd;&#xa; def exists(String path){&#xd;&#xa; exists(new File(path))&#xd;&#xa; }&#xd;&#xa;&#xd;&#xa; def exists(File file){&#xd;&#xa; file.isFile()&#xd;&#xa; }&#xd;&#xa;&#xd;&#xa;// end:"/>
951961
</node>
952962
<node TEXT="Package add-on for publication" ID="ID_1767675080" LINK="menuitem:_addons.devtools.releaseAddOn_on_single_node"/>
953963
<node TEXT="Export Translations" ID="ID_1894374378" LINK="menuitem:_addons.devtools.exportTranslations_on_single_node"/>

MapDriveInator/history.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# History
22

3+
## v.0.0.13
4+
5+
* Refactoring MapDriveInator for future changes
6+
* Now it marks fileNodes that couldn't be moved in drive
7+
* Added 'notMovedRenamed' style to template mindmap
8+
* Now it controls if the MDI template used in the map is up to date
9+
* It logs which files were moved/renamed and which couldn't be moved/renamed
10+
(in log.0 file)
11+
* Now newImportsNode 's note can show different levels of logging:
12+
- (0) no log at all
13+
- (1) Legacy message
14+
- (2) + Failed actions in drive (default)
15+
- (3) + Moved/renamed files in drive
16+
- (4) + Changes made to mindMap
17+
- (5) + MDI debug info
18+
- (6) + Elapsed times
19+
- (7) + Lists calculated to MD-inate
20+
* Correction: MDI doesn't mark already marked nodes to not raise false 'node changed' events in Freeplane
21+
* Better information about new created folders
22+
323
## v0.0.12
424

525
* MapDriveInator: Logs MDI version, Map path, baseFolderNode properties

MapDriveInator/scripts/DistributeNewNodes.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ while (nodesToMove.size()>0 && evitarLoop<5){
7979
// --> this node is the destination node where the toBeMoved node should be moved
8080
// "moveTo" is a node
8181
def moveTos = baseFolderNode.find{it.link.uri == uriBuscado}.collect().minus(nodeWithTwin)
82-
def moveTo = moveTos[selectMoveTo(moveTos)] //TODO: lo lleva al primero que encuentra. debería llevarlo sólo si hay uno, si hay más debería dar la opción de elegir
82+
def moveTo = moveTos[selectMoveTo(moveTos)]
8383
// and the moving action itself!!!
8484
toBeMoved.moveTo(moveTo)
8585
//formats the former "folder" to be a button to help the user find where the new node went in the map to

0 commit comments

Comments
 (0)