org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetPresentationsManager.java
changeset 460 c0bff5ed874c
parent 457 f1087591ff71
equal deleted inserted replaced
459:c278f0c8917f 460:c0bff5ed874c
    32     private Map<IDeploymentTargetType, IConfigurationElement> presentations;
    32     private Map<IDeploymentTargetType, IConfigurationElement> presentations;
    33 
    33 
    34     public ITargetDetailsPane createDetailsPane(IDeploymentTargetType targetType) {
    34     public ITargetDetailsPane createDetailsPane(IDeploymentTargetType targetType) {
    35         readRegistry();
    35         readRegistry();
    36         final IConfigurationElement element = presentations.get(targetType);
    36         final IConfigurationElement element = presentations.get(targetType);
    37         if (element != null && element.getAttribute("detailsPane") == null) {
    37         if (element != null && element.getAttribute("detailsPane") != null) {
    38             try {
    38             try {
    39                 return (ITargetDetailsPane) element.createExecutableExtension("detailsPane");
    39                 return (ITargetDetailsPane) element.createExecutableExtension("detailsPane");
    40             } catch (CoreException e) {
    40             } catch (CoreException e) {
    41                 MTWCoreUI.log(e);
    41                 MTWCoreUI.log(e);
    42             }
    42             }
    48         if (presentations == null) {
    48         if (presentations == null) {
    49             presentations = new HashMap<IDeploymentTargetType, IConfigurationElement>();
    49             presentations = new HashMap<IDeploymentTargetType, IConfigurationElement>();
    50             final IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(
    50             final IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(
    51                     MTWCoreUI.PLUGIN_ID, "targetPresentation");
    51                     MTWCoreUI.PLUGIN_ID, "targetPresentation");
    52             for (IConfigurationElement element : elements) {
    52             for (IConfigurationElement element : elements) {
    53                 final String runtimeId = element.getAttribute("targetId");
    53                 final String runtimeId = element.getAttribute("targetTypeId");
    54                 final IDeploymentTargetType targetType = MTWCoreUI.getDefault().getDeploymentTypesRegistry()
    54                 final IDeploymentTargetType targetType = MTWCoreUI.getDefault().getDeploymentTypesRegistry()
    55                         .getType(runtimeId);
    55                         .getType(runtimeId);
    56                 if (targetType == null) {
    56                 if (targetType == null) {
    57                     MTWCoreUI.log("Runtime %s was not found. It is referenced from plugin %s", runtimeId, element
    57                     MTWCoreUI.log("Runtime %s was not found. It is referenced from plugin %s", runtimeId, element
    58                             .getContributor().getName());
    58                             .getContributor().getName());