Search in sources :

Example 1 with TextZoomInHandler

use of org.eclipse.ui.texteditor.TextZoomInHandler in project eclipse.platform.text by eclipse.

the class AbstractTextZoomHandlerTest method assertZoomSupported.

private void assertZoomSupported(Object receiver, boolean expectedEnabled) {
    TextZoomInHandler textZoomHandler = new TextZoomInHandler();
    EvaluationContext evaluationContext = new EvaluationContext(null, new Object());
    evaluationContext.addVariable(ISources.ACTIVE_EDITOR_NAME, receiver);
    textZoomHandler.setEnabled(evaluationContext);
    boolean actualEnabled = textZoomHandler.isEnabled();
    assertEquals(expectedEnabled, actualEnabled);
}
Also used : TextZoomInHandler(org.eclipse.ui.texteditor.TextZoomInHandler) EvaluationContext(org.eclipse.core.expressions.EvaluationContext)

Aggregations

EvaluationContext (org.eclipse.core.expressions.EvaluationContext)1 TextZoomInHandler (org.eclipse.ui.texteditor.TextZoomInHandler)1