Some refactoring and simplifications. #5

2 commits merged into from Oct 21, 2010


None yet

1 participant

bscottm commented Oct 21, 2010

I refactored some of the ScionInstance event code so that I can signal when servers stop unexpectedly (ScionManager would pop up a dialog asking if the user wants the server to be restarted).

Also simplified ScionServer.processRequest(). Was difficult to follow the control flow and there was a very subtle bug with respect to dequeueing commands.

Thanks for fixing ScionPP's layout. That's some foo!

Scott Michel added some commits Oct 21, 2010
Scott Michel scionserver_101020
Magic date day: 10+10 = 20... :-)

(a) Make server event listeners per-ScionInstance instead of
    static. This allows the code to signal more server event types
    than it does currently.
(b) Make the ScionInstance the event source in ScionServerEvent,
    add the server as another parameter.
(c) Fix server executable change code in the HaskellEditor so that
    the editor and the outline view refresh properly. Yeah!
(d) Refactor ScionCommand.runSuccessors to move the isSync
  test outside of the loop. Gains a negligible amount of speed.
(e) Simplify ScionServer.processResponse: eliminate the try/catch
    blocks, exit as soon as possible on error, ensure that the
    command is always dequeued, even if there's a version mismatch
And update the code formatting for some consistency.
Scott Michel Merge branch 'master' of 7623e8f
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment