Add work wrapper to active set
@param ww The work wrapper
484991
void addWorkWrapper(WorkWrapper ww)
   {
      synchronized (activeWorkWrappers)
      {
         activeWorkWrappers.add(ww);

         if (statisticsEnabled)
            statistics.setWorkActive(activeWorkWrappers.size());
      }
   }
782143
public void setWp(A_CmsListDialog wp) {

        m_wp = wp;
        Iterator<CmsListColumnDefinition> itCols = getColumnDefinitions().iterator();
        while (itCols.hasNext()) {
            CmsListColumnDefinition column = itCols.next();
            column.setWp(wp);
        }
        Iterator<CmsListItemDetails> itDets = getItemDetailDefinitions().iterator();
        while (itDets.hasNext()) {
            CmsListItemDetails detail = itDets.next();
            detail.setWp(wp);
        }
        Iterator<CmsListMultiAction> itMultiActs = getMultiActions().iterator();
        while (itMultiActs.hasNext()) {
            CmsListMultiAction action = itMultiActs.next();
            action.setWp(wp);
        }
        Iterator<I_CmsListAction> itIndActs = getIndependentActions().iterator();
        while (itIndActs.hasNext()) {
            I_CmsListAction action = itIndActs.next();
            action.setWp(wp);
        }
        if (m_searchAction != null) {
            m_searchAction.setWp(wp);
        }
    }
971670
public void registerWorkManager(WorkManager wm)
   {
      if (wm != null)
      {
         if (wm.getName() == null || wm.getName().trim().equals(""))
            throw new IllegalArgumentException("The name of WorkManager is invalid: " + wm);

         if (trace)
            log.tracef("Registering WorkManager: %s", wm);

         if (!workmanagers.keySet().contains(wm.getName()))
         {
            workmanagers.put(wm.getName(), wm);

            // Replay events for distributed work managers
            if (wm instanceof DistributedWorkManager)
            {
               WorkManagerEventQueue wmeq = WorkManagerEventQueue.getInstance();
               List<WorkManagerEvent> events = wmeq.getEvents(wm.getName());

               if (!events.isEmpty())
               {
                  if (trace)
                     log.tracef("%s: Events=%s", wm.getName(), events);

                  for (WorkManagerEvent event : events)
                  {
                     if (event.getType() == WorkManagerEvent.TYPE_JOIN)
                     {
                        DistributedWorkManager dwm = resolveDistributedWorkManager(event.getAddress());

                        if (dwm != null)
                        {
                           Collection<NotificationListener> copy =
                              new ArrayList<>(dwm.getNotificationListeners());
                           for (NotificationListener nl : copy)
                           {
                              nl.join(event.getAddress());
                           }
                        }
                     }
                     else if (event.getType() == WorkManagerEvent.TYPE_LEAVE)
                     {
                        DistributedWorkManager dwm = 
                           (DistributedWorkManager)activeWorkmanagers.get(event.getAddress().getWorkManagerId());

                        if (dwm != null)
                        {
                           Collection<NotificationListener> copy =
                              new ArrayList<NotificationListener>(dwm.getNotificationListeners());
                           for (NotificationListener nl : copy)
                           {
                              nl.leave(event.getAddress());
                           }
                        }

                        removeWorkManager(event.getAddress().getWorkManagerId());
                     }
                     else if (event.getType() == WorkManagerEvent.TYPE_UPDATE_SHORT_RUNNING)
                     {
                        DistributedWorkManager dwm = 
                           (DistributedWorkManager)activeWorkmanagers.get(event.getAddress().getWorkManagerId());

                        if (dwm != null)
                        {
                           Collection<NotificationListener> copy =
                              new ArrayList<NotificationListener>(dwm.getNotificationListeners());
                           for (NotificationListener nl : copy)
                           {
                              nl.updateShortRunningFree(event.getAddress(), event.getValue());
                           }
                        }
                     }
                     else if (event.getType() == WorkManagerEvent.TYPE_UPDATE_LONG_RUNNING)
                     {
                        DistributedWorkManager dwm = 
                           (DistributedWorkManager)activeWorkmanagers.get(event.getAddress().getWorkManagerId());

                        if (dwm != null)
                        {
                           Collection<NotificationListener> copy =
                              new ArrayList<NotificationListener>(dwm.getNotificationListeners());
                           for (NotificationListener nl : copy)
                           {
                              nl.updateLongRunningFree(event.getAddress(), event.getValue());
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
1135778
protected boolean addWork(final ForkJoinContext<?> context) {
	requireNotStopped(this);

	final boolean result = workQueue.addWaitingWork(context);
	if (result) {
	    addWorkerIfNeeded();
	}

	return result;
    }
1057781
public void setWorkerIds(java.util.Collection<String> workerIds) {
        if (workerIds == null) {
            this.workerIds = null;
            return;
        }

        this.workerIds = new java.util.ArrayList<String>(workerIds);
    }
981456
private void readWBS()
   {
      Map<Integer, List<MapRow>> levelMap = new HashMap<Integer, List<MapRow>>();
      for (MapRow row : m_tables.get("STR"))
      {
         Integer level = row.getInteger("LEVEL_NUMBER");
         List<MapRow> items = levelMap.get(level);
         if (items == null)
         {
            items = new ArrayList<MapRow>();
            levelMap.put(level, items);
         }
         items.add(row);
      }

      int level = 1;
      while (true)
      {
         List<MapRow> items = levelMap.get(Integer.valueOf(level++));
         if (items == null)
         {
            break;
         }

         for (MapRow row : items)
         {
            m_wbsFormat.parseRawValue(row.getString("CODE_VALUE"));
            String parentWbsValue = m_wbsFormat.getFormattedParentValue();
            String wbsValue = m_wbsFormat.getFormattedValue();
            row.setObject("WBS", wbsValue);
            row.setObject("PARENT_WBS", parentWbsValue);
         }

         final AlphanumComparator comparator = new AlphanumComparator();
         Collections.sort(items, new Comparator<MapRow>()
         {
            @Override public int compare(MapRow o1, MapRow o2)
            {
               return comparator.compare(o1.getString("WBS"), o2.getString("WBS"));
            }
         });

         for (MapRow row : items)
         {
            String wbs = row.getString("WBS");
            if (wbs != null && !wbs.isEmpty())
            {
               ChildTaskContainer parent = m_wbsMap.get(row.getString("PARENT_WBS"));
               if (parent == null)
               {
                  parent = m_projectFile;
               }

               Task task = parent.addTask();
               String name = row.getString("CODE_TITLE");
               if (name == null || name.isEmpty())
               {
                  name = wbs;
               }
               task.setName(name);
               task.setWBS(wbs);
               task.setSummary(true);
               m_wbsMap.put(wbs, task);
            }
         }
      }
   }
802337
public void addButton(Widget w) {

        m_buttonPanel.add(w);
        if (CmsCoreProvider.get().isIe7()) {
            m_buttonPanel.getElement().getStyle().setWidth(m_buttonPanel.getWidgetCount() * 22, Unit.PX);
        }
    }
237426
public void localDoWork(Address address, DistributableWork work) throws WorkException
   {
      if (trace)
         log.tracef("LOCAL_DO_WORK(%s, %s)", address, work);

      DistributedWorkManager dwm = workManagerCoordinator.resolveDistributedWorkManager(address);

      dwm.localDoWork(work);
   }
1206656
public ProjectCalendarWeek addWorkWeek()
   {
      ProjectCalendarWeek week = new ProjectCalendarWeek();
      week.setParent(this);
      m_workWeeks.add(week);
      m_weeksSorted = false;
      clearWorkingDateCache();
      return week;
   }
1209881
public void setWp(A_CmsListDialog wp) {

        m_wp = wp;
        Iterator<I_CmsListDirectAction> itActs = getDirectActions().iterator();
        while (itActs.hasNext()) {
            I_CmsListDirectAction action = itActs.next();
            action.setWp(wp);
        }
        Iterator<CmsListDefaultAction> itDefActs = getDefaultActions().iterator();
        while (itDefActs.hasNext()) {
            CmsListDefaultAction action = itDefActs.next();
            action.setWp(wp);
        }
    }
1117460
private void addFailedWorkUnits(List<WorkUnit> previousWorkUnitsForRetry,
      MultiWorkUnitWeightedQueue multiWorkUnitWeightedQueue) {
    for (WorkUnit wu : previousWorkUnitsForRetry) {

      try {
        multiWorkUnitWeightedQueue.addWorkUnit(wu,
            this.fs.getFileStatus(new Path(wu.getProp(ConfigurationKeys.SOURCE_FILEBASED_FILES_TO_PULL))).getLen());
      } catch (IOException e) {
        Throwables.propagate(e);
      }

      LOG.info(
          "Will process file from previous workunit: " + wu.getProp(ConfigurationKeys.SOURCE_FILEBASED_FILES_TO_PULL));

      this.fileCount++;
    }
  }
378970
private void addWorkerFailed(Worker w) {
        final ReentrantLock mainLock = this.mainLock;
        mainLock.lock();
        try {
            if (w != null)
                workers.remove(w);
            decrementWorkerCount();
            tryTerminate();
        } finally {
            mainLock.unlock();
        }
    }
1231200
public WorkingWeek intersection(final WorkingWeek ww) {
        final byte combined = (byte) (this.workingDays & ww.workingDays);
        return new WorkingWeek(combined);
    }
1153979
@Reference(name = "workClassifier", policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.OPTIONAL)
    protected void setWorkClassifier(WorkClassifier service) {
        workClassifier = service;
    }
1191442
void setWrap(Collection<Unit> exceptUnit, Collection<Unit> plusUnfiltered) {
        if (isImport()) {
            si.setOuterWrap(state.outerMap.wrapImport(activeGuts, si));
        } else {
            // Collect Units for be wrapped together.  Just this except for overloaded methods
            List<Unit> units;
            if (snippet().kind() == Kind.METHOD) {
                String name = ((MethodSnippet) snippet()).name();
                units = plusUnfiltered.stream()
                        .filter(u -> u.snippet().kind() == Kind.METHOD &&
                                 ((MethodSnippet) u.snippet()).name().equals(name))
                        .collect(toList());
            } else {
                units = Collections.singletonList(this);
            }
            // Keys to exclude from imports
            Set<Key> except = exceptUnit.stream()
                    .map(u -> u.snippet().key())
                    .collect(toSet());
            // Snippets to add to imports
            Collection<Snippet> plus = plusUnfiltered.stream()
                    .filter(u -> !units.contains(u))
                    .map(Unit::snippet)
                    .collect(toList());
            // Snippets to wrap in an outer
            List<Snippet> snippets = units.stream()
                    .map(Unit::snippet)
                    .collect(toList());
            // Snippet wraps to wrap in an outer
            List<Wrap> wraps = units.stream()
                    .map(u -> u.activeGuts)
                    .collect(toList());
            // Set the outer wrap for this snippet
            si.setOuterWrap(state.outerMap.wrapInClass(except, plus, snippets, wraps));
            state.debug(DBG_WRAP, "++setWrap() %s\n%s\n",
                    si, si.outerWrap().wrapped());
        }
    }
892509
public void addSummaryType(AbstractMemberWriter mw, ProgramElementDoc member,
            Content tdSummaryType) {
        mw.addSummaryType(member, tdSummaryType);
    }
978266
public void setWorkteams(java.util.Collection<Workteam> workteams) {
        if (workteams == null) {
            this.workteams = null;
            return;
        }

        this.workteams = new java.util.ArrayList<Workteam>(workteams);
    }