Bug 526030 - Dot Editor throws java.lang.IllegalStateException when validating dot style attribute values
Summary: Dot Editor throws java.lang.IllegalStateException when validating dot style a...
Status: RESOLVED FIXED
Alias: None
Product: GEF
Classification: Tools
Component: GEF DOT (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 5.0.2 (Oxygen.2) M1   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2017-10-14 05:58 EDT by Tamas Miklossy CLA
Modified: 2017-10-14 06:08 EDT (History)
0 users

See Also:


Attachments
IllegalStateException during Dot style attribute value validation (40.29 KB, image/png)
2017-10-14 05:58 EDT, Tamas Miklossy CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tamas Miklossy CLA 2017-10-14 05:58:09 EDT
Created attachment 271003 [details]
IllegalStateException during Dot style attribute value validation

The Dot Editor throws the following java.lang.IllegalStateException when validating dot style attribute values:

java.lang.IllegalStateException: Attribute context not specified.
	at org.eclipse.gef.dot.internal.language.validation.DotStyleJavaValidator.getAttributeContext(DotStyleJavaValidator.java:146)
	at org.eclipse.gef.dot.internal.language.validation.DotStyleJavaValidator.checkStyleItemConformsToContext(DotStyleJavaValidator.java:50)
	at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.xtext.validation.AbstractDeclarativeValidator$MethodWrapper.invoke(AbstractDeclarativeValidator.java:118)
	at org.eclipse.xtext.validation.AbstractDeclarativeValidator.internalValidate(AbstractDeclarativeValidator.java:311)
	at org.eclipse.xtext.validation.AbstractInjectableValidator.validate(AbstractInjectableValidator.java:66)
	at org.eclipse.xtext.validation.CompositeEValidator.validate(CompositeEValidator.java:127)
	at org.eclipse.emf.ecore.util.Diagnostician.doValidate(Diagnostician.java:171)
	at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:158)
	at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
	at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
	at org.eclipse.emf.ecore.util.Diagnostician.doValidateContents(Diagnostician.java:181)
	at org.eclipse.xtext.validation.CancelableDiagnostician.doValidateContents(CancelableDiagnostician.java:48)
	at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:161)
	at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:137)
	at org.eclipse.xtext.validation.CancelableDiagnostician.validate(CancelableDiagnostician.java:36)
	at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostician.java:120)
	at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:145)
	at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:123)
	at org.eclipse.xtext.validation.ResourceValidatorImpl.validate(ResourceValidatorImpl.java:86)
	at org.eclipse.xtext.ui.validation.DefaultResourceUIValidatorExtension.addMarkers(DefaultResourceUIValidatorExtension.java:58)
	at org.eclipse.xtext.ui.validation.DefaultResourceUIValidatorExtension.updateValidationMarkers(DefaultResourceUIValidatorExtension.java:44)
	at org.eclipse.xtext.builder.builderState.MarkerUpdaterImpl.processDelta(MarkerUpdaterImpl.java:79)
	at org.eclipse.xtext.builder.builderState.MarkerUpdaterImpl.updateMarkers(MarkerUpdaterImpl.java:58)
	at org.eclipse.xtext.builder.builderState.AbstractBuilderState.updateMarkers(AbstractBuilderState.java:81)
	at org.eclipse.xtext.builder.clustering.ClusteringBuilderState.doUpdate(ClusteringBuilderState.java:272)
	at org.eclipse.xtext.builder.builderState.AbstractBuilderState.update(AbstractBuilderState.java:112)
	at org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:187)
	at org.eclipse.xtext.builder.impl.XtextBuilder.fullBuild(XtextBuilder.java:213)
	at org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:89)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
Comment 1 Tamas Miklossy CLA 2017-10-14 06:07:51 EDT
The following changes are published on the origin/R5_0_0_maintenance and origin/master branches:

[526030] Avoid Exception during DOT style attribute value validation.

- Modify the DotStyleJavaValidator to not to throw any
IllegalStateException when the DOT attribute context cannot be
determined. In such cases the checkStyleItemConformsToContext validation
rule should have no effect.
- Implement corresponding DotStyle validation test cases.

Resolving as fixed in 5.0.2 M1.