Mercurial > hg > de.codedo.java.editor
view src/de/codedo/java/editor/ToggleEditorIconHandler.java @ 6:6287f5e469f1
Reset the title image when an editor is closed.
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Mon, 07 Sep 2015 14:42:44 +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; } }