[ https://issues.apache.org/jira/browse/NETBEANS-4460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17499536#comment-17499536 ]
Junhao Liao commented on NETBEANS-4460: --------------------------------------- [~lkishalmi] Thanks for your response! I agree fixing it in the C/C++ module will be the easiest. However, the module is no longer maintained since NetBeans 8.2. Upon further investigation, I found the exception was raised because the return type of `[image2Icon|https://github.com/apache/netbeans/blob/3dfe01225c66a7b6438801621b4d111f946e64b5/platform/openide.util.ui/src/org/openide/util/ImageUtilities.java#L248]` was changed from `ImageIcon` to `TooltipImage`. While the comments explain that the change means to utilize tweaks in rendering icons on HiDPI screens, the change is a little awkward. The method name suggest it converts an image to an icon, but in the end an `Image` is returned. Is there any chance you can change the return type back? If the fix in NetBeans is too much hassle, I can try to fix the C/C++ module and use my own copy. Thanks in advance! Working code from 2018: https://github.com/apache/netbeans/blob/3dfe01225c66a7b6438801621b4d111f946e64b5/platform/openide.util.ui/src/org/openide/util/ImageUtilities.java#L248 Current code: https://github.com/apache/netbeans/blob/ee2ceb2cbdad2ef5c05691c02116f31ea345a7ab/platform/openide.util.ui/src/org/openide/util/ImageUtilities.java#L324 > C++ Code Completion not working > ------------------------------- > > Key: NETBEANS-4460 > URL: https://issues.apache.org/jira/browse/NETBEANS-4460 > Project: NetBeans > Issue Type: Bug > Components: cnd - Code Completion > Affects Versions: 12.0, 11.2, 11.3 > Environment: Windows 10, msys64 > Reporter: Holger Weber > Priority: Major > > Sometimes the Code Completion doesn't work. So creating a derived class and > try to auto complete a constructor just shows "Please wait.." tool tip and a > notification is created. > Part of Log: > SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor > org.netbeans.spi.editor.completion.support.AsyncCompletionTask > java.lang.ClassCastException: org.openide.util.ImageUtilities$ToolTipImage > cannot be cast to java.desktop/javax.swing.ImageIcon > at > org.netbeans.modules.cnd.refactoring.completion.overridemethod.CsmOverrideMethodCompletionItem.<init>(CsmOverrideMethodCompletionItem.java:112) > at > org.netbeans.modules.cnd.refactoring.completion.overridemethod.CsmOverrideMethodCompletionItem.createImplementItem(CsmOverrideMethodCompletionItem.java:139) > at > org.netbeans.modules.cnd.refactoring.completion.overridemethod.CsmOverrideMethodCompletionProvider$Query.getItems(CsmOverrideMethodCompletionProvider.java:242) > at > org.netbeans.modules.cnd.refactoring.completion.overridemethod.CsmOverrideMethodCompletionProvider$Query.query(CsmOverrideMethodCompletionProvider.java:125) > at > org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:198) > at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) > at > org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) > at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) > [catch] at > org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists