1 11 package org.eclipse.ui.texteditor; 12 13 14 15 import java.util.ResourceBundle ; 16 17 18 26 public class RevertToSavedAction extends TextEditorAction { 27 28 39 public RevertToSavedAction(ResourceBundle bundle, String prefix, ITextEditor editor) { 40 super(bundle, prefix, editor); 41 } 42 43 46 public void run() { 47 getTextEditor().doRevertToSaved(); 48 } 49 50 53 public void update() { 54 setEnabled(getTextEditor().isDirty()); 55 } 56 } 57 | Popular Tags |