public class ResourceProblemMarkerService
extends java.lang.Object
errors
and warnings
of
Resource
resources and creating corresponding problem markers on underlying file
s.IXMLMarker.XML_WELLFORMEDNESS_PROBLEM
,
IXMLMarker.XML_VALIDITY_PROBLEM
,
IXMLMarker.XML_INTEGRITY_PROBLEM
,
PROXY_URI_INTEGRITY_PROBLEM
,
IMarker.PROBLEM
Modifier and Type | Field and Description |
---|---|
static ResourceProblemMarkerService |
INSTANCE
Singleton instance.
|
static java.lang.String |
PROXY_URI_INTEGRITY_PROBLEM
Proxy URI integrity problem marker type.
|
Modifier and Type | Method and Description |
---|---|
void |
addProblemMarkers(java.util.Collection<org.eclipse.emf.ecore.resource.Resource> resources,
org.eclipse.core.runtime.IProgressMonitor monitor)
Analyzes
errors and warnings of given collection of
resource s and creates corresponding problem markers on underlying file s. |
void |
addProblemMarkers(org.eclipse.emf.ecore.resource.Resource resource,
org.eclipse.core.runtime.IProgressMonitor monitor)
Analyzes
errors and warnings of given
resource and creates corresponding problem markers on underlying file . |
void |
removeProblemMarkers(java.util.Collection<org.eclipse.core.resources.IFile> files,
org.eclipse.core.runtime.IProgressMonitor monitor)
Removes problem markers related to resource loading and saving.
|
public static final java.lang.String PROXY_URI_INTEGRITY_PROBLEM
!! Important Note !! Don't use Activator.getPlugin().getSymbolicName() instead of hard-coded plug-in name because this would prevent this class from being loaded in Java standalone applications.
IMarker.getType()
,
Constant Field Valuespublic static ResourceProblemMarkerService INSTANCE
public void addProblemMarkers(org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.core.runtime.IProgressMonitor monitor)
errors
and warnings
of given
resource
and creates corresponding problem markers on underlying file
.
The type of the problem marker being created depends on the type of error
or
warning
of given resource
and can be one of the following:
Diagnostic type |
Exception cause (in case that diagnostic is an
exception ) |
Problem marker type |
---|---|---|
XMLIntegrityException |
any | IXMLMarker.XML_INTEGRITY_PROBLEM |
ProxyURIIntegrityException |
any | PROXY_URI_INTEGRITY_PROBLEM |
XMIException |
XMLWellformednessException |
IXMLMarker.XML_WELLFORMEDNESS_PROBLEM |
XMIException |
XMLValidityException |
IXMLMarker.XML_VALIDITY_PROBLEM |
XMIException |
any other | IMarker.PROBLEM |
any other | any | IMarker.PROBLEM |
resource
- Resource
whose errors
and warnings
are to be analyzed and converted into corresponding problem markers on underlying file
.IXMLMarker.XML_WELLFORMEDNESS_PROBLEM
,
IXMLMarker.XML_VALIDITY_PROBLEM
,
IXMLMarker.XML_INTEGRITY_PROBLEM
,
PROXY_URI_INTEGRITY_PROBLEM
,
IMarker.PROBLEM
public void addProblemMarkers(java.util.Collection<org.eclipse.emf.ecore.resource.Resource> resources, org.eclipse.core.runtime.IProgressMonitor monitor)
errors
and warnings
of given collection of
resource
s and creates corresponding problem markers on underlying file
s.
The type of the problem marker being created depends on the type of error
or
warning
of given resource
and can be one of the following:
Diagnostic type |
Exception cause (in case that diagnostic is an
exception ) |
Problem marker type |
---|---|---|
XMLIntegrityException |
any | IXMLMarker.XML_INTEGRITY_PROBLEM |
ProxyURIIntegrityException |
any | PROXY_URI_INTEGRITY_PROBLEM |
XMIException |
XMLWellformednessException |
IXMLMarker.XML_WELLFORMEDNESS_PROBLEM |
XMIException |
XMLValidityException |
IXMLMarker.XML_VALIDITY_PROBLEM |
XMIException |
any other | IMarker.PROBLEM |
any other | any | IMarker.PROBLEM |
resources
- Collection of Resource
s whose errors
and
warnings
are to be analyzed and converted into corresponding problem
markers on underlying file
s.async
- true
if this operation is required to be run asynchronously, or false
if
synchronous execution is desired.monitor
- A progress monitor
, or null
if progress reporting is not
desired.IXMLMarker.XML_WELLFORMEDNESS_PROBLEM
,
IXMLMarker.XML_VALIDITY_PROBLEM
,
IXMLMarker.XML_INTEGRITY_PROBLEM
,
PROXY_URI_INTEGRITY_PROBLEM
,
IMarker.PROBLEM
public void removeProblemMarkers(java.util.Collection<org.eclipse.core.resources.IFile> files, org.eclipse.core.runtime.IProgressMonitor monitor)
files
- Collection of file
s for which we ask to remove problem markers.monitor
- A progress monitor
, or null
if progress reporting is not
desired.