Changeset 1954

Show
Ignore:
Timestamp:
02/25/08 15:16:27 (9 months ago)
Author:
jjarrett
Message:

Additional Code clean up

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/mls/framework-plugin/src/com/tresys/framework/compiler/mls/MLSSupport.java

    r1953 r1954  
    657657                MLSLevel selected = null; 
    658658                int i; 
    659 //              int displacedIndex = 0; 
    660 //              int selectedIndex = 0; 
    661659                 
    662660                _levels.values ().toArray (levels); 
     
    670668                                displaced = current; 
    671669                                displaced.setOrder (currentIndex); 
    672 //                              displacedIndex = i; 
    673670                        } 
    674671                        else if ((null == selected) && (currentIndex == current.getOrder ())) 
     
    676673                                selected = current; 
    677674                                selected.setOrder (newIndex); 
    678 //                              selectedIndex = i; 
    679675                        } 
    680676                         
     
    685681                } 
    686682                 
    687 //              levels[displacedIndex] = selected; 
    688 //              levels[selectedIndex] = displaced; 
    689 //               
    690 //              _levels.clear (); 
    691 //               
    692 //              for (i = 0; i < levels.length; i++) 
    693 //              { 
    694 //                      _levels.put (levels[i].getName (), levels[i]); 
    695 //              } 
    696                  
    697683                return; 
    698684        } 
  • branches/mls/framework-plugin/src/com/tresys/framework/plugin/builder/FrameworkNature.java

    r1953 r1954  
    5454import com.tresys.framework.plugin.SEFramework_Plugin; 
    5555import com.tresys.framework.plugin.builder.FrameworkBuilder; 
    56 import com.tresys.framework.plugin.editor.policy.graphic.model.Shape; 
    5756import com.tresys.framework.plugin.preferences.PreferenceInitializer; 
    5857import com.tresys.framework.plugin.preferences.SEFPreferencePage; 
  • branches/mls/framework-plugin/src/com/tresys/framework/plugin/builder/SELinuxSystem.java

    r1953 r1954  
    4545import com.tresys.framework.plugin.editor.policy.graphic.GraphicPolicyRefresh; 
    4646import com.tresys.framework.plugin.editor.policy.graphic.IShapeVisitor; 
    47 import com.tresys.framework.plugin.editor.policy.graphic.model.AccessConnection; 
    48 import com.tresys.framework.plugin.editor.policy.graphic.model.BaseDomainShape; 
    49 import com.tresys.framework.plugin.editor.policy.graphic.model.BaseResourceShape; 
    50 import com.tresys.framework.plugin.editor.policy.graphic.model.Connection; 
    51 import com.tresys.framework.plugin.editor.policy.graphic.model.ControlResourceShape; 
    5247import com.tresys.framework.plugin.editor.policy.graphic.model.DefaultMLSLevelUpdateVisitor; 
    53 import com.tresys.framework.plugin.editor.policy.graphic.model.DomainShape; 
    54 import com.tresys.framework.plugin.editor.policy.graphic.model.EntryConnection; 
    55 import com.tresys.framework.plugin.editor.policy.graphic.model.EntryPointShape; 
    5648import com.tresys.framework.plugin.editor.policy.graphic.model.PolicyDiagram; 
    57 import com.tresys.framework.plugin.editor.policy.graphic.model.ResourceShape; 
    58 import com.tresys.framework.plugin.editor.policy.graphic.model.UserDomainShape; 
    5949import com.tresys.framework.plugin.preferences.SEFPreferencePage; 
    6050 
     
    719709                 
    720710                return; 
    721         } 
    722          
    723          
    724 //      protected class MLSUpdateVisitor  
    725 //              implements IShapeVisitor 
    726 //      { 
    727 //              public void Visit (DomainShape i_domain) 
    728 //              { 
    729 //                      i_domain.updateMLS (); 
    730 //                       
    731 //                      return; 
    732 //              } 
    733 //               
    734 //              public void Visit (BaseDomainShape i_baseDom) 
    735 //              { 
    736 //                      return; 
    737 //              } 
    738 //               
    739 //              public void Visit (UserDomainShape i_userDom) 
    740 //              { 
    741 //                      return; 
    742 //              } 
    743 //               
    744 //              public void Visit (ResourceShape i_resource) 
    745 //              { 
    746 //                      i_resource.updateMLS (); 
    747 //                       
    748 //                      return; 
    749 //              } 
    750 //               
    751 //              public void Visit (BaseResourceShape i_baseRes) 
    752 //              { 
    753 //                      return; 
    754 //              } 
    755 //               
    756 //              public void Visit (AccessConnection i_access) 
    757 //              { 
    758 //                      return; 
    759 //              } 
    760 //               
    761 //              public void Visit (PolicyDiagram i_diagram) 
    762 //              { 
    763 //                      return; 
    764 //              } 
    765 //               
    766 //              public void Visit (EntryPointShape i_entryPt) 
    767 //              { 
    768 //                      i_entryPt.updateMLS (); 
    769 //                       
    770 //                      return; 
    771 //              } 
    772 //               
    773 //              public void Visit (EntryConnection i_enter) 
    774 //              { 
    775 //                      return; 
    776 //              } 
    777 //               
    778 //              public void Visit (Connection conn) 
    779 //              { 
    780 //                      return;                  
    781 //              } 
    782 //               
    783 //              public void Visit (ControlResourceShape i_controlResource) 
    784 //              { 
    785 //                      i_controlResource.updateMLS (); 
    786 //                       
    787 //                      return; 
    788 //              } 
    789 //      } 
     711        }        
    790712} 
  • branches/mls/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/ControlResourceShape.java

    r1953 r1954  
    4040import com.tresys.framework.plugin.builder.SELinuxSystem; 
    4141import com.tresys.framework.plugin.editor.policy.graphic.IShapeVisitor; 
    42 import com.tresys.framework.plugin.preferences.SEFPreferencePage; 
    4342import com.tresys.framework.plugin.wizards.ControlResourcePropertyWizard; 
    4443 
     
    434433                 
    435434                return verbs; 
    436         } 
    437          
    438 //      public void updateMLS() 
    439 //      { 
    440 //              ComponentWithDictObjects component = (ComponentWithDictObjects) getComponent();  
    441 //               
    442 //              firePropertyChange(Shape.MLS_PROP, null, component.getMLSLabel ()); 
    443 //               
    444 //              return; 
    445 //      } 
    446 //       
    447 //      public void updateDefaultMLS() 
    448 //      { 
    449 //              ComponentWithDictObjects component = (ComponentWithDictObjects) getComponent(); 
    450 //               
    451 //              firePropertyChange(SEFPreferencePage.DEFAULT_MLS_LEVEL, null, component.getMLSLabel ()); 
    452 //               
    453 //              return; 
    454 //      } 
    455                  
     435        }                
    456436} 
  • branches/mls/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/DefaultMLSLevelUpdateVisitor.java

    r1953 r1954  
    55import com.tresys.framework.plugin.editor.policy.graphic.IShapeVisitor; 
    66 
     7/** 
     8 * DefaultMLSLevelUpdateVisitor 
     9 *  
     10 * Manages the process of updating changes to the any of the MLS related data on the  
     11 * Project Property Page and the drawing editors 
     12 *  
     13 * @author jjarrett 
     14 * 
     15 */ 
    716public class DefaultMLSLevelUpdateVisitor 
    817implements IShapeVisitor 
  • branches/mls/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/DomainShape.java

    r1953 r1954  
    1919import org.eclipse.core.resources.IResource; 
    2020import org.eclipse.core.runtime.IPath; 
    21 import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; 
    2221import org.eclipse.draw2d.PositionConstants; 
    2322import org.eclipse.draw2d.geometry.Dimension; 
     
    5251import com.tresys.framework.plugin.editor.properties.PathPropertyDescriptor; 
    5352import com.tresys.framework.plugin.editor.properties.PathRdefEditContainer; 
    54 import com.tresys.framework.plugin.preferences.SEFPreferencePage; 
    5553import com.tresys.framework.plugin.wizards.ShapePropertyWizard; 
    5654 
     
    579577                return; 
    580578        } 
    581          
    582 //      public void updateMLS() 
    583 //      { 
    584 //              Domain dom = (Domain)getComponent (); 
    585 //               
    586 //              firePropertyChange(Shape.MLS_PROP, null, dom.getMLSLabel ()); 
    587 //      } 
    588 //       
    589 //      public void updateDefaultMLS(PreferenceChangeEvent event) 
    590 //      { 
    591 //              Domain dom = (Domain)getComponent (); 
    592 //               
    593 //              firePropertyChange(SEFPreferencePage.DEFAULT_MLS_LEVEL, event.getOldValue (), dom.getMLSLabel ()); 
    594 //      } 
    595579} 
  • branches/mls/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/EntryPointShape.java

    r1953 r1954  
    4141import com.tresys.framework.plugin.editor.policy.graphic.IShapeVisitor; 
    4242import com.tresys.framework.plugin.editor.properties.PathPropertyDescriptor; 
    43 import com.tresys.framework.plugin.preferences.SEFPreferencePage; 
    4443import com.tresys.framework.plugin.wizards.EntrypointShapePropertyWizard; 
    4544 
     
    382381 
    383382                return; 
    384         } 
    385          
    386 //      public void updateMLS() 
    387 //      { 
    388 //              EntrypointResource epr = getEntrypointResource (); 
    389 //               
    390 //              firePropertyChange(Shape.MLS_PROP, null, epr.getMLSLabel ()); 
    391 //      } 
    392 //       
    393 //      public void updateDefaultMLS() 
    394 //      { 
    395 //              EntrypointResource epr = getEntrypointResource (); 
    396 //               
    397 //              firePropertyChange(SEFPreferencePage.DEFAULT_MLS_LEVEL, null, epr.getMLSLabel ()); 
    398 //      } 
    399          
    400          
     383        }        
    401384} 
    402385                 
  • branches/mls/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/ResourceShape.java

    r1953 r1954  
    4545import com.tresys.framework.plugin.editor.properties.PathPropertyDescriptor; 
    4646import com.tresys.framework.plugin.editor.properties.PathRdefEditContainer; 
    47 import com.tresys.framework.plugin.preferences.SEFPreferencePage; 
    4847import com.tresys.framework.plugin.wizards.ResourceShapePropertyWizard; 
    4948 
     
    321320 
    322321                return; 
    323         } 
    324          
    325 //      public void updateMLS() 
    326 //      { 
    327 //              ComponentWithDictObjects component = (ComponentWithDictObjects) getComponent(); 
    328 //               
    329 //              firePropertyChange(Shape.MLS_PROP, null, component.getMLSLabel ()); 
    330 //      } 
    331 //       
    332 //      public void updateDefaultMLS() 
    333 //      { 
    334 //              ComponentWithDictObjects component = (ComponentWithDictObjects) getComponent(); 
    335 //               
    336 //              firePropertyChange(SEFPreferencePage.DEFAULT_MLS_LEVEL, null, component.getMLSLabel ()); 
    337 //      } 
    338 //       
    339          
     322        }        
    340323} 
  • branches/mls/framework-plugin/src/com/tresys/framework/plugin/preferences/MLSEclipseLevel.java

    r1953 r1954  
    130130                return; 
    131131        } 
    132          
     132 
     133        /** 
     134         * formatHex 
     135         *  
     136         * Ensures that definition of the Colors can be correctly parsed from their  
     137         * respective string representations 
     138         *  
     139         * @param sb    - The StringBuilder used to generate the new text  
     140         *                                representation of the color value 
     141         * @param c             - The integer value of the color to be output as a string 
     142         *  
     143         */ 
    133144        protected static void formatHex(StringBuilder sb, int c) 
    134145        { 
  • branches/mls/framework-plugin/src/com/tresys/framework/plugin/preferences/MLSSettingsProjProperties.java

    r1953 r1954  
    2323 
    2424import java.io.File; 
    25 import java.util.Date; 
    2625import java.util.Iterator; 
    2726