Changeset 1996
- Timestamp:
- 03/13/08 08:41:02
(8 months ago)
- Author:
- apatel
- Message:
Generated a menu group for the custom policy menu items.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r1995 |
r1996 |
|
| 3 | 3 | |*| License: refer to COPYING file for license information. |
|---|
| 4 | 4 | |*| Author: David Sugar <dsugar@tresys.com> |
|---|
| 5 | | |*| |
|---|
| 6 | | |*| $Rev$ |
|---|
| | 5 | |*| Anand Patel <apatel@tresys.com> |
|---|
| | 6 | |*| $Rev$ |
|---|
| 7 | 7 | |*| $Date$ |
|---|
| 8 | 8 | \*/ |
|---|
| … | … | |
| 12 | 12 | import org.eclipse.jface.action.IAction; |
|---|
| 13 | 13 | import org.eclipse.jface.action.IMenuManager; |
|---|
| | 14 | import org.eclipse.jface.action.Separator; |
|---|
| 14 | 15 | import org.eclipse.jface.viewers.IStructuredSelection; |
|---|
| 15 | 16 | import org.eclipse.jface.viewers.StructuredSelection; |
|---|
| … | … | |
| 23 | 24 | import com.tresys.framework.compiler.custom.ICustomPolicy; |
|---|
| 24 | 25 | import com.tresys.framework.compiler.policy.Component; |
|---|
| | 26 | import com.tresys.framework.plugin.editor.CDSEditorActionConstants; |
|---|
| 25 | 27 | import com.tresys.framework.plugin.editor.action.AddCustomPolicy; |
|---|
| 26 | 28 | import com.tresys.framework.plugin.editor.action.RemoveCustomPolicy; |
|---|
| … | … | |
| 82 | 84 | getAction(ActionFactory.DELETE.getId())); |
|---|
| 83 | 85 | |
|---|
| 84 | | |
|---|
| | 86 | menu.add(new Separator(CDSEditorActionConstants.CUSTOM_POLICY)); |
|---|
| 85 | 87 | IAction action = getAction (AddCustomPolicy.ID); |
|---|
| 86 | 88 | if( action != null ) |
|---|
| 87 | 89 | { |
|---|
| 88 | 90 | action.setEnabled (customizationAllowed ()); |
|---|
| 89 | | menu.appendToGroup(GEFActionConstants.GROUP_EDIT, action); |
|---|
| | 91 | menu.appendToGroup (CDSEditorActionConstants.CUSTOM_POLICY, action); |
|---|
| 90 | 92 | } |
|---|
| 91 | 93 | action = getAction (RemoveCustomPolicy.ID); |
|---|
| … | … | |
| 93 | 95 | { |
|---|
| 94 | 96 | action.setEnabled (true); |
|---|
| 95 | | menu.appendToGroup(GEFActionConstants.GROUP_EDIT,action); |
|---|
| | 97 | menu.appendToGroup (CDSEditorActionConstants.CUSTOM_POLICY, action); |
|---|
| 96 | 98 | } |
|---|
| 97 | 99 | } |
|---|
Download in other formats:
* Generating other formats may take time.