Léa Saviot
4fb0a7e467
[apps/code] properly display the importation source
...
- It sould be nameOfScript.py, not just nameOfScript, when the source is
a script
- Fix the source for script name variables. For instance, "from
script1 import *" should display the node "script1" with the source "script1.py"
- If a script has the same name as a module, the module will be imported
and not the script, so do not load its variables (even if the module is
not in the toolbox).
2020-06-04 14:50:06 +02:00
Léa Saviot
2a823419ff
[apps/code] Cycle through possible autocompletions with up/down
2020-06-04 14:50:05 +02:00
Léa Saviot
94e9a10f16
[apps/code] Autocomplete only with parentheses if needed
...
For instance, type "abs", there is "()" autocompletion
2020-06-04 14:50:05 +02:00
Léa Saviot
5d2910188d
[apps/code] Add the parentheses in the autocompletion
2020-06-04 14:50:05 +02:00
Léa Saviot
da2730dd64
[apps/code] Autocomplete at the end of tokens
...
Not at the end of "words" separated by spaces.
2020-06-04 14:50:05 +02:00
Léa Saviot
e630b0e9e5
[apps/code] Remove __import__ from builtins
2020-06-04 14:50:05 +02:00
Léa Saviot
5393ec7273
[apps/code] Add matplotlib.pyplot in the var box
2020-06-04 14:50:05 +02:00
Léa Saviot
003317647e
[apps/code] Display empty message in var box
2020-06-04 14:50:05 +02:00
Léa Saviot
398de8bda3
[apps/code] Empty controller in the var box
2020-06-04 14:50:05 +02:00
Léa Saviot
33d8d10286
[apps/code] Do not select subtitles in the variable box
2020-06-04 14:50:05 +02:00
Léa Saviot
0d6016116d
[apps/code] Cosmetic fixes on the variable box
2020-06-04 14:50:05 +02:00
Léa Saviot
74b786f875
[apps/code] Add list methods to the variable box
2020-06-04 14:50:05 +02:00
Léa Saviot
38854d2435
[apps/code] Fix cell type
2020-06-04 14:50:05 +02:00
Léa Saviot
d5e1e620fd
[apps/code] Display source and description in var box
2020-06-04 14:50:05 +02:00
Léa Saviot
96d68d6b44
[apps/code/varbox] Subtitles and basic items are displayed properly
2020-06-04 14:50:05 +02:00
Léa Saviot
34a1a8e35f
[apps/code] Fix willDisplayCellForIndex
...
Problem: some nodes were not displayed, because the subtitles count was
not taken into account when using the index parameter if
willDisplayCellForIndex
2020-06-04 14:50:05 +02:00
Léa Saviot
0863abc4da
[apps/code] VariableBox cells with node origins
2020-06-04 14:50:05 +02:00
Léa Saviot
52644bf76d
[apps/code] Subtitles in the variable box
2020-06-04 14:50:05 +02:00
Léa Saviot
a98f4b6ca0
[apps/code] Edit the builtins list
2020-06-04 14:50:05 +02:00
Léa Saviot
6aa150d5d7
[apps/code] Cleaning 3
2020-06-04 14:50:05 +02:00
Léa Saviot
86435bf647
[apps/code] Cleaning 2
2020-06-04 14:50:04 +02:00
Léa Saviot
327dd0ac41
[apps/code] Cleaning 1
2020-06-04 14:50:04 +02:00
Léa Saviot
1e59abf55b
[apps/code] Load global and imported variables from imported scripts
2020-06-04 14:50:04 +02:00
Léa Saviot
2b83d9b952
[apps/code] Continue cleaning and refactoring in variable box
2020-06-04 14:50:04 +02:00
Léa Saviot
b11bab4045
[apps/code] Refactoring
2020-06-04 14:50:04 +02:00
Léa Saviot
d2bfe01cd4
[apps/code] VariableBoxController::contains method
2020-06-04 14:50:04 +02:00
Léa Saviot
a0f1d0f24b
[apps/code] Start getting importations in the variable box
2020-06-04 14:50:04 +02:00
Léa Saviot
78a747d9c6
[apps/code] Start loading imported variables in var box
2020-06-04 14:50:04 +02:00
Léa Saviot
ac3a09bdeb
[apps/code] Insert only the completing text when autocompleting
2020-06-04 14:50:04 +02:00
Léa Saviot
ad5c998b97
[apps/code] Add module names to the builtins
2020-06-04 14:50:04 +02:00
Léa Saviot
1b828196e9
[apps/code] Use ScriptNode::Type in VariableBoxController
2020-06-04 14:50:04 +02:00
Léa Saviot
f412d95584
[apps/code] Load builtins according to autocompleted text
2020-06-04 14:50:04 +02:00
Léa Saviot
86349675c1
[apps/code] Code cleaning
2020-06-04 14:50:04 +02:00
Léa Saviot
6f2dedf8ee
[apps/code] Search aphabetically if var is already in var box
2020-06-04 14:50:04 +02:00
Léa Saviot
5d4a3f8726
[apps/code] Add variables in alphabetical order in the var box
2020-06-04 14:50:03 +02:00
Léa Saviot
c273f734fe
[apps/code] Add some buitin vars in the varbox
2020-06-04 14:50:03 +02:00
Léa Saviot
eeb42f2544
[apps/code] autocompletionText uses the right text length
...
Before, there was no notion that the autocompleted text might not be a
null terminated string.
2020-06-04 14:50:03 +02:00
Léa Saviot
7f486d790f
[apps/code] Get current script variables and functions
2020-06-04 14:50:03 +02:00
Léa Saviot
b9693f1f26
[apps/code] Load variable box with script index argument
2020-06-04 14:50:03 +02:00
Léa Saviot
321f87ea78
[apps/code] VariableBoxController::autocompletionForText
2020-06-04 14:50:03 +02:00
Léa Saviot
f883516716
[apps/code] Editor asks VariableBox for autocompletion
2020-06-04 14:50:03 +02:00
Léa Saviot
72aedaadd0
[apps/code] VarBox contains current/buitin/imported vars and functions
2020-06-04 14:50:03 +02:00
Léa Saviot
4caf9f5197
[coding style] Make some methods const
2019-09-09 20:05:14 +02:00
Émilie Feral
0e5d29950a
[code] Get rid of unused member variable in VariableBoxController
2019-04-12 15:16:52 +02:00
Émilie Feral
a4f7d83805
[code] Load Variable box content before compiling any other python code
...
to avoid memory exhaustion when displaying variable box
2018-11-23 12:04:03 +01:00
Émilie Feral
4070c754fe
[code] VariableBoxController inherits from NestedMenuController
2018-11-23 12:04:02 +01:00
Émilie Feral
01e433a9f2
[escher] Clean Field and Input class hierarchy:
...
Class hierarchy:
- InputEventHandler
- TextInput
- EditableField derives from InputEventHandler
- LayoutField, TextField and ExpressioField derives from EditableField
- TextArea and TextField derives from TextInput
2018-11-23 12:04:02 +01:00
Léa Saviot
2661032993
[apps/code] Fix Python loading when going in the VarBoxController
...
The Var box controller deinited python on exit, and the console
controller did not reload python + it made the console controller lose
all its context, such as imported scripts
2018-09-21 11:55:12 +02:00
Émilie Feral
58ad8bd87e
[code] Fix handling of python heap by ConsoleController,
...
EditorController and VariableBoxController
2018-09-20 11:54:56 +02:00
Émilie Feral
dae91f1540
[apps] VariableBoxController: get rid of variable-size table
2018-09-17 17:14:43 +02:00