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: | Double click selection differs in different source types | ||
---|---|---|---|
Product: | editor | Reporter: | randahl <randahl> |
Component: | -- Other -- | Assignee: | Milutin Kristofic <mkristofic> |
Status: | REOPENED --- | ||
Severity: | blocker | CC: | issues, jchalupa, mariusz_m, pkuzel, slmark |
Priority: | P3 | ||
Version: | Dev | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
randahl
2004-12-06 09:51:08 UTC
Certainly not a P1. IDE doesn't crash, no data is lost. Please use bug priorities judiciously. NB editor infrastructure allows to accept/reject particular characters such as dot as part of the selected word. I think that it makes sense either way so it could possibly be made customizable. Passing to xml module for further evaluation. Mila what acceptor do you mean? I can see just IDENTIFIER_ACCEPTOR and it's defined by XML specs: NameChar [4]. Simply XML identifies != Java identifiers. It cannot be addressed at XML side without breaking IdentifierAcceptor contract. I discussed with Mila and propose editor infrastructure enhancement. It sould treat acceptors in different way. There should be array of acceptors: e.g. naturalLanguageWord, identifierAcceptor, naturalLanguageSentence, statementAcceptor, line, paragraph, whole file... Then on first double click editor chooses shortest region and shows it, on next click extending to next shortest region, ... For Java it means (| denotes caret): Object o = loo|kup.lookup(Class); // example 1: lookup = word and identifier 2: lookup.lookup(Class); = statement 3: Object o = lookup. = sentence (strange out-side comment) 4: Object o = lookup.lookup(Class); // example = line for XML: <x|ml.type inherit-"all"/> <!-- example --> 1: xml = word 2: xml.type = identifier 3: <xml.type inherit-"all"/> = statement 4: <xml.type inherit-"all"/> <!-- example --> = line Randhal does it match your expectation? I'm wondering if more than three levels of selection isn't too much especially when being triggered by mouse. IMHO when three-clicking by mouse it should be clear what each next click will select prior doing so. I would personally stay with up to three-click: 1.click - position mouse 2.click - select word (depends what 'word' means in each language) 3.click - select line Regarding exteding of the selection depending on syntactic elements there already is SelectCodeElementAction implemented for java. It could be added for other mime-types as well. Hi All. I faced with the same problem using Smarty & PHP Double click on e.g. S_MY_STRING in PHP trigger selection of the whole string, while in Smarty only substring before/after underscore is selected, e.g. clickin on R letter will select only STRING. S_MY_ will be not selected. Thank, Slava. This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss (In reply to Martin Balin from comment #7) > This old bug may not be relevant anymore. If you can still reproduce it in > 8.2 development builds please reopen this issue. > > Thanks for your cooperation, > NetBeans IDE 8.2 Release Boss This default notepad-like selection behavior in PROGRAMMERS editor where underscores are common identifier element becomes annoying after so many years the issue was opened. Great, inteligent behavior in C++, primitive in Bash/Cmake/Text/(others). I understand the expected double-click handling should be different for certain languages, but if not specified explicitly, support at least these MY_LOCAL_NAME form. Intelligent selection of text in single/doble quotes also will be appreciated :) |