CodeEvaluator
class added.
+ CodeEvaluator
class introduced
+ to access and manage a component for code evaluations
+ and handle it's result.
+
true
when code evaluation is possible (e.g. the debugger is suspended),
+ * false
otherwise.
+ */
+ public abstract boolean canEvaluate();
+
+ /**
+ * Evaluate the given expression.
+ * The evaluation typically should be performed asynchronously, and the
+ * result is then set to {@link Result} or any other custom result handler.
+ * @param expression The expression to evaluate.
+ */
+ public abstract void evaluate(String expression);
+
+ /**
+ * Get the historical evaluated expressions. Items provided by this list
+ * are accessible from the code evaluator UI.
+ * @return The list of evaluated expressions.
+ */
+ public abstract ListTopComponent
(singleton) */
+ TopComponent instance = WindowManager.getDefault().findTopComponent("resultsView"); // NOI18N [TODO]
+ // Can be null
+ return instance;
+ }
+
+ private void fireResultChange(R result) {
+ for (Listener