Package org.eclipse.ui.activities

Examples of org.eclipse.ui.activities.IdentifierEvent


    private void notifyIdentifiers(Map identifierEventsByIdentifierId) {
        for (Iterator iterator = identifierEventsByIdentifierId.entrySet()
                .iterator(); iterator.hasNext();) {
            Map.Entry entry = (Map.Entry) iterator.next();
            String identifierId = (String) entry.getKey();
            IdentifierEvent identifierEvent = (IdentifierEvent) entry
                    .getValue();
            Identifier identifier = (Identifier) identifiersById
                    .get(identifierId);

            if (identifier != null) {
View Full Code Here


            enabledChanged = identifier.setEnabled(enabled);
            identifier.setActivityIds(Collections.EMPTY_SET);
            deferredIdentifiers.add(identifier);
            getUpdateJob().schedule();
            if (enabledChanged) {
        return new IdentifierEvent(identifier, activityIdsChanged,
                        enabledChanged);
      }
        }
        else {
            boolean matchesAtLeastOneEnabled = false;
            boolean matchesAtLeastOneDisabled = false;
            Set activityIdsToUpdate = new HashSet(changedActivityIds);
            if (identifier.getActivityIds() != null) {
                activityIdsToUpdate.addAll(identifier.getActivityIds());
            }
            for (Iterator iterator = activityIdsToUpdate.iterator(); iterator
                    .hasNext();) {
                String activityId = (String) iterator.next();
                Activity activity = (Activity) getActivity(activityId);
   
                if (activity.isMatch(id)) {
                    activityIds.add(activityId);
                    if (activity.isEnabled()) {
            matchesAtLeastOneEnabled = true;
          } else {
            matchesAtLeastOneDisabled = true;
          }
                }
            }
           
            enabled = matchesAtLeastOneEnabled ? true : !matchesAtLeastOneDisabled;
           
            activityIdsChanged = identifier.setActivityIds(activityIds);
            enabledChanged = identifier.setEnabled(enabled);
   
            if (activityIdsChanged || enabledChanged) {
        return new IdentifierEvent(identifier, activityIdsChanged,
                        enabledChanged);
      }
        }
        return null;
    }
View Full Code Here

            String identifierId = (String) iterator.next();
            Identifier identifier = (Identifier) identifiersById
                    .get(identifierId);

            if (identifier != null) {
                IdentifierEvent identifierEvent = updateIdentifier(identifier, changedActivityIds);

                if (identifierEvent != null) {
          identifierEventsByIdentifierId.put(identifierId,
                            identifierEvent);
        }
View Full Code Here

                            }
                        }
                       
                        boolean activityIdsChanged = identifier.setActivityIds(activityIds);
                        if (activityIdsChanged) {
                            IdentifierEvent identifierEvent = new IdentifierEvent(identifier, activityIdsChanged,
                                    false);
                            Map identifierEventsByIdentifierId = new HashMap(1);
                            identifierEventsByIdentifierId.put(identifier.getId(),
                                    identifierEvent);
                            notifyIdentifiers(identifierEventsByIdentifierId);
View Full Code Here

TOP

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

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.