1 11 package org.eclipse.jdt.internal.ui.propertiesfileeditor; 12 13 import org.eclipse.jface.action.IStatusLineManager; 14 15 import org.eclipse.ui.IActionBars; 16 import org.eclipse.ui.IEditorPart; 17 import org.eclipse.ui.texteditor.ITextEditor; 18 19 import org.eclipse.ui.editors.text.TextEditorActionContributor; 20 21 import org.eclipse.jdt.ui.actions.JdtActionConstants; 22 23 24 29 public class PropertiesFileEditorActionContributor extends TextEditorActionContributor { 30 31 32 35 public void setActiveEditor(IEditorPart part) { 36 super.setActiveEditor(part); 37 38 IActionBars actionBars= getActionBars(); 39 IStatusLineManager manager= actionBars.getStatusLineManager(); 40 manager.setMessage(null); 41 manager.setErrorMessage(null); 42 43 ITextEditor textEditor= null; 44 if (part instanceof ITextEditor) 45 textEditor= (ITextEditor)part; 46 47 actionBars.setGlobalActionHandler(JdtActionConstants.OPEN, getAction(textEditor, JdtActionConstants.OPEN)); 48 } 49 50 53 public void dispose() { 54 setActiveEditor(null); 55 super.dispose(); 56 } 57 } 58 | Popular Tags |