gpapp / FreePlaneGTD

Fork of Freeplane GTD with extensions
https://www.itworks.hu/portfolio/freeplane-gtd/
GNU General Public License v3.0
50 stars 18 forks source link

FEATURE: evaluate node's formula before view in task summary #97

Open nnako opened 5 years ago

nnako commented 5 years ago

BACKGROUND

Currently, PLAIN TEXT and HTML content is read from the task node's CORE and displayed properly within the task summary list, after filtering the mindmap for relevant task nodes (identified by the appropriate icon) and collecting their local CORE content.

FEATURE REQUEST

Sometimes, the task description might not be placed within the local node itself but within a distant node in the same mindmap (and in the future maybe even in another mindmap). The local node would commonly link to the target node's core content by using a FORMULA like "=ID_12345678.text". In order to fetch the distant node's core content, the functionality of GTD would have to be extended in the way that these local FORMULA contents should be evaluated prior to their display within the summary window.

Would this fit to GTD's current operation concept? Would it be possible to implement?

gpapp commented 5 years ago

This does not make much sense to me. The entire idea of the addon is to collect tasks from a distributed mindmap. If the task text is available in the mindmap it should be used to create a task.

The other issue is that evaluation of a node's content used to require creation of a groovy executor, which requires hacking the java security model of the freeplane. This is getting harder on each version.

Using the getTransformedText may help, however I have a gut feeling I tried to use it previously for the same thing and failed http://www.freeplane.org/doc/api/org/freeplane/api/NodeRO.html#getTransformedText--

I'll look into it when I get my hand on an unrestricted developer machine. (my work laptop does not allow me to run developer tools, and my home laptop is not strong enough to run java debugging)

nnako commented 5 years ago

Hi, here come my short clarifications:

This does not make much sense to me...

In the picture you see the concept I was particularly thinking of:

FeatReq__evaluate_formula_for_core_text

I want to use certain general "requirements" defining things to be done when implementing different tools. These Requirements have a title (CORE) and a detail description (DETAILS). Now, my mindmap holds several tools in which these requirements are to be implemented ("tool 1", "tool 2" and "tool 3"). Within each tool, each requirement "instance" is regarded as dedicated OPEN POINT or GTD ELEMENT. Even though the requirements repeat themselves within the tools, they are to be regarded as separate GTD ELEMENTS. But as the description repeats itself, I want to use the core texts and details descriptions from the respective general requirements node.

This concept is only possible, I guess, when the formula core contents of a GTD element (and also the details text) is looked up in a respective node within the (let's say same) mindmap.

The other issue is that evaluation of a node's content used to require creation of a groovy executor...

nope. you would not have to execute the node's formula, but just have a RegEx which checks for a specific string like "=ID_12345678.text". This would then trigger a node-lookup and get the core and details strings from there... put it into the GTD summary overview screen. No JAVA hacking at all.

I'll look into it when I get my hand on an unrestricted developer machine...

I could try an implementation myself, if you like. I just wanted to check if there are major objections regarding this concept from your side. As it has the potential of making mindmaps much more complex. But in this case, it should not disturb any of the standard users.

What do you think?

gpapp commented 5 years ago

Seems like an interesting approach. I welcome any additions to the features.

I started working on a new Swing based display due to the removal of JavaFX support in current versions.

If you get anywhere with the development get a push request in, so I can merge it with the master.