This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | AssertionError: Invalid start:-1 | ||
---|---|---|---|
Product: | javaee | Reporter: | Chiana |
Component: | JSF Editor | Assignee: | Marek Fukala <mfukala> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | Chiana |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 162793 |
Attachments: | stacktrace |
Description
Chiana
2009-11-24 04:41:26 UTC
Created attachment 91592 [details]
stacktrace
Is that issue reproducible? Can you please give a sample code and exact steps to reproduce? I am also little bit confused by your statement that you had to back over the trailing '}' char. The trailing bracket autocompletion should move the caret inside the brackets when you type #{ . Thanks for the feedback. I think the problem lies in the fact that the codecompletion automatically adds the trailing } without checking if there is one before... Here's the setup; have a line that you are tying in a .xhtml <f:button id="knapp" value="testBean.value" style= At that point you realized you forgot the #{} and starts backing towards the first parameter, then you add the "}" when you pass by so the string looks like //<f:button id="knapp" value="testBean.value}" style=// after that you continue to the beginning of the parameter and type #{ and then the autocompletion kicks in and the result looks like //<f:button id="knapp" value="#{}testBean.value" style=// but since that is NOT what you want you need to delete the first } whitch IMHO shouldn't have been there in the first place, perhaps an enhancement would be to scan the string to look for an ending } and then don't insert the }, the editor obviously knows you are inside a quoted string. There is a similar phenomena occuring if you start on the other end (i.e. beginning) but that's another report... Chiana, thanks for the detailed explanation, now it's clear what you ment. However, I am still not able to reproduce the exception. Does it happen to you each time? fixed in web-main#4740f68485be (In reply to comment #4) > Chiana, thanks for the detailed explanation, now it's clear what you ment. > However, I am still not able to reproduce the exception. Does it happen to you > each time? Oh, yes, every time, i normally don't report every time it happens, as that would probable overload bugzilla B-) Can you reproduce it on a new file with just a few necessary lines of code or it is specific to some context? I cannot reproduce following the scenario. What I do is: 1) create a xhtml file 2) put <h:outputText value="blabla"/>| then continue editing according to the description (| denotes caret) 3) <h:outputText value="blabla}|"/> (move caret back and type }) 4) <h:outputText value="${|}blabla}"/> (move caret at the beginning of the attribute value and type { 5) <h:outputText value="#{|blabla}"/> (deleted the first close curly bracket) 6) invoked completion => no exception. Am I doing something wrong? BTW I've fixed the issue just by ignoring the errorneous offset range, but I am curious what is the cause of the problem. Of course I tried the steps before the fix ;-) Thanks for your help. Integrated into 'main-golden', will be available in build *200912010200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/4740f68485be User: Marek Fukala <mfukala@netbeans.org> Log: #177498 - AssertionError: Invalid start:-1 |