/**
   * Creates the content in the form hosted in this page.
   *
   * @param managedForm the form hosted in this page.
   */
  @Override
  protected void createFormContent(IManagedForm managedForm) {
    super.createFormContent(managedForm);
    ScrolledForm form = managedForm.getForm();
    form.setText("Android Manifest Permissions");
    form.setImage(AdtPlugin.getAndroidLogo());

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

    ElementDescriptor[] descriptorFilters = null;
    if (manifestDescriptor != null) {
      descriptorFilters =
          new ElementDescriptor[] {
            manifestDescriptor.getPermissionElement(),
            manifestDescriptor.getUsesPermissionElement(),
            manifestDescriptor.getPermissionGroupElement(),
            manifestDescriptor.getPermissionTreeElement()
          };
    }
    mTreeBlock =
        new UiTreeBlock(
            mEditor,
            manifest,
            true /* autoCreateRoot */,
            descriptorFilters,
            "Permissions",
            "List of permissions defined and used by the manifest");
    mTreeBlock.createContent(managedForm);
  }
  /** Changes and refreshes the Application UI node handled by the sub parts. */
  public void refreshUiNode() {
    if (mTreeBlock != null) {
      UiElementNode manifest = mEditor.getUiRootNode();
      AndroidManifestDescriptors manifestDescriptor = mEditor.getManifestDescriptors();

      mTreeBlock.changeRootAndDescriptors(
          manifest,
          new ElementDescriptor[] {
            manifestDescriptor.getPermissionElement(),
            manifestDescriptor.getUsesPermissionElement(),
            manifestDescriptor.getPermissionGroupElement(),
            manifestDescriptor.getPermissionTreeElement()
          },
          true /* refresh */);
    }
  }