Ignore:
Timestamp:
07/14/13 23:20:04 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • improve tree side notes
  • improve GUI layout
  • add foldable list of occured events to EventControl?
  • improve automatic type conversion in proxy listeners
  • implement several Access functionalities as algorithms independent of Access type
  • introduce draft base classes for distributed experiments
  • automatically register dependant Java classes to FramsClass? registry
  • add testing prime experiment and configuration
  • simplify and improve task dispatching

CHANGELOG:
Improve task dispatching in RemoteTree?.

GUI no longer hangs on connection problems.

Make all dispatchers joinables.

Refactorize Thread dispatcher.

Remove Task and PeriodicTask?.

Use Java utilities in those situations.

Reworking tasks dispatching.

Fix bug in EventControl? listener dispatching.

Minor improvements.

Add testing configuration for ExternalProcess? in GUI.

More improvement to prime.

Support for USERREADONLY in GUI.

Add that flag to various params in Java classes.

Remove redundant register clauses from several FramsClassAnnotations?.

Automatically gather and register dependant classes.

Add configuration for prime.

Improve Simulator class.

Add prime.xml configuration.

Introduce draft Experiment and Simulator classes.

Add prime experiment tests.

Enclose typical map with listeners into SimpleUniqueList?.

Needfile works in GUI.

Improve needfile handling in Browser.

More improvement with NeedFile?.

Implementing needfile.

Update test.

Rename ChangeEvent? to TestChangeEvent?.

Automatic argument type search in RemoteTree? listeners.

MultiParamLoader? uses AccessProvider?. By default old implementation
enclosed in AccessStash? or Registry.

Minor changes.

Rename SourceInterface? to Source.

Also improve toString of File and ListSource?.

Remove unused SimpleSource? class.

Add clearing in HistoryControl?.

Show entries in table at EventControl?.

Improve EventControl?.

Add listeners registration to EventControl?.

Add foldable table to HistoryControl?.

Add control row to Procedure and Event controls.

Improve layout of controls.

Another minor change to gui layout.

Minor improvement in the SliderControl?.

Minor changes.

Move ReflectionAccess?.Backend to separate file.

It was to cluttered.

Cleanup in ReflectionAccess?.

Move setMin, setMax, setDef to AccessOperations?.

Extract loading operation into AccessOperations?.

Append Framsticks to name of UnsupportedOperationException?.

The java.lang.UnsupportedOperationException? was shadowing this class.

Rename params.Util to params.ParamsUtil?.

Several improvements.

Minor changes.

Implement revert functionality.

Improve local changes management.

Minor improvement.

Remove methods rendered superfluous after SideNoteKey? improvement.

Improve SideNoteKey?.

It is now generic type, so explicit type specification at
call site is no more needed.

Introduce SideNoteKey? interface.

Only Objects implementing that key may be used as side note keys.

Minor improvements.

Use strings instead of ValueControls? in several gui mappings.

