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/Path.java

    r97 r98  
    5858        public Path appendParam(CompositeParam param) {
    5959                assert isResolved();
    60                 return appendNode(new Node(param, null));
     60                return appendNode(new Node(tree, param, null));
    6161        }
    6262
     
    9999                public PathBuilder setLast(Object object) {
    100100                        Node n = nodes.pollLast();
    101                         nodes.add(new Node(n.getParam(), object));
     101                        nodes.add(new Node(n.getTree(), n.getParam(), object));
    102102                        return this;
    103103                }
     
    130130                }
    131131
     132
    132133                public PathBuilder resolve(@Nonnull Tree tree, String textual) {
    133134
     
    136137                        this.tree = tree;
    137138
    138                         nodes.add(tree.getRoot());
    139                         Node current = tree.getRoot();
     139                        Node current = tree.getAssignedRoot();
     140                        nodes.add(current);
    140141
    141142                        StringBuilder b = new StringBuilder();
    142143                        Iterator<String> i = splitPath(textual);
    143144                        while (i.hasNext() && current.getObject() != null) {
    144                                 AccessInterface access = tree.prepareAccess(current.getParam());
    145                                 if (access == null) {
    146                                         break;
    147                                 }
     145                                AccessInterface access = TreeOperations.bindAccess(current);// tree.prepareAccess(current.getParam());
    148146                                String e = i.next();
    149147                                Param p = access.getParam(e);
     
    155153                                b.append("/").append(e);
    156154                                access.select(current.getObject());
    157                                 current = new Node(c, getKnownChild(tree, access, c));
     155                                current = new Node(current.getTree(), c, getKnownChild(tree, access, c));
    158156                                nodes.add(current);
    159157                        }
     
    218216                assert Dispatching.isThreadSafe();
    219217                return this.textual.equals(textual);
     218        }
     219
     220        public final boolean isTheSameTextually(Path path) {
     221                assert Dispatching.isThreadSafe();
     222                return (tree == path.getTree()) && textual.equals(path.getTextual());
    220223        }
    221224
     
    242245                        return Path.build().resolve(tree, "/").finish();
    243246                }
    244                 Object child = getKnownChild(tree, TreeOperations.bindAccess(tree, getUnder()), getTop().getParam());
     247                Object child = getKnownChild(tree, TreeOperations.bindAccess(getUnder()), getTop().getParam());
    245248                if (child == null) {
    246249                        return this;
     
    249252        }
    250253
    251         public boolean matches(Path p) {
    252                 assert Dispatching.isThreadSafe();
    253                 assert tree == p.tree;
    254                 Iterator<Node> a = nodes.iterator();
    255                 Iterator<Node> b = p.nodes.iterator();
    256                 while (a.hasNext() && b.hasNext()) {
    257                         Node an = a.next();
    258                         Node bn = b.next();
    259                         if (an.object != bn.object) {
    260                                 return false;
    261                         }
    262                 }
    263                 return a.hasNext() == b.hasNext();
    264         }
    265254
    266255        public String getLastElement() {
     
    278267        }
    279268
    280         public void assureResolved() {
     269        public Path assureResolved() {
    281270                if (!isResolved()) {
    282271                        throw new FramsticksException().msg("path is not resolved").arg("path", this);
    283272                }
     273                return this;
    284274        }
    285275
     
    287277                return Path.build().resolve(tree, textual).finish();
    288278        }
     279
     280        public boolean isTheSameObjects(Path path) {
     281                if (tree != path.getTree()) {
     282                        return false;
     283                }
     284                if (size() != path.size()) {
     285                        return false;
     286                }
     287                if (!getTextual().equals(path.getTextual())) {
     288                        return false;
     289                }
     290                Iterator<Node> a = nodes.iterator();
     291                Iterator<Node> b = path.getNodes().iterator();
     292                while (a.hasNext()) {
     293                        assert b.hasNext();
     294                        if (a.next() != b.next()) {
     295                                return false;
     296                        }
     297                }
     298                return true;
     299        }
     300
     301
     302        // public boolean isEmpty() {
     303        //      return nodes.isEmpty();
     304        // }
    289305}
    290306
Note: See TracChangeset for help on using the changeset viewer.