Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.de> schrieb am Fr., 15. Nov. 2019, 09:38:


Just another idea (I seem to have too many of them :D): Some kind of UnderlyingObjectAttribute (with a better name, of course) an editor can check the selection before compiling it when inspectIt/exploreIt is pressed?


Example 1: ('2 + 3' asText) -> User presses inspectIt -> Editor checks for UnderylingObjectAttribute -> none found, so the string is compilaed as usual.

Example 2: (Text string: '2 + 3' attributes: (UnderylingObjectAttribute for: 5)) -> User presses inspectIt -> Editor finds an UnderylingObjectAttribute -> instead of compiling the selection, the cached result is reused for the inspector.

We would not even need to display this Attribute visually if it works reliably.


Make sure it is transient in some way because it would be quite annoying if the hidden object were out of date with regards to the text.