本文整理匯總了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));
}
}
}
示例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;
}
示例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();
}
}
}
示例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));
}
}
}
示例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;
}
示例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;
}
示例7: getSourceElement
import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
@NotNull
public ComplexPackagingElement<?> getSourceElement() {
return mySourceElement;
}
示例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);
}
示例9: doNotSubstitute
import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
public void doNotSubstitute(ComplexPackagingElement<?> element) {
mySubstituted.remove(element);
}
示例10: shouldProcessSubstitution
import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
public boolean shouldProcessSubstitution(ComplexPackagingElement<?> element) {
return true;
}
示例11: appendComplex
import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
public PackagingElementPath appendComplex(ComplexPackagingElement<?> element) {
return new PackagingElementPath(this, element);
}
示例12: getSourceElement
import com.intellij.packaging.elements.ComplexPackagingElement; //導入依賴的package包/類
@Nonnull
public ComplexPackagingElement<?> getSourceElement() {
return mySourceElement;
}
示例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);
}