google / blockly-android

Blockly for Android
Apache License 2.0
673 stars 209 forks source link

Adding FunctionCategoryFactory to handle the custom PROCEDURE toolbox category. #590

Closed AnmAtAnm closed 7 years ago

AnmAtAnm commented 7 years ago

Also, refactored how custom categories are added, making it consistent with how activities (and the activity helper) add mutators and extensions.


This change is Reviewable

RoboErikG commented 7 years ago

minor nits, then :lgtm_strong:


Review status: 0 of 10 files reviewed at latest revision, 2 unresolved discussions, some commit checks broke.


blocklylib-core/src/main/java/com/google/blockly/model/DefaultBlocks.java, line 108 at r1 (raw file):

    }

    public static Map<String, CategoryFactory> getToolboxCustomCategories(BlocklyController controller) {

nit line length


blocklylib-core/src/main/java/com/google/blockly/model/FunctionCategoryFactory.java, line 18 at r1 (raw file):

    public BlocklyCategory obtainCategory(String customType) {
        BlockFactory factory = mController.getBlockFactory();

Should this have a TODO: Implement?


Comments from Reviewable

AnmAtAnm commented 7 years ago

Review status: 0 of 10 files reviewed at latest revision, 2 unresolved discussions, some commit checks pending.


blocklylib-core/src/main/java/com/google/blockly/model/DefaultBlocks.java, line 108 at r1 (raw file):

Previously, RoboErikG wrote…
nit line length

Fixed.


blocklylib-core/src/main/java/com/google/blockly/model/FunctionCategoryFactory.java, line 18 at r1 (raw file):

Previously, RoboErikG wrote…
Should this have a TODO: Implement?

Added.


Comments from Reviewable