Eclipse context help through Eclipse’s help button

As mentioned in my previous article there is a third alternative for providing context help. This is also the most simple of all. On your wizard page class all you have to do is overriding the method performHelp:

public void performHelp(){
	String contextHelpID = "ch.sahits.phpclassgenerator.filename";
	getShell().setData(ECLIPSE_HELP,contextHelpID);
	PlatformUI.getWorkbench().getHelpSystem().displayHelp(contextHelpID);
}

You will notice that this is the same code as in the widgetSelected method.

Schreibe einen Kommentar