New functionalities for the AuthorPersistentHighlighter
Posted: Thu Aug 16, 2012 11:32 am
Hi,
In our Eclipse RCP client we currently use your ro.sync.ecss.extensions.api.highlights.AuthorPersistentHighlighter to highlight certain XML tags.
For the rendering a ro.sync.ecss.extensions.api.highlights.ColorHighlightPainter in the ro.sync.ecss.extensions.api.highlights.PersistentHighlightRenderer is used.
Would it be possible to add some functionalities?
We´d like to have a possibility to draw a border around the XML tags, which should be highlighted and add some text before and after the hightlighted XML tag.
It would be nice, if the ColorHighlightPainter would have setBorder(BorderInformation borderInfo) method in order to draw a border around the Highlighted XML tag.
The PersistentHighlightRenderer has a getTooltip method.
Maybe you could add a getTextBefore(AuthorPersistentHighlight highlight); and a getTextAfter(AuthorPersistentHighlight highlight);
An even better approach would be the possibility to customise the the highlight via CSS, so that it is up to the user how to style a Highlight.
I imagine something like this :
In this forum post Radu mentions something similar for PIs : http://www.oxygenxml.com/forum/topic6949.html#p21688
Maybe oxy|highlights could be implemented in a similar way...
Looking forward for your feedback according to this feature request.
Best regards,
Simon
In our Eclipse RCP client we currently use your ro.sync.ecss.extensions.api.highlights.AuthorPersistentHighlighter to highlight certain XML tags.
For the rendering a ro.sync.ecss.extensions.api.highlights.ColorHighlightPainter in the ro.sync.ecss.extensions.api.highlights.PersistentHighlightRenderer is used.
Would it be possible to add some functionalities?
We´d like to have a possibility to draw a border around the XML tags, which should be highlighted and add some text before and after the hightlighted XML tag.
It would be nice, if the ColorHighlightPainter would have setBorder(BorderInformation borderInfo) method in order to draw a border around the Highlighted XML tag.
The PersistentHighlightRenderer has a getTooltip method.
Maybe you could add a getTextBefore(AuthorPersistentHighlight highlight); and a getTextAfter(AuthorPersistentHighlight highlight);
An even better approach would be the possibility to customise the the highlight via CSS, so that it is up to the user how to style a Highlight.
I imagine something like this :
Code: Select all
oxy|highlights[kgu-custom='validblock']:before
{
color : #CD2626 ;
content : "Start - valid for ["attr(valid)"]";
display : block;
margin-bottom : 5px;
}
oxy|highlights[kgu-custom='validblock']
{
padding : 5px;
border: dashed 0.5px #CD2626;
}
oxy|highlights[kgu-custom='validblock']:after {
color : #CD2626 ;
margin-top : 5px;
content : "End - valid for ["attr(valid)"]";
display : block;
}
Maybe oxy|highlights could be implemented in a similar way...
Looking forward for your feedback according to this feature request.
Best regards,
Simon