Ignore:
Timestamp:
07/10/13 22:41:02 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGTS:

  • complete events implementation
  • add CLI in Java Framsticks server
  • add automatic registration for events in GUI
  • improve objects fetching (object are never overwritten with new instances)
  • properly react for ListChange? events
  • add ListPanel? with table view
    • columns to be shown may be statically specified in configuration
    • currently modyfying data through tables is not available
  • improve maven configuration
    • configuration file may be specified without touching pom.xml

CHANGELOG:
Extract constants from Flags into ParamFlags? and SetStateFlags?.

Extract flags I/O to FlagsUtils? class.

Configured maven to exec given resource configuration.

For example:
mvn exec:exec -Dframsticks.config=/configs/managed-console.xml

Cleanup pom.xml

Rename ObjectTree? to LocalTree? (also make LocalTree? and RemoteTree? final).

Minor change.

Add maximum number of columns in ListPanelProvider?.

Improve ColumnsConfig? interpretation.

Automatically fill FramsClass?.name if trying to construct empty.

Improve identitifer case mangling in XmlLoader?.

Introduce configurable ColumnsConfig?.

Draft working version of ListPanel?.

Table is being shown (although empty).

More improvements to table building.

Move some functionality from Frame to TreeModel?.

Move tree classes in gui to separate package.

Remove old table related classes.

Add draft implementation of TableModel?.

Redirect ParamBuilder?.forAccess to AccessInterface?.

Optimize ParamBuilder?.forAccess()

Do not clear list when loading.

Do not load fetched values directly.

Implement different AccessInterface? copying policy.

Optimize fetching values routine.

Remove Mode enum (work out get semantics).

Some improvements to ListChange? handling.

Improve UniqueListAccess?.

Add reaction for ListChanges? in the TreeNode?.

EventListeners? are being added in the TreeNode?.

Listeners for ListParams? are now very naive (they download
whole list).

Automatially register on events in GUI.

Events are working in RemoteTree? and Server.

Move listeners to the ClientSideManagedConnection?.

Remove old classes responsible for event subscriptions.

Improve event reading.

Improve events handling at server side.

Add register attribute in FramsClassAnnotation?
to automatically also register other classes.

Registering events works.

Setup for remote listeners registration.

More improvements.

Minor changes.

Add rootTree to the ClientAtServer?.

Moving CLI to the ClientAtServer?.

Fix bug: use Void.TYPE instead of Void.class

More development around CLI.

  • Improve Path resolving.

Add synthetic root to ObjectTree?.

It is needed to allow sybling for the original root
that would containg CLI.

Some work with registering events in RemoteTree?.

Draft implementation of listener registering in RemoteTree?.

Support events registration in the ObjectTree?.

Add events support to ReflectionAccess?.

EventParam? is recognized by ParamCandidate?.

Prepare interface for Events across project.

Add EventListener? and API for listeners in Tree.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • java/main/src/main/java/com/framsticks/params/SimpleAbstractAccess.java

    r98 r99  
    66import org.apache.log4j.Logger;
    77
    8 import com.framsticks.util.UnimplementedException;
     8import com.framsticks.params.types.ObjectParam;
     9import com.framsticks.util.FramsticksException;
     10import static com.framsticks.params.SetStateFlags.*;
    911
    1012/**
     
    105107        @Override
    106108        public <T> int set(ValueParam param, T value) {
    107                 int flags = 0;
    108109
    109110                //String id = param.getEffectiveId();
     
    115116                                internalSet(param, casted);
    116117                        }
    117                         flags = result.getFlags();
     118                        return result.getFlags();
    118119                } catch (CastFailure e) {
    119                         log.error("casting failure while set: ", e);
    120                 }
    121                 return flags;
     120                        throw new FramsticksException()
     121                                .msg("casting failure while set")
     122                                .arg("param", param)
     123                                .arg("value", value)
     124                                .arg("value's type", (value == null ? "<null>" : value.getClass().getCanonicalName()))
     125                                .arg("in", this).cause(e);
     126                }
    122127        }
    123128
     
    167172                        set(i, max);
    168173                }
    169         }
    170 
    171         @Override
    172         public void copyFrom(AccessInterface src) {
    173                 throw new UnimplementedException();
    174                 // clearValues();
    175                 //TODO: iterate over self, and pull from src
    176                 /*
    177                 for (int i = 0; i < src.getFramsClass().size(); i++) {
    178                         this.set(i, src.get(i, Object.class));
    179                 }
    180                 */
    181174        }
    182175
     
    257250                                continue;
    258251                        }
    259                         if ((param.getFlags() & Flags.DONTLOAD) != 0) {
     252                        if ((param.getFlags() & ParamFlags.DONTLOAD) != 0) {
    260253                                log.debug("DontLoad flag was set - not loading...");
    261254                        } else {
    262255                                int retFlags = this.set((ValueParam) param, entry.value);
    263                                 if ((retFlags & (Flags.PSET_HITMIN | Flags.PSET_HITMAX)) != 0) {
    264                                         String which = ((retFlags & Flags.PSET_HITMIN) != 0) ? "small" : "big";
     256                                if ((retFlags & (PSET_HITMIN | PSET_HITMAX)) != 0) {
     257                                        String which = ((retFlags & PSET_HITMIN) != 0) ? "small" : "big";
    265258                                        log.warn("value of key '" + entry.key + "' was too " + which + ", adjusted");
    266259                                }
     
    304297        }*/
    305298
     299        @Override
     300        public String toString() {
     301                StringBuilder b = new StringBuilder();
     302                b.append(framsClass);
     303                if (getSelected() != null) {
     304                        b.append("(").append(getSelected()).append(")");
     305                }
     306                return b.toString();
     307        }
     308
     309        @Override
     310        public ParamBuilder buildParam(ParamBuilder builder) {
     311                return builder.name(getId()).type(ObjectParam.class).containedTypeName(getId());
     312        }
    306313
    307314}
Note: See TracChangeset for help on using the changeset viewer.