本文整理汇总了Java中org.apache.maven.shared.dependency.tree.DependencyNode.OMITTED_FOR_CONFLICT属性的典型用法代码示例。如果您正苦于以下问题:Java DependencyNode.OMITTED_FOR_CONFLICT属性的具体用法?Java DependencyNode.OMITTED_FOR_CONFLICT怎么用?Java DependencyNode.OMITTED_FOR_CONFLICT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.maven.shared.dependency.tree.DependencyNode
的用法示例。
在下文中一共展示了DependencyNode.OMITTED_FOR_CONFLICT属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: calculateStateTipPart
@NbBundle.Messages({
"TIP_Included=Is included",
"TIP_Conflict=Is omitted for conflict, version used is {0}",
"TIP_Duplicate=Is omitted for duplicate with the same version",
"TIP_Cycle=Is omitted for cycle"
})
private static String calculateStateTipPart(DependencyNode node) {
int s = node.getState();
if (s == DependencyNode.INCLUDED) {
return Bundle.TIP_Included();
} else if (s == DependencyNode.OMITTED_FOR_CONFLICT) {
return Bundle.TIP_Conflict(node.getRelatedArtifact().getVersion());
} else if (s == DependencyNode.OMITTED_FOR_DUPLICATE) {
return Bundle.TIP_Duplicate();
} else if (s == DependencyNode.OMITTED_FOR_CYCLE) {
return Bundle.TIP_Cycle();
}
throw new IllegalStateException("illegal state:" + s);
}
示例2: getConflictType
int getConflictType () {
int ret = NO_CONFLICT;
DefaultArtifactVersion includedV = new DefaultArtifactVersion(
getArtifact().getArtifact().getVersion());
int result;
for (DependencyNode curDepN : getDuplicatesOrConflicts()) {
if (curDepN.getState() == DependencyNode.OMITTED_FOR_CONFLICT) {
result = includedV.compareTo(new DefaultArtifactVersion(curDepN.getArtifact().getVersion()));
if (result < 0) {
return CONFLICT;
}
if (result > 0) {
ret = POTENTIAL_CONFLICT;
}
}
}
return ret;
}
示例3: getHtmlDisplayName
@Override
public String getHtmlDisplayName() {
if (node.getState() == DependencyNode.OMITTED_FOR_DUPLICATE) {
return "<html><s>" + getDisplayName() + "</s></html>";
}
if (node.getState() == DependencyNode.OMITTED_FOR_CONFLICT) {
return "<html><font color=\"!nb.errorForeground\"><s>" + getDisplayName() + "</s></font></html>";
}
return super.getHtmlDisplayName(); //To change body of generated methods, choose Tools | Templates.
}
示例4: isFixCandidate
static boolean isFixCandidate (GraphNode<MavenDependencyNode> node) {
Set<MavenDependencyNode> conf = node.getDuplicatesOrConflicts();
for (MavenDependencyNode dn : conf) {
if (dn.getState() == DependencyNode.OMITTED_FOR_CONFLICT) {
if (node.getImpl().compareVersions(dn) < 0) {
return true;
}
}
}
return false;
}
示例5: visit
@Override
public boolean visit(final DependencyNode node) {
final Artifact at = node.getArtifact();
final int state = node.getState();
final String key = getQualifiedName(at);
switch (state) {
case DependencyNode.INCLUDED:
resolvedDependenciesByName.put(key, at);
break;
case DependencyNode.OMITTED_FOR_CONFLICT:
DefaultArtifactVersion dav1 = new DefaultArtifactVersion(node.getArtifact()
.getVersion());
DefaultArtifactVersion dav2 = new DefaultArtifactVersion(node.getRelatedArtifact()
.getVersion());
if (isIncompatible(dav1, dav2)) {
if (conflictDependencyArtifacts.containsKey(key)) {
conflictDependencyArtifacts.get(key).add(at);
conflictDependencyArtifacts.get(key).add(node.getRelatedArtifact());
} else {
List<Artifact> ats = new ArrayList<Artifact>();
ats.add(at);
if (!key.equals(getQualifiedName(node.getRelatedArtifact()))) {
ats.add(node.getRelatedArtifact());
}
conflictDependencyArtifacts.put(key, ats);
}
}
case DependencyNode.OMITTED_FOR_CYCLE:
case DependencyNode.OMITTED_FOR_DUPLICATE:
default:
break;
}
return true;
}
示例6: isFixCandidate
static boolean isFixCandidate (ArtifactGraphNode node) {
Set<DependencyNode> conf = node.getDuplicatesOrConflicts();
ArtifactVersion nodeV = new DefaultArtifactVersion(node.getArtifact().getArtifact().getVersion());
for (DependencyNode dn : conf) {
if (dn.getState() == DependencyNode.OMITTED_FOR_CONFLICT) {
if (nodeV.compareTo(new DefaultArtifactVersion(dn.getArtifact().getVersion())) < 0) {
return true;
}
}
}
return false;
}
示例7: EdgeWidget
public EdgeWidget(DependencyGraphScene scene, ArtifactGraphEdge edge) {
super(scene, edge);
this.edge = edge;
origStroke = getStroke();
// setTargetAnchorShape(AnchorShape.TRIANGLE_FILLED);
isConflict = edge.getTarget().getState() == DependencyNode.OMITTED_FOR_CONFLICT;
edgeConflictType = getConflictType();
updateVersionW(isConflict);
}
示例8: modelChanged
void modelChanged () {
edgeConflictType = getConflictType();
isConflict = edge.getTarget().getState() == DependencyNode.OMITTED_FOR_CONFLICT;
// correction if some graph editing(fixing) was done
if (isConflict && edgeConflictType == ArtifactGraphNode.NO_CONFLICT) {
isConflict = false;
}
updateVersionW(isConflict);
updateAppearance();
}
示例9: visit
@Override public boolean visit(MavenDependencyNode node) {
if (root == null) {
root = node;
}
GraphNode<MavenDependencyNode> grNode;
boolean primary = false;
grNode = cache.get(node.getDependencyConflictId());
if (node.getState() == DependencyNode.INCLUDED) {
if (grNode == null) {
grNode = new GraphNode(node);
cache.put(node.getDependencyConflictId(), grNode);
} else {
grNode.setImpl(node);
}
grNode.setPrimaryLevel(path.size());
primary = true;
} else {
if (grNode == null) {
grNode = new GraphNode(node);
String conflictId = node.getState() == DependencyNode.OMITTED_FOR_CONFLICT ? node.getRelatedDependencyConflictId() : node.getDependencyConflictId();
cache.put(conflictId, grNode);
}
grNode.addDuplicateOrConflict(node);
}
if (!path.empty()) {
GraphNodeImplementation parent = path.peek();
GraphEdge ed = new GraphEdge(parent, node);
ed.setPrimaryPath(primary);
edges.add(ed);
}
if (node != root && grNode.getImpl() != null) {
grNode.setManagedState(obtainManagedState(grNode.getImpl()));
}
path.push(node);
// graphPath.push(grNode);
return true;
}
示例10: visit
@Override public boolean visit(DependencyNode node) {
if (root == null) {
root = node;
}
ArtifactGraphNode grNode;
boolean primary = false;
grNode = cache.get(node.getArtifact().getDependencyConflictId());
if (node.getState() == DependencyNode.INCLUDED) {
if (grNode == null) {
grNode = new ArtifactGraphNode(node);
cache.put(node.getArtifact().getDependencyConflictId(), grNode);
} else {
grNode.setArtifact(node);
}
grNode.setPrimaryLevel(path.size());
primary = true;
} else {
if (grNode == null) {
grNode = new ArtifactGraphNode(node);
Artifact a = node.getState() == DependencyNode.OMITTED_FOR_CONFLICT ? node.getRelatedArtifact() : node.getArtifact();
cache.put(a.getDependencyConflictId(), grNode);
}
grNode.addDuplicateOrConflict(node);
}
if (!path.empty()) {
DependencyNode parent = path.peek();
ArtifactGraphEdge ed = new ArtifactGraphEdge(parent, node);
ed.setLevel(path.size() - 1);
ed.setPrimaryPath(primary);
edges.add(ed);
}
if (node != root && grNode.getArtifact() != null) {
grNode.setManagedState(
obtainManagedState(grNode.getArtifact().getArtifact(), scene));
}
path.push(node);
// graphPath.push(grNode);
return true;
}