Fills the context menu.<p>

@param loggerSet Set of logger to open context menu for
493979
private void fillContextMenu(final Set<Logger> loggerSet) {

        for (LoggerLevel level : LoggerLevel.values()) {
            final LoggerLevel currentLevel = level;
            ContextMenuItem item = m_menu.addItem(level.getLevelStringComplet());
            item.setData(loggerSet);
            item.addItemClickListener(new ContextMenuItemClickListener() {

                public void contextMenuItemClicked(ContextMenuItemClickEvent event) {

                    changeLoggerLevel(currentLevel, loggerSet);

                }
            });
            if (loggerSet.size() == 1) {
                if (level.getLevel().equals(loggerSet.iterator().next().getLevel())) {
                    item.setIcon(FontOpenCms.CHECK_SMALL);
                }
            }
        }
        if (loggerSet.size() == 1) {
            String message = CmsVaadinUtils.getMessageText(Messages.GUI_LOGFILE_LOGSETTINGS_NEWFILE_0);
            if (isloggingactivated(loggerSet.iterator().next())) {
                message = CmsVaadinUtils.getMessageText(Messages.GUI_LOGFILE_LOGSETTINGS_REMOVEFILE_0);
            }
            ContextMenuItem item = m_menu.addItem(message);
            item.setData(loggerSet);
            item.addItemClickListener(new ContextMenuItemClickListener() {

                public void contextMenuItemClicked(ContextMenuItemClickEvent event) {

                    toggleOwnFile(loggerSet.iterator().next());

                }
            });
        }
    }
862549
public void init(@NonNull Context context, final int levConsole, final int levFile, int logSizeLimit) {
        if (levConsole != LogLevel.OFF.getValue()) {
            aConsole = new AppenderConsole(levConsole, new FormatterConsoleLog());
        }
        if (levFile != LogLevelConst.OFF) {
            aFile = new AppenderFile(context, levFile, new FormatterFileLog(), logSizeLimit);
        }
    }
1204119
public void setHostIdSet(java.util.Collection<String> hostIdSet) {
        if (hostIdSet == null) {
            this.hostIdSet = null;
            return;
        }

        this.hostIdSet = new com.amazonaws.internal.SdkInternalList<String>(hostIdSet);
    }
856948
public static void setLogLevel(String cls, String level){
        Logger l = null;
        if(Objects.isNullOrEmpty(cls))
            l = LogManager.getRootLogger();
        else
            l = LogManager.getLogger(cls);
        if(level.equalsIgnoreCase("TRACE"))
            l.setLevel(Level.TRACE);
        else if(level.equalsIgnoreCase("DEBUG"))
            l.setLevel(Level.DEBUG);
        else if(level.equalsIgnoreCase("INFO"))
            l.setLevel(Level.INFO);
        else if(level.equalsIgnoreCase("WARN"))
            l.setLevel(Level.WARN);
        else if(level.equalsIgnoreCase("ERROR"))
            l.setLevel(Level.ERROR);
    }
246074
@SuppressWarnings("deprecation")
    private void fillTable() {

        removeAllItems();
        List<Logger> loggerList = CmsLog4jUtil.getAllLoggers();
        for (Logger logger : loggerList) {
            addItemForLogger(logger);
        }
    }
1351090
private void initContextMenu() {

        m_contextMenu.removeItems();
        MenuItem main = m_contextMenu.addItem("", null);
        main.setIcon(FontOpenCms.CONTEXT_MENU);
        main.setDescription(CmsVaadinUtils.getMessageText(Messages.GUI_MENU_TITLE_0));
        CmsContextMenuTreeBuilder treeBuilder = new CmsContextMenuTreeBuilder(getDialogContext());
        CmsTreeNode<I_CmsContextMenuItem> tree = treeBuilder.buildAll(
            OpenCms.getWorkplaceAppManager().getMenuItemProvider().getMenuItems());
        for (CmsTreeNode<I_CmsContextMenuItem> node : tree.getChildren()) {
            createMenuEntry(main, node, treeBuilder);
        }
    }
604461
private void fillResponseContext(UnitResponse.Context responseContext) {
        IdManager.makeSureMsgId(responseContext);
        responseContext.setNodeStatus(getSimpleStatus());
        responseContext.setMessageType(MessageType.response);
    }
140697
protected static void init(ServletContext context) {
		TimeInterval interval = new TimeInterval();
		
		servletContext = context;
		contextPath = context.getContextPath();
		handler = new ActionHandler(HuluSetting.actionPackages);
		
		String startMsg = null;
		try {
			startMsg = FileUtil.readUtf8String("startup.txt");
		} catch (IORuntimeException e) {
			Throwable cause = e.getCause();
			if(null != cause){
				if(cause instanceof FileNotFoundException){
					log.debug("No file [startup.txt] in classpath, use default start messsage.");
				}else{
					log.warn("Read [startup.txt] error, cause by: {}", cause.getMessage());
				}
			}else{
				log.warn("Read [startup.txt] error, cause by: {}", e.getMessage());
			}
		}
		
		if(StrUtil.isNotBlank(startMsg)){
			Dict param = Dict.create().set("spend", interval.intervalMs()).set("contextPath", contextPath);
			log.info(StrUtil.format("\n" + startMsg, param));
		}else{
			log.info("\n***** Hulu framwork init finished, context path: [{}], spend {}ms *****", contextPath, interval.intervalMs());
		}
	}
883860
public void setLogEvents(java.util.Collection<InputLogEvent> logEvents) {
        if (logEvents == null) {
            this.logEvents = null;
            return;
        }

        this.logEvents = new com.amazonaws.internal.SdkInternalList<InputLogEvent>(logEvents);
    }
1249647
function setGlobalLogger(fn) {
  for (let klass of [ContextMenuBuilder, ContextMenuListener, SpellCheckHandler]) {
    klass.setLogger(fn);
  }
}
87068
public void setLoggingConfigurations(java.util.Collection<LoggingConfiguration> loggingConfigurations) {
        if (loggingConfigurations == null) {
            this.loggingConfigurations = null;
            return;
        }

        this.loggingConfigurations = new java.util.ArrayList<LoggingConfiguration>(loggingConfigurations);
    }
1044272
public void setTagSet(java.util.Collection<Tag> tagSet) {
        if (tagSet == null) {
            this.tagSet = null;
            return;
        }

        this.tagSet = new com.amazonaws.internal.SdkInternalList<Tag>(tagSet);
    }
452655
private void fillMenu() {
        // Create a selection listener to handle when the
        // user selects a warning severity.
        SelectionListener menuItemSelectionListener = new SelectionAdapter() {
            /*
             * (non-Javadoc)
             *
             * @see
             * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
             * .swt.events.SelectionEvent)
             */
            @Override
            public void widgetSelected(SelectionEvent e) {
                Widget w = e.widget;
                int index;
                for (index = 0; index < severityItemList.length; ++index) {
                    if (w == severityItemList[index]) {
                        break;
                    }
                }

                if (index < severityItemList.length) {
                    if (bugInstance != null) {
                        bugInstance.setProperty(BugProperty.SEVERITY, String.valueOf(index + 1));
                    }
                }
            }
        };

        severityItemList = new MenuItem[SEVERITY_LABEL_LIST.length];
        for (int i = 0; i < SEVERITY_LABEL_LIST.length; ++i) {
            MenuItem menuItem = new MenuItem(menu, SWT.RADIO);
            menuItem.setText(SEVERITY_LABEL_LIST[i]);
            menuItem.addSelectionListener(menuItemSelectionListener);

            severityItemList[i] = menuItem;
        }

        // Keep menu in sync with current BugInstance.
        menu.addMenuListener(new MenuAdapter() {
            /*
             * (non-Javadoc)
             *
             * @see
             * org.eclipse.swt.events.MenuAdapter#menuShown(org.eclipse.swt.
             * events.MenuEvent)
             */
            @Override
            public void menuShown(MenuEvent e) {
                syncMenu();
            }
        });
    }
1368026
@SuppressWarnings("unchecked")
		@Override
	    public void fillContextMenu(IMenuManager menu) {
	        IStructuredSelection selection = (IStructuredSelection) getContext().getSelection();
	        boolean hasClosedProjects = false;
	        Iterator<Object> resources = selection.iterator();

	        while (resources.hasNext() && (!hasClosedProjects)) {
	            Object next = resources.next();
	            IProject project = null;

	            if (next instanceof IProject) {
	                project = (IProject) next;
	            } else if (next instanceof IAdaptable) {
	                project = (IProject) ((IAdaptable) next).getAdapter(IProject.class);
	            }

	            if (project == null) {
	                continue;
	            }

	            if (!project.isOpen()) {
	                hasClosedProjects = true;
	            }
	        }

	        if (!hasClosedProjects) {
	            refreshAction.selectionChanged(selection);
	            menu.appendToGroup(ICommonMenuConstants.GROUP_BUILD, refreshAction);
	        }
	    }
240642
private void fillBuckets(SparseIntArray bucketSizes) {
    mBuckets.clear();
    for (int i = 0; i < bucketSizes.size(); ++i) {
      final int bucketSize = bucketSizes.keyAt(i);
      final int maxLength = bucketSizes.valueAt(i);
      mBuckets.put(
          bucketSize,
          new Bucket<V>(
              getSizeInBytes(bucketSize), maxLength, 0, mPoolParams.fixBucketsReinitialization));
    }
  }
690594
public void setLoggerLevel(@Nonnull String loggerName, @Nullable String level) {
        logger.info("setLoggerLevel(" + loggerName + "," + level + ")");
        try {
            Level levelAsObject = Level.toLevel(level);
            LogManager.getLogger(loggerName).setLevel(levelAsObject);
        } catch (RuntimeException e) {
            logger.warn("Exception setting logger " + loggerName + " to level " + level, e);
            throw e;
        }
    }
943082
private void fillRequestContext(RequestContext context) {
        IdManager.makeSureMsgId(context);
        context.setNodeStatus(getSimpleStatus());
        context.setMessageType(MessageType.request);
        context.setSourceNodeId(nodeId);//this node id
    }