Changeset 353

Show
Ignore:
Timestamp:
09/14/08 11:58:47 (4 months ago)
Author:
sergey.kol..@gmail.com
Message:

Sergey Kolos:

  • Cleaning up code.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • jasko.tim.lisp/src/jasko/tim/lisp/views/ReplView.java

    r344 r353  
    106106                                        " | Cusp: " + LispPlugin.getVersion() + 
    107107                                        " | Current package: " + pkg); 
    108 /*                       
    109                         LispPlugin.getDefault().updateStatusLine("CL: " + swank.getLispVersion() +  
    110                                         " | Cusp: " + LispPlugin.getVersion() + 
    111                                         " | Current package: " + pkg); */ 
    112108                        if( replPackage != null ){ 
    113109                                replPackage.setText("Current package: "+pkg); 
     
    822818                stepButton.setToolTipText("Step"); 
    823819 
    824                 runTestsButton = new Action("Run Tests") { 
    825                         public void run() { 
    826                                 SwankInterface swank = LispPlugin.getDefault().getSwank(); 
    827                                 if( swank != null && swank.useUnitTest ){ 
    828                                         PackageDialog pd =  
    829                                                 new PackageDialog(ReplView.this.getSite().getShell(), 
    830                                                                 swank.getPackagesWithTests(1000),  
    831                                                                 swank.getlastTestPackage(),true); 
    832                                         if (pd.open() == Dialog.OK) { 
    833                                                 swank.sendRunTests(pd.getPackage(), new TestsRunnable()); 
    834                                         }                                        
    835                                 } else { 
    836                                         ArrayList<String> strings = new ArrayList<String>(2); 
    837                                         strings.add("Cannot run tests,"); 
    838                                 } 
    839                         } 
    840                 }; 
     820                runTestsButton = new TestAction(getSite().getShell());  
    841821                runTestsButton.setImageDescriptor( 
    842822                                LispImages.getImageDescriptor(LispImages.RUN_TESTS)); 
  • jasko.tim.lisp/src/jasko/tim/lisp/views/TestsView.java

    r295 r353  
    11package jasko.tim.lisp.views; 
    2  
    3 import java.util.ArrayList; 
    42 
    53import jasko.tim.lisp.LispImages; 
    64import jasko.tim.lisp.LispPlugin; 
    75import jasko.tim.lisp.swank.*; 
    8 import jasko.tim.lisp.views.repl.PackageDialog; 
    96 
    107import org.eclipse.jface.action.Action; 
    118import org.eclipse.jface.action.IToolBarManager; 
    12 import org.eclipse.jface.dialogs.Dialog; 
    139import org.eclipse.swt.SWT; 
    1410import org.eclipse.swt.custom.*; 
     
    111107        protected void fillToolBar(Composite parent) { 
    112108                 
    113                 runTestsButton = new Action("Run Tests") { 
    114                         public void run() { 
    115                                 SwankInterface swank = LispPlugin.getDefault().getSwank(); 
    116                                 if( swank != null && swank.ranAfterLispStart() && swank.useUnitTest ){ 
    117                                         PackageDialog pd =  
    118                                                 new PackageDialog(TestsView.this.getSite().getShell(), 
    119                                                                 swank.getPackagesWithTests(1000),  
    120                                                                 swank.getlastTestPackage(),true); 
    121                                         if (pd.open() == Dialog.OK) { 
    122                                                 swank.sendRunTests(pd.getPackage(), new TestsRunnable()); 
    123                                         }                                        
    124                                 } else { 
    125                                         ArrayList<String> strings = new ArrayList<String>(2); 
    126                                         strings.add("Cannot run tests,"); 
    127                                 } 
    128                         } 
    129                 }; 
     109                runTestsButton = new TestAction(getSite().getShell());  
    130110                runTestsButton.setImageDescriptor( 
    131111                                LispImages.getImageDescriptor(LispImages.RUN_TESTS)); 
  • jasko.tim.lisp/src/jasko/tim/lisp/wizards/NewProjectWiz.java

    r352 r353  
    1313import jasko.tim.lisp.LispPlugin; 
    1414import jasko.tim.lisp.builder.LispNature; 
    15 import jasko.tim.lisp.views.*; 
    1615 
    1716import org.eclipse.jface.viewers.*; 
     
    223222                 
    224223                monitor.worked(2); 
    225                 monitor.done();/* 
    226                 ReplView rv = ReplView.getInstance(); 
    227                 if (rv != null) { 
    228                         rv.switchPackage(pkg); 
    229                 }*/ 
     224                monitor.done(); 
    230225        } // void doFinish(...) 
    231226