Closed AnmAtAnm closed 7 years ago
Review status: 0 of 43 files reviewed at latest revision, 7 unresolved discussions.
blocklylib-core/src/main/java/com/google/blockly/android/control/ProcedureManager.java, line 240 at r1 (raw file):
Docs for parameters
Done, with a refactor that includes optional / @Nullable arguments (otherwise using existing values).
blocklylib-core/src/main/java/com/google/blockly/android/control/ProcedureManager.java, line 260 at r1 (raw file):
Should you check if it's valid before you add it to the manager?
Removed the above name manager addition here, because it was also done within groupAndFireEvents(..)
, where it belonged, after all vars had already been validated.
blocklylib-core/src/main/java/com/google/blockly/android/control/ProcedureManager.java, line 319 at r1 (raw file):
It's bumping it away from another connection, not away from its current position. This means it always ends up the same distance from the other connection. It should be fine to make that optional though and bump from the current position.
Acknowledged. Clarified TODO.
blocklylib-core/src/main/java/com/google/blockly/android/ui/fieldview/BasicFieldVariableView.java, line 175 at r1 (raw file):
remove?
Removed, and other in test class.
blocklylib-core/src/main/java/com/google/blockly/android/ui/fieldview/BasicFieldVariableView.java, line 249 at r1 (raw file):
You've been converting a lot of direct access loops to iterator loops. These are slightly slower and cause a bit more garbage collection. It's not significant, but I'd prefer you not convert them unless there's a reason to.
Understood about that trade offs. I also realize the TreeSet replacing the SimpleArrayMap has similar trade-offs.
In this case, SortedSet does not have random access, so iterator is the only way to go. The alternative would be to make this return an array backed data structure. If there was a sorted variant of the ArraySet, I'd probably use that.
blocklylib-core/src/main/java/com/google/blockly/android/ui/fieldview/BasicFieldVariableView.java, line 303 at r1 (raw file):
ditto
Same SortedSet mVar as above.
blocklylib-core/src/main/java/com/google/blockly/model/Workspace.java, line 238 at r1 (raw file):
Here too.
Again, a set. No random access.
Comments from Reviewable
Awaiting LG
Review status: 0 of 43 files reviewed at latest revision, 7 unresolved discussions.
Comments from Reviewable
:
Review status: 0 of 43 files reviewed at latest revision, 8 unresolved discussions.
blocklylib-core/src/main/java/com/google/blockly/android/control/ProcedureManager.java, line 255 at r2 (raw file):
* name, or if argument name is invalid. */ public void mutateProcedure(final String originalProcedureName,
@NonNull for the originalProcedureName?
Comments from Reviewable
WIP: Compiles, tests, and runs.
Changes:
ProcedureManager.mutateProcedure(..)
, including managing Inputs and making variables.NameManager
s to preserve user inputed case. Included in this is a real map backing, sorting inNameManager
, and index based methods have been shuffled intoBasicVariableFieldView.VariableAdapter
.Needs:
This change is![Reviewable](https://reviewable.io/review_button.svg)