當前位置: 首頁>>代碼示例>>Java>>正文


Java ComplexPackagingElement類代碼示例

本文整理匯總了Java中com.intellij.packaging.elements.ComplexPackagingElement的典型用法代碼示例。如果您正苦於以下問題:Java ComplexPackagingElement類的具體用法?Java ComplexPackagingElement怎麽用?Java ComplexPackagingElement使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ComplexPackagingElement類屬於com.intellij.packaging.elements包,在下文中一共展示了ComplexPackagingElement類的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addNodes

import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
public static void addNodes(@NotNull List<? extends PackagingElement<?>> elements, @NotNull CompositePackagingElementNode parentNode,
                             @NotNull CompositePackagingElement parentElement, @NotNull ArtifactEditorContext context,
                             @NotNull ComplexElementSubstitutionParameters substitutionParameters, @NotNull Collection<PackagingNodeSource> nodeSources,
                             @NotNull List<PackagingElementNode<?>> nodes,
                             ArtifactType artifactType,
                             Set<PackagingElement<?>> processed) {
  for (PackagingElement<?> element : elements) {
    final PackagingElementNode<?> prev = findEqual(nodes, element);
    if (prev != null) {
      prev.addElement(element, parentElement, nodeSources);
      continue;
    }

    if (element instanceof ArtifactRootElement) {
      throw new AssertionError("artifact root not expected here");
    }
    else if (element instanceof CompositePackagingElement) {
      nodes.add(new CompositePackagingElementNode((CompositePackagingElement<?>)element, context, parentNode, parentElement, substitutionParameters, nodeSources,
                                                  artifactType));
    }
    else if (element instanceof ComplexPackagingElement) {
      final ComplexPackagingElement<?> complexElement = (ComplexPackagingElement<?>)element;
      if (processed.add(element) && substitutionParameters.shouldSubstitute(complexElement)) {
        final List<? extends PackagingElement<?>> substitution = complexElement.getSubstitution(context, artifactType);
        if (substitution != null) {
          final PackagingNodeSource source = new PackagingNodeSource(complexElement, parentNode, parentElement, nodeSources);
          addNodes(substitution, parentNode, parentElement, context, substitutionParameters, Collections.singletonList(source), nodes,
                   artifactType, processed);
          continue;
        }
      }
      nodes.add(new ComplexPackagingElementNode(complexElement, context, parentNode, parentElement, substitutionParameters, nodeSources));
    }
    else {
      nodes.add(new PackagingElementNode<PackagingElement<?>>(element, context, parentNode, parentElement, nodeSources));
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:39,代碼來源:PackagingTreeNodeFactory.java

示例2: PackagingNodeSource

import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
public PackagingNodeSource(@NotNull ComplexPackagingElement<?> sourceElement,
                           @NotNull PackagingElementNode<?> sourceParentNode,
                           @NotNull CompositePackagingElement<?> sourceParentElement,
                           @Nullable Collection<PackagingNodeSource> parentSources) {
  mySourceElement = sourceElement;
  mySourceParentNode = sourceParentNode;
  mySourceParentElement = sourceParentElement;
  myParentSources = parentSources;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:10,代碼來源:PackagingNodeSource.java

示例3: setShowContent

import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
public void setShowContent(ComplexPackagingElementType<?> type, boolean showContent) {
  if (showContent) {
    myTypesToSubstitute.add(type);
  }
  else {
    myTypesToSubstitute.remove(type);
  }
  final Iterator<ComplexPackagingElement<?>> iterator = mySubstituted.iterator();
  while (iterator.hasNext()) {
    if (iterator.next().getType().equals(type)) {
      iterator.remove();
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:15,代碼來源:ComplexElementSubstitutionParameters.java

示例4: addNodes

import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
public static void addNodes(@Nonnull List<? extends PackagingElement<?>> elements, @Nonnull CompositePackagingElementNode parentNode,
                            @Nonnull CompositePackagingElement parentElement, @Nonnull ArtifactEditorContext context,
                            @Nonnull ComplexElementSubstitutionParameters substitutionParameters, @Nonnull Collection<PackagingNodeSource> nodeSources,
                            @Nonnull List<PackagingElementNode<?>> nodes,
                            ArtifactType artifactType,
                            Set<PackagingElement<?>> processed) {
  for (PackagingElement<?> element : elements) {
    final PackagingElementNode<?> prev = findEqual(nodes, element);
    if (prev != null) {
      prev.addElement(element, parentElement, nodeSources);
      continue;
    }

    if (element instanceof ArtifactRootElement) {
      throw new AssertionError("artifact root not expected here");
    }
    else if (element instanceof CompositePackagingElement) {
      nodes.add(new CompositePackagingElementNode((CompositePackagingElement<?>)element, context, parentNode, parentElement, substitutionParameters, nodeSources,
                                                  artifactType));
    }
    else if (element instanceof ComplexPackagingElement) {
      final ComplexPackagingElement<?> complexElement = (ComplexPackagingElement<?>)element;
      if (processed.add(element) && substitutionParameters.shouldSubstitute(complexElement)) {
        final List<? extends PackagingElement<?>> substitution = complexElement.getSubstitution(context, artifactType);
        if (substitution != null) {
          final PackagingNodeSource source = new PackagingNodeSource(complexElement, parentNode, parentElement, nodeSources);
          addNodes(substitution, parentNode, parentElement, context, substitutionParameters, Collections.singletonList(source), nodes,
                   artifactType, processed);
          continue;
        }
      }
      nodes.add(new ComplexPackagingElementNode(complexElement, context, parentNode, parentElement, substitutionParameters, nodeSources));
    }
    else {
      nodes.add(new PackagingElementNode<PackagingElement<?>>(element, context, parentNode, parentElement, nodeSources));
    }
  }
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:39,代碼來源:PackagingTreeNodeFactory.java

示例5: PackagingNodeSource

import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
public PackagingNodeSource(@Nonnull ComplexPackagingElement<?> sourceElement,
                           @Nonnull PackagingElementNode<?> sourceParentNode,
                           @Nonnull CompositePackagingElement<?> sourceParentElement,
                           @Nullable Collection<PackagingNodeSource> parentSources) {
  mySourceElement = sourceElement;
  mySourceParentNode = sourceParentNode;
  mySourceParentElement = sourceParentElement;
  myParentSources = parentSources;
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:10,代碼來源:PackagingNodeSource.java

示例6: ComplexPackagingElementNode

import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
public ComplexPackagingElementNode(ComplexPackagingElement<?> element, ArtifactEditorContext context, CompositePackagingElementNode parentNode,
                                   CompositePackagingElement<?> parentElement,
                                   ComplexElementSubstitutionParameters substitutionParameters, Collection<PackagingNodeSource> nodeSources) {
  super(element, context, parentNode, parentElement, nodeSources);
  mySubstitutionParameters = substitutionParameters;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:7,代碼來源:ComplexPackagingElementNode.java

示例7: getSourceElement

import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
@NotNull
public ComplexPackagingElement<?> getSourceElement() {
  return mySourceElement;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:PackagingNodeSource.java

示例8: shouldSubstitute

import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
public boolean shouldSubstitute(@NotNull ComplexPackagingElement<?> element) {
  final ComplexPackagingElementType<?> type = (ComplexPackagingElementType<?>)element.getType();
  return myTypesToSubstitute.contains(type) || mySubstituted.contains(element);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:ComplexElementSubstitutionParameters.java

示例9: doNotSubstitute

import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
public void doNotSubstitute(ComplexPackagingElement<?> element) {
  mySubstituted.remove(element);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:ComplexElementSubstitutionParameters.java

示例10: shouldProcessSubstitution

import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
public boolean shouldProcessSubstitution(ComplexPackagingElement<?> element) {
  return true;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:PackagingElementProcessor.java

示例11: appendComplex

import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
public PackagingElementPath appendComplex(ComplexPackagingElement<?> element) {
  return new PackagingElementPath(this, element);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:PackagingElementPath.java

示例12: getSourceElement

import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
@Nonnull
public ComplexPackagingElement<?> getSourceElement() {
  return mySourceElement;
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:5,代碼來源:PackagingNodeSource.java

示例13: shouldSubstitute

import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
public boolean shouldSubstitute(@Nonnull ComplexPackagingElement<?> element) {
  final ComplexPackagingElementType<?> type = (ComplexPackagingElementType<?>)element.getType();
  return myTypesToSubstitute.contains(type) || mySubstituted.contains(element);
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:5,代碼來源:ComplexElementSubstitutionParameters.java


注:本文中的com.intellij.packaging.elements.ComplexPackagingElement類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。