Location:
java/main/src/test/java/com/framsticks
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/test/java/com/framsticks/communication/RequestTest.java

    r99 r101  
    2828
    2929                assertThat(Request.takeRequestId(true, " 2 simple second")).isEqualTo(Pair.make(2, "simple second"));
     30                assertThat(Request.takeRequestId(true, " -3 simple")).isEqualTo(Pair.make(-3, "simple"));
    3031        }
    3132
  • java/main/src/test/java/com/framsticks/core/ListChangeTest.java

    r100 r101  
    77
    88import com.framsticks.core.ListChange.Action;
     9import com.framsticks.params.AccessOperations;
    910import com.framsticks.params.FramsClass;
    1011import com.framsticks.params.ListSink;
     
    6061        @Test(dependsOnMethods = "createReflectionAccess")
    6162        public void load() throws Exception {
    62                 access.select(listChange).load(ListSource.createFrom("type:2", "pos:0", "id:test"));
     63                AccessOperations.load(access.select(listChange), ListSource.createFrom("type:2", "pos:0", "id:test"));
    6364
    6465                assertThat(listChange.action).isEqualTo(Action.Modify);
  • java/main/src/test/java/com/framsticks/core/XmlBasedTest.java

    r96 r101  
    2626        }
    2727
    28         protected abstract String getConfigurationName();
     28        protected String getConfigurationName() {
     29                return this.getClass().getSimpleName() + ".xml";
     30        }
    2931
    3032
  • java/main/src/test/java/com/framsticks/gui/ProcedureBrowserTest.java

    r100 r101  
    1717import com.framsticks.params.types.StringParam;
    1818import com.framsticks.parsers.XmlLoader;
    19 import com.framsticks.test.ChangeEvent;
     19import com.framsticks.test.TestChangeEvent;
    2020import com.framsticks.test.TestClass;
    2121import com.framsticks.util.dispatching.FutureHandler;
     
    8282                waitForIdle();
    8383
    84                 final EventListener<ChangeEvent> listener = new EventListener<ChangeEvent>() {
     84                final EventListener<TestChangeEvent> listener = new EventListener<TestChangeEvent>() {
    8585
    8686                        @Override
    87                         public void action(ChangeEvent argument) {
     87                        public void action(TestChangeEvent argument) {
    8888                                assertThat(argument.history).isEqualTo("");
    8989                        }
     
    9696                                assertThat(access.get("history", String.class)).isEqualTo("initial|Żółw|");
    9797
    98                                 tree.addListener(Path.to(tree, "/"), access.getFramsClass().getParamEntry("history_changed", EventParam.class), listener, ChangeEvent.class, FutureHandler.doNothing(Void.class, failOnException));
     98                                tree.addListener(Path.to(tree, "/"), access.getFramsClass().getParamEntry("history_changed", EventParam.class), listener, TestChangeEvent.class, FutureHandler.doNothing(Void.class, failOnException));
    9999                        }
    100100                });
  • java/main/src/test/java/com/framsticks/gui/console/TrackConsoleTest.java

    r98 r101  
    33import org.testng.annotations.Test;
    44
    5 import com.framsticks.communication.Address;
    6 import com.framsticks.communication.ClientSideManagedConnection;
    7 import com.framsticks.communication.Connection;
    85import com.framsticks.core.Path;
    96import com.framsticks.gui.GuiTest;
     
    2825                tree = new RemoteTree();
    2926
    30                 tree.setConnection(Connection.to(new ClientSideManagedConnection(), new Address("localhost:9009")));
     27                tree.setAddress("localhost:9009");
    3128
    3229                console = new TrackConsole().setConnection(tree.getConnection());
  • java/main/src/test/java/com/framsticks/hosting/ServerTest.java

    r100 r101  
    1515import com.framsticks.remote.RemoteTree;
    1616
    17 import com.framsticks.test.ChangeEvent;
     17import com.framsticks.test.TestChangeEvent;
    1818import com.framsticks.test.TestClass;
    1919import com.framsticks.core.Tree;
     
    4545        protected LocalTree hosted;
    4646        protected TestClass hostedObject;
    47         protected EventListener<ChangeEvent> listener;
     47        protected EventListener<TestChangeEvent> listener;
    4848        protected EventListener<ListChange> childListener;
    4949
     
    5252
    5353
    54         @Override
    55         protected String getConfigurationName() {
    56                 return "ServerTest.xml";
    57         }
    5854
    5955        @Test
     
    127123        public void registerListener() {
    128124                final Waiter waiter = produceWaiter(1.0);
    129                 listener = new EventListener<ChangeEvent>() {
    130 
    131                         @Override
    132                         public void action(ChangeEvent argument) {
     125                listener = new EventListener<TestChangeEvent>() {
     126
     127                        @Override
     128                        public void action(TestChangeEvent argument) {
    133129                                listenerArguments.add(argument.history);
    134130                        }
     
    142138                });
    143139
    144                 addListener(remotePath, remoteTestFramsClass.getParamEntry("history_changed", EventParam.class), listener, ChangeEvent.class, produceWaiter(1.0).passInFuture(Void.class));
     140                addListener(remotePath, remoteTestFramsClass.getParamEntry("history_changed", EventParam.class), listener, TestChangeEvent.class, produceWaiter(1.0).passInFuture(Void.class));
    145141        }
    146142
  • java/main/src/test/java/com/framsticks/model/ModelPackageTest.java

    r100 r101  
    88import com.framsticks.params.FramsClass;
    99import com.framsticks.params.ReflectionAccess;
    10 import com.framsticks.params.SourceInterface;
     10import com.framsticks.params.Source;
    1111import com.framsticks.params.ValueParam;
    1212import com.framsticks.parsers.FileSource;
     
    2525                assertThat(stream).describedAs("stream " + filename).isNotNull();
    2626
    27                 SourceInterface source = new FileSource(stream, filename);
     27                Source source = new FileSource(stream, filename);
    2828
    2929                assertThat(source.isClosed()).isFalse();
  • java/main/src/test/java/com/framsticks/params/FramsClassBuilderTest.java

    r100 r101  
    1010import com.framsticks.params.types.StringParam;
    1111import com.framsticks.parsers.Savers;
    12 import com.framsticks.test.ChangeEvent;
     12import com.framsticks.test.TestChangeEvent;
    1313import com.framsticks.test.TestClass;
    1414import com.framsticks.test.TestConfiguration;
     
    6969                                        "id:history_changed",
    7070                                        "name:HistoryListener",
    71                                         "type:e ChangeEvent",
     71                                        "type:e TestChangeEvent",
    7272                                        "",
    7373                                        "prop:",
     
    128128                final Holder<String> called = new Holder<>();
    129129
    130                 final EventListener<ChangeEvent> listener = new EventListener<ChangeEvent>() {
     130                final EventListener<TestChangeEvent> listener = new EventListener<TestChangeEvent>() {
    131131
    132132                        @Override
    133                         public void action(ChangeEvent argument) {
     133                        public void action(TestChangeEvent argument) {
    134134                                called.set(argument.history);
    135135                        }
  • java/main/src/test/java/com/framsticks/params/ParamBuilderTest.java

    r100 r101  
    3030        public void loadParam() throws Exception {
    3131                access = new ReflectionAccess(ParamBuilder.class, builderFramsClass);
    32                 SourceInterface source = ListSource.createFrom("prop:", "id:v", "name:variable", "type:f", "help:just a testing variable", "");
     32                Source source = ListSource.createFrom("prop:", "id:v", "name:variable", "type:f", "help:just a testing variable", "");
    3333
    3434                MultiParamLoader loader = new MultiParamLoader();
  • java/main/src/test/java/com/framsticks/parsers/F0ParserTest.java

    r100 r101  
    7373        @Test(dependsOnMethods = {"readF0"})
    7474        public void stripAccess() {
    75                 components = Util.stripAccess(accesses, ModelComponent.class);
     75                components = ParamsUtil.stripAccess(accesses, ModelComponent.class);
    7676
    7777                assertThat(components.get(1)).isInstanceOf(Part.class);
  • java/main/src/test/java/com/framsticks/running/ExternalProcessTest.java

    r90 r101  
    99import org.testng.annotations.Test;
    1010
     11import com.framsticks.core.ValueChange;
     12import com.framsticks.params.EventListener;
    1113import com.framsticks.test.TestConfiguration;
    1214import com.framsticks.util.dispatching.Monitor;
     
    2527                final List<String> output = new LinkedList<>();
    2628
    27                 process.addListener(new OutputListener() {
     29                process.addOutputListener(new EventListener<ValueChange>() {
    2830                        @Override
    29                         public void onLineRead(String line) {
    30                                 output.add(line);
     31                        public void action(ValueChange change) {
     32                                output.add(change.value.toString());
    3133                        }
    3234                });
Note: See TracChangeset for help on using the changeset viewer.