Ignore:
Timestamp:
06/22/13 21:51:33 (11 years ago)
Author:
psniegowski
Message:

HIGHLIGHTS:

  • simplification of entities management model
  • cleanup around params (improve hierarchy)
  • migrate from JUnit to TestNG
  • introduce FEST to automatically test GUI
  • improve slider control
  • loosen synchronization between gui tree and backend representation
  • and many other bug fixes

NOTICE:

  • a great many of lines is changed only because of substituting spaces with tabs

CHANGELOG (oldest changes at the bottom):

Some cleaning after fix found.

Fix bug with tree.

More changes with TreeNodes?.

Finally fix issue with tree.

Improve gui tree management.

Decouple update of values from fetch request in gui.

Minor changes.

Minor changes.

Minor change.

Change Path construction wording.

More fixes to SliderControl?.

Fix SliderControl?.

Fix SliderControl?.

Minor improvement.

Several changes.

Make NumberParam? a generic class.

Add robot to the gui test.

Setup common testing logging configuration.

Remove Parameters class.

Remove entityOwner from Parameters.

Move name out from Parameters class.

Move configuration to after the construction.

Simplify observers and endpoints.

Remove superfluous configureEntity overrides.

Add dependency on fest-swing-testng.

Use FEST for final print test.

Use FEST for more concise and readable assertions.

Divide test of F0Parser into multiple methods.

Migrate to TestNG

Minor change.

Change convention from LOGGER to log.

Fix reporting of errors during controls filling.

Bound maximal height of SliderControl?.

Minor improvements.

Improve tooltips for controls.

Also use Delimeted in more places.

Move static control utilities to Gui.

Rename package gui.components to controls.

Some cleaning in controls.

Improve Param classes placing.

Move ValueParam?, PrimitiveParam? and CompositeParam? one package up.

Improve ParamBuilder?.

Move getDef to ValueParam? and PrimitiveParam?.

Move getMax and getDef to ValueParam?.

Move getMin to ValueParam?.

Upgrade to laters apache commons versions.

Use filterInstanceof extensively.

Add instanceof filters.

Make ValueParam? in many places of Param.

Place assertions about ValueParam?.

Add ValueParam?

Rename ValueParam? to PrimitiveParam?

Minor changes.

Several improvements to params types.

Add NumberParam?.

Add TextControl? component.

Add .swp files to .gitignore

Greatly improved slider component.

Some improvements.

Make Param.reassign return also a state.

Add IterableIterator?.

Several changes.

  • Move util classes to better packages.
  • Remove warnings from eclim.

Several improvements.

Fix bug with BooleanParam?.

Some experiments with visualization.

Another fix to panel management.

Improve panel management.

Some refactorization around panels.

Add root class for panel.

Location:
java/main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • java/main

    • Property svn:ignore set to
      target
  • java/main/src/main/java/com/framsticks/params/Flags.java

    r77 r84  
    33import java.lang.reflect.Field;
    44import org.apache.log4j.Logger;
     5
     6import com.framsticks.util.lang.Delimeted;
    57
    68/**
     
    911 *
    1012 * Based on c++ defines located in: cpp/gdk/param.h
    11  * 
     13 *
    1214 * @author Jarek Szymczak <name.surname@gmail.com>
    1315 * (please replace name and surname with my personal data)
     
    1719public final class Flags {
    1820
    19         private final static Logger logger = Logger.getLogger(Flags.class.getName());
    20 
     21        private final static Logger log = Logger.getLogger(Flags.class.getName());
    2122
    2223        public static final int READONLY = 1;
     
    4849        public static final int PSET_HITMAX = 8;
    4950
     51        public static String write(int flags, String empty) {
     52                Delimeted d = new Delimeted("+", empty);
     53                try {
     54                        for (Field f : Flags.class.getDeclaredFields()) {
     55                                if (f.getType() != int.class) {
     56                                        continue;
     57                                }
     58                                if ((flags & f.getInt(null)) != 0) {
     59                                        d.append(f.getName());
     60                                }
     61                        }
     62                } catch (IllegalArgumentException e) {
     63                        e.printStackTrace();
     64                } catch (IllegalAccessException e) {
     65                        e.printStackTrace();
     66                }
     67                return d.build();
     68        }
     69
    5070        public static Integer read(String flags) {
    5171                Integer allFlags = 0;
     
    5979                                        allFlags |= Integer.parseInt(field.get(null).toString());
    6080                                } catch (SecurityException e) {
    61                                         logger.warn("security exception was thrown while trying to read flag ("
    62                                                         + flag + ")");
     81                                        log.warn("security exception was thrown while trying to read flag (" + flag + ")");
    6382                                } catch (NoSuchFieldException e) {
    64                                         logger.warn("selected flag is not known (" + flag + ")");
     83                                        log.warn("selected flag is not known (" + flag + ")");
    6584                                } catch (IllegalArgumentException e) {
    66                                         logger.warn("selected flag is not known (" + flag + ")");
     85                                        log.warn("selected flag is not known (" + flag + ")");
    6786                                } catch (IllegalAccessException e) {
    68                                         logger.warn("selected flag is not known (" + flag + ")");
     87                                        log.warn("selected flag is not known (" + flag + ")");
    6988                                }
    7089                        }
Note: See TracChangeset for help on using the changeset viewer.