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.

Bug 245626 - Help Button for Code Completion does nothing but beeps
Summary: Help Button for Code Completion does nothing but beeps
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Options (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
: 253779 (view as bug list)
Depends on: 253857
Blocks:
  Show dependency tree
 
Reported: 2014-07-13 23:28 UTC by MackSix
Modified: 2015-07-29 01:29 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2014-07-13 23:28:25 UTC
1. Goto Tools>>Options>>Editor>>Code Completion and click the Help Button.

Results: PC Beeps and nothing else happens.

Expected: "Editor Options: Code Completion" of HELP opens up.

Product Version: NetBeans IDE Dev (Build 201407090001)
Java: 1.8.0_05; Java HotSpot(TM) 64-Bit Server VM 25.5-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_05-b13
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 Milutin Kristofic 2014-07-14 14:38:23 UTC
It works on

Product Version: NetBeans IDE Dev (Build 201407010002)
Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 3
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08

Maybe java 8 bug.
Comment 2 MackSix 2014-07-14 15:45:02 UTC
(In reply to Milutin Kristofic from comment #1)
> It works on
> 
> Product Version: NetBeans IDE Dev (Build 201407010002)
> Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 3
> Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
> 
> Maybe java 8 bug.

I found after deleting userdir, it works for me. This is the steps that cause it:

1. Goto: Tools>>Options>>Editor>>Code Completion>>Language:Java and add a,b,c to "Packages/classes" Excludes.
2. Click Apply Button.
3. Click Help Button.

Results: Just a Beep.


Workaround: Restart NetBeans and Help works again.
Comment 3 Theofanis Oikonomou 2014-07-15 15:06:11 UTC
I can also reproduce in latest build. I think the problem lies in org.netbeans.modules.options.editor.completion.CodeCompletionOptionsPanelController.getHelpCtx()

when Apply button is pressed the getHelpCtx method is called and fetches the help context for the selected customizer. In Java's case "netbeans.optionsDialog.editor.codeCompletion.java" is returned as the context's id. The same id is returned also in HTML's case, which is weird.

In any case you either need to create some help context to link to each customizer's id or return the same context as is return for "All languages"

re-assigning back to evaluate the best solution. Thanks
Comment 4 Milutin Kristofic 2014-08-08 12:47:16 UTC
1, Problem with wrong help ID
Fanis, I am surprised that Help ID is preloaded, so getHelpCtx is called when switching tabs or using apply, but not when you press help button.

How can I change which help ID is shown when user changes Language in ComboBox?
Comment 5 Milutin Kristofic 2014-08-08 12:50:00 UTC
2, Problem with non functional help button:

Fanis, you are right, if I rewrote getHelpCtx to return always same CTX, the help works always. 


But, how to fix problem 1?
Comment 6 Theofanis Oikonomou 2014-08-19 12:47:02 UTC
If you decide to implement the solution from comment 5 you do not need to fix issue from comment 4. The help shown currently though for code completion contains info for All languages, Java, Html, Php and C/C++ controls. I would suggest to ask doc team to modify help shown to also include controls for JSON and Javascript.

(In reply to Milutin Kristofic from comment #4)
> 1, Problem with wrong help ID
> Fanis, I am surprised that Help ID is preloaded, so getHelpCtx is called
> when switching tabs or using apply, but not when you press help button.
> 
> How can I change which help ID is shown when user changes Language in
> ComboBox?

In any case, when user changes language you can call pcs.firePropertyChange(PROP_HELP_CTX, null, null). This will force options.api to query CodeCompletionOptionsPanelController for the correct HelpCtx, thus giving you the chance to return the correct ctx id.
Comment 7 Milutin Kristofic 2015-07-27 12:13:24 UTC
*** Bug 253779 has been marked as a duplicate of this bug. ***
Comment 8 Milutin Kristofic 2015-07-27 13:30:32 UTC
Fanis,

I was testing pcs.firePropertyChange(DialogDescriptor.PROP_HELP_CTX, null, null); But I probably need access to OptionsDisplayerImpl.OptionsPanelListener. 

I don't see a way how to connect CodeCompletionOptionsPanel with OptionsPanelListener, so OptionsPanelListener will listen on changes.
Comment 9 Milutin Kristofic 2015-07-28 11:16:55 UTC
Ok, userguide suggested one help idx id. So I fixed it with http://hg.netbeans.org/jet-main/rev/ea3cb9991ecb . Other help idx are ignored.
Comment 10 Quality Engineering 2015-07-29 01:29:46 UTC
Integrated into 'main-silver', will be available in build *201507290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ea3cb9991ecb
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #245626 - Help Button for Code Completion does nothing but beeps