FileDocCategorySizeDatePackage
InstrumentationPage.javaAPI DocAndroid 1.5 API3467Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.editors.manifest.pages

InstrumentationPage

public final class InstrumentationPage extends org.eclipse.ui.forms.editor.FormPage
Page for instrumentation settings, part of the AndroidManifest form editor.

Fields Summary
public static final String
PAGE_ID
Page id used for switching tabs programmatically
com.android.ide.eclipse.editors.manifest.ManifestEditor
mEditor
Container editor
private com.android.ide.eclipse.editors.ui.tree.UiTreeBlock
mTreeBlock
Constructors Summary
public InstrumentationPage(com.android.ide.eclipse.editors.manifest.ManifestEditor editor)


       
        super(editor, PAGE_ID, "Instrumentation");  // tab's label, keep it short
        mEditor = editor;
    
Methods Summary
protected voidcreateFormContent(org.eclipse.ui.forms.IManagedForm managedForm)
Creates the content in the form hosted in this page.

param
managedForm the form hosted in this page.

        super.createFormContent(managedForm);
        ScrolledForm form = managedForm.getForm();
        form.setText("Android Manifest Instrumentation");
        form.setImage(AdtPlugin.getAndroidLogo());

        UiElementNode manifest = mEditor.getUiRootNode();
        AndroidManifestDescriptors manifestDescriptor = mEditor.getManifestDescriptors();

        ElementDescriptor[] descriptorFilters = null;
        if (manifestDescriptor != null) {
            descriptorFilters = new ElementDescriptor[] {
                    manifestDescriptor.getInstrumentationElement(),
            };
        }

        mTreeBlock = new UiTreeBlock(mEditor, manifest,
                true /* autoCreateRoot */,
                descriptorFilters,
                "Instrumentation",
                "List of instrumentations defined in the manifest");
        mTreeBlock.createContent(managedForm);
    
public voidrefreshUiNode()
Changes and refreshes the Application UI node handled by the sub parts.

        if (mTreeBlock != null) {
            UiElementNode manifest = mEditor.getUiRootNode();
            AndroidManifestDescriptors manifestDescriptor = mEditor.getManifestDescriptors();

            mTreeBlock.changeRootAndDescriptors(manifest,
                    new ElementDescriptor[] {
                        manifestDescriptor.getInstrumentationElement()
                    },
                    true /* refresh */);
        }