Ignore:
Timestamp:
07/12/13 23:41:06 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • add <include/> to configuration
  • add side notes to tree
    • used to store arbitrary information alongside the tree structure
  • migrate to log4j2
    • supports lazy string evaluation of passed arguments
  • improve GUI tree
    • it stays in synchronization with actual state (even in high load test scenario)
  • improve panel management in GUI
  • make loading objects in GUI more lazy
  • offload parsing to connection receiver thread
    • info parsing
    • first step of objects parsing
  • fix connection parsing bug (eof in long values)
  • support zero-arguments procedure in table view

CHANGELOG:
Implement procedure calls from table view.

Refactorization around procedures in tables.

Add table editor for buttons.

Render buttons in the the list view.

Further improve Columns.

Add Column class for TableModel?.

Accept also non-arguments ProcedureParams? in tableView.

Increase maximal TextAreaControl? size.

Add tooltip to ProcedureControl?.

Fix bug of interpreting eofs in long values by connection reader.

Further rework connection parsing.

Simplify client connection processing.

Test ListChange? modification.

Test ListChange? events with java server.

Add TestChild?.

Fix bug with fast deregistering when connecting to running server.

Another minor refactorization in TreeOperations?.

Fix bug in SimpleAbstractAccess? loading routine.

Another minor improvement.

Minor change.

Make reading of List objects two-phase.

Another minor change.

Dispatch parsing into receiver thread.

Another step.

Enclose passing value in ObjectParam? case in closure.

Minor step.

Minor change on way to offload parsing.

Temporarily comment out single ValueParam? get.

It will be generalized to multi ValueParam?.

Process info in receiver thread.

Add DispatchingExceptionHandler?.

Make waits in browser test longer.

Use FETCHED_MARK.

It is honored in GUI, where it used to decide whether to get values

after user action.

It is set in standard algorithm for processing fetched values.

Add remove operation to side notes.

Make loading more lazy.

Improve loading policy.

On node choose load itself, on node expansion, load children.

Minor improvement.

Fix bug with panel interleaving.

Minor improvements.

Improve panel management.

More cleaning around panels.

Reorganize panels.

Further improve tree.

Fix bug in TreeModel?.

Remove children from TreeNode?.

Implement TreeNode? hashCode and equals.

Make TreeNode? delegate equals and hashcode to internal reference.

Move listeners from TreeNode? to side notes.

Store path.textual as a side note.

Side note params instead of accesses for objects.

More refactorizations.

In TreeNode? bindAccess based on side notes.

Minor step.

Hide createAccess.

Rename AccessInterface? to Access.

Minor changes.

Several improvements in high load scenarios.

Change semantics of ArrayListAccess?.set(index, null);

It now removes the element, making list shorter
(it was set to null before).

Add path remove handler.

Handle exceptions in Connection.

Update .gitignore

Configure logging to file.

Move registration to TreeModel?.

Further refactorization.

Minor refactorization.

Minor improvements.

Use specialized event also for Modify action of ListChange?.

Use remove events.

Use the insertion events for tree.

Further improve tree refreshing.

Further improve reacting on events in GUI.

Fix problem with not adding objects on addition list change.

Migrate to log4j lazy String construction interface.

Migrate imports to log4j2.

Drop dependency on adapter to version 1.2.

Switch log4j implementation to log4j2.

Add dirty mark to the NodeAtFrame?.

Make selecting in AccessInterfaces? type safe.

Ignore containers size settings in Model and Genotype.

Use tree side notes to remember local changes and panels.

Add sideNotes to tree.

They will be used to store various accompanying information
right in the tree.

Use ReferenceIdentityMap? from apache in TreeNode?.

It suits the need perfectly (weak semantics on both key and value).

Make ArrayListParam? do not react size changes.

Guard in TableModel? before not yet loaded objects.

Add <include/> clause and AutoInjector?.

Extract common columns configuration to separate xml,
that can be included by other configurations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/test/java/com/framsticks/hosting/ServerTest.java

    r99 r100  
    88import org.testng.annotations.Test;
    99
     10import com.framsticks.core.ListChange;
    1011import com.framsticks.core.LocalTree;
    1112import com.framsticks.core.Path;
     
    1819import com.framsticks.core.Tree;
    1920import com.framsticks.params.FramsClass;
    20 import com.framsticks.params.AccessInterface;
     21import com.framsticks.params.Access;
    2122import com.framsticks.params.EventListener;
    2223import com.framsticks.params.PrimitiveParam;
    2324import com.framsticks.params.PropertiesAccess;
    2425import com.framsticks.params.types.EventParam;
     26import com.framsticks.params.types.StringParam;
    2527// import com.framsticks.params.types.EventParam;
    2628import com.framsticks.params.types.ProcedureParam;
     
    4446        protected TestClass hostedObject;
    4547        protected EventListener<ChangeEvent> listener;
     48        protected EventListener<ListChange> childListener;
     49
    4650        protected List<String> listenerArguments = new LinkedList<>();
     51        protected List<ListChange> childrenChanges = new LinkedList<>();
     52
    4753
    4854        @Override
     
    9096                                assertThat(path.isResolved()).isTrue();
    9197                                remotePath = path;
    92                                 AccessInterface access = bindAccess(path);
     98                                Access access = bindAccess(path);
    9399                                assertThat(access).isInstanceOf(PropertiesAccess.class);
    94100                                assertThat(access.get("name", String.class)).isEqualTo("a test name");
     
    167173        }
    168174
    169         @Test(dependsOnMethods = "callMethod")
     175
     176        @Test(dependsOnMethods = "deregisterListener")
     177        public void registerChildListener() {
     178
     179                childListener = new EventListener<ListChange>() {
     180                        @Override
     181                        public void action(ListChange listChange) {
     182                                childrenChanges.add(listChange);
     183                        }
     184                };
     185
     186                addListener(remotePath, remoteTestFramsClass.getParamEntry("children_changed", EventParam.class), childListener, ListChange.class, produceWaiter(1.0).passInFuture(Void.class));
     187        }
     188
     189        @Test(dependsOnMethods = "registerChildListener")
     190        public void createChild() {
     191                final Waiter waiter = produceWaiter(2.0);
     192                call(remotePath, "createChild", new Object[] { "a child" }, produceWaiter(2.0).passInFuture(Object.class));
     193                call(remotePath, "createChild", new Object[] { "another child" }, produceWaiter(2.0).passInFuture(Object.class));
     194
     195                tryGet(remote, "/testClass/children/c0", new FutureHandler<Path>(failOnException) {
     196
     197                        @Override
     198                        protected void result(Path result) {
     199                                set(result, getFramsClass(result).getParamEntry("name", StringParam.class), "new_name", new FutureHandler<Integer>(failOnException) {
     200
     201                                        @Override
     202                                        protected void result(Integer result) {
     203                                                waiter.pass();
     204                                        }
     205                                });
     206                        }
     207                });
     208        }
     209
     210        @Test(dependsOnMethods = "createChild")
     211        public void deregisterChildListener() {
     212                removeListener(remotePath, remoteTestFramsClass.getParamEntry("children_changed", EventParam.class), childListener, produceWaiter(1.0).passInFuture(Void.class));
     213        }
     214
     215        @Test(dependsOnMethods = "deregisterChildListener")
     216        public void checkListChanges() {
     217                assertThat(childrenChanges).isEqualTo(Arrays.asList(
     218                        new ListChange(ListChange.Action.Add, 0, "c0"),
     219                        new ListChange(ListChange.Action.Add, 1, "c1"),
     220                        new ListChange(ListChange.Action.Modify, 0, "c0")
     221                ));
     222        }
     223
     224        @Test(dependsOnMethods = "checkListChanges")
    170225        public void endWait() {
    171226                monitor.useFor(1.0);
Note: See TracChangeset for help on using the changeset viewer.