public class MavenMarkerManager extends java.lang.Object implements IMavenMarkerManager
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
log |
private IMavenConfiguration |
mavenConfiguration |
| Constructor and Description |
|---|
MavenMarkerManager(IMavenConfiguration mavenConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
void |
addErrorMarker(org.eclipse.core.resources.IResource resource,
java.lang.String type,
MavenProblemInfo problem) |
void |
addErrorMarkers(org.eclipse.core.resources.IResource resource,
java.lang.String type,
java.lang.Exception ex)
Transform an exception into an error marker on an IResource.
|
void |
addErrorMarkers(org.eclipse.core.resources.IResource resource,
java.lang.String type,
java.util.List<MavenProblemInfo> problems) |
void |
addErrorMarkers(org.eclipse.core.resources.IResource resource,
java.lang.String type,
java.lang.Throwable ex)
Transform an exception into an error marker on an IResource
|
org.eclipse.core.resources.IMarker |
addMarker(org.eclipse.core.resources.IResource resource,
java.lang.String type,
java.lang.String message,
int lineNumber,
int severity)
Add a Maven marker to a resource
|
private org.eclipse.core.resources.IMarker |
addMarker(org.eclipse.core.resources.IResource resource,
java.lang.String type,
java.lang.String message,
int lineNumber,
int severity,
boolean isTransient) |
void |
addMarkers(org.eclipse.core.resources.IResource pomResource,
java.lang.String type,
org.apache.maven.execution.MavenExecutionResult result)
Add markers to a pom file from a MavenExecutionResult.
|
private void |
addMissingArtifactProblemInfos(org.apache.maven.project.MavenProject mavenProject,
SourceLocation location,
java.util.List<MavenProblemInfo> knownProblems) |
void |
deleteMarkers(org.eclipse.core.resources.IResource resource,
boolean includeSubtypes,
java.lang.String type)
Delete all Maven markers of the specified type from an IResource
|
void |
deleteMarkers(org.eclipse.core.resources.IResource resource,
java.lang.String type)
Delete all Maven markers of the specified type (including subtypes) from an IResource
|
void |
deleteMarkers(org.eclipse.core.resources.IResource resource,
java.lang.String type,
java.lang.String attrName,
java.lang.String attrValue)
Delete all Maven markers that have the specified type and attribute from an IResource
|
private static <T> boolean |
eq(T a,
T b) |
private static boolean |
equals(org.eclipse.aether.artifact.Artifact a1,
org.eclipse.aether.artifact.Artifact a2) |
private org.eclipse.core.resources.IMarker |
findMarker(org.eclipse.core.resources.IResource resource,
java.lang.String type,
java.lang.String message,
int lineNumber,
int severity,
boolean isTransient) |
private java.lang.String |
getArtifactId(org.apache.maven.artifact.resolver.AbstractArtifactResolutionException rex) |
private java.lang.String |
getErrorMessage(java.lang.Throwable ex) |
private java.lang.Throwable |
getRootCause(java.lang.Throwable ex) |
private java.lang.String |
getRootErrorMessage(java.lang.Throwable ex) |
private java.util.List<MavenProblemInfo> |
toMavenProblemInfos(org.eclipse.core.resources.IResource pomResource,
SourceLocation location,
java.util.List<? extends java.lang.Throwable> exceptions) |
private static org.slf4j.Logger log
private final IMavenConfiguration mavenConfiguration
public MavenMarkerManager(IMavenConfiguration mavenConfiguration)
public void addMarkers(org.eclipse.core.resources.IResource pomResource,
java.lang.String type,
org.apache.maven.execution.MavenExecutionResult result)
IMavenMarkerManageraddMarkers in interface IMavenMarkerManagerpomResource - the pom file to attach markers to.result - containing messages to be addedd as markerspublic org.eclipse.core.resources.IMarker addMarker(org.eclipse.core.resources.IResource resource,
java.lang.String type,
java.lang.String message,
int lineNumber,
int severity)
IMavenMarkerManageraddMarker in interface IMavenMarkerManagerresource - : the IResource to attach the marker to.message - : the marker's message.lineNumber - : the resource line to attach the marker to.severity - : the severity of the marker.private org.eclipse.core.resources.IMarker addMarker(org.eclipse.core.resources.IResource resource,
java.lang.String type,
java.lang.String message,
int lineNumber,
int severity,
boolean isTransient)
private static <T> boolean eq(T a,
T b)
private org.eclipse.core.resources.IMarker findMarker(org.eclipse.core.resources.IResource resource,
java.lang.String type,
java.lang.String message,
int lineNumber,
int severity,
boolean isTransient)
throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreExceptionprivate java.lang.String getArtifactId(org.apache.maven.artifact.resolver.AbstractArtifactResolutionException rex)
private java.lang.String getRootErrorMessage(java.lang.Throwable ex)
private java.lang.String getErrorMessage(java.lang.Throwable ex)
private java.lang.Throwable getRootCause(java.lang.Throwable ex)
private java.util.List<MavenProblemInfo> toMavenProblemInfos(org.eclipse.core.resources.IResource pomResource, SourceLocation location, java.util.List<? extends java.lang.Throwable> exceptions)
public void deleteMarkers(org.eclipse.core.resources.IResource resource,
java.lang.String type)
throws org.eclipse.core.runtime.CoreException
IMavenMarkerManagerdeleteMarkers in interface IMavenMarkerManagerorg.eclipse.core.runtime.CoreExceptionpublic void deleteMarkers(org.eclipse.core.resources.IResource resource,
boolean includeSubtypes,
java.lang.String type)
throws org.eclipse.core.runtime.CoreException
IMavenMarkerManagerdeleteMarkers in interface IMavenMarkerManagerorg.eclipse.core.runtime.CoreExceptionpublic void deleteMarkers(org.eclipse.core.resources.IResource resource,
java.lang.String type,
java.lang.String attrName,
java.lang.String attrValue)
throws org.eclipse.core.runtime.CoreException
IMavenMarkerManagerdeleteMarkers in interface IMavenMarkerManagerorg.eclipse.core.runtime.CoreExceptionprivate void addMissingArtifactProblemInfos(org.apache.maven.project.MavenProject mavenProject,
SourceLocation location,
java.util.List<MavenProblemInfo> knownProblems)
public void addErrorMarkers(org.eclipse.core.resources.IResource resource,
java.lang.String type,
java.lang.Throwable ex)
IMavenMarkerManageraddErrorMarkers in interface IMavenMarkerManagerpublic void addErrorMarkers(org.eclipse.core.resources.IResource resource,
java.lang.String type,
java.lang.Exception ex)
IMavenMarkerManageraddErrorMarkers in interface IMavenMarkerManagerpublic void addErrorMarkers(org.eclipse.core.resources.IResource resource,
java.lang.String type,
java.util.List<MavenProblemInfo> problems)
addErrorMarkers in interface IMavenMarkerManagerpublic void addErrorMarker(org.eclipse.core.resources.IResource resource,
java.lang.String type,
MavenProblemInfo problem)
addErrorMarker in interface IMavenMarkerManagerprivate static boolean equals(org.eclipse.aether.artifact.Artifact a1,
org.eclipse.aether.artifact.Artifact a2)