[jbosstools-issues] [JBoss JIRA] (JBIDE-10104) VPE does not open css file if the style is not on the first place
Viacheslav Kabanovich (Commented) (JIRA)
jira-events at lists.jboss.org
Fri Nov 4 20:59:45 EDT 2011
[ https://issues.jboss.org/browse/JBIDE-10104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640527#comment-12640527 ]
Viacheslav Kabanovich commented on JBIDE-10104:
-----------------------------------------------
Class CSSClassHyperlink invokes Arrays.binarySearch(String[] styleWords, String styleName, Comparator); to look for styleName among styleWords. Comments to 'binarySearch' method mention that array is supposed to be ordered with the same comparator. The fix is easy enough to be done for 3.3.0.Beta1.
There is one more case, which requires to improve CSSClassHyperlink.COMPARE_CLASS_REGEX_PREFIX regular expression.
EXECUTE: Create style
{code}
p[id="111"].style1 {background: blue; font-size: 30}
{code}
EXECUTE: Create html
{code}
<p id="111" class="style1">abc1</p>
{code}
ASSERT: Open-on opens the style p[id="111"].style1.
And because this is context-dependent style, it should be implemented taking into account attribute values:
EXECUTE: Create html
{code}
<p id="112" class="style1">abc1</p>
{code}
ASSERT: Open-on does not opens the style p[id="111"].style1.
That last case should be considered as new feature request.
Also, if there are several declarations
{code}
p .style1 {background: blue; font-size: 30}
div .style1 {background: yellow; font-size: 30}
{code}
search should be implemented taking into account parents of node specifying class='style1'.
Simple matching that we have will always open the first declaration which may be irrelevant.
However, I would also separated that as a feature request.
> VPE does not open css file if the style is not on the first place
> -----------------------------------------------------------------
>
> Key: JBIDE-10104
> URL: https://issues.jboss.org/browse/JBIDE-10104
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: jsp/jsf/xml source editing
> Affects Versions: 3.3.0.M4
> Reporter: Vitali Yemialyanchyk
> Assignee: Victor Rubezhny
> Fix For: 3.3.x
>
>
> I've find next problem, when open style by Ctrl+Lmouse click:
> a) try to open "style1" in <div class="style1"> - it works correctly;
> b) try to open "style2" in <div class="style2"> - it does not work;
> I've try to investigate and find for case (b) in somefile.css we have next definition:
> .event .evt_sub .style2 {float:left; margin-right:10px}
> .event .evt_sub .style2 strong{display: inline-block; width: 51px;}
> .event .evt_sub .style2 span{border-right:1px solid #ccc;padding-right:7px;margin-right:7px}
> if we change it to:
> .style2 .event .evt_sub {float:left; margin-right:10px}
> .style2 .event .evt_sub strong{display: inline-block; width: 51px;}
> .style2 .event .evt_sub span{border-right:1px solid #ccc;padding-right:7px;margin-right:7px}
> in case (b) open functionality start to work correctly.
> So VPE can not open css file, if the style is not on the first place.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list