1 11 12 package org.eclipse.pde.internal.ui.editor.cheatsheet.comp.actions; 13 14 import org.eclipse.pde.internal.core.icheatsheet.comp.ICompCSConstants; 15 import org.eclipse.pde.internal.core.icheatsheet.comp.ICompCSTaskGroup; 16 import org.eclipse.pde.internal.ui.PDEUIMessages; 17 import org.eclipse.pde.internal.ui.wizards.cheatsheet.CompCSCreationOperation; 18 19 20 24 public class CompCSAddGroupAction extends CompCSAbstractAddAction { 25 26 29 public CompCSAddGroupAction() { 30 setText(PDEUIMessages.CompCSCreationOperation_group); 31 } 32 33 36 public void run() { 37 38 if (fParentObject == null) { 39 return; 40 } 41 ICompCSTaskGroup group = 42 CompCSCreationOperation.createBasicGroup(fParentObject); 43 if (fParentObject.getType() == ICompCSConstants.TYPE_TASKGROUP) { 45 ICompCSTaskGroup parent = (ICompCSTaskGroup)fParentObject; 46 String name = generateTaskObjectName(parent, PDEUIMessages.CompCSCreationOperation_group); 47 group.setFieldName(name); 48 parent.addFieldTaskObject(group); 49 } else if (fParentObject.getType() == ICompCSConstants.TYPE_COMPOSITE_CHEATSHEET) { 50 } 52 } 53 54 } 55 | Popular Tags |