public ICreateFeature[] getCreateFeatures() { ActivityReader ar = new ActivityReader(); List <ActivityDescriptor> act = ar.readActivities(); List <ICreateFeature> list = new ArrayList <ICreateFeature>(); for (int j = 0; j<k; j++){ CreateActivityFeature caf = new CreateActivityFeature(this); caf.setDescriptorID(act.get(j).getId()); caf.setCreateName(act.get(j).getName()); caf.setDescription(act.get(j).getDescription()); list.add(caf); ICreateFeature[] cf = list.toArray((new ICreateFeature[list.size()])); return cf; }
PaletteCompartmentEntry compartmentEntry3 = new PaletteCompartmentEntry("Activities", null); ret.add(compartmentEntry3); ICreateFeature[] createActivityFeatures = featureProvider.getCreateFeatures(); for (ICreateFeature cf : createActivityFeatures) { if (cf instanceof CreateActivityFeature){ ObjectCreationToolEntry objectCreationToolEntry = new ObjectCreationToolEntry(cf.getCreateName(), cf.getCreateDescription(), cf.getCreateImageId(), cf.getCreateLargeImageId(), cf); compartmentEntry3.addToolEntry(objectCreationToolEntry);