Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 225501 Details for
Bug 397970
Basic EMF-Validation should be enabled by default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Pactch for using default validator if no validator is supplied.
defaultValidation.patch (text/plain), 2.05 KB, created by
Tobias Verhoeven
on 2013-01-11 07:44:49 EST
(
hide
)
Description:
Pactch for using default validator if no validator is supplied.
Filename:
MIME Type:
Creator:
Tobias Verhoeven
Created:
2013-01-11 07:44:49 EST
Size:
2.05 KB
patch
obsolete
>diff --git a/ECP2/org.eclipse.emf.ecp.validation.connector/src/org/eclipse/emf/ecp/validation/connector/ValidationService.java b/ECP2/org.eclipse.emf.ecp.validation.connector/src/org/eclipse/emf/ecp/validation/connector/ValidationService.java >index 2d0ed87..27e4aca 100644 >--- a/ECP2/org.eclipse.emf.ecp.validation.connector/src/org/eclipse/emf/ecp/validation/connector/ValidationService.java >+++ b/ECP2/org.eclipse.emf.ecp.validation.connector/src/org/eclipse/emf/ecp/validation/connector/ValidationService.java >@@ -21,6 +21,7 @@ > import org.eclipse.emf.ecore.EObject; > import org.eclipse.emf.ecore.EValidator; > import org.eclipse.emf.ecore.util.Diagnostician; >+import org.eclipse.emf.ecore.util.EObjectValidator; > import org.eclipse.emf.ecp.ui.common.AbstractCachedTree; > import org.eclipse.emf.ecp.ui.common.CachedTreeNode; > import org.eclipse.emf.ecp.ui.common.IExcludedObjectsCallback; >@@ -136,19 +137,21 @@ > } > > private Diagnostic getSeverity(EObject object) { >- EValidator validator = EValidator.Registry.INSTANCE.getEValidator(object.eClass().getEPackage()); >- BasicDiagnostic diagnostics = Diagnostician.INSTANCE.createDefaultDiagnostic(object); >- >- if (validator != null) { >- Map<Object, Object> context = new HashMap<Object, Object>(); >- context.put(EValidator.SubstitutionLabelProvider.class, Diagnostician.INSTANCE); >- context.put(EValidator.class, validator); >- >- validator.validate(object, diagnostics, context); >- return diagnostics; >- } >+ EValidator validator = EValidator.Registry.INSTANCE.getEValidator(object.eClass().getEPackage()); >+ BasicDiagnostic diagnostics = Diagnostician.INSTANCE.createDefaultDiagnostic(object); >+ >+ if (validator == null) { >+ validator = EObjectValidator.INSTANCE; >+ } >+ >+ Map<Object, Object> context = new HashMap<Object, Object>(); >+ context.put(EValidator.SubstitutionLabelProvider.class, Diagnostician.INSTANCE); >+ context.put(EValidator.class, validator); >+ >+ validator.validate(object, diagnostics, context); > return diagnostics; >- } >+ >+ } > > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 397970
:
225501
|
225502