Ignore:
Timestamp:
07/10/13 22:41:02 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGTS:

  • complete events implementation
  • add CLI in Java Framsticks server
  • add automatic registration for events in GUI
  • improve objects fetching (object are never overwritten with new instances)
  • properly react for ListChange? events
  • add ListPanel? with table view
    • columns to be shown may be statically specified in configuration
    • currently modyfying data through tables is not available
  • improve maven configuration
    • configuration file may be specified without touching pom.xml

CHANGELOG:
Extract constants from Flags into ParamFlags? and SetStateFlags?.

Extract flags I/O to FlagsUtils? class.

Configured maven to exec given resource configuration.

For example:
mvn exec:exec -Dframsticks.config=/configs/managed-console.xml

Cleanup pom.xml

Rename ObjectTree? to LocalTree? (also make LocalTree? and RemoteTree? final).

Minor change.

Add maximum number of columns in ListPanelProvider?.

Improve ColumnsConfig? interpretation.

Automatically fill FramsClass?.name if trying to construct empty.

Improve identitifer case mangling in XmlLoader?.

Introduce configurable ColumnsConfig?.

Draft working version of ListPanel?.

Table is being shown (although empty).

More improvements to table building.

Move some functionality from Frame to TreeModel?.

Move tree classes in gui to separate package.

Remove old table related classes.

Add draft implementation of TableModel?.

Redirect ParamBuilder?.forAccess to AccessInterface?.

Optimize ParamBuilder?.forAccess()

Do not clear list when loading.

Do not load fetched values directly.

Implement different AccessInterface? copying policy.

Optimize fetching values routine.

Remove Mode enum (work out get semantics).

Some improvements to ListChange? handling.

Improve UniqueListAccess?.

Add reaction for ListChanges? in the TreeNode?.

EventListeners? are being added in the TreeNode?.

Listeners for ListParams? are now very naive (they download
whole list).

Automatially register on events in GUI.

Events are working in RemoteTree? and Server.

Move listeners to the ClientSideManagedConnection?.

Remove old classes responsible for event subscriptions.

Improve event reading.

Improve events handling at server side.

Add register attribute in FramsClassAnnotation?
to automatically also register other classes.

Registering events works.

Setup for remote listeners registration.

More improvements.

Minor changes.

Add rootTree to the ClientAtServer?.

Moving CLI to the ClientAtServer?.

Fix bug: use Void.TYPE instead of Void.class

More development around CLI.

  • Improve Path resolving.

Add synthetic root to ObjectTree?.

It is needed to allow sybling for the original root
that would containg CLI.

Some work with registering events in RemoteTree?.

Draft implementation of listener registering in RemoteTree?.

Support events registration in the ObjectTree?.

Add events support to ReflectionAccess?.

EventParam? is recognized by ParamCandidate?.

Prepare interface for Events across project.

Add EventListener? and API for listeners in Tree.

File:
1 edited

Legend:

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

    r97 r99  
    77import org.testng.annotations.Test;
    88
     9import com.framsticks.core.Path;
    910import com.framsticks.core.Tree;
    10 import com.framsticks.core.ObjectTree;
     11import com.framsticks.core.LocalTree;
    1112import com.framsticks.params.AccessInterface;
     13import com.framsticks.params.EventListener;
    1214import com.framsticks.params.FramsClass;
    1315import com.framsticks.params.ReflectionAccess;
     16import com.framsticks.params.types.EventParam;
    1417import com.framsticks.params.types.StringParam;
    1518import com.framsticks.parsers.XmlLoader;
     19import com.framsticks.test.ChangeEvent;
    1620import com.framsticks.test.TestClass;
     21import com.framsticks.util.dispatching.FutureHandler;
    1722// import com.framsticks.util.dispatching.Dispatching;
    1823import com.framsticks.util.dispatching.RunAt;
     
    2227public class ProcedureBrowserTest extends BrowserBaseTest {
    2328
    24         ObjectTree tree;
     29        LocalTree tree;
    2530
    2631        @Override
     
    2934
    3035                assertThat(browser.getTrees().size()).isEqualTo(1);
    31                 assertThat(browser.getTrees().get("test")).isInstanceOf(ObjectTree.class);
     36                assertThat(browser.getTrees().get("test")).isInstanceOf(LocalTree.class);
    3237
    33                 tree = (ObjectTree) browser.getTrees().get("test");
     38                tree = (LocalTree) browser.getTrees().get("test");
    3439        }
    3540
     
    6065                                assertThat(access).isInstanceOf(ReflectionAccess.class);
    6166                                FramsClass framsClass = access.getFramsClass();
    62                                 assertThat(framsClass.getParamCount()).isEqualTo(4);
     67                                assertThat(framsClass.getParamCount()).isEqualTo(5);
    6368                                assertThat(framsClass.getParam(0).getId()).isEqualTo("name");
    6469                                assertThat(framsClass.getParam(1).getId()).isEqualTo("history");
    65                                 assertThat(framsClass.getParam(2).getId()).isEqualTo("appendHistory");
    66                                 assertThat(framsClass.getParam(3).getId()).isEqualTo("resetHistory");
     70                                assertThat(framsClass.getParam(2).getId()).isEqualTo("history_changed");
     71                                assertThat(framsClass.getParam(3).getId()).isEqualTo("appendHistory");
     72                                assertThat(framsClass.getParam(4).getId()).isEqualTo("resetHistory");
    6773
    6874                                assertThat(access.get("history", String.class)).isEqualTo("initial|");
     
    7783                waitForIdle();
    7884
     85                final EventListener<ChangeEvent> listener = new EventListener<ChangeEvent>() {
     86
     87                        @Override
     88                        public void action(ChangeEvent argument) {
     89                                assertThat(argument.history).isEqualTo("");
     90                        }
     91                };
    7992
    8093                tree.dispatch(new RunAt<Tree>(failOnException) {
    8194                        @Override
    8295                        protected void runAt() {
    83                                 assertThat(bindAccess(tree, "/").get("history", String.class)).isEqualTo("initial|Żółw|");
     96                                AccessInterface access = bindAccess(tree, "/");
     97                                assertThat(access.get("history", String.class)).isEqualTo("initial|Żółw|");
     98
     99                                tree.addListener(Path.to(tree, "/"), access.getFramsClass().getParamEntry("history_changed", EventParam.class), listener, ChangeEvent.class, FutureHandler.doNothing(Void.class, failOnException));
    84100                        }
    85101                });
     
    91107                        @Override
    92108                        protected void runAt() {
    93                                 assertThat(bindAccess(tree, "/").get("history", String.class)).isEqualTo("");
     109                                AccessInterface access = bindAccess(tree, "/");
     110                                assertThat(access.get("history", String.class)).isEqualTo("");
     111
     112                                tree.removeListener(Path.to(tree, "/"), access.getFramsClass().getParamEntry("history_changed", EventParam.class), listener, FutureHandler.doNothing(Void.class, failOnException));
    94113                        }
    95114                });
Note: See TracChangeset for help on using the changeset viewer.