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

OverviewInfoPart

public final class OverviewInfoPart extends com.android.ide.eclipse.editors.ui.UiElementPart
Generic info section part for overview page: it displays all the attributes from the manifest element.

Fields Summary
private org.eclipse.ui.forms.IManagedForm
mManagedForm
Constructors Summary
public OverviewInfoPart(org.eclipse.swt.widgets.Composite body, org.eclipse.ui.forms.widgets.FormToolkit toolkit, com.android.ide.eclipse.editors.manifest.ManifestEditor editor)

        super(body, toolkit, editor,
                getManifestUiNode(editor),  // uiElementNode
                "Manifest General Attributes", // section title
                "Defines general information about the AndroidManifest.xml", // section description
                Section.TWISTIE | Section.EXPANDED);
    
Methods Summary
protected voidcreateFormControls(org.eclipse.ui.forms.IManagedForm managedForm)
Overridden in order to capture the current managed form. {@inheritDoc}

        mManagedForm = managedForm; 
        super.createFormControls(managedForm);
    
private static com.android.ide.eclipse.editors.uimodel.UiElementNodegetManifestUiNode(com.android.ide.eclipse.editors.manifest.ManifestEditor editor)
Retrieves the UiElementNode that this part will edit. The node must exist and can't be null, by design, because it's a mandatory node.

        AndroidManifestDescriptors manifestDescriptors = editor.getManifestDescriptors();
        if (manifestDescriptors != null) {
            ElementDescriptor desc = manifestDescriptors.getManifestElement();
            if (editor.getUiRootNode().getDescriptor() == desc) {
                return editor.getUiRootNode();
            } else {
                return editor.getUiRootNode().findUiChildNode(desc.getXmlName());
            }
        }
        
        // No manifest descriptor: we have a dummy UiRootNode, so we return that.
        // The editor will be reloaded once we have the proper descriptors anyway.
        return editor.getUiRootNode();
    
public voidonSdkChanged()
Removes any existing Attribute UI widgets and recreate them if the SDK has changed.

This is called by {@link OverviewPage#refreshUiApplicationNode()} when the SDK has changed.

        setUiElementNode(getManifestUiNode(getEditor()));
        createUiAttributes(mManagedForm);