}
/**
- * This is a callback that will allow us
- * to create the viewer and initialize it.
+ * Initializes the view
*/
public void createPartControl(Composite parent) {
browser = new Browser(parent, SWT.NONE);
}
}
- private void showReference(final String occurrence) {
- System.out.println("Show reference for " + occurrence);
+ /**
+ * Updates the browser with the reference page for a given function
+ *
+ * @param funcName Function name
+ */
+ private void showReference(final String funcName) {
+ System.out.println("Show reference for " + funcName);
new Thread(new Runnable() {
public void run() {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
- String html = getHtmlSource(occurrence);
+ String html = getHtmlSource(funcName);
browser.setText(html);
}
});
}
/**
- * Looks for the function's reference page inside the doc.zip file and
- * returns a filtered HTML source of it
- * @param funcName Function name
+ * Filters the function's reference page extracting only parts of it
+ *
+ * @param source HTML source of the reference page
* @return HTML source of reference page
*/
private String filterHtmlSource(String source) {
}
/**
- * Looks for the function's reference page inside the doc.zip file and
- * returns a filtered HTML source of it
+ * Reads the template that defines the style of the reference page
+ * shown inside the view's browser
+ *
* @param funcName Function name
* @return HTML source of reference page
*/
}
/**
- * Looks for the function's reference page inside the doc.zip file and
- * returns a filtered HTML source of it
+ * Looks for the function's reference page inside the doc.zip file
+ * and returns a filtered HTML source of it embedded in the template
+ *
* @param funcName Function name
* @return HTML source of reference page
*/