[root]/src/slogo
expression
(4 files, 133 lines)
gui
(3 files, 500 lines)
images
(4 files, 0 lines)
instruction
(7 files, 365 lines)
arithmetic
(9 files, 244 lines)
conditional
(5 files, 160 lines)
drawing
(21 files, 599 lines)
language
(5 files, 155 lines)
model
(0 files, 0 lines)
parser
(46 files, 1333 lines)
token
(52 files, 843 lines)
booleantokens
(0 files, 0 lines)
drawingtokens
(0 files, 0 lines)
mathtokens
(0 files, 0 lines)
Author | Changes | Lines of Code | Lines per Change |
---|---|---|---|
Totals | 25 (100.0%) | 1179 (100.0%) | 47.1 |
ivyj | 18 (72.0%) | 1027 (87.1%) | 57.0 |
richardsonw | 5 (20.0%) | 150 (12.7%) | 30.0 |
tshishikub | 1 (4.0%) | 2 (0.2%) | 2.0 |
gehmane | 1 (4.0%) | 0 (0.0%) | 0.0 |
Did some refactoring of Parsing code so that have less duplicated code.
- mainly created methods to parse instruction parameters (in SLogoParser). This code showed up in a lot of places, so it was good to make into methods.
Added a lot of tests to SLogoParserTest
Added a few methods to Turtle class so that the Parsing code does less/knows less about Turtle's innerworkings. (Required adding "notifyListeners" to some of Turtle's methods)
Cleaned up code: removed debugging statements
1 lines of code changed in 1 file:
Updated SetXYParser to use GrammarElements instead of Expressions
Updated many instructions to inherit from the OneParameterInstruction (better code reuse)
Removed a print statement from Main.java (no longer prints when the user cancels Opening a file)
52 lines of code changed in 1 file:
Made some major and minor changes
Created instruction hierarchy:
- ConditionalInstructions
- return 1 or 0 when evaluated
- NumericInstructions
- return a number when evaluated
- OneParameterInstructions
- have a parameter (often numeric) that needs to be evaluated
Made lots of changes because of the above changes. Needed to update the parsers and the instruction classes.
Added some methods to the Turtle class so that the Instructions have less knowledge of the Turtle's innerworkings.
Moved SubroutineFactory to slogo.language package instead of slogo.expression
Updated comments in many instructions (use the Javadoc in the evaluate)
14 lines of code changed in 1 file:
Professor Sprenkle pointed out that I don't need to duplicate code and that I can refactor a method. Meanwhile, I've come to the conclusion that I need to get more sleep. Code now more elegant. Also, Undo used to set all state variables including pen color and pen up/down status. That tended to screw with the GUI portraying everything correctly, and I've fixed it so that it now will reset position/heading/points drawn and those will be the only changes that the user will see. Finally, I took out a couple of diagnostic print statements in my methods.
Sorry for the rapid succession there; THIS is why I normally don't commit often, and this should be my last one for the day/term. Happy Holidays.
16 lines of code changed in 1 file:
Now the Undo/Redo functionality works for the GUI heading controls. I wasn't thinking. There IS duplicate code, but it is inevitable given the design (there is no central function for alteration to the turtle's state). Also, I changed the GUI back.
5 lines of code changed in 1 file:
The Undo/Redo functionality is complete. The one small chink in its functionality is that it does not recognize when the user changes the header via the GUI. This could not be fixed without major design renovations OR other smaller, less sensible bugs (e.g. the stack being off by one, double clicking the first time to make it undo, etc.). It also increases the independence between GUI/underlying program (the program does not rely upon for signs from the GUI that indicate that the program has changed; it realizes that the state has changed using other methods), which seems like a good thing to me.
To make this part of the undo/redo functionality apparent to the user, I have changed the GUI tag above the Undo/Redo frame to: "Undo/Redo Command" (sorry to meddle with your GUI, Jack)
If this is unwieldy/ugly/unclear, feel free to change it.
25 lines of code changed in 1 file:
Together with Eric's find regarding the mis-cast Object, the Undo/redo function is now no longer off by one (i.e. press twice on first undo and it wouldn't go all the way back to initial state). Also, redo stack now feeds back into the undo stack, allowing infinite undoings/redoings. It should be noted that the bug that won't allow one to execute after one has undone anything is still there, though. I'm still working on it.
44 lines of code changed in 1 file:
set Turtle status display text fields to non-editable
7 lines of code changed in 1 file:
add more menu functionality
fixed reset option
85 lines of code changed in 1 file:
set turtle to center of window
4 lines of code changed in 1 file:
Now with undo and redo methods that don't quite work! They don't make anything crash, though. I hope.
60 lines of code changed in 1 file:
added more menu functionality
24 lines of code changed in 1 file:
added File-Open capability (no file readers yet though, just getting file from dialogue)
initialized Undo/Redo buttons to "unclickable"
32 lines of code changed in 1 file:
Added a little more error handling in GUI for user commands.
- need to handle "other" exceptions besides the parse exceptions
6 lines of code changed in 1 file:
Modified SLogoParser so that the parse method (now called "interpret") returns the value from executing the last statement.
- updated related methods as appropriate
Added tests to SLogoParserTest for subroutines
Modified some arithmetic-related SLogoParserTests to leverage that interpret returns a result, so now uses the assert statements to verify the results
Modified Main
- to use SLogoParser's new interpret method
- does not throw runtime nullpointer exceptions if the result of executing the command is null.
20 lines of code changed in 1 file:
now handles when user attempts to rotate turtle without first entering an angle
23 lines of code changed in 1 file:
added pen color changing functionality, although the color of a given line drawn is not saved with the Turtle, so whenever the turtle is updated (moved or rotated) and the color has been changed, all previous lines drawn are changed to that color
33 lines of code changed in 1 file:
got rid of some more import warnings
9 lines of code changed in 1 file:
added text area that displays results of expressions
refactored duplicated code in ActionListeners of command button and command text field
33 lines of code changed in 1 file:
Fixed the "TURTLE" border disappearing, a little reorganizing as well
80 lines of code changed in 1 file:
(15 more)