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/main/java/com/framsticks/gui/controls/ProcedureControl.java

    r99 r100  
    11package com.framsticks.gui.controls;
    22
    3 import com.framsticks.core.Tree;
    43import com.framsticks.core.Path;
    54import com.framsticks.gui.Frame;
     
    109import com.framsticks.util.dispatching.ExceptionResultHandler;
    1110import com.framsticks.util.dispatching.FutureHandler;
    12 import com.framsticks.util.dispatching.RunAt;
    1311import com.framsticks.util.dispatching.ThrowExceptionHandler;
     12import com.framsticks.util.swing.TooltipConstructor;
    1413
    1514import javax.swing.*;
    1615import javax.swing.border.BevelBorder;
    17 import javax.swing.tree.TreePath;
    1816
    19 import org.apache.log4j.Logger;
     17import org.apache.logging.log4j.Logger;
     18import org.apache.logging.log4j.LogManager;
    2019
    2120import java.awt.event.ActionEvent;
     
    2928public class ProcedureControl extends Control implements ControlOwner {
    3029
    31         private static final Logger log = Logger.getLogger(ProcedureControl.class);
     30        private static final Logger log = LogManager.getLogger(ProcedureControl.class);
    3231
    3332        protected final JButton procedureButton;
     
    3736        public ProcedureControl(ProcedureParam procedureParam) {
    3837                super(procedureParam);
     38
     39                this.setToolTipText(new TooltipConstructor()
     40                        .append("name", procedureParam.getName())
     41                        .append("id", procedureParam.getId())
     42                        .append("help", procedureParam.getHelp())
     43                        .build());
    3944
    4045                procedureButton = new JButton("Call");
     
    5661                        public void actionPerformed(ActionEvent e) {
    5762
    58                                 final Path path = getFrame().getTreeModel().convertToPath(getCurrentTreePath());
     63                                final Path path = getCurrentPath();
    5964
    6065                                final List<Object> arguments = new LinkedList<Object>();
     
    6267                                        Object value = components.get(arg).getCurrentValue();
    6368                                        arguments.add(value);
    64                                         log.debug("argument " + arg + ": " + value);
     69                                        log.debug("argument {}: {}", arg, value);
    6570                                }
    6671                                //TODO FEH: make it show dialog
    67                                 final ExceptionResultHandler handler = ThrowExceptionHandler.getInstance();
     72                                callProcedure(path, getParam(), arguments.toArray());
    6873
    69                                 path.getTree().dispatch(new RunAt<Tree>(handler) {
    70                                         @Override
    71                                         protected void runAt() {
    72                                                 path.getTree().call(path, getParam(), arguments.toArray(), new FutureHandler<Object>(handler) {
    73 
    74                                                         @Override
    75                                                         public void result(Object result) {
    76 
    77                                                         }
    78                                                 });
    79                                         }
    80                                 });
    8174                        }
    8275                });
    8376                this.add(procedureButton);
    8477
     78        }
     79
     80        public static void callProcedure(final Path path, final ProcedureParam param, Object[] arguments) {
     81                final ExceptionResultHandler handler = ThrowExceptionHandler.getInstance();
     82
     83                assert path.getTree().isActive();
     84
     85                path.getTree().call(path, param, arguments, new FutureHandler<Object>(handler) {
     86
     87                        @Override
     88                        public void result(Object result) {
     89
     90                        }
     91                });
    8592        }
    8693
     
    109116
    110117        @Override
    111         public TreePath getCurrentTreePath() {
    112                 return owner.getCurrentTreePath();
     118        public Path getCurrentPath() {
     119                return owner.getCurrentPath();
    113120        }
    114121
Note: See TracChangeset for help on using the changeset viewer.