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/diagnostics/Diagnostics.java

    r97 r98  
    11package com.framsticks.diagnostics;
    22
    3 import java.util.Date;
    4 import java.io.File;
    5 import java.io.FileOutputStream;
    6 import java.io.IOException;
    7 import java.io.OutputStreamWriter;
    8 import java.io.PrintWriter;
    9 import java.text.SimpleDateFormat;
    103
    11 import org.apache.log4j.Logger;
    12 
    13 import com.framsticks.core.AbstractTreeListener;
    144import com.framsticks.core.Tree;
    15 import com.framsticks.core.Path;
    16 import com.framsticks.dumping.PrintWriterSink;
    17 import com.framsticks.dumping.SaveStream;
    185import com.framsticks.params.annotations.AutoAppendAnnotation;
    19 import com.framsticks.remote.RecursiveFetcher;
    20 import com.framsticks.util.FramsticksException;
    21 import com.framsticks.util.PeriodicTask;
    22 import com.framsticks.util.dispatching.ExceptionResultHandler;
    23 import com.framsticks.util.dispatching.FutureHandler;
    246import com.framsticks.util.dispatching.JoinableCollection;
    25 import com.framsticks.util.dispatching.ThrowExceptionHandler;
    26 import com.framsticks.util.io.Encoding;
    277
    288/**
     
    3010 */
    3111public class Diagnostics extends JoinableCollection<Tree> {
    32         private static final Logger log = Logger.getLogger(Diagnostics.class);
    3312
    3413
     
    4827                super.add(tree);
    4928
    50                 tree.addListener(new AbstractTreeListener() {
    51                         @Override
    52                         public void onRun(Exception e) {
    53                                 if (e != null) {
    54                                         return;
    55                                 }
     29                // tree.addListener(new AbstractTreeListener() {
     30                //      @Override
     31                //      public void onRun(Exception e) {
     32                //              if (e != null) {
     33                //                      return;
     34                //              }
    5635
    57                                 if (dumpsInterval != null) {
    58                                         new PeriodicTask<Tree>(ThrowExceptionHandler.getInstance(), tree, dumpsInterval * 1000) {
    59                                                 protected final ExceptionResultHandler repeater = new ExceptionResultHandler() {
     36                //              if (dumpsInterval != null) {
     37                //                      new PeriodicTask<Tree>(ThrowExceptionHandler.getInstance(), tree, dumpsInterval * 1000) {
     38                //                              protected final ExceptionResultHandler repeater = new ExceptionResultHandler() {
    6039
    61                                                         @Override
    62                                                         public void handle(FramsticksException exception) {
    63                                                                 log.error("caught error during diagnostics fetching (repeating): " + exception);
    64                                                                 again();
    65                                                         }
     40                //                                      @Override
     41                //                                      public void handle(FramsticksException exception) {
     42                //                                              log.error("caught error during diagnostics fetching (repeating): " + exception);
     43                //                                              again();
     44                //                                      }
    6645
    67                                                 };
    68                                                 @Override
    69                                                 protected void runAt() {
     46                //                              };
     47                //                              @Override
     48                //                              protected void runAt() {
    7049
    71                                                         log.info("starting periodic dump");
    72                                                         new RecursiveFetcher(tree, Path.to(tree, "/"), new FutureHandler<Void>(repeater) {
     50                //                                      log.info("starting periodic dump");
     51                //                                      new RecursiveFetcher(tree, Path.to(tree, "/"), new FutureHandler<Void>(repeater) {
    7352
    74                                                                 @Override
    75                                                                 protected void result(Void result) {
    76                                                                         log.info("tree resolved, saving");
    77                                                                         try {
    78                                                                                 final String fileName = dumpsPath + "/" + tree + "_" + new SimpleDateFormat(dumpsFormat).format(new Date()) + ".param";
    79                                                                                 File file = new File(fileName);
    80                                                                                 new SaveStream(new PrintWriterSink(new PrintWriter(new OutputStreamWriter(new FileOutputStream(file), Encoding.getFramsticksCharset()))), tree, Path.to(tree, "/"), new FutureHandler<Void>(repeater) {
     53                //                                              @Override
     54                //                                              protected void result(Void result) {
     55                //                                                      log.info("tree resolved, saving");
     56                //                                                      try {
     57                //                                                              final String fileName = dumpsPath + "/" + tree + "_" + new SimpleDateFormat(dumpsFormat).format(new Date()) + ".param";
     58                //                                                              File file = new File(fileName);
     59                //                                                              new SaveStream(new PrintWriterSink(new PrintWriter(new OutputStreamWriter(new FileOutputStream(file), Encoding.getFramsticksCharset()))), tree, Path.to(tree, "/"), new FutureHandler<Void>(repeater) {
    8160
    82                                                                                         @Override
    83                                                                                         protected void result(Void result) {
    84                                                                                                 again();
    85                                                                                         }
    86                                                                                 });
    87                                                                         } catch (IOException e) {
    88                                                                                 throw new FramsticksException().msg("failed to initiate dump").cause(e);
    89                                                                         }
    90                                                                 }
    91                                                         });
    92                                                 }
    93                                         };
    94                                 }
    95                         }
    96                 });
     61                //                                                                      @Override
     62                //                                                                      protected void result(Void result) {
     63                //                                                                              again();
     64                //                                                                      }
     65                //                                                              });
     66                //                                                      } catch (IOException e) {
     67                //                                                              throw new FramsticksException().msg("failed to initiate dump").cause(e);
     68                //                                                      }
     69                //                                              }
     70                //                                      });
     71                //                              }
     72                //                      };
     73                //              }
     74                //      }
     75                // });
    9776
    9877
Note: See TracChangeset for help on using the changeset viewer.