Commit Graph

121 Commits

Author SHA1 Message Date
Léa Saviot
5d49f5dca2 [apps/code] Fix VariableBoxController::addNodesFromImportMaybe
Scenario: write a ascrip "from matplotlib.pyplot0 import *" than open
the variable box
2020-06-04 14:50:09 +02:00
Léa Saviot
2bea3f3d47 [apps/code] Fix again VariableBoxController::loadCurrentVariablesInScript 2020-06-04 14:50:09 +02:00
Léa Saviot
00291c8974 [apps/code] Fix var initialisation in variable_box_controller 2020-06-04 14:50:09 +02:00
Léa Saviot
691c6739af [apps/variable_box_controller] Fix loadCurrentVariablesInScript
Scenario: write the script:

def squares():
  for i in range(660):
    forward(L)lo)

Put the cursor right of "lo" and press backspace.
2020-06-04 14:50:08 +02:00
Léa Saviot
a53edf5202 [apps/code] Remove TODOs 2020-06-04 14:50:07 +02:00
Léa Saviot
f763bb50ac [apps/code] Do not display subtitles in var box from console 2020-06-04 14:50:07 +02:00
Léa Saviot
780c593c26 [apps/code] Autocompletion for "abs" proposes parentheses 2020-06-04 14:50:06 +02:00
Léa Saviot
c915eb0b27 [apps/code] Do not autocomplete with arguments
Eg : arr|ow(x,y,dx,dy) should give arrow(|,,,)
2020-06-04 14:50:06 +02:00
Léa Saviot
0dac6b5bac [apps/code] Replace int with size_t 2020-06-04 14:50:06 +02:00
Léa Saviot
7ef17960c8 [apps/code/variable_box_controller] More TODOs removal 2020-06-04 14:50:06 +02:00
Léa Saviot
714410287a [apps/code] Remove TODOs 2020-06-04 14:50:06 +02:00
Léa Saviot
c5f2f7cf83 [apps/code] Remove TODO comments 2020-06-04 14:50:06 +02:00
Léa Saviot
43d0ab5ea7 [apps] Rename displayEmptyController -> displayEmptyControllerIfNeeded 2020-06-04 14:50:06 +02:00
Léa Saviot
e28f4ed7e2 [apps/code/variable_box_controller] Use std::min 2020-06-04 14:50:06 +02:00
Léa Saviot
59db24c518 [apps/code/variable_box_controller] Comment out unused variables 2020-06-04 14:50:06 +02:00
Léa Saviot
cf6b9d580b [apps/code] rename Script::scriptContent() -> Script::content() 2020-06-04 14:50:06 +02:00
Léa Saviot
5986716031 [apps/code] Fix first varbox row that never appeared again
After scrolling down
2020-06-04 14:50:06 +02:00
Léa Saviot
2fbf5d2d9f [apps/code] No variables starting with underscore in imported variables
In the variable box
2020-06-04 14:50:06 +02:00
Léa Saviot
ccca872a0f [appx/code] Empty variable box before loading it in the console 2020-06-04 14:50:06 +02:00
Léa Saviot
0c82334a96 [apps/code] Fix preventing module importations in varbox from console 2020-06-04 14:50:06 +02:00
Léa Saviot
5ffcb77c69 [apps/code] Fix missing return 2020-06-04 14:50:06 +02:00
Léa Saviot
ac654f0097 [apps/code] Load varbox before returning it in console 2020-06-04 14:50:06 +02:00
Léa Saviot
d1c8bbdaf7 [apps/code] The console marks imported script for the var box
After lauching the console, if we fetch a script we mark it as fetched.
When the variable box displays variables from imported scripts, it scans
all the variables from the scripts marked as fetched.
2020-06-04 14:50:06 +02:00
Léa Saviot
9e973adbab [apps/code] VarBox from console 2020-06-04 14:50:06 +02:00
Léa Saviot
d8cab18eb3 [apps/code] Do not display varbox source name if it does not fit 2020-06-04 14:50:06 +02:00
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
f9bbc94eea [apps/code] Handle autocompletionAlternativeAtIndex with no nodes 2020-06-04 14:50:05 +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
afdf34bbb9 [apps/code] Signed/unsigned comparison 2020-06-04 14:50:05 +02:00
Léa Saviot
e7bfb3b5f3 [apps/code] Use variable 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
7636c001e1 [apps/code] Fix varbox parentheses bug
Scenario: write i, open the varbox and select "in" -> parentheses are
added, but there shouldn't be any
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
dd6c2a4f54 [apps/code] Translate the variable box 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
bbeb17c3a9 [apps/code] Rename ScriptNode::Types to With/WithoutParentheses
Because some functions already have the parentheses in their name, so
their type would have been Variable but it is clearer to give it the
type WithoutParentheses. this is the case for nodes created from toolbox
nodes.
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
03471bb7b4 [apps/code] Insert right text form var box
The text was iffset due to the subtitle rows
2020-06-04 14:50:05 +02:00
Léa Saviot
1d416b3299 [apps/code] Fix varbox row height 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