FileDocCategorySizeDatePackage
ManifestEditorContributor.javaAPI DocAndroid 1.5 API4049Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.editors.manifest

ManifestEditorContributor

public final class ManifestEditorContributor extends org.eclipse.ui.part.MultiPageEditorActionBarContributor
Manages the installation/deinstallation of global actions for multi-page editors. Responsible for the redirection of global actions to the active editor. Multi-page contributor replaces the contributors for the individual editors in the multi-page editor. TODO: Doesn't look like we need this. Remove it if not needed.
deprecated

Fields Summary
private org.eclipse.ui.IEditorPart
mActiveEditorPart
Constructors Summary
private ManifestEditorContributor()
Creates a multi-page contributor. Marked as Private so it can't be instanciated. This is a cheap way to make sure it's not being used. As noted in constructor, should be removed if not used.

deprecated

        super();
    
Methods Summary
protected org.eclipse.jface.action.IActiongetAction(org.eclipse.ui.texteditor.ITextEditor editor, java.lang.String actionID)
Returns the action registed with the given text editor.

return
IAction or null if editor is null.

        return (editor == null ? null : editor.getAction(actionID));
    
public voidsetActivePage(org.eclipse.ui.IEditorPart part)

        if (mActiveEditorPart == part)
            return;

        mActiveEditorPart = part;

        IActionBars actionBars = getActionBars();
        if (actionBars != null) {

            ITextEditor editor =
                (part instanceof ITextEditor) ? (ITextEditor)part : null;

            actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(),
                    getAction(editor, ITextEditorActionConstants.DELETE));
            actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(),
                    getAction(editor, ITextEditorActionConstants.UNDO));
            actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(),
                    getAction(editor, ITextEditorActionConstants.REDO));
            actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(),
                    getAction(editor, ITextEditorActionConstants.CUT));
            actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(),
                    getAction(editor, ITextEditorActionConstants.COPY));
            actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(),
                    getAction(editor, ITextEditorActionConstants.PASTE));
            actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(),
                    getAction(editor, ITextEditorActionConstants.SELECT_ALL));
            actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(),
                    getAction(editor, ITextEditorActionConstants.FIND));
            actionBars.setGlobalActionHandler(
                    IDEActionFactory.BOOKMARK.getId(), getAction(editor,
                            IDEActionFactory.BOOKMARK.getId()));
            actionBars.updateActionBars();
        }