Neil Fraser
43b65d2aa1
Factor out procedure population from generators
...
Also fix bug in Lua generator where variables were not populated in the nameDB (only language with no variable initialization).
2021-05-27 21:30:26 -07:00
Neil Fraser
9869269ce2
Add procedures to name DB in init
...
This enables the generator for any block to see all variable names and procedure names in the whole program, including those that haven’t generated yet.
2021-05-27 21:30:26 -07:00
Neil Fraser
17f9209f2f
Add missing extern
2021-05-27 21:30:26 -07:00
Neil Fraser
ecca5bf274
Use Object.values rather than loop
...
Only for JS, Lua, and PHP. Dart and Python need extra logic to split out import statements.
Also use ‘this’ instead of fully qualified names in generators.
2021-05-27 21:30:26 -07:00
Neil Fraser
d919b0af21
Update JSDoc from Array.<> to Array<>
...
Same with Object.
2021-05-27 21:30:26 -07:00
Neil Fraser
b50cb5779f
Set generator’s isInitialized to false in finish
...
Previously isInitialized would remain true after first generation.
Also move common init/finish code to parent class.
2021-05-27 21:30:26 -07:00
Neil Fraser
5d2c48e1ab
Remove unused Blockly.Generator.NAME_TYPE
2021-05-27 21:30:26 -07:00
Neil Fraser
a385f3c2a6
Enable extraction of names from name DB.
...
Also gets rid of hacky name_realm contatination.
2021-05-27 21:30:26 -07:00
Neil Fraser
d519ab8f54
JSDoc improvements
2021-05-27 21:30:26 -07:00
Neil Fraser
2f2252f588
Rename variableDB_ to nameDB_
...
There is significant confusion in names and comments with regards to variables and procedures. `Blockly.Generator.prototype.variableDB_` is a Blockly.Names database, not a variable map. This rename introduces a getter and setter so deprecated references still work. This commit also fixes some comments which are either outright wrong or misleading regarding variable and procedure names.
2021-05-27 21:30:26 -07:00
Monica Kozbial
5344ad6c21
Add support for IAutoHideable ( #4855 )
2021-05-27 17:01:11 -07:00
Monica Kozbial
1cadbb94bd
Rename PluginManager and related elements ( #4857 )
...
* Rename PluginManager and related elements to use component instead of plugin
* Rename types to capabilities
2021-05-27 16:14:33 -07:00
Beka Westberg
5ffd43824f
Change lastConnectionInRow to getPlaceForOrphanedOutput - Take 2 ( #4851 )
...
* Change lastConnectionInRow to getPlaceForOrphanedOutput
* PR comments
2021-05-26 09:16:33 -07:00
Neil Fraser
dd0314bc0b
Normalize comments
2021-05-19 09:57:14 -07:00
Neil Fraser
4436e2814d
Use localeCompare’s case insensitivity option
...
Variables and procedures now sorted using local rules, not Unicode code points. Verified that ’sensitivity’ survives Closure compiler without quotes.
2021-05-19 09:57:14 -07:00
Neil Fraser
707b42e79b
Rename ‘type’ to ‘realm’ within Blockly.Names
...
Elsewhere ’type’ refers to int/float/string when referencing variables. This change is local and has no API effect.
2021-05-19 09:57:14 -07:00
Rachel Fenichel
d1aedd9cd5
Merge pull request #4798 from BeksOmega/fix/get-def-procedures
...
Fix getDefinition not working for modified/new procedures
2021-05-11 09:08:48 -07:00
Beka Westberg
75319312c1
Revert "Move ProcedureBlock to interface"
...
This reverts commit 918bdc2359 .
2021-05-10 15:34:36 -07:00
Beka Westberg
8a00303aa7
Revert "Rename to IProcedureBlock"
...
This reverts commit c8a065fa13 .
2021-05-10 15:33:12 -07:00
Beka Westberg
c8a065fa13
Rename to IProcedureBlock
2021-05-08 07:57:38 -07:00
Monica Kozbial
6259579c64
Add positioning helpers for trashcan and zoom controls ( #4807 )
2021-05-07 17:13:48 -07:00
Beka Westberg
918bdc2359
Move ProcedureBlock to interface
2021-05-06 12:22:40 -07:00
Beka Westberg
43e95af14e
Fix getDefinition being too restrictive
2021-04-25 14:46:51 -07:00
Monica Kozbial
5139057664
Merge consecutive viewport change events ( #4792 )
2021-04-23 10:56:52 -07:00
Beka Westberg
2cfd62a229
Add better error messages to insertion marker ( #4791 )
2021-04-22 11:13:09 -07:00
Sam El-Husseini
f2f878db8c
Fix multiple strict require warnings ( #4793 )
2021-04-21 16:46:04 -07:00
Sam El-Husseini
d83279008b
Remove dark theme in favour of @blockly/theme-dark ( #4697 )
...
* Remove dark theme in favour of @blockly/theme-dark
2021-04-21 13:33:59 -07:00
Sam El-Husseini
0cc79b1366
Fix missing require - constructors ( #4676 )
...
* Fix missing constructors
2021-04-21 12:11:13 -07:00
Rachel Fenichel
256eaa9497
Remove rules forbidding es6
2021-04-13 16:02:11 -07:00
Monica Kozbial
e295102eda
Update Flyout metrics and implement adjustable margin for scrollbars. ( #4763 )
2021-04-09 11:16:34 -07:00
Grayson Nix
3d22f8401e
Issue #4475 fix ( #4758 )
...
* Issue #4475 fix
2021-04-08 16:01:16 -07:00
Laura Harker
5ff76ae32d
Stop overriding @protected methods with @private ( #4760 )
...
An upcoming change to emit private properties in Google's internal version of
https://github.com/angular/clutz will otherwise break any
TypeScript depending on these types. This is because TypeScript errors
on overriding protected with private (Closure Compiler does not).
2021-04-06 11:05:41 -07:00
kozbial
7b4b818e96
Fix typo
2021-03-25 13:08:57 -07:00
alschmiedt
71640fbff5
Fix keyboard shortcut for advanced compilation ( #4727 )
2021-03-24 13:09:33 -07:00
alschmiedt
fe41814958
Fix missing dependency ( #4722 )
2021-03-24 13:08:20 -07:00
Monica Kozbial
b6628da5bb
Always scroll center on zoom reset ( #4725 )
...
* Always scroll center on zoom reset
2021-03-24 10:08:42 -07:00
Monica Kozbial
babf940ef5
Fix flyout scroll metrics ( #4726 )
...
* Fix flyout scroll metrics
2021-03-24 10:07:28 -07:00
Monica Kozbial
62dc2ff6fa
Include oldCoordinate and oldContents in ws comment event serialization ( #4718 )
...
* Include oldCoordinate and oldContent in ws comment event serialization
2021-03-22 08:41:31 -07:00
Monica Kozbial
8386566894
Update IPositionable position JSDoc ( #4705 )
2021-03-19 16:39:27 -07:00
alschmiedt
deab5fdd69
Update to metrics interface ( #4696 )
2021-03-19 10:27:28 -07:00
alschmiedt
2cbbaa666a
Mutator flyout scrollbar fix ( #4711 )
2021-03-18 16:08:06 -07:00
Monica Kozbial
7fdf579985
Update jsdoc ( #4714 )
2021-03-18 15:52:04 -07:00
alschmiedt
9a93ca486f
Fix advanced compilation tests for Q1 2021 release ( #4709 )
2021-03-17 15:46:17 -07:00
Sam El-Husseini
82a2dd90a7
Use registry to instantiate flyout from trashcan ( #4706 )
...
* Instantiate flyouts using registry in trashcan
2021-03-16 08:54:13 -07:00
alschmiedt
d58c80db76
Refactor flyout and toolbox metrics ( #4648 )
2021-03-15 12:37:23 -07:00
alschmiedt
869e4eb366
Update flyout metrics to work with the new metrics manager ( #4684 )
2021-03-09 17:09:49 -08:00
Monica Kozbial
8b0488d71e
Fix flyout scrollbar reposition edge case ( #4693 )
...
* Fix flyout scrollbar position
2021-03-09 11:32:10 -08:00
Sam El-Husseini
17d2e72ab0
Fix circular dependencies in shortcut + contextmenu registries ( #4681 )
...
* Fix circular dependencies in shortcut and contextmenu registries
2021-03-08 13:35:11 -08:00
Monica Kozbial
bea85cda1c
Positionables bugfix ( #4685 )
...
* Apply fixes to positionable logic
* Update variable name and add @private annotation
2021-03-08 11:20:30 -08:00
Rachel Fenichel
855185c6cf
Merge pull request #4682 from rachel-fenichel/toolbox_constants
...
Use Blockly.utils.toolbox.Position enum everywhere
2021-03-08 10:52:58 -08:00