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

HIGHLIGHTS:

CHANGELOG:
Get data also on tree expansion.

Use nice framstick icon for empty nodes.

Update panel after reload if it is current.

Add shallow reload procedure.

Cut Gui prefix from several tree classes.

Bring back counter of GuiTreeNode?.

Use IdentityHashMap? were it is more appriopriate.

Remove TreeListener?.

Do not use TreeListener? in GUI.

Minor change.

Done migration to GuiTreeModel?.

BrowserTest? in that version always crashes frams.linux.

Move rendering implementation into GuiAbstractNode?.

Use hand-crafted list in GuiTreeNode?.

Generally, it would be a great place for WeakIdentityHashMap?
(but there is none in Java Collection Framework).

Remove superfluous logging.

Fix bug in GuiTreeNode?.

Use IdentityHashMap? instead of HashMap?.

Improve structure update.

Filter out invalid uids in UniqueListAccess?.

Improve TreeCellRenderer?.

Add filtering in TrackConsole?.

Improve TreeModel?.

More changes.

More improvements.

More changes.

Remove TreeNode?.

Support MetaNode? in the GuiTreeModel?.

Implement more in GuiTreeModel?.

Add CompositeParam? interface to FramsClass? and AccessInterface?.

Allow access by number to UniqueList?.

Add UidComparator?.

Use TreeMap? as a default accessee in unique list.

It keeps order of keys.

Introduce classes to use with new TreeModel?.

Another step.

Migrate from TreeNode? to Node in many places.

Remove some uses of TreeNode? as DefaultMutableTreeNode?.

Remove Path from TreeNode? interface.

Remove Path from TreeNode?.

Add Path recration from node feature.

Reworking TreeCellRenderer?.

Minor change of TreeOperations? interface.

Remove last methods from TreeNode?.

Another minor step.

Do not store reference to TreeAtFrame? in TreeNode?.

Add proxy exceptionHandler to StatusBar?.

Move panels management to TreeAtFrame?.

Store localChanges in the NodeAtFrame?.

More cleanup.

Move name computing to TreeCellRenderer?.

Move tooltip and icon computations to TreeCellRenderer?.

More dispatches removed.

Remove most dispatching from TreeNode?.

TreeNode? does not actually redispatch tasks.

Make Tree embedded in Browser use SwingDispatcher?.

Make lazy binding of Tree with Dispatcher.

Minor changes.

Organizational change in AbstractTree?.

Make AbstractTree? compose from Thread instead of inherit from it.

Make SwingDispatcher? and AtOnceDispatcher? Joinable compatible.

Add ListPanelProvider?.

Improve Controls readonly and enabled handling.

Properly pass ExceptionHandlers? in more places.

Make Tree.get accept ValueParam?.

  • This is to allow access number of list elements.

Remove not needed get redirection in ClientAtServer?.

Rename tryResolve to tryGet.

Unify tryResolveAndGet into tryResolve.

Remove resolveTop from Tree interface.

Make Tree.get accept Future<Path>.

Use get to implement resolveTop also in ObjectTree?.

Unify resolveTop and get in RemoteTree?.

Another minor step.

More minor changes in tree operations.

Minor organizational changes.

In RemoteTree? first fetch info for root.

Reworking resolving.

Minor changes.

Make ListAccess? return proxy iterators (instead of creating temporary collection).

Let AccessInterface? return Iterable<Param>.

Improve resolving.

More improvements.

First working completion in ManagedConsole?.

Rename resolve to resolveTop.

This reflects the actuall functionality.

Change semantic of tryResolve and tryResolveAndGet.

File:
1 edited

Legend:

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

    r97 r98  
    99import com.framsticks.communication.queries.InfoRequest;
    1010import com.framsticks.communication.queries.SetRequest;
    11 import com.framsticks.core.Mode;
    1211import com.framsticks.core.Tree;
    1312import com.framsticks.core.Path;
     
    1817import com.framsticks.util.dispatching.AbstractJoinable;
    1918import com.framsticks.util.dispatching.Dispatching;
     19import com.framsticks.util.dispatching.ExceptionResultHandler;
    2020import com.framsticks.util.dispatching.FutureHandler;
    2121import com.framsticks.util.dispatching.Joinable;
     
    3131 * @author Piotr Sniegowski
    3232 */
    33 public class ClientAtServer extends AbstractJoinable implements RequestHandler, JoinableParent {
     33public class ClientAtServer extends AbstractJoinable implements RequestHandler, JoinableParent, ExceptionResultHandler {
    3434
    3535        protected final Server server;
     
    5252                assureNotEmpty(request.getPath());
    5353
    54                 resolve(tree, request.getPath(), new FutureHandler<Path>(responseCallback) {
     54                tryGet(tree, request.getPath(), new FutureHandler<Path>(responseCallback) {
    5555                        @Override
    5656                        protected void result(final Path path) {
     57
     58                                if (!path.getTextual().equals(request.getPath())) {
     59                                        throw new FramsticksException().msg("invalid path").arg("path", request.getPath());
     60                                }
    5761
    5862                                // final AccessInterface access = tree.prepareAccess(path);
     
    7377
    7478                                if (request instanceof GetRequest) {
    75                                         tree.get(path, Mode.FETCH, new FutureHandler<Object>(responseCallback) {
    76 
    77                                                 @Override
    78                                                 protected void result(Object result) {
    79                                                         if (result != access.getSelected()) {
    80                                                                 throw new FramsticksException().msg("mismatch objects during fetch").arg("path", path);
    81                                                         }
    82                                                         // TODO Auto-generated method stub
    83                                                         List<File> files = new LinkedList<File>();
    84                                                         ListSink sink = new ListSink();
    85                                                         access.save(sink);
    86                                                         files.add(new File(path.getTextual(), new ListSource(sink.getOut())));
    87                                                         responseCallback.pass(new Response(true, "", files));
    88                                                 }
    89                                         });
     79                                        Object result = path.getTopObject();
     80                                        if (result != access.getSelected()) {
     81                                                throw new FramsticksException().msg("mismatch objects during fetch").arg("path", path);
     82                                        }
     83                                        List<File> files = new LinkedList<File>();
     84                                        ListSink sink = new ListSink();
     85                                        access.save(sink);
     86                                        files.add(new File(path.getTextual(), new ListSource(sink.getOut())));
     87                                        responseCallback.pass(new Response(true, "", files));
    9088
    9189                                        return;
     
    148146        }
    149147
     148        @Override
     149        public void handle(FramsticksException exception) {
     150                tree.handle(exception);
     151        }
    150152
    151153}
Note: See TracChangeset for help on using the changeset viewer.