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

Bug 549412

Summary: DOT Editor - Add hovering support to dot html-like label color attribute values.
Product: [Tools] GEF Reporter: Tamas Miklossy <miklossy>
Component: GEF DOTAssignee: Zoey Gerrit Prigge <eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 5.3.0 (2019-12) RC2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
screenshot about the hover support of dot color attributes none

Description Tamas Miklossy CLA 2019-07-19 02:54:56 EDT
Created attachment 279340 [details]
screenshot about the hover support of dot color attributes

Given is the following dot graph:

graph {
	
	1 [color=red]
		
	2 [label=<
		<FONT COLOR="green" >text</FONT>
	>]
}

The DOT Editor already supports hovering on dot color attribute values (see also the attached screenshot).

This support should be extended to dot html-like label color attribute values.

Hint: the hovering support on dot color attribute values has been added by the commit: https://github.com/eclipse/gef/commit/a3a6969d7a8e52f862aabd8b22e8c770a0d4b87e
Comment 1 Zoey Gerrit Prigge CLA 2019-11-28 03:33:01 EST
I pushed a commit as follows to the master branch 

[549412] Color Hovering in HtmlLikeLabels

- moved Color hover htmlInfo calculation to from DotHoverProvider to new
DotHoverUtils for reuse.
- new DotSourceViewerConfiguration to allow for partition based
ITextHover
- new DotHtmlLabelAdaptingTextHover for use as ITextHover for Html-label
partition
- new DotHtmlLabelHoverFakeSourceViewer to be passed as dummy to
subgrammar hover for XtextDocument extraction only.
- DotHtmlLabelSubgrammarEObjectHover and
DotHtmlLabelSubgrammarHoverProvider for subgrammar internal hovering
support
- Included new classes in DotHtmlLabelUiModule and DotUiModule
- Included corresponding DotHoverTest cases
- changed DotHoverTest logic to use partitioning from
DotSourceViewerConfiguration


This should implement the wished for additions.

Closing this bug as Resolved/Fixed in 5.3.0 (2019-12) RC1.
Comment 2 Tamas Miklossy CLA 2019-11-28 05:13:35 EST
I have just updated to the latest version and it works as desired!

Nice work! Thank you very much for your contribution, Zoey!
Comment 3 Zoey Gerrit Prigge CLA 2019-12-05 04:49:41 EST
I pushed the following fix to the master branch and changed the target to RC2.

[549412] Fixup RGB colors and space between attributes

-Exception occurred when hovering over empty space between
HTML-attributes
-RGB colors in Html-like labels were displayed quoted in hover
-Fixed both issues and added corresponding tests to DotHoverTest

Signed-off-by: zprigge <zprigge@itemis.com>
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=549412