Changeset 2219

Show
Ignore:
Timestamp:
06/10/08 13:59:47 (3 months ago)
Author:
apatel
Message:

I think the deletion of the customized shape should not be allowed. This is to prevent name collision for e.g. Create a resource named "config" and then customize it and then delete it. Later create a resource named "config" again and now it will be presented as customized as the mapped interfaces exist in the customize file. Therefore, only way to customized shape would be first remove the customization and then delete it.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/framework-plugin/src/com/tresys/framework/plugin/editor/policy/graphic/GraphicPolicyEditorContextMenuProvider.java

    r2054 r2219  
    7171                                GEFActionConstants.GROUP_UNDO,  
    7272                                getAction(ActionFactory.REDO.getId())); 
    73                 menu.appendToGroup( 
    74                                 GEFActionConstants.GROUP_EDIT, 
    75                                 getAction(ActionFactory.DELETE.getId())); 
    76                  
    77  
    78                  
    7973                 
    8074                { // custom policy menus 
     
    9185                        { 
    9286                                case CDSEditorActionConstants.ADD_POLICY: 
     87                                        // if it is not customized then allow DELETE 
     88                                        menu.appendToGroup( 
     89                                                GEFActionConstants.GROUP_EDIT, 
     90                                                getAction(ActionFactory.DELETE.getId())); 
    9391                                        final IAction add_action = getAction (AddCustomPolicy.ID); 
    9492                                        if( add_action == null ) 
     
    106104                                case CDSEditorActionConstants.UNKNOWN: 
    107105                                default: 
     106                                        menu.appendToGroup( 
     107                                                GEFActionConstants.GROUP_EDIT, 
     108                                                getAction(ActionFactory.DELETE.getId())); 
    108109                                        break; 
    109110                        }