Replies the assignment component with the given nazme in the given grammar component.

@param grammarComponent the component to explore.
@param assignmentName the name of the assignment to search for.
@return the assignment component.
513995
protected static Action findAction(EObject grammarComponent, String assignmentName) {
		for (final Action action : GrammarUtil.containedActions(grammarComponent)) {
			if (GrammarUtil.isAssignedAction(action)) {
				if (Objects.equals(assignmentName, action.getFeature())) {
					return action;
				}
			}
		}
		return null;
	}
787050
function(grammar) {
							var stylerAdapter = new mTextStyler.createPatternBasedAdapter(grammar.grammars, grammar.id, contentType);
							this.styler = new mTextStyler.TextStyler(textView, annotationModel, stylerAdapter);
						}
113102
public Component getComponent(int componentIndex)
    {
        if (componentList != null)
            if (componentIndex < componentList.length)
                return componentList[componentIndex];
        return null;
    }
888750
private static Matcher<CompoundAssignmentTree> variableFromCompoundAssignmentTree(
      final Matcher<ExpressionTree> exprMatcher) {
    return new Matcher<CompoundAssignmentTree>() {
      @Override
      public boolean matches(CompoundAssignmentTree tree, VisitorState state) {
        return exprMatcher.matches(tree.getVariable(), state);
      }
    };
  }
536765
public static UIComponent resolveComponent(FacesContext context, UIComponent source, String expression) {

        return resolveComponent(context, source, expression, SearchExpressionHint.NONE);
    }
1212723
Optional<PackingPlan.InstancePlan> getInstance(String componentName, int componentIndex) {
    for (PackingPlan.InstancePlan instancePlan : this.instances) {
      if (instancePlan.getComponentName().equals(componentName)
          && instancePlan.getComponentIndex() == componentIndex) {
        return Optional.of(instancePlan);
      }
    }
    return Optional.absent();
  }
675276
@Override
    public String fromComponentNameToPartOfClassName(final String componentName) {
        if (componentName == null) {
            throw new EmptyRuntimeException("componentName");
        }
        String[] names = LdiStringUtil.split(componentName, PACKAGE_SEPARATOR_STR);
        StringBuffer buf = new StringBuffer(50);
        for (int i = 0; i < names.length; ++i) {
            if (i == names.length - 1) {
                buf.append(LdiStringUtil.capitalize(names[i]));
            } else {
                buf.append(names[i]).append(".");
            }
        }
        return buf.toString();
    }
790285
public ICalComponentScribe<? extends ICalComponent> getComponentScribe(ICalComponent component) {
		if (component instanceof RawComponent) {
			RawComponent raw = (RawComponent) component;
			return new RawComponentScribe(raw.getName());
		}

		return getComponentScribe(component.getClass());
	}
464644
public synchronized void addComponent(ComponentEvent event)
    {
        try
        {
            if(log.isDebugEnabled())log.debug("Component added "+event);
            Object o=event.getComponent();
            
            ModelMBean mbean=ModelMBeanImpl.mbeanFor(o);
            if (mbean==null)
                log.warn("No MBean for "+o);
            else
            {
                ObjectName oName=null;
                if (mbean instanceof ModelMBeanImpl)
                {
                    ((ModelMBeanImpl)mbean).setBaseObjectName(getObjectName().toString());
                    oName=
                        getMBeanServer().registerMBean(mbean,null).getObjectName();
                }
                else
                {
                    oName=uniqueObjectName(getMBeanServer(),
                                           o,
                                           getObjectName().toString());
                    oName=getMBeanServer().registerMBean(mbean,oName)
                        .getObjectName();
                }
                Holder holder = new Holder(oName,mbean);
                _mbeanMap.put(o,holder);
            }
        }
        catch(Exception e)
        {
            log.warn(LogSupport.EXCEPTION,e);
        }
    }
64339
public AlignedExpressionTree getBestAlignment(AlignmentExample example) {
    CfgParser parser = getCfgParser(example);
    ExpressionTree tree = example.getTree();
    
    Factor rootFactor = getRootFactor(tree, parser.getParentVariable());
    CfgParseChart chart = parser.parseMarginal(example.getWords(), rootFactor, false);
    CfgParseTree parseTree = chart.getBestParseTree();

    return decodeCfgParse(parseTree, 0);
  }
878301
public <T> T get(@NotNull String name, @NotNull T defaultValue) {
    return getForComponent(component, name, defaultValue);
  }
106873
protected void addVerbatimAfterComponent(UIComponentClassicTagBase parentTag, UIComponent verbatim,
                                             UIComponent component)
    {
        int indexOfComponentInParent = 0;
        UIComponent parent = component.getParent();

        // invert the order of this if and the assignment below. Since this line is
        // here, it appears an early return is acceptable/desired if parent is null,
        // and, if it is null, we should probably check for that before we try to
        // access it. 2006-03-15 jdl
        if (null == parent)
        {
            return;
        }
        List<UIComponent> children = parent.getChildren();
        indexOfComponentInParent = children.indexOf(component);
        if (children.size() - 1 == indexOfComponentInParent)
        {
            children.add(verbatim);
        }
        else
        {
            children.add(indexOfComponentInParent + 1, verbatim);
        }
        parentTag.addChild(verbatim);
    }
644461
private Optional<PackingPlan.InstancePlan> getAnyInstanceOfComponent(String componentName) {
    for (PackingPlan.InstancePlan instancePlan : this.instances) {
      if (instancePlan.getComponentName().equals(componentName)) {
        return Optional.of(instancePlan);
      }
    }
    return Optional.absent();
  }
866577
protected Component lookForComponent(String name, Component[] components) {
        for (int i = 0; i < components.length && !mFindWithEqual; i++) {
            //String componentName = ComponentNamer.getInstance().getNameForComponent(components[c]);
            Component c = components[i];
            checkName(name, c);
            if (!mFindWithEqual) {
                if (c instanceof Container) {
                    Component result = lookForComponent(name, ((Container) c).getComponents());
                    if (result != null) {
                        return result;
                    }
                }
            }
        }
        return null;
    }
541615
public CharacterComponent getComponent (int componentId)
        throws NoSuchComponentException
    {
        CharacterComponent component = _components.get(componentId);
        if (component == null) {
            throw new NoSuchComponentException(componentId);
        }
        return component;
    }
853370
public void setBinding(javax.faces.component.UIComponent _binding) {
		getStateHelper().put(PropertyKeys.binding, _binding);
	}
1270862
public void setComponent(String component, Variable ... vars) {
		for (Variable var : vars) {
			if (var.getComponent() != null && !var.getComponent().equals(component)) {
				components.get(var.getComponent()).remove(var);
			}
		}
		if (!components.containsKey(component)) components.put(component, new ArrayList<Variable>());
		for (Variable var : vars) components.get(component).add(var);
	}

	/**
	 * Create a batch of new {@link Variable}s for this {@link ConstraintSolver}.
	 * @param num The number of variables to create.
	 * @return A batch of new {@link Variable}s.
	 */
	public final Variable[] createVariables(int num) {
		return this.createVariables(num, null);
	}

	/**
	 * Create a batch of new {@link Variable}s for this {@link ConstraintSolver}.
	 * @param num The number of variables to create.
	 * @param component The component tag to associate to these new variables.
	 * @return A batch of new {@link Variable}s.
	 */
	public final Variable[] createVariables(int num, String component) {
		Variable[] ret = createVariablesSub(num, component);
		if (ret == null) return null;
		//need to add all to network so if sth goes wrong I can delete all of them concurrently
		for (Variable v : ret) this.theNetwork.addVariable(v);
		if (!skipPropagation && autoprop && checkDomainsInstantiated() && !noPropOnVarCreation) this.propagate();
		logger.finest("Created variables " + Arrays.toString(ret));
		return ret;
	}