THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
The following is a description on how to figure out how to implement a tiny feature without know much about the code. The actual feature is trivial to implement. The main learning of this starter project is to set up the dev environment, how to navigate the code base and make a change. In this spirit, the instructions below does not go directly to the feature, rather it includes lots of investigative steps.
- Follow the instructions at Client Development Setup to set up the dev environment
- In windows or linux, start the browser with OOPHM plugin installed and navigate to the WIAB server as in the above instruction. This lets you debug the client code.
- Let's try to see if there are any classes to do with undo.
- In eclipse hit ctrl+shift+t (class search), and type "Undo".
- Notice there is a class called
UndoManagerImpl
. Notice there is a method calledundoPlus()
in this class. - Let's look up where it's called, by putting the cursor over the method and hit ctrl+shft+g, which looks up call references should take you to
EditorUndoManagerImpl.undo()
. - Repeat call reference look up again on
EditorUndoMangerImpl.undo()
, should take you toEditorImpl:handleCommand()
. Notice on line 764if (event.isUndoCombo()) {
. Bingo - Putting cursor over
isUndoCombo()
and hit ctrl+t, which looks up implementations of the method. This will take you toSignalEventImpl.isUndoCombo()
- Looks like it currently uses "Z" for undo. Let's change it to "0".
- Refresh the browser with OOPHM and try the feature. The code now works in debug.
- Compile the WIAB (slow) to see it works outside of debug
- In the wave-protocol directory run
ant
- Restart WIAB server
- In the wave-protocol directory run
- Open WIAB in a browser without using OOPHM by directly visiting
http://localhost:9898
and check the feature works.- Open WIAB client.
- Create a new wave
- Type some text
- ctrl+0