Changeset 2017

Show
Ignore:
Timestamp:
03/28/08 10:36:48 (8 months ago)
Author:
apatel
Message:

localized the messages in the custom action.
removed the remove custom policy action.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/plugin/editor/action/AddCustomPolicy.java

    r2009 r2017  
    4646{ 
    4747         
    48         public static final String ID = "custom.policy.addpolicy"; 
     48        public static final String ID = "custom.policy.addpolicy"; //$NON-NLS-1$ 
    4949        private GraphicPolicyEditor mEditor; 
    5050  
    5151        public AddCustomPolicy (GraphicPolicyEditor part) 
    5252        { 
    53                 super ("Add Custom Policy..."); 
     53                super (Messages.custom_policy_name); 
    5454                mEditor = part; 
    5555                setEnabled (false); 
    56                 setToolTipText ("Creates a new module that contains custom policy"); 
     56                setToolTipText (Messages.custom_policy_tool_tip); 
    5757        } 
    5858 
     
    7474                 */ 
    7575                Shell shell = SEFramework_Plugin.getDefault ().getWorkbench ().getActiveWorkbenchWindow ().getShell (); 
    76                 boolean OK = MessageDialog.openConfirm (shell, "Custom Policy", "Are you sure you want to modify the policy?"); 
     76                boolean OK = MessageDialog.openConfirm (shell, Messages.custom_policy_dialog_title, Messages.custom_policy_warning_message); 
    7777 
    7878                if( ! OK ) 
     
    8686                        if( files == null ) 
    8787                        { 
    88                                 MessageDialog.openError (shell, "Custom Policy", "Could not find files."); 
     88                                MessageDialog.openError (shell, Messages.custom_policy_dialog_title, Messages.custom_policy_file_error); //$NON-NLS-1$ 
    8989                                return; 
    9090                        } 
     
    9999                                if( stream == null ) 
    100100                                { 
    101                                         System.out.println ("AddCustomPolicy.run() --> No Policy Found"); 
    102101                                        return; 
    103102                                } 
     
    117116                catch(PartInitException pe) 
    118117                { 
    119                         ErrorDialog.openError (shell,"Error" ,pe.getMessage (), pe.getStatus ()); 
     118                        ErrorDialog.openError (shell,Messages.custom_policy_dialog_title,pe.getMessage (), pe.getStatus ()); 
    120119                } 
    121120                catch(CoreException ce) 
    122121                { 
    123                         ErrorDialog.openError (shell,"Error" ,ce.getMessage (), ce.getStatus ()); 
     122                        ErrorDialog.openError (shell,Messages.custom_policy_dialog_title,ce.getMessage (), ce.getStatus ()); //$NON-NLS-1$ 
    124123                } 
    125124        } 
     
    129128                SELinuxSystem system = mEditor.getSystem(); 
    130129                Linkage linkage = system.getLinkage (); 
    131 //              String module_name = system.getCustomPoilcyContainer().getCustomModuleName(); 
    132130                SELinuxPolicy policy = new SELinuxPolicy(linkage, true, system.getName ()); 
    133131                 
     
    169167                return null; 
    170168        } 
    171          
    172         void print_debug(Object o) 
    173         { 
    174                 System.out.println ("---------------------------------------"); 
    175                 if( o == null ) 
    176                         System.out.println ("NULLLLLLLLLLLLLLLLLLLL"); 
    177                 else 
    178                         System.out.println (o); 
    179                 System.out.println ("---------------------------------------"); 
    180         } 
    181          
    182169} 
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/GraphicPolicyEditor.java

    r2010 r2017  
    9393import com.tresys.framework.plugin.builder.SELinuxSystem; 
    9494import com.tresys.framework.plugin.editor.action.AddCustomPolicy; 
    95 import com.tresys.framework.plugin.editor.action.RemoveCustomPolicy; 
    9695import com.tresys.framework.plugin.editor.policy.IPolicyEditor; 
    9796import com.tresys.framework.plugin.editor.policy.graphic.model.ModelElement; 
     
    857856                registry.registerAction(action); 
    858857                getSelectionActions().add(action.getId()); 
    859                  
    860                 action = new RemoveCustomPolicy(this); 
    861                 registry.registerAction(action); 
    862                 getSelectionActions().add(action.getId()); 
    863858} 
    864859         
  • branches/custome_policy/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/GraphicPolicyEditorContextMenuProvider.java

    r2010 r2017  
    2424import com.tresys.framework.plugin.editor.CDSEditorActionConstants; 
    2525import com.tresys.framework.plugin.editor.action.AddCustomPolicy; 
    26 import com.tresys.framework.plugin.editor.action.RemoveCustomPolicy; 
    2726 
    2827 
     
    9392                                menu.appendToGroup (CDSEditorActionConstants.CUSTOM_POLICY, action); 
    9493                        } 
    95                         action = getAction (RemoveCustomPolicy.ID); 
    96                         if( action != null ) 
    97                         { 
    98                                 action.setEnabled (true); 
    99                                 menu.appendToGroup (CDSEditorActionConstants.CUSTOM_POLICY, action); 
    100                         } 
    10194                } 
    10295