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/core/ObjectTree.java

    r97 r98  
    88import com.framsticks.params.Param;
    99import com.framsticks.params.PrimitiveParam;
     10import com.framsticks.params.ValueParam;
    1011import com.framsticks.params.annotations.AutoAppendAnnotation;
    1112import com.framsticks.params.annotations.FramsClassAnnotation;
    12 import com.framsticks.util.UnsupportedOperationException;
    1313import com.framsticks.params.types.ProcedureParam;
    1414import com.framsticks.util.FramsticksException;
    1515import com.framsticks.util.dispatching.Future;
     16
    1617import static com.framsticks.core.TreeOperations.*;
    1718
     
    2425                registry.registerAndBuild(object.getClass());
    2526                AccessInterface access = registry.createAccess(object.getClass());
    26                 setRoot(new Node(Param.build().forAccess(access).id(getName()).finish(CompositeParam.class), object));
     27                assignRootParam(Param.build().forAccess(access).id(getName()).finish(CompositeParam.class));
     28                assignRootObject(object);
    2729        }
    2830
    2931        public Object getRootObject() {
    30                 return getRoot().getObject();
     32                return getAssignedRoot().getObject();
    3133        }
    3234
     
    4345
    4446        @Override
    45         public void get(final Path path, Mode mode, Future<Object> future) {
     47        public void get(Path path, Mode mode, Future<Path> future) {
    4648                assert isActive();
    4749                log.debug("requesting: " + path);
    48                 fireFetch(path);
    49                 future.pass(path.getTopObject());
     50                path = resolveTopSync(path);
     51                future.pass(path);
    5052        }
    5153
    5254        @Override
    53         public void get(Path path, PrimitiveParam<?> param, Mode mode, Future<Object> future) {
     55        public void get(Path path, ValueParam param, Mode mode, Future<Object> future) {
    5456                assert isActive();
    55                 fireFetch(path);
     57                path = resolveTopSync(path);
    5658                future.pass(bindAccess(path).get(param, Object.class));
    5759        }
     
    8082        }
    8183
    82         @Override
    83         public void resolve(Path path, Future<Path> future) {
     84        protected Path resolveTopSync(Path path) {
    8485                assert isActive();
    8586                assert path.isOwner(this);
    8687                if (path.getTop().getObject() != null) {
    87                         future.pass(path);
    88                         return;
     88                        return path;
    8989                }
    90                 AccessInterface access = bindAccess(this, path.getUnder());
     90                AccessInterface access = bindAccess(path.getUnder());
    9191                Object object = access.get(path.getTop().getParam(), Object.class);
    9292                if (object == null) {
    93                         future.pass(path);
    94                         return;
     93                        return path;
    9594                }
    96                 future.pass(path.appendResolution(object));
     95                return path.appendResolution(object);
    9796        }
     97
    9898
    9999        @Override
     
    103103        }
    104104
    105         @Override
    106         public Path create(Path path) {
    107                 assert isActive();
    108                 assert !path.isResolved();
    109                 throw new UnsupportedOperationException();
    110         }
    111 
    112105}
Note: See TracChangeset for help on using the changeset viewer.