Ignore:
Timestamp:
06/30/13 12:48:20 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • loading f0 schema with XmlLoader?
  • use XmlLoader? to load configuration
  • introduce unified fork-join model of various entities

(Instances, Connections, GUI Frames, etc.),
all those entities clean up gracefully on
shutdown, which may be initialized by user
or by some entity

  • basing on above, simplify several organizing classes

(Observer, main class)

(to host native frams server process from Java level)

CHANGELOG:
Remove redundant Observer class.

Clean up in AbstractJoinable?.

Update ExternalProcess? class to changes in joining model.

Another sweep through code with FindBugs?.

Find bug with not joining RemoteInstance?.

Joining almost works.

Much improved joining model.

More improvement to joining model.

Add logging messages around joinable operations.

Rename methods in AbstractJoinable?.

Improve Joinable.

Rewrite of entity structure.

More simplifications with entities.

Further improve joinables.

Let Frame compose from JFrame instead of inheriting.

Add join classes.

Improvements of closing.

Add Builder interface.

Add FramsServerTest?.xml

FramsServer? may be configured through xml.

Make Framsticks main class an Observer of Entities.

Make Observer a generic type.

Remove variables regarding to removed endpoint.

Simplify observer (remove endpoints).

More changes to Observer and Endpoint.

Minor improvements.

Add OutputListener? to ExternalProcess?.

Improve testing of ExternalProcess?.

Add ExternalProcess? runner.

Rename the Program class to Framsticks.

Migrate Program to use XmlLoader? configuration.

First steps with configuration using XmlLoader?.

Fix several bugs.

Move all f0 classes to apriopriate package.

XmlLoader? is able to load Schema.

XmlLoader? is loading classes and props.

Add GroupBuilder?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/test/java/com/framsticks/gui/BrowserTest.java

    r87 r88  
    33import javax.swing.JFrame;
    44
    5 import org.apache.commons.configuration.PropertiesConfiguration;
    65import org.apache.log4j.Logger;
    76import org.fest.swing.edt.FailOnThreadViolationRepaintManager;
     
    1615import com.framsticks.remote.RemoteInstance;
    1716import com.framsticks.test.TestConfiguration;
     17import com.framsticks.util.dispatching.Dispatching;
     18import com.framsticks.util.dispatching.JoinableMonitor;
     19// import com.framsticks.util.dispatching.Dispatching;
    1820
    1921import static org.fest.assertions.Assertions.*;
     
    2527        private static final Logger log = Logger.getLogger(BrowserTest.class);
    2628
     29        JoinableMonitor monitor;
    2730        Browser browser;
    2831        Robot robot;
     
    3740
    3841                browser = new Browser();
    39                 browser.configure(new PropertiesConfiguration());
     42                monitor = new JoinableMonitor(browser);
    4043
    4144                RemoteInstance localhost = new RemoteInstance();
     
    4346                localhost.setAddress("localhost:9009");
    4447
    45                 browser.addEndpointForInstance(localhost);
     48                browser.addInstance(localhost);
    4649
    47                 browser.start();
     50                monitor.use();
    4851                // robot.waitForIdle();
    4952                frame = new FrameFixture(robot,
     
    5154                                        @Override
    5255                                        protected JFrame executeInEDT() throws Throwable {
    53                                                 return browser.getMainFrame();
     56                                                return browser.getMainFrame().getSwing();
    5457                                        }
    5558                                }));
     
    8689                clickAndExpandPath(tree, "localhost/simulator/genepools/groups");
    8790                clickAndExpandPath(tree, "localhost/simulator/genepools/groups/Genotypes");
     91
     92
     93
     94
     95
     96
    8897                // tree.clickPath("localhost/simulator/genepools/groups/Genotypes/genotypes");
    8998                // robot.waitForIdle();
     
    97106        }
    98107
    99         public void sleep(int seconds) {
    100                 try {
    101                         Thread.sleep(seconds * 1000, 0);
    102                 } catch (InterruptedException e) {
    103                         e.printStackTrace();
    104                 }
    105         }
    106108
    107109        @AfterClass
    108110        public void tearDown() {
    109                 // frame.close();
    110                 frame.cleanUp();
     111                log.info("before close");
     112
     113                monitor.drop();
     114
     115                Dispatching.joinAbsolutely(browser);
     116                // frame.cleanUp();
     117                // log.info("before close");
     118                // browser.interrupt();
     119
     120                // try {
     121                //      // frame.close();
     122                // } catch (Throwable t) {
     123                //      log.error("caught ", t);
     124                // }
     125                // log.info("after close");
     126                // // frame.close();
     127                // // frame.cleanUp();
     128
     129
     130
     131                // Dispatching.join(browser);
    111132        }
    112133
Note: See TracChangeset for help on using the changeset viewer.