Package org.eclipse.ui.activities

Examples of org.eclipse.ui.activities.ICategory


   *            the id to fetch.
   * @return return all ids for activities that are in the given in the
   *         category.
   */
  private Collection getCategoryActivityIds(String categoryId) {
    ICategory category = activitySupport.getCategory(
        categoryId);
    Set activityBindings = category.getCategoryActivityBindings();
    List categoryActivities = new ArrayList(activityBindings.size());
    for (Iterator i = activityBindings.iterator(); i.hasNext();) {
      ICategoryActivityBinding binding = (ICategoryActivityBinding) i
          .next();
      String activityId = binding.getActivityId();
View Full Code Here


    Set categories = activitySupport
        .getDefinedCategoryIds();
    List checked = new ArrayList(10), grayed = new ArrayList(10);
    for (Iterator i = categories.iterator(); i.hasNext();) {
      String categoryId = (String) i.next();
      ICategory category = activitySupport
          .getCategory(categoryId);

      int state = NONE;
      Collection activities = getCategoryActivityIds(categoryId);
      int foundCount = 0;
View Full Code Here

      if (descriptor != null) {
      return descriptor;
    }
       
      if (element instanceof ICategory) {
          ICategory category = (ICategory) element;
      descriptor = PlatformUI.getWorkbench().getActivitySupport()
          .getImageDescriptor(category);
      if (descriptor != null) {
        descriptorMap.put(element, descriptor);
      }
View Full Code Here

                return activity.getName();
            } catch (NotDefinedException e) {
                return activity.getId();
            }
        } else if (element instanceof ICategory) {
            ICategory category = ((ICategory) element);
            try {
                return category.getName();
            } catch (NotDefinedException e) {
                return category.getId();
            }
        }
        return super.getText(element);
    }
View Full Code Here

   */
  public Object[] getDuplicateCategoryActivities(
      CategorizedActivity categorizedActivity) {
    ArrayList duplicateCategorizedactivities = new ArrayList();
    Set categoryIds = manager.getDefinedCategoryIds();
    ICategory currentCategory = null;
    String currentActivityId = null;
    IActivity[] categoryActivities = null;
    String currentCategoryId = null;
    // find the duplicate activities in the defined categories
    for (Iterator i = categoryIds.iterator(); i.hasNext();) {
View Full Code Here

        if (parentElement instanceof IActivityManager) {
            Set categoryIds = manager.getDefinedCategoryIds();
            ArrayList categories = new ArrayList(categoryIds.size());
            for (Iterator i = categoryIds.iterator(); i.hasNext();) {
                String categoryId = (String) i.next();
                ICategory category = manager.getCategory(categoryId);
        if (getCategoryActivities(category).length > 0) {
          categories.add(category);
        }
            }
            return categories.toArray();
View Full Code Here

TOP

Related Classes of org.eclipse.ui.activities.ICategory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.