1 11 12 package org.eclipse.pde.internal.ui.editor.cheatsheet.comp.actions; 13 14 import java.util.HashSet ; 15 16 import org.eclipse.pde.internal.core.icheatsheet.comp.ICompCSObject; 17 import org.eclipse.pde.internal.core.icheatsheet.comp.ICompCSTaskGroup; 18 import org.eclipse.pde.internal.core.icheatsheet.comp.ICompCSTaskObject; 19 import org.eclipse.pde.internal.ui.editor.cheatsheet.CSAbstractAddAction; 20 21 25 public abstract class CompCSAbstractAddAction extends CSAbstractAddAction { 26 27 protected ICompCSObject fParentObject; 28 29 32 public CompCSAbstractAddAction() { 33 } 35 36 39 public void setParentObject(ICompCSObject object) { 40 fParentObject = object; 41 } 42 43 46 protected String generateTaskObjectName(ICompCSTaskGroup parent, String base) { 47 StringBuffer result = new StringBuffer (base); 48 ICompCSTaskObject[] taskObjects = parent.getFieldTaskObjects(); 49 HashSet set = new HashSet (); 51 52 for (int i = 0; i < taskObjects.length; i++) { 56 compareTitleWithBase(base, set, taskObjects[i].getFieldName()); 57 } 58 addNumberToBase(result, set); 60 61 return result.toString(); 62 } 63 } 64 | Popular Tags |