Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 540330

Summary: DOT Editor - Implement redundant attribute validation rule and corresponding quickfix
Product: [Tools] GEF Reporter: Tamas Miklossy <miklossy>
Component: GEF DOTAssignee: Zoey Gerrit Prigge <eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: matthias.wienand
Version: unspecified   
Target Milestone: 5.0.300 (2018-12)   
Hardware: PC   
OS: Windows 10   
See Also: https://github.com/eclipse/gef/pull/35
https://github.com/eclipse/gef/pull/38
Whiteboard: low-hanging fruit

Description Tamas Miklossy CLA 2018-10-20 03:30:37 EDT
Given is the following DOT graph with redundant attributes:

graph {
	1[style=bold style=dashed style=dotted]
}

The DOT Editor should recognize if an attribute is defined more than once and issue corresponding warnings. Quickfixes should be also provided to remove the redundant attributes and keep only the last one.
Comment 1 Zoey Gerrit Prigge CLA 2018-11-02 11:19:09 EDT
Hi Tamas,

You write the DOT editor should recognize redundant attributes.

I would personally expect this to be flagged by DotJavaValidator (i.e. the dot and not the dot.ui package)?

Do you agree?
Comment 2 Tamas Miklossy CLA 2018-11-02 11:46:42 EDT
Yes, I agree.
Comment 3 Eclipse Genie CLA 2018-11-13 07:40:06 EST
GitHub Pull Request 35 created by [prggz]
https://github.com/eclipse/gef/pull/35
Comment 4 Zoey Gerrit Prigge CLA 2018-11-13 07:46:02 EST
I have created a pull request to implement warnings in DotJavaValidator; there will be a second pull request implementing quick fixes.
Comment 5 Tamas Miklossy CLA 2018-11-17 04:34:36 EST
Thanks for your contribution Zoey, I merged your PR into the master branch.

I also did a small modification after the merge:

[540330] Improve DotJavaValidator checkRedundantAttribute reporting.

- Modify the DotJavaValidator checkRedundantAttribute validation rule to
mark not only the attribute name, but the entire attribute with the
warning marker.
- Adapt the corresponding DotValidatorTests test cases.
Comment 6 Eclipse Genie CLA 2018-11-20 08:27:41 EST
GitHub Pull Request 38 created by [prggz]
https://github.com/eclipse/gef/pull/38
Comment 7 Zoey Gerrit Prigge CLA 2018-11-20 08:33:58 EST
Thank you Tamás for the adaptation (comment #5).

I have provided a pull request for a quickfix to remove a redundant attribute.

From my pov we can close this bug as resolved once the PR is merged.
Comment 8 Tamas Miklossy CLA 2018-11-20 09:38:02 EST
Thanks for your contribution Zoey, I merged your PR into the master branch.

I agree, this issue is done but would not close until the target milestone '5.0.300' can be properly set.
Comment 9 Matthias Wienand CLA 2018-11-30 08:29:23 EST
Thank you for the contribution! I set the target milestone and resolve this ticket as fixed for 5.0.300.