本文整理汇总了Java中com.intellij.xml.XmlElementsGroup类的典型用法代码示例。如果您正苦于以下问题:Java XmlElementsGroup类的具体用法?Java XmlElementsGroup怎么用?Java XmlElementsGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XmlElementsGroup类属于com.intellij.xml包,在下文中一共展示了XmlElementsGroup类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPossibleElements
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
private void getPossibleElements(List<XmlElementDescriptor> elements) {
switch (myGroup.getGroupType()) {
case SEQUENCE:
getLastChild();
while (myLastChild != null) {
myLastChild.getPossibleElements(elements);
if (myLastChild.myGroup.getMinOccurs() == 0) {
myLastChild = getNextSubGroup();
}
else return;
}
break;
case CHOICE:
case ALL:
case GROUP:
for (XmlElementsGroup group : myGroup.getSubGroups()) {
new XmlContentDFAImpl(group).getPossibleElements(elements);
}
break;
case LEAF:
ContainerUtil.addIfNotNull(elements, myGroup.getLeafDescriptor());
break;
}
}
示例2: XmlElementsGroupProcessor
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
private XmlElementsGroupProcessor(XmlNSDescriptorImpl nsDescriptor)
{
super(nsDescriptor, "attribute");
myGroups.push(new XmlElementsGroupImpl(null, null, null)
{
@Override
public XmlElementsGroup.Type getGroupType()
{
return XmlElementsGroup.Type.GROUP;
}
@Override
public String toString()
{
return "root";
}
});
}
示例3: compute
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
@NotNull
@Override
protected List<XmlElementsGroup> compute() {
return ContainerUtil.map(myParticle.getSubParticles(), new Function<XmlContentParticle, XmlElementsGroup>() {
@Override
public XmlElementsGroup fun(XmlContentParticle xmlContentParticle) {
return new XmlElementsGroupImpl(xmlContentParticle, XmlElementsGroupImpl.this);
}
});
}
示例4: XmlElementsGroupProcessor
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
private XmlElementsGroupProcessor(XmlNSDescriptorImpl nsDescriptor) {
super(nsDescriptor, "attribute");
myGroups.push(new XmlElementsGroupImpl(null, null, null) {
@Override
public XmlElementsGroup.Type getGroupType() {
return XmlElementsGroup.Type.GROUP;
}
@Override
public String toString() {
return "root";
}
});
}
示例5: addSubGroup
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
private void addSubGroup(XmlElementsGroup group) {
if (!myGroups.empty()) {
XmlElementsGroup last = myGroups.peek();
if (last instanceof XmlElementsGroupImpl) {
((XmlElementsGroupImpl)last).addSubGroup(group);
}
}
}
示例6: createContentDFA
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
@Nullable
public static XmlContentDFA createContentDFA(XmlTag parentTag) {
XmlElementDescriptor descriptor = parentTag.getDescriptor();
if (descriptor == null) {
return null;
}
XmlElementsGroup topGroup = descriptor.getTopGroup();
if (topGroup == null) {
return null;
}
return new XmlContentDFAImpl(topGroup);
}
示例7: doTransition
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
private Result doTransition(@NotNull XmlElementDescriptor element) {
if (myGroup.getGroupType() == XmlElementsGroup.Type.LEAF) {
if (element.equals(myGroup.getLeafDescriptor())) {
return consume();
}
else return Result.NONE;
}
return processSubGroups(element);
}
示例8: getLastChild
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
private void getLastChild() {
if (myLastChild == null) {
List<XmlElementsGroup> subGroups = myGroup.getSubGroups();
if (!subGroups.isEmpty()) {
myLastChild = new XmlContentDFAImpl(subGroups.get(0));
}
}
}
示例9: addSubGroup
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
private void addSubGroup(XmlElementsGroup group)
{
if(!myGroups.empty())
{
XmlElementsGroup last = myGroups.peek();
if(last instanceof XmlElementsGroupImpl)
{
((XmlElementsGroupImpl) last).addSubGroup(group);
}
}
}
示例10: getTopGroup
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
@Nullable
@Override
public XmlElementsGroup getTopGroup() {
return null;
}
示例11: getTopGroup
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
@Nullable
@Override
public XmlElementsGroup getTopGroup() {
return null;
}
示例12: getTopGroup
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
@Override
public XmlElementsGroup getTopGroup() {
return null;
}
示例13: getTopGroup
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
@Override
public XmlElementsGroup getTopGroup() {
XmlElementContentGroup topGroup = myElementDecl.getContentSpecElement().getTopGroup();
return topGroup == null ? null : new XmlElementsGroupImpl(topGroup, null);
}
示例14: XmlElementsGroupImpl
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
public XmlElementsGroupImpl(@NotNull XmlContentParticle particle, XmlElementsGroup parent) {
myParticle = particle;
myParent = parent;
}
示例15: getParentGroup
import com.intellij.xml.XmlElementsGroup; //导入依赖的package包/类
@Override
public XmlElementsGroup getParentGroup() {
return myParent;
}