Ignore:
Timestamp:
06/22/13 21:51:33 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • simplification of entities management model
  • cleanup around params (improve hierarchy)
  • migrate from JUnit to TestNG
  • introduce FEST to automatically test GUI
  • improve slider control
  • loosen synchronization between gui tree and backend representation
  • and many other bug fixes

NOTICE:

  • a great many of lines is changed only because of substituting spaces with tabs

CHANGELOG (oldest changes at the bottom):

Some cleaning after fix found.

Fix bug with tree.

More changes with TreeNodes?.

Finally fix issue with tree.

Improve gui tree management.

Decouple update of values from fetch request in gui.

Minor changes.

Minor changes.

Minor change.

Change Path construction wording.

More fixes to SliderControl?.

Fix SliderControl?.

Fix SliderControl?.

Minor improvement.

Several changes.

Make NumberParam? a generic class.

Add robot to the gui test.

Setup common testing logging configuration.

Remove Parameters class.

Remove entityOwner from Parameters.

Move name out from Parameters class.

Move configuration to after the construction.

Simplify observers and endpoints.

Remove superfluous configureEntity overrides.

Add dependency on fest-swing-testng.

Use FEST for final print test.

Use FEST for more concise and readable assertions.

Divide test of F0Parser into multiple methods.

Migrate to TestNG

Minor change.

Change convention from LOGGER to log.

Fix reporting of errors during controls filling.

Bound maximal height of SliderControl?.

Minor improvements.

Improve tooltips for controls.

Also use Delimeted in more places.

Move static control utilities to Gui.

Rename package gui.components to controls.

Some cleaning in controls.

Improve Param classes placing.

Move ValueParam?, PrimitiveParam? and CompositeParam? one package up.

Improve ParamBuilder?.

Move getDef to ValueParam? and PrimitiveParam?.

Move getMax and getDef to ValueParam?.

Move getMin to ValueParam?.

Upgrade to laters apache commons versions.

Use filterInstanceof extensively.

Add instanceof filters.

Make ValueParam? in many places of Param.

Place assertions about ValueParam?.

Add ValueParam?

Rename ValueParam? to PrimitiveParam?

Minor changes.

Several improvements to params types.

Add NumberParam?.

Add TextControl? component.

Add .swp files to .gitignore

Greatly improved slider component.

Some improvements.

Make Param.reassign return also a state.

Add IterableIterator?.

Several changes.

  • Move util classes to better packages.
  • Remove warnings from eclim.

Several improvements.

Fix bug with BooleanParam?.

Some experiments with visualization.

Another fix to panel management.

Improve panel management.

Some refactorization around panels.

Add root class for panel.

Location:
java/main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • java/main

    • Property svn:ignore set to
      target
  • java/main/src/main/java/com/framsticks/examples/GenotypeBrowser.java

    r79 r84  
    33import com.framsticks.core.Instance;
    44import com.framsticks.core.Node;
    5 import com.framsticks.core.Parameters;
    6 import com.framsticks.core.Path;
     5import com.framsticks.dumping.PrintWriterSink;
    76import com.framsticks.model.*;
    87import com.framsticks.model.Package;
    98import com.framsticks.params.*;
    10 import com.framsticks.params.types.CompositeParam;
    119import com.framsticks.parsers.F0Parser;
     10import com.framsticks.parsers.F0Writer;
    1211import com.framsticks.parsers.Schema;
     12
     13import org.apache.commons.configuration.Configuration;
    1314import org.apache.log4j.Logger;
    1415
     16import java.io.PrintWriter;
     17import java.io.StringWriter;
    1518import java.util.List;
    1619
     
    2023public class GenotypeBrowser extends Instance {
    2124
    22         private static final Logger LOGGER = Logger.getLogger(Instance.class.getName());
     25        private static final Logger log = Logger
     26                        .getLogger(Instance.class.getName());
    2327        protected Schema schema;
    2428
    25 
    26         public GenotypeBrowser(Parameters parameters) {
    27                 super(parameters);
    28                 LOGGER.info("model builder created");
     29        public GenotypeBrowser() {
     30                log.info("model builder created");
    2931        }
    3032
    3133        @Override
    32         protected void configure() throws Exception {
    33                 super.configure();
    34                 schema = new Schema(Schema.getDefaultDefinitionAsStream());
     34        public void configure(Configuration config) {
     35                super.configure(config);
     36                try {
     37                        schema = new Schema(Schema.getDefaultDefinitionAsStream());
     38                } catch (Exception e) {
     39                        log.error("failed to load schema: " + e);
     40                }
    3541                this.registry = schema.getRegistry();
    3642                Package.register(this.getRegistry());
     
    3844                registry.putInfoIntoCache(new FramsClass("ModelBuilderRoot", "ModelBuilderRoot", null)
    3945                                .append(new ParamBuilder().setType("o Model").setId("model").setName("model").build())
     46                                .append(new ParamBuilder().setType("s 1").setId("genotype").setName("genotype").build())
    4047                );
    4148                root = new Node((CompositeParam)new ParamBuilder().setType("o ModelBuilderRoot").setId(name).setName("Instance").build(), PropertiesAccess.createPropertiesMap());
     
    5158                        Model model = Model.build(objects);
    5259
    53                         AccessInterface rootAccess = bindAccess(new Path(this, "/"));
     60                        AccessInterface rootAccess = bindAccess(this.getRootPath());
    5461
    5562                        rootAccess.set("model", model);
    5663
     64                        StringWriter w = new StringWriter();
     65                        new F0Writer(schema, model, new PrintWriterSink(new PrintWriter(w))).write();
     66                        rootAccess.set("genotype", w.getBuffer().toString());
     67
    5768                } catch (Exception e) {
    58                         LOGGER.error("exception caught: " + e);
     69                        log.error("exception caught: " + e);
    5970                }
    6071                //done();
Note: See TracChangeset for help on using the changeset viewer.