Changeset 1973
- Timestamp:
- 03/04/08 11:49:05 (9 months ago)
- Files:
-
- branches/mls/framework-plugin/.options (modified) (1 diff)
- branches/mls/framework-plugin/.settings/org.eclipse.jdt.ui.prefs (modified) (1 diff)
- branches/mls/framework-plugin/plugin.properties (modified) (1 diff)
- branches/mls/framework-plugin/plugin.xml (modified) (3 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/compiler/ErrorHandler.java (modified) (1 diff)
- branches/mls/framework-plugin/src/com/tresys/framework/compiler/PolicyGenerator.java (modified) (5 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/compiler/linkage/Linkage.java (modified) (1 diff)
- branches/mls/framework-plugin/src/com/tresys/framework/compiler/mls/MLSSupport.java (modified) (1 diff)
- branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/Component.java (modified) (4 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/ComponentWithDictObjects.java (modified) (5 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/EntrypointResource.java (modified) (5 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/IDomain.java (modified) (2 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/IMLSSetting.java (modified) (2 diffs, 2 props)
- branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/PolicyParser.jj (modified) (2 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/builder/AccessCheckBuilder.java (added)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/builder/AccessCheckVisitor.java (deleted)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/builder/FrameworkNature.java (modified) (13 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/builder/GUIErrorHandler.java (modified) (1 diff)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/builder/SELinuxSystem.java (modified) (8 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/ControlResourceShape.java (modified) (6 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/DomainShape.java (modified) (11 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/EntryPointShape.java (modified) (11 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/ResourceShape.java (modified) (11 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/model/Shape.java (modified) (9 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/parts/DomainEditPart.java (modified) (1 diff)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/parts/PolicyEditPart.java (modified) (4 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/parts/ShapeEditPart.java (modified) (2 diffs)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/preferences/MLSEclipseLevel.java (modified) (1 prop)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/preferences/MLSOrderingViewerComparator.java (modified) (1 diff, 1 prop)
- branches/mls/framework-plugin/src/com/tresys/framework/plugin/preferences/MLSSettingsProjProperties.java (modified) (6 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/mls/framework-plugin/.options
r1764 r1973 9 9 com.tresys.cdsframework/debug/navigator=false 10 10 com.tresys.cdsframework/debug/graphiceditor=false 11 com.tresys.cdsframework/debug/accesschecks=false branches/mls/framework-plugin/.settings/org.eclipse.jdt.ui.prefs
r1763 r1973 1 # Wed Nov 21 11:46:43 EST 20071 #Mon Mar 03 14:34:58 EST 2008 2 2 eclipse.preferences.version=1 3 3 formatter_profile=_Project Format branches/mls/framework-plugin/plugin.properties
r1878 r1973 43 43 ## builder 44 44 frameworkBuilder = CDS Framework Builder 45 AccessCheckBuilder = Access Check Builder 45 46 46 47 ## plugin Preferences branches/mls/framework-plugin/plugin.xml
r1878 r1973 54 54 </editor> 55 55 </extension> 56 <extension 57 id="AccessCheckBuilder" 58 name="%AccessCheckBuilder" 59 point="org.eclipse.core.resources.builders"> 60 <builder 61 callOnEmptyDelta="false" 62 hasNature="false" 63 isConfigurable="false"> 64 <run 65 class="com.tresys.framework.plugin.builder.AccessCheckBuilder"> 66 </run> 67 </builder> 68 </extension> 56 69 57 70 <extension … … 59 72 name="%frameworkBuilder" 60 73 point="org.eclipse.core.resources.builders"> 61 <builder hasNature="true"> 74 <builder 75 hasNature="true" 76 isConfigurable="false"> 62 77 <run class="com.tresys.framework.plugin.builder.FrameworkBuilder"/> 63 78 </builder> … … 74 89 <requires-nature id="com.tresys.slide.SystemProjectNature"/> 75 90 <requires-nature id="com.tresys.slide.SLIDEProject"/> 91 <builder 92 id="com.tresys.framework.AccessCheckBuilder"> 93 </builder> 76 94 </extension> 77 95 branches/mls/framework-plugin/src/com/tresys/framework/compiler/ErrorHandler.java
r1878 r1973 37 37 static final public int ERROR_ENTRYPOINT_MISSING_FILE = 28; 38 38 static final public int ERROR_DUPLICATE_ACCESS = 29; 39 39 static final public int ERROR_TE_ACCESS_DENIED = 30; 40 static final public int ERROR_CONSTRAINT_ACCESS_DENIED = 31; 41 static final public int ERROR_RBAC_ACCESS_DENIED = 32; 40 42 41 43 protected int warningCount = 0; branches/mls/framework-plugin/src/com/tresys/framework/compiler/PolicyGenerator.java
r1953 r1973 22 22 import com.tresys.framework.compiler.linkage.flnkage.Ability; 23 23 import com.tresys.framework.compiler.linkage.flnkage.BaseAccessDefn; 24 import com.tresys.framework.compiler.mls.MLSLevel; 24 25 import com.tresys.framework.compiler.policy.AccessBaseResource; 25 26 import com.tresys.framework.compiler.policy.AccessResource; … … 72 73 } 73 74 74 String mlsLevel = i_resource.getMLSLabel (); 75 appendMLSLevel (buf, mlsLevel); 75 appendMLSLevel (buf, i_resource.getMLSLevel ()); 76 76 77 77 buf.append(";"); … … 118 118 } 119 119 120 String mlsLevel = i_domain.getMLSLabel (); 121 appendMLSLevel (buf, mlsLevel); 120 appendMLSLevel (buf, i_domain.getMLSLevel ()); 122 121 123 122 buf.append(";"); … … 134 133 buf.append(i_ep.getName()); 135 134 136 String mlsLevel = i_ep.getMLSLabel (); 137 appendMLSLevel (buf, mlsLevel); 135 appendMLSLevel (buf, i_ep.getMLSLevel ()); 138 136 139 137 buf.append(";"); … … 408 406 } 409 407 410 protected void appendMLSLevel(StringBuffer buf, String mlsLevel) 411 { 412 if ((null != mlsLevel) && (!mlsLevel.equals (""))) 413 { 414 buf.append ("\""); 415 buf.append (mlsLevel); 416 buf.append ("\""); 417 } 418 419 return; 408 private void appendMLSLevel (StringBuffer i_buf, MLSLevel mlsLevel) 409 { 410 if (mlsLevel == null) 411 return; 412 413 i_buf.append (" \""); 414 i_buf.append (mlsLevel.getName ()); 415 i_buf.append ('"'); 420 416 } 421 417 } branches/mls/framework-plugin/src/com/tresys/framework/compiler/linkage/Linkage.java
r1901 r1973 76 76 } 77 77 78 public MLSSupport getMLSSupport () 79 { 80 return m_MLSSupport; 81 } 82 78 83 /** 79 84 * This method should return a string that may perform some basic branches/mls/framework-plugin/src/com/tresys/framework/compiler/mls/MLSSupport.java
r1961 r1973 760 760 return; 761 761 } 762 763 /** 764 * get all of the MLS level names 765 * @return - String array of names 766 */ 767 public String [] getLevelNames () 768 { 769 String [] values = new String[this.size ()]; 770 for (Iterator _iter = this.iterator (); _iter.hasNext (); ) 771 { 772 MLSLevel mls = (MLSLevel)_iter.next (); 773 values[mls.getOrder ()] = mls.getName (); 774 } 775 776 return values; 777 } 762 778 } 763 779 branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/Component.java
r1964 r1973 25 25 import com.tresys.framework.compiler.AbstractToken; 26 26 import com.tresys.framework.compiler.linkage.Linkage; 27 import com.tresys.framework.compiler.mls.MLSSupport;28 27 29 28 /** … … 215 214 * @return 216 215 */ 217 public String getSensitivity ( MLSSupport i_support)218 { 219 return "s0";216 public String getSensitivity () 217 { 218 return new String (); 220 219 } 221 220 … … 224 223 * @return 225 224 */ 226 public String getFullContext ( MLSSupport i_support)225 public String getFullContext () 227 226 { 228 227 StringBuffer buf = new StringBuffer (); … … 233 232 buf.append (getType ()); 234 233 235 if (i_support != null) 234 String sSensitivtity = getSensitivity (); 235 if (sSensitivtity.length () > 0) 236 236 { 237 237 buf.append (':'); 238 buf.append ( getSensitivity (i_support));238 buf.append (sSensitivtity); 239 239 } 240 240 branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/ComponentWithDictObjects.java
r1964 r1973 54 54 protected final Map/*<IDictionaryObject, List<SystemResource>>*/sysResources; // associated system resources 55 55 56 protected String m_sMLSString;56 protected MLSLevel m_MLSLevel = null; 57 57 58 58 /** … … 69 69 assocRdefsLocations = new HashMap/*<Rdef, Token>*/(); 70 70 sysResources = new TreeMap/*<IDictionaryObject, List<SystemResource>>*/(); 71 72 MLSSupport mlsSupport = pol.getLinkage ().getMLSSupport (); 73 if (mlsSupport != null) 74 m_MLSLevel = mlsSupport.getDefaultMLSLevel (); 71 75 } 72 76 … … 311 315 public String getMLSLabel () 312 316 { 313 return m_sMLSString; 317 if (m_MLSLevel == null) 318 return null; 319 return m_MLSLevel.getName (); 320 } 321 322 /* (non-Javadoc) 323 * @see com.tresys.framework.compiler.policy.IMLSSetting#getMLSLevel() 324 */ 325 public MLSLevel getMLSLevel () 326 { 327 return m_MLSLevel; 314 328 } 315 329 … … 318 332 * @see com.tresys.framework.compiler.policy.IMLSSetting#setMLSLabel(java.lang.String) 319 333 */ 320 public void setMLSLabel ( Stringi_sMLSLabel)321 { 322 m_ sMLSString= i_sMLSLabel;334 public void setMLSLabel (MLSLevel i_sMLSLabel) 335 { 336 m_MLSLevel = i_sMLSLabel; 323 337 } 324 338 … … 328 342 * @return 329 343 */ 330 public String getSensitivity (MLSSupport i_support) 331 { 332 if (i_support != null) 333 { 334 MLSLevel mlsLevel = i_support.getLevel (getMLSLabel ()); 335 if (mlsLevel != null) 336 return mlsLevel.getRange (); 337 } 338 339 return "s0"; 344 public String getSensitivity () 345 { 346 MLSLevel mlsLevel = getMLSLevel (); 347 if (mlsLevel != null) 348 return mlsLevel.getRange (); 349 350 return new String (); 340 351 } 341 352 branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/EntrypointResource.java
r1964 r1973 42 42 private Set/*<FileResource>*/files; 43 43 44 private String m_sMLSString;44 private MLSLevel m_MLSLevel; 45 45 46 46 /** … … 56 56 files = new HashSet/*<FileResource>*/(); 57 57 EPDictDef = epD; 58 59 MLSSupport mlsSupport = pol.getLinkage ().getMLSSupport (); 60 if (mlsSupport != null) 61 m_MLSLevel = mlsSupport.getDefaultMLSLevel (); 58 62 } 59 63 … … 66 70 files.clear(); 67 71 EPDictDef = null; 68 m_ sMLSString= null;72 m_MLSLevel = null; 69 73 } 70 74 … … 129 133 public String getMLSLabel () 130 134 { 131 return m_ sMLSString;135 return m_MLSLevel.getName (); 132 136 } 133 137 … … 136 140 * @see com.tresys.framework.compiler.policy.IMLSSetting#setMLSLabel(java.lang.String) 137 141 */ 138 public void setMLSLabel ( String i_sMLSLabel)142 public void setMLSLabel (MLSLevel i_MLSLabel) 139 143 { 140 m_sMLSString = i_sMLSLabel; 144 m_MLSLevel = i_MLSLabel; 145 } 146 147 public MLSLevel getMLSLevel () 148 { 149 return m_MLSLevel; 141 150 } 142 151 branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/IDomain.java
r1964 r1973 19 19 import com.tresys.framework.compiler.AbstractToken; 20 20 import com.tresys.framework.compiler.linkage.Linkage; 21 import com.tresys.framework.compiler.mls.MLSSupport;22 21 23 22 public interface IDomain … … 65 64 public String getType(); 66 65 67 public String getFullContext ( MLSSupport i_support);66 public String getFullContext (); 68 67 69 68 public Domain getParent(); branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/IMLSSetting.java
- Property svn:kewords deleted
- Property svn:keywords set to Date Revision Id Author
r1901 r1973 9 9 10 10 package com.tresys.framework.compiler.policy; 11 12 import com.tresys.framework.compiler.mls.MLSLevel; 11 13 12 14 /** … … 23 25 public String getMLSLabel (); 24 26 27 public MLSLevel getMLSLevel (); 28 25 29 /** 26 30 * set the MLS label used for this object 27 31 * @param i_sLabel 28 32 */ 29 public void setMLSLabel ( String i_sLabel);33 public void setMLSLabel (MLSLevel i_MLSLabel); 30 34 } branches/mls/framework-plugin/src/com/tresys/framework/compiler/policy/PolicyParser.jj
r1901 r1973 43 43 import com.tresys.framework.compiler.dictionary.EntryAccessDefn; 44 44 import com.tresys.framework.compiler.linkage.flnkage.Ability; 45 import com.tresys.framework.compiler.mls.MLSLevel; 46 import com.tresys.framework.compiler.mls.MLSSupport; 45 47 46 48 import com.tresys.framework.compiler.Utility; … … 274 276 sLabel = sLabel.substring (1, sLabel.length()-1); 275 277 } 276 277 i_obj.setMLSLabel (sLabel); 278 279 MLSSupport mlsSupport = policy.getLinkage ().getMLSSupport (); 280 if (mlsSupport != null) 281 { 282 MLSLevel mlsLevel = mlsSupport.getLevel (sLabel); 283 i_obj.setMLSLabel (mlsLevel); 284 } 278 285 } 279 286 branches/mls/framework-plugin/src/com/tresys/framework/plugin/builder/FrameworkNature.java
r1964 r1973 17 17 import java.io.InputStreamReader; 18 18 import java.net.URL; 19 import java.util.ArrayList; 19 20 import java.util.Collection; 20 21 import java.util.Enumeration; … … 54 55 import com.tresys.framework.compiler.mls.MLSLevel; 55 56 import com.tresys.framework.compiler.mls.MLSSupport; 56 import com.tresys.framework.compiler.policy.Policy;57 57 import com.tresys.framework.plugin.SEFramework_Plugin; 58 58 import com.tresys.framework.plugin.builder.FrameworkBuilder; 59 import com.tresys.framework.plugin.editor.policy.graphic.IShapeVisitor; 60 import com.tresys.framework.plugin.editor.policy.graphic.model.DefaultMLSLevelUpdateVisitor; 59 61 import com.tresys.framework.plugin.preferences.MLSSettingsProjProperties; 60 62 import com.tresys.framework.plugin.preferences.PreferenceInitializer; … … 134 136 if (event.getKey ().equals (SEFPreferencePage.MLS_UPDATE)) 135 137 { 136 Iterator _iter = getSystems ().iterator (); 137 138 while (_iter.hasNext ()) 138 IShapeVisitor isv = new DefaultMLSLevelUpdateVisitor(event); 139 for (Iterator _iter = getSystems ().iterator (); _iter.hasNext (); ) 139 140 { 140 141 SELinuxSystem sels = (SELinuxSystem)_iter.next (); 141 142 sels.mlsDefinitionChanged (event); 142 sels.getDiagram ().Accept (isv); 143 143 } 144 144 } … … 146 146 if (event.getKey ().equals (SEFPreferencePage.DEFAULT_MLS_LEVEL)) 147 147 { 148 Iterator _iter = getSystems ().iterator (); 149 150 while (_iter.hasNext ()) 148 IShapeVisitor isv = new DefaultMLSLevelUpdateVisitor(event); 149 for (Iterator _iter = getSystems ().iterator (); _iter.hasNext (); ) 151 150 { 152 151 SELinuxSystem sels = (SELinuxSystem)_iter.next (); 153 154 sels.mlsDefaultChanged (event); 152 sels.getDiagram ().Accept (isv); 155 153 } 156 154 } … … 158 156 if (event.getKey ().equals (SEFPreferencePage.DEFAULT_MLS_LEVEL_REMOVED)) 159 157 { 160 Iterator _iter = getSystems ().iterator (); 161 162 while (_iter.hasNext ()) 158 IShapeVisitor isv = new DefaultMLSLevelUpdateVisitor(event); 159 for (Iterator _iter = getSystems ().iterator (); _iter.hasNext (); ) 163 160 { 164 161 SELinuxSystem sels = (SELinuxSystem)_iter.next (); 165 166 sels.mlsDefaultChanged (event); 162 sels.getDiagram ().Accept (isv); 167 163 } 168 164 } … … 213 209 } 214 210 215 ICommand[] newCommands = new ICommand[commands.length + 1];211 ICommand[] newCommands = new ICommand[commands.length + 2]; 216 212 217 213 System.arraycopy(commands, 0, newCommands, 1, commands.length); 218 ICommand command = desc.newCommand(); 219 command.setBuilderName(FrameworkBuilder.BUILDER_ID); 220 221 newCommands[0] = command; 214 newCommands[0] = desc.newCommand(); 215 newCommands[0].setBuilderName(FrameworkBuilder.BUILDER_ID); 216 217 newCommands[newCommands.length -1] = desc.newCommand (); 218 newCommands[newCommands.length -1].setBuilderName(AccessCheckBuilder.BUILDER_ID); 222 219 223 220 desc.setBuildSpec(newCommands); … … 238 235 IProjectDescription description = getProject().getDescription(); 239 236 ICommand[] commands = description.getBuildSpec(); 240 ICommand[] newCommands = new ICommand[commands.length - 1];241 242 for (int i = 0 , j = 0; i < commands.length; ++i)237 ArrayList newCommands = new ArrayList (commands.length); 238 239 for (int i = 0; i < commands.length; ++i) 243 240 { 244 241 if (commands[i].getBuilderName().equals(FrameworkBuilder.BUILDER_ID)) 245 242 continue; 246 247 newCommands[j++] = commands[i]; 248 } 249 250 description.setBuildSpec(newCommands); 243 if (commands[i].getBuilderName().equals(AccessCheckBuilder.BUILDER_ID)) 244 continue; 245 246 newCommands.add (commands[i]); 247 } 248 249 newCommands.toArray (commands); 250 description.setBuildSpec(commands); 251 251 } 252 252 … … 285 285 286 286 // Load MLS Support when Project is set 287 try 288 { 289 this.getMLSSupport (); 290 287 MLSSupport mlsSupport = this.getMLSSupport (true); 288 if (mlsSupport != null) 289 { 291 290 // Redefine the Default MLS Level to match the definition for 292 291 // the new Project being assigned. 293 MLSLevel mls = this._mlsConfiguration.getLevel (m_projPrefs.get (SEFPreferencePage.DEFAULT_MLS_LEVEL, MLSSettingsProjProperties.DEFAULT_MLS)); 294 this._mlsConfiguration.setDefaultMLSLevel (mls); 295 } 296 catch (MLSInitializationException mie) 297 { 298 // Ignore the exception... 299 } 300 292 MLSLevel mls = mlsSupport.getLevel (m_projPrefs.get (SEFPreferencePage.DEFAULT_MLS_LEVEL, MLSSettingsProjProperties.DEFAULT_MLS)); 293 mlsSupport.setDefaultMLSLevel (mls); 294 } 301 295 return; 302 296 } … … 497 491 try 498 492 { 499 SELinuxSystem system = new SELinuxSystem ((IFolder) resources[i] );493 SELinuxSystem system = new SELinuxSystem ((IFolder) resources[i], getMLSSupport (true)); 500 494 m_systems.add (system); 501 495 } … … 619 613 * configuration file 620 614 */ 621 public MLSSupport getMLSSupport () throws MLSInitializationException615 public MLSSupport getMLSSupport (boolean bInitIfNotFound) 622 616 { 623 617 if (null == _mlsConfiguration) … … 628 622 { 629 623 IFile mlsConfigurationFile = this.getSupportFolder ().getFile (MLS_CONFIGURATION_FILE); 630 _mlsConfiguration = new MLSSupport(mlsConfigurationFile.getLocation ().toFile ()); 624 try 625 { 626 _mlsConfiguration = new MLSSupport(mlsConfigurationFile.getLocation ().toFile ()); 627 } 628 catch (MLSInitializationException mie) 629 { 630 // Establish a minimal MLS configuration 631 // if it can't be loaded from the file system. 632 if (bInitIfNotFound) 633 { 634 IPath ipFull = mlsConfigurationFile.getLocation (); 635 File file = ipFull.toFile (); 636 _mlsConfiguration = new MLSSupport(file.getAbsolutePath ()); 637 } 638 } 631 639 } 632 640 } … … 798 806 if (existingSystem == null) 799 807 { 800 SELinuxSystem sys = new SELinuxSystem ((IFolder) res );808 SELinuxSystem sys = new SELinuxSystem ((IFolder) res, getMLSSupport (true)); 801 809 nat.addSystem(sys); 802 810 } … … 816 824 return false; 817 825 818 String sName = res.getName ().substring (0, res.getName ().length () - sExtension.length () -1); 819 if (sName.equals ("policy") && Integer.valueOf (sExtension) != null) 820 { 821 checkAccesses ((IFile) res); 822 823 } 824 826 // String sName = res.getName ().substring (0, res.getName ().length () - sExtension.length () -1); 827 // if (sName.equals ("policy") && Integer.valueOf (sExtension) != null) 828 // { 829 // checkAccesses ((IFile) res); 830 // } 825 831 } 826 832 827 833 return false; 828 834 } 829 830 //TODO - this functions but is very unstable at this point - I just want to get it committed in a rough working state831 private void checkAccesses (IFile i_policy)832 {833 boolean bRunCheckAccess = true;834 if (!bRunCheckAccess)835 return;836 837 try838 {839 AccessCheckVisitor visitor = null;840 try841 {842 visitor = new AccessCheckVisitor (i_policy, getMLSSupport ());843 844 }845 catch (MLSInitializationException mie)846 {847 visitor = new AccessCheckVisitor (i_policy, null);848 }849 850 if (visitor != null)851 {852 SELinuxSystem sys = getSystem (i_policy);853 Policy policy = sys.getPolicy ();854 855 policy.Accept (visitor);856 }857 }858 catch (IOException e)859 {860 e.printStackTrace();861 }862 863 }864 865 835 } 866 836 } branches/mls/framework-plugin/src/com/tresys/framework/plugin/builder/GUIErrorHandler.java
r1825 r1973 160 160 } 161 161 catch (CoreException e) 162 {} 162 { 163 e.printStackTrace (); 164 } 163 165 } 164 166 branches/mls/framework-plugin/src/com/tresys/framework/plugin/builder/SELinuxSystem.java
r1961 r1973 30 30 import org.eclipse.core.runtime.Path; 31 31 import org.eclipse.core.runtime.PlatformObject; 32 import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;33 32 import org.eclipse.jface.resource.ImageDescriptor; 34 33 import org.eclipse.swt.widgets.Display; … … 39 38 import com.tresys.framework.compiler.linkage.Linkage; 40 39 import com.tresys.framework.compiler.linkage.libselinuxjava_plugin; 40 import com.tresys.framework.compiler.mls.MLSSupport; 41 41 import com.tresys.framework.compiler.policy.Policy; 42 42 import com.tresys.framework.compiler.systemResources.SystemResources; … … 44 44 import com.tresys.framework.plugin.SEFramework_Plugin; 45 45 import com.tresys.framework.plugin.editor.policy.graphic.GraphicPolicyRefresh; 46 import com.tresys.framework.plugin.editor.policy.graphic.IShapeVisitor;47 import com.tresys.framework.plugin.editor.policy.graphic.model.DefaultMLSLevelUpdateVisitor;48 46 import com.tresys.framework.plugin.editor.policy.graphic.model.PolicyDiagram; 49 47 import com.tresys.framework.plugin.preferences.SEFPreferencePage; … … 89 87 protected final File buildPath; 90 88 89 private final MLSSupport m_mlsSupport; 91 90 protected ErrorHandler m_fsysErrorHandler; 92 91 protected ErrorHandler m_fpolErrorHandler; … … 94 93 protected static final boolean DEBUG = SEFramework_Plugin.getDefault ().isDebugging ("/debug/building"); 95 94 96 public SELinuxSystem(IFolder folder )95 public SELinuxSystem(IFolder folder, MLSSupport i_mlsSupport) 97 96 throws IllegalArgumentException 98 97 { … … 108 107 throw new IllegalArgumentException("System folder must be of the format: selinux-policy-(system name)"); 109 108 109 m_mlsSupport = i_mlsSupport; 110 110 AnalysisContainer.getContainer ().addListener (m_folder, this); 111 111 } … … 423 423 String flaskPath = flaskFolder.getLocation().toString(); 424 424 425 m_linkage = new Linkage (flaskPath, null);425 m_linkage = new Linkage (flaskPath, m_mlsSupport); 426 426 m_linkage.LNFILESPATH = getProject ().getLocation ().toOSString (); 427 427 … … 694 694 } 695 695 } 696 697 public void mlsDefinitionChanged(PreferenceChangeEvent event)698 {699 IShapeVisitor isv = new DefaultMLSLevelUpdateVisitor(event);700 this.m_diagram.Accept (isv);701 &n
