Changeset 390

Show
Ignore:
Timestamp:
07/28/10 15:33:37 (2 years ago)
Author:
ke
Message:

Set verbose flags back to false.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • kahina/trunk/src/org/kahina/core/KahinaInstance.java

    r387 r390  
    3939public abstract class KahinaInstance<S extends KahinaState, G extends KahinaGUI, B extends KahinaBridge> implements KahinaListener 
    4040{ 
    41         private static final boolean VERBOSE = true; 
     41        private static final boolean VERBOSE = false; 
    4242         
    4343        protected S state; 
  • kahina/trunk/src/org/kahina/core/gui/KahinaGUI.java

    r384 r390  
    3838public class KahinaGUI implements KahinaListener 
    3939{ 
    40         private static final boolean verbose = true; 
     40        private static final boolean VERBOSE = false; 
    4141 
    4242        protected KahinaInstance<?, ?, ?> kahina; 
     
    6262        public KahinaGUI(Class<? extends KahinaStep> stepType, KahinaInstance<?, ?, ?> kahina) 
    6363        { 
    64                 if (verbose
     64                if (VERBOSE
    6565                { 
    6666                        System.err.println("creating Kahina GUI..."); 
     
    102102        protected void fillFieldToView(Class<? extends KahinaStep> stepType) 
    103103        { 
    104                 if (verbose
     104                if (VERBOSE
    105105                { 
    106106                        System.err.println("Generating views for step fields:"); 
     
    108108                for (Field field : stepType.getFields()) 
    109109                { 
    110                         if (verbose
     110                        if (VERBOSE
    111111                        { 
    112112                                System.err.println("\tfield: " + field.getName() + "\n\t\tclass: " + field.getType()); 
     
    116116                                KahinaView<?> newView = KahinaViewRegistry.generateViewFor(field.getType()); 
    117117                                KahinaRunner.getControl().registerListener("update", newView); 
    118                                 if (verbose
     118                                if (VERBOSE
    119119                                { 
    120120                                        System.err.println("\t\tview: " + newView); 
     
    230230            if (stepID != -1) 
    231231            { 
    232                 if (verbose
     232                if (VERBOSE
    233233                { 
    234234                        System.err.println("Updating selection to step " + stepID); 
  • kahina/trunk/src/org/kahina/core/io/magazine/ObjectMagazine.java

    r383 r390  
    2525public class ObjectMagazine<S> 
    2626{ 
    27         private static final boolean VERBOSE = true; 
     27        private static final boolean VERBOSE = false; 
    2828 
    2929        private final File folder; 
  • kahina/trunk/src/org/kahina/tralesld/TraleSLDRunner.java

    r383 r390  
    11package org.kahina.tralesld; 
    22 
     3import java.io.File; 
     4 
    35import org.kahina.core.KahinaRunner; 
     6import org.kahina.core.event.KahinaSessionEvent; 
    47import org.kahina.tralesld.bridge.TraleSLDBridge; 
    58 
    69public class TraleSLDRunner extends KahinaRunner 
    710{ 
    8         public static void main(String[] args) 
    9         { 
    10                 TraleSLDBridge bridge = runAndGetBridge(); 
    11                 bridge.initializeParseTrace("[she,thinks,she,gives,her,milk]"); 
    12                 bridge.registerChartEdge(0, 5, 6, "lexicon"); 
    13                 bridge.registerStepInformation(1, "rule_close", "close chart edge under rule application"); 
    14                 bridge.registerStepLocation(1, 0); 
    15                 bridge.registerRuleApplication(2, "subject_head_rule", 0, "apply rule, subject_head_rule"); // TODO 
    16                 bridge.registerStepSourceCodeLocation(2, "/home/johannes/pro/kahina/trale/test_gram/theory3.pl", 185); 
    17                 bridge.registerStepLocation(2, 1); 
    18                 bridge.registerEdgeRetrieval(0); 
    19                 bridge.registerStepInformation(3, "unify(Subj)", "unify edge with Subj"); 
    20                 bridge.registerStepSourceCodeLocation(3, "/home/johannes/pro/kahina/trale/test_gram/theory3.pl", 191); 
    21                 bridge.registerStepLocation(3, 2); 
    22                 bridge.registerStepInformation(4, "type(edge,bot)", "add type, bot, to edge"); 
    23                 bridge.registerStepLocation(4, 3); 
    24                 bridge.registerStepExit(4, true); 
    25                 bridge.registerStepExit(3, true); 
    26                 bridge.registerStepInformation(5, "featval(edge:phon)", "enforce description on phon value of edge"); 
    27                 bridge.registerStepSourceCodeLocation(5, "/home/johannes/pro/kahina/trale/test_gram/theory3.pl", 191); 
    28                 bridge.registerStepLocation(5, 2); 
    29                 bridge.registerStepInformation(6, "unify(SubjPhon)", "unify value at phon with SubjPhon"); 
    30                 bridge.registerStepSourceCodeLocation(6, "/home/johannes/pro/kahina/trale/test_gram/theory3.pl", 191); 
    31                 bridge.registerStepLocation(6, 5); 
    32                 bridge.registerStepInformation(7, "type(phon,ne_list)", "add type, ne_list, to value at phon"); 
    33                 bridge.registerStepLocation(7, 6); 
    34                 bridge.registerStepExit(7, true); 
    35                 bridge.registerStepExit(6, true); 
    36                 bridge.registerStepExit(5, true); 
    37                 bridge.registerStepFailure(2); 
    38                 bridge.registerRuleApplication(8, "head_complement_rule", 0, "apply rule, head_complement_rule"); 
    39                 bridge.registerStepSourceCodeLocation(8, "/home/johannes/pro/kahina/trale/test_gram/theory3.pl", 195); 
    40                 bridge.registerStepLocation(8, 1); 
    41                 bridge.registerEdgeRetrieval(0); 
    42                 bridge.registerStepInformation(9, "unify(Head)", "unify edge with Head"); 
    43                 bridge.registerStepSourceCodeLocation(9, "/home/johannes/pro/kahina/trale/test_gram/theory3.pl", 201); 
    44                 bridge.registerStepLocation(9, 8); 
    45                 bridge.registerStepInformation(10, "type(edge,bot)", "add type, bot, to edge"); 
    46                 bridge.registerStepLocation(10, 9); 
    47         } 
    4811 
    4912        public static void initialize() 
     
    6831                } 
    6932        } 
     33 
     34        private static void runWithoutBridge(File savedSession) 
     35        { 
     36                try 
     37                { 
     38                        initialize(); 
     39                        TraleSLDInstance kahina = new TraleSLDInstance(); 
     40                        kahina.getGUI().prepare(); 
     41                        kahina.getGUI().buildAndShow(); 
     42                        if (savedSession != null) 
     43                        { 
     44                                KahinaRunner.processEvent(new KahinaSessionEvent(KahinaSessionEvent.LOAD_SESSION, savedSession)); 
     45                        } 
     46                } catch (Exception e) 
     47                { 
     48                        e.printStackTrace(); 
     49                        System.exit(-1); 
     50                } 
     51        } 
     52         
     53        public static void main(String[] args) 
     54        { 
     55                File savedSession = null; 
     56                if (args.length > 0) 
     57                { 
     58                        savedSession = new File(args[0]); 
     59                } 
     60                runWithoutBridge(savedSession); 
     61        } 
    7062}