Ignore:
Timestamp:
09/10/13 21:11:41 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • import refactorization: move Tree, Path, etc.

from core to structure package

  • initial serialization implementation
  • improve PrimeExperiment? test
  • many organizational changes and convenience improvements

CHANGELOG:
Make registry in AbstractTree? final.

Move most classes from core to structure package.

Minor changes.

Switch names of Future and FutureHandler?.

Rename ExceptionResultHandler? to ExceptionHandler?.

Rename ExceptionHandler? to ExceptionDispatcherHandler?.

Fix bug in ParamCandidate? cache.

Add missing synchronization to the BufferedDispatcher?.

Develop @Serialized support.

Rework serialization further.

Add serialization/deserialization interface to ValueParam?.

Move getStorageType and isNumeric from Param down to params hierarchy.

Minor changes.

Improve param type induction.

Add TestSerializedClass? for testing new serialization.

Add info files gor GenePool? and Population.

Add standard.expt exemplary netfile.

Add type name field to PropertiesObject?.

Use PropertiesObject? for PropertiesAccess? instead of ordinary map.

Hide getFramsClass is several more places.

More unification accross FramsClass?, Access and Path.

Add ParamCollection?.

Simplify interface for getting params from FramsClass?, Access
or Path.

Make Access.call() interface variadic.

Add arguments(args) convenience wrapper around new Object[] {args}.

Upgrade to apache.commons.lang version 3.1

Minor improvement with Response constructors.

Develop proper result printing in ClientAtServer?.

Add experimentNetsave to PrimeExperiment?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/gui/tree/TreeModel.java

    r103 r105  
    1414import org.apache.logging.log4j.LogManager;
    1515
    16 import com.framsticks.core.ListChange;
    17 import com.framsticks.core.Node;
    18 import com.framsticks.core.Path;
    19 import com.framsticks.core.SideNoteKey;
    20 import com.framsticks.core.TreeOperations;
    21 import com.framsticks.core.ValueChange;
    2216import com.framsticks.gui.Frame;
    2317import com.framsticks.params.Access;
     
    2923import com.framsticks.params.ValueParam;
    3024import com.framsticks.params.types.EventParam;
    31 import com.framsticks.util.FramsticksException;
     25import com.framsticks.structure.Node;
     26import com.framsticks.structure.Path;
     27import com.framsticks.structure.SideNoteKey;
     28import com.framsticks.structure.TreeOperations;
     29import com.framsticks.structure.messages.ListChange;
     30import com.framsticks.structure.messages.ValueChange;
    3231import com.framsticks.util.Misc;
    3332import com.framsticks.util.FramsticksUnsupportedOperationException;
    34 import com.framsticks.util.dispatching.FutureHandler;
     33import com.framsticks.util.dispatching.Future;
    3534import com.framsticks.util.lang.Casting;
    3635
    37 import static com.framsticks.core.TreeOperations.*;
     36import static com.framsticks.structure.TreeOperations.*;
    3837
    3938public class TreeModel implements javax.swing.tree.TreeModel {
     
    4241
    4342        protected List<TreeModelListener> listeners = new LinkedList<>();
    44 
    4543
    4644        protected final Frame frame;
     
    208206        }
    209207
    210         public TreePath convertToTreePath(Path path, boolean forceComplete) {
     208        public TreePath convertToTreePath(Path path) {
    211209                assert frame.isActive();
    212210
     
    271269                        return;
    272270                }
    273                 path.getTree().get(path, new FutureHandler<Path>(frame) {
     271                path.getTree().get(path, new Future<Path>(frame) {
    274272                        @Override
    275273                        protected void result(Path result) {
    276                                 final TreePath treePath = convertToTreePath(result, true);
     274                                final TreePath treePath = convertToTreePath(result);
    277275
    278276
     
    358356
    359357                                        log.debug("reacting to change {} in {}", listChange, listPath);
    360                                         final TreePath treeListPath = convertToTreePath(listPath, true);
    361                                         if (treeListPath == null) {
    362                                                 throw new FramsticksException().msg("path was not fully converted").arg("path", listPath);
    363                                         }
     358                                        final TreePath treeListPath = convertToTreePath(listPath);
    364359
    365360                                        if ((listChange.getAction().equals(ListChange.Action.Modify)) && (listChange.getPosition() == -1)) {
     
    387382                                                        }
    388383
    389                                                         listPath.getTree().get(childPath, new FutureHandler<Path>(frame) {
     384                                                        listPath.getTree().get(childPath, new Future<Path>(frame) {
    390385                                                                @Override
    391386                                                                protected void result(Path result) {
     
    394389                                                                        }
    395390                                                                        assert frame.isActive();
    396                                                                         final TreePath treePath = Misc.throwIfNull(frame.getTreeModel().convertToTreePath(result, true));
     391                                                                        final TreePath treePath = Misc.throwIfNull(frame.getTreeModel().convertToTreePath(result));
    397392
    398393                                                                        // treeModel.nodeStructureChanged(treePath);
     
    420415                                                case Modify: {
    421416                                                        Path childPath = listPath.appendParam(access.prepareParamFor(id)).tryResolveIfNeeded();
    422                                                         listPath.getTree().get(childPath, new FutureHandler<Path>(frame) {
     417                                                        listPath.getTree().get(childPath, new Future<Path>(frame) {
    423418                                                                @Override
    424419                                                                protected void result(Path result) {
Note: See TracChangeset for help on using the changeset viewer.