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.
C/C++ operator name can include characters: space, []+-()&*=<>|:!~^/% For example valid operators names: operator * operator & operator < operator > As result GoTo Symbol has several bugs: 1. Wrong display name of operator "operator &" in search results. In table operators shows as "operator &...." 2. Impossible to select "operator *" 3. There is no bold selection for operators: "operator =", "operator >", "operator <" , "operator ->" and other that include ">", "<" or "=".
Operator is not a symbol. The []() are filtered in Vladimir's NameMatcherFactory (http://hg.netbeans.org/releases/file/b6fa2a485438/jumpto/src/org/netbeans/spi/jumpto/support/NameMatcherFactory.java) The space is definitely not a valid input in Go To Symbol but it can be a valid symbol name if your SymbolDescriptor implements getSimpleName method. The others seems problem with HtmlRenderer
Hi Alexander! In which module is the c/c++ SymbolProvider implementation? I will need to change it to resolve this issue. Thanks
(In reply to Tomas Zezula from comment #2) > Hi Alexander! > In which module is the c/c++ SymbolProvider implementation? > I will need to change it to resolve this issue. > Thanks Hi Tomas, It is: cnd-main/cnd.gotodeclaration/src/org/netbeans/modules/cnd/gotodeclaration/symbol/CppSymbolProvider.java Alexander
I've fixed the following parts of the issue: 1) Wrong display name of the operators 2) Match highlighting does not work for operators. The last problem is with operator * but it cannot be fixed in generic infrastructure as * is treated as regexp and only CND knows that "operator *" has different meaning. The CppSymbolProvider gets: request { text: "operator *", searchType: "CASE_INSENSITIVE_REGEXP" } so it can special case this input and change the request into: request { text: "operator *", searchType: "CASE_INSENSITIVE_PREFIX" } and it should fix the problem. The jumpto parts fixed.
Created attachment 154447 [details] Proposed patch Patch special casing operator *