To get more information on classes from the com.jprofiler.api.* packages, please choose Help->Show Javadoc Overview from the menu and read the the help topic on custom probes.
A number of packages can be used without using fully-qualified class names. Those packages are:
You can put a number of import statements as the first lines in the text area in order to avoid using fully qualified class names.
All scripts are passed an instance of com.jprofiler.api.agent.ScriptContext that allows you to save state between successive invocations of the script.
Example: object.toString().contains("test")
The above example would work as a filter script in the outgoing reference view of the heap walker.
Example: data[0] = ((Integer)probeContext.getMap().remove("myCount")).intValue();
The above example would work as the telemetry script in a custom probe configuration.
CTRL-Space
brings up a popup with code completion proposals. Also, typing
a dot (".") shows this popup after a delay if no other character is typed.
While the popup is displayed, you can continue to type or delete characters with Backspace
and
the popup will be updated accordingly. "Camel-hump completion" is supported, i.e.
typing NPE and
hitting CTRL-Space
will propose NullPointerException among other classes.
If you accept a class that is not automatically imported, the fully qualified name
will be inserted.
The completion popup can suggest:
You can configure code completion behavior in the Editor Settings.
Parameter classes that are neither contained in the configured session class path
nor in the configured JDK are marked as [unresolved]
and are changed to the generic java.lang.Object
type. To get code completion for these parameters,
add the missing JAR files to the session class path.
The status indicator at the top of the right gutter is
You can configure the threshold for problem analysis in the Editor Settings.
SHIFT-F1
opens the browser at the Javadoc page that describes the element at the cursor
position. If no corresponding Javadoc can be found, a warning message is displayed.
Javadoc for the
Java runtime library can only be displayed if a JDK is configured for the session
and a valid Javadoc location is specified in the JDK settings.