Mercurial > hg > de.codedo.java.editor
view src/de/codedo/java/editor/ToggleEditorIconHandler.java @ 9:935df68696c0 default tip
Reflection Code in eigene Klasse verschoben.
author | Dirk Olmes <dirk.olmes@codedo.de> |
---|---|
date | Thu, 15 Oct 2020 12:05:06 +0200 |
parents | f7d908568cfc |
children |
line wrap: on
line source
package de.codedo.java.editor; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.handlers.HandlerUtil; public class ToggleEditorIconHandler extends AbstractHandler { @Override public Object execute(ExecutionEvent event) throws ExecutionException { IEditorPart editorPart = HandlerUtil.getActiveEditor(event); if (editorPart instanceof CodedoJavaEditor) { CodedoJavaEditor editor = (CodedoJavaEditor)editorPart; editor.toggleTitleImage(); } return null; } }