PermissionPagepublic final class PermissionPage extends org.eclipse.ui.forms.editor.FormPage
Fields Summary |
---|
public static final String | PAGE_IDPage id used for switching tabs programmatically | com.android.ide.eclipse.editors.manifest.ManifestEditor | mEditorContainer editor | private com.android.ide.eclipse.editors.ui.tree.UiTreeBlock | mTreeBlock |
Methods Summary |
---|
protected void | createFormContent(org.eclipse.ui.forms.IManagedForm managedForm)Creates the content in the form hosted in this page.
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);
| public void | refreshUiNode()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.getPermissionElement(),
manifestDescriptor.getUsesPermissionElement(),
manifestDescriptor.getPermissionGroupElement(),
manifestDescriptor.getPermissionTreeElement()
},
true /* refresh */);
}
|
|