Targets presentation can be customized
authorEugene Ostroukhov <eugeneo@symbian.org>
Wed, 28 Jul 2010 15:43:33 -0700
changeset 457 f1087591ff71
parent 456 12b549765c34
child 458 5ff93668b08c
Targets presentation can be customized
org.symbian.tools.mtw.ui/plugin.xml
org.symbian.tools.mtw.ui/schema/targetPresentation.exsd
org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DefaultDeploymentTypePresentation.java
org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeployWizardContext.java
org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentSummaryWizardPage.java
org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetPresentationsManager.java
org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetTypeDescriptor.java
org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetTypesRegistry.java
org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetWizardPage.java
org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetWrapper.java
org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/MTWCoreUI.java
org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/ProjectMemo.java
org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/IDeploymentTarget.java
org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/ITargetDetailsPane.java
org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/bluetooth/BluetoothTarget.java
--- a/org.symbian.tools.mtw.ui/plugin.xml	Wed Jul 28 14:07:39 2010 -0700
+++ b/org.symbian.tools.mtw.ui/plugin.xml	Wed Jul 28 15:43:33 2010 -0700
@@ -2,6 +2,7 @@
 <?eclipse version="3.4"?>
 <plugin>
    <extension-point id="deploymentTargetType" name="Provides targets for project deployments" schema="schema/deploymentTargetType.exsd"/>
+   <extension-point id="targetPresentation" name="Deployment Target Presentation" schema="schema/targetPresentation.exsd"/>
 	<!-- Navigator Extensions -->
 	<extension point="org.eclipse.ui.navigator.viewer">
 	  <viewerActionBinding
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.mtw.ui/schema/targetPresentation.exsd	Wed Jul 28 15:43:33 2010 -0700
@@ -0,0 +1,109 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.symbian.tools.mtw.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appinfo>
+         <meta.schema plugin="org.symbian.tools.mtw.ui" id="targetPresentation" name="Deployment Target Presentation"/>
+      </appinfo>
+      <documentation>
+         Provides UI extensions to customize deployment target presentation.
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appinfo>
+            <meta.element />
+         </appinfo>
+      </annotation>
+      <complexType>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="targetPresentation">
+      <complexType>
+         <attribute name="targetId" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="identifier" basedOn="org.symbian.tools.mtw.core.runtimes/runtime/@id"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="detailsPane" type="string">
+            <annotation>
+               <documentation>
+                  Details pane that will show information about selected deployment target. This pane is limited in height.
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="java" basedOn=":org.symbian.tools.mtw.ui.deployment.ITargetDetailsPane"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="since"/>
+      </appinfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="examples"/>
+      </appinfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="apiinfo"/>
+      </appinfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="implementation"/>
+      </appinfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DefaultDeploymentTypePresentation.java	Wed Jul 28 15:43:33 2010 -0700
@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Symbian Foundation - initial contribution.
+ * Contributors:
+ * Description:
+ * Overview:
+ * Details:
+ * Platforms/Drives/Compatibility:
+ * Assumptions/Requirement/Pre-requisites:
+ * Failures and causes:
+ */
+package org.symbian.tools.mtw.internal.deployment;
+
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget;
+import org.symbian.tools.mtw.ui.deployment.ITargetDetailsPane;
+
+public class DefaultDeploymentTypePresentation implements ITargetDetailsPane {
+    private Text text;
+
+    public void init(IWizardPage page) {
+    }
+
+    public void setTarget(IDeploymentTarget target) {
+        text.setText(target.getDescription());
+    }
+
+    public void createControl(Composite parent) {
+        text = new Text(parent, SWT.BORDER | SWT.MULTI | SWT.READ_ONLY);
+    }
+
+    public Control getControl() {
+        return text;
+    }
+}
--- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeployWizardContext.java	Wed Jul 28 14:07:39 2010 -0700
+++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeployWizardContext.java	Wed Jul 28 15:43:33 2010 -0700
@@ -26,6 +26,7 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.SubProgressMonitor;
 import org.symbian.tools.mtw.core.projects.IMTWProject;
+import org.symbian.tools.mtw.ui.MTWCoreUI;
 
 public class DeployWizardContext {
     private DeploymentTargetWrapper target;
@@ -49,7 +50,7 @@
     }
 
     public DeploymentTargetWrapper[] getDeploymentTargets() {
-        final DeploymentTargetTypeDescriptor[] providers = DeploymentTargetTypesRegistry.getInstance()
+        final DeploymentTargetTypeDescriptor[] providers = MTWCoreUI.getDefault().getDeploymentTypesRegistry()
                 .getProviders();
         Collection<DeploymentTargetWrapper> targets = new HashSet<DeploymentTargetWrapper>();
 
@@ -62,7 +63,7 @@
     }
 
     public void doSearch(IProgressMonitor monitor) throws CoreException {
-        final DeploymentTargetTypeDescriptor[] providers = DeploymentTargetTypesRegistry.getInstance()
+        final DeploymentTargetTypeDescriptor[] providers = MTWCoreUI.getDefault().getDeploymentTypesRegistry()
                 .getProviders();
         monitor.beginTask("Discovering deployment targets", providers.length * 10);
         for (DeploymentTargetTypeDescriptor descriptor : providers) {
@@ -72,7 +73,7 @@
     }
 
     public boolean areTargetsReady() {
-        final DeploymentTargetTypeDescriptor[] providers = DeploymentTargetTypesRegistry.getInstance()
+        final DeploymentTargetTypeDescriptor[] providers = MTWCoreUI.getDefault().getDeploymentTypesRegistry()
                 .getProviders();
         for (DeploymentTargetTypeDescriptor descriptor : providers) {
             if (!descriptor.targetsDiscovered()) {
--- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentSummaryWizardPage.java	Wed Jul 28 14:07:39 2010 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Symbian Foundation - initial contribution.
- * Contributors:
- * Description:
- * Overview:
- * Details:
- * Platforms/Drives/Compatibility:
- * Assumptions/Requirement/Pre-requisites:
- * Failures and causes:
- */
-package org.symbian.tools.mtw.internal.deployment;
-
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
-
-public class DeploymentSummaryWizardPage extends WizardPage {
-    private StringBuilder buffer = new StringBuilder(1000);
-    private Text log;
-
-    public DeploymentSummaryWizardPage() {
-        super("deploy");
-        setTitle("WRT Application Deployment");
-        setDescription("Please wait while deployment is in progress");
-    }
-
-    public void createControl(Composite parent) {
-        log = new Text(parent, SWT.BORDER | SWT.MULTI | SWT.READ_ONLY | SWT.WRAP);
-        setControl(log);
-    }
-
-    public void log(String line) {
-        synchronized (buffer) {
-            buffer.append(line).append("\n");
-        }
-        log.getDisplay().asyncExec(new Runnable() {
-            public void run() {
-                synchronized (buffer) {
-                    log.setText(buffer.toString());
-                }
-            }
-        });
-    }
-
-    public void clear() {
-        log.setText("");
-        buffer = new StringBuilder();
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetPresentationsManager.java	Wed Jul 28 15:43:33 2010 -0700
@@ -0,0 +1,66 @@
+/**
+ * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Symbian Foundation - initial contribution.
+ * Contributors:
+ * Description:
+ * Overview:
+ * Details:
+ * Platforms/Drives/Compatibility:
+ * Assumptions/Requirement/Pre-requisites:
+ * Failures and causes:
+ */
+package org.symbian.tools.mtw.internal.deployment;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.symbian.tools.mtw.ui.MTWCoreUI;
+import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType;
+import org.symbian.tools.mtw.ui.deployment.ITargetDetailsPane;
+
+public class DeploymentTargetPresentationsManager {
+    private Map<IDeploymentTargetType, IConfigurationElement> presentations;
+
+    public ITargetDetailsPane createDetailsPane(IDeploymentTargetType targetType) {
+        readRegistry();
+        final IConfigurationElement element = presentations.get(targetType);
+        if (element != null && element.getAttribute("detailsPane") == null) {
+            try {
+                return (ITargetDetailsPane) element.createExecutableExtension("detailsPane");
+            } catch (CoreException e) {
+                MTWCoreUI.log(e);
+            }
+        }
+        return new DefaultDeploymentTypePresentation();
+    }
+
+    private synchronized void readRegistry() {
+        if (presentations == null) {
+            presentations = new HashMap<IDeploymentTargetType, IConfigurationElement>();
+            final IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor(
+                    MTWCoreUI.PLUGIN_ID, "targetPresentation");
+            for (IConfigurationElement element : elements) {
+                final String runtimeId = element.getAttribute("targetId");
+                final IDeploymentTargetType targetType = MTWCoreUI.getDefault().getDeploymentTypesRegistry()
+                        .getType(runtimeId);
+                if (targetType == null) {
+                    MTWCoreUI.log("Runtime %s was not found. It is referenced from plugin %s", runtimeId, element
+                            .getContributor().getName());
+                    continue;
+                } else {
+                    presentations.put(targetType, element);
+                }
+            }
+        }
+    }
+}
--- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetTypeDescriptor.java	Wed Jul 28 14:07:39 2010 -0700
+++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetTypeDescriptor.java	Wed Jul 28 15:43:33 2010 -0700
@@ -122,8 +122,7 @@
             try {
                 return Integer.parseInt(attribute);
             } catch (NumberFormatException e) {
-                MTWCoreUI.log(String.format("%s is not a valid priority value for %s provider", attribute, getId()),
-                        null);
+                MTWCoreUI.log("%s is not a valid priority value for %s provider", attribute, getId());
             }
         }
         return 0;
@@ -145,4 +144,34 @@
         return type.getSchedulingRule(target);
     }
 
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        DeploymentTargetTypeDescriptor other = (DeploymentTargetTypeDescriptor) obj;
+        if (getId() == null) {
+            if (other.getId() != null) {
+                return false;
+            }
+        } else if (!getId().equals(other.getId())) {
+            return false;
+        }
+        return true;
+    }
+
 }
--- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetTypesRegistry.java	Wed Jul 28 14:07:39 2010 -0700
+++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetTypesRegistry.java	Wed Jul 28 15:43:33 2010 -0700
@@ -24,11 +24,9 @@
 import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType;
 
 public class DeploymentTargetTypesRegistry {
-    private static DeploymentTargetTypesRegistry INSTANCE;
-
     private DeploymentTargetTypeDescriptor[] descriptors;
 
-    private DeploymentTargetTypesRegistry() {
+    public DeploymentTargetTypesRegistry() {
         readExtensions();
     }
 
@@ -41,18 +39,11 @@
         }
     }
 
-    public static synchronized DeploymentTargetTypesRegistry getInstance() {
-        if (INSTANCE == null) {
-            INSTANCE = new DeploymentTargetTypesRegistry();
-        }
-        return INSTANCE;
-    }
-
     public DeploymentTargetTypeDescriptor[] getProviders() {
         return descriptors;
     }
 
-    public IDeploymentTargetType getProvider(String id) {
+    public IDeploymentTargetType getType(String id) {
         DeploymentTargetTypeDescriptor[] providers = getProviders();
         for (DeploymentTargetTypeDescriptor descriptor : providers) {
             if (descriptor.getId().equals(id)) {
--- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetWizardPage.java	Wed Jul 28 14:07:39 2010 -0700
+++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetWizardPage.java	Wed Jul 28 15:43:33 2010 -0700
@@ -20,6 +20,8 @@
 
 import java.lang.reflect.InvocationTargetException;
 import java.text.MessageFormat;
+import java.util.HashMap;
+import java.util.Map;
 
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -48,17 +50,22 @@
 import org.eclipse.swt.layout.FormLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Control;
 import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.ui.part.PageBook;
 import org.symbian.tools.mtw.ui.MTWCoreUI;
 import org.symbian.tools.mtw.ui.ProjectMemo;
 import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget;
+import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType;
+import org.symbian.tools.mtw.ui.deployment.ITargetDetailsPane;
 
 public class DeploymentTargetWizardPage extends WizardPage {
     private final DeployWizardContext context;
     private TableViewer list;
-    private Text description;
     private final IDeploymentTarget prev;
+    private PageBook descriptions;
+    private final Map<IDeploymentTargetType, ITargetDetailsPane> panes = new HashMap<IDeploymentTargetType, ITargetDetailsPane>();
+    private Control emptyness;
 
     public DeploymentTargetWizardPage(DeployWizardContext context, ProjectMemo memo) {
         super("TargetPage", "Select Deployment Target", null);
@@ -109,26 +116,15 @@
         search.setText("Discover");
         search.setImage(MTWCoreUI.getImages().getDiscoverButtonIcon());
 
-        description = new Text(root, SWT.BORDER | SWT.READ_ONLY);
-        final Button enableLogging = new Button(root, SWT.CHECK);
-        enableLogging.setText("Enable diagnostic logging");
-        enableLogging.addSelectionListener(new SelectionAdapter() {
-            @Override
-            public void widgetSelected(SelectionEvent e) {
-                toggleLogging(enableLogging.getSelection());
-            }
-        });
+        descriptions = new PageBook(root, SWT.BORDER);
+        emptyness = new Composite(descriptions, SWT.NONE);
 
         FormData data = new FormData();
-        data.bottom = new FormAttachment(100, -5);
-        data.left = new FormAttachment(0, 5);
-        enableLogging.setLayoutData(data);
-
-        data = new FormData();
         data.left = new FormAttachment(0, 5);
         data.right = new FormAttachment(100, -5);
-        data.bottom = new FormAttachment(enableLogging, -20);
-        description.setLayoutData(data);
+        data.bottom = new FormAttachment(100, -5);
+        data.height = 50;
+        descriptions.setLayoutData(data);
 
         data = new FormData();
         data.top = new FormAttachment(0, 5);
@@ -138,7 +134,7 @@
         data = new FormData();
         data.left = new FormAttachment(0, 5);
         data.top = new FormAttachment(0, 5);
-        data.bottom = new FormAttachment(description, -10);
+        data.bottom = new FormAttachment(descriptions, -10);
         data.right = new FormAttachment(search, -10);
 
         list.getControl().setLayoutData(data);
@@ -196,14 +192,23 @@
     protected void selectDeploymentTarget(DeploymentTargetWrapper target) {
         if (target != null) {
             context.setTarget(target);
-            //            String desc = target.getDescription();
-            //            this.description.setText(desc);
             setMessage(null);
             setErrorMessage(null);
             setPageComplete(true);
+
+            IDeploymentTargetType type = target.getType();
+            ITargetDetailsPane pane = panes.get(type);
+            if (pane == null) {
+                pane = MTWCoreUI.getDefault().getPresentations().createDetailsPane(type);
+                pane.createControl(descriptions);
+                pane.init(this);
+                panes.put(type, pane);
+            }
+            pane.setTarget(target.getActualTarget());
+            descriptions.showPage(pane.getControl());
         } else {
+            descriptions.showPage(emptyness);
             context.setTarget(null);
-            //            description.setText("");
             setPageComplete(false);
             setMessage(null);
             setErrorMessage("Select device or emulator to deploy the application");
--- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetWrapper.java	Wed Jul 28 14:07:39 2010 -0700
+++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetWrapper.java	Wed Jul 28 15:43:33 2010 -0700
@@ -161,4 +161,8 @@
     public IDeploymentTarget getActualTarget() {
         return target;
     }
+
+    public String getDescription() {
+        return target.getDescription();
+    }
 }
--- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/MTWCoreUI.java	Wed Jul 28 14:07:39 2010 -0700
+++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/MTWCoreUI.java	Wed Jul 28 15:43:33 2010 -0700
@@ -10,12 +10,15 @@
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
 import org.symbian.tools.mtw.core.projects.IMTWProject;
+import org.symbian.tools.mtw.internal.deployment.DeploymentTargetPresentationsManager;
+import org.symbian.tools.mtw.internal.deployment.DeploymentTargetTypesRegistry;
 
 /**
  * The activator class controls the plug-in life cycle
  */
 public class MTWCoreUI extends AbstractUIPlugin {
     private final Map<IProject, ProjectMemo> MEMOS = new WeakHashMap<IProject, ProjectMemo>();
+    private final DeploymentTargetTypesRegistry typesRegistry = new DeploymentTargetTypesRegistry();
 
     // The plug-in ID
     public static final String PLUGIN_ID = "org.symbian.tools.mtw.ui"; //$NON-NLS-1$
@@ -23,6 +26,7 @@
     // The shared instance
     private static MTWCoreUI plugin;
     private Images images;
+    private final DeploymentTargetPresentationsManager presentations = new DeploymentTargetPresentationsManager();
 
     /**
      * The constructor
@@ -66,6 +70,10 @@
         getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, e));
     }
 
+    public static void log(String message, Object... args) {
+        log(String.format(message, args), (Exception) null);
+    }
+
     public static void log(Exception e) {
         log(null, e);
     }
@@ -83,10 +91,18 @@
         return memo;
     }
 
+    public DeploymentTargetTypesRegistry getDeploymentTypesRegistry() {
+        return typesRegistry;
+    }
+
     public static Images getImages() {
         if (getDefault().images == null) {
             getDefault().images = new Images(getDefault().getImageRegistry());
         }
         return getDefault().images;
     }
+
+    public DeploymentTargetPresentationsManager getPresentations() {
+        return presentations;
+    }
 }
--- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/ProjectMemo.java	Wed Jul 28 14:07:39 2010 -0700
+++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/ProjectMemo.java	Wed Jul 28 15:43:33 2010 -0700
@@ -32,7 +32,6 @@
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.XMLMemento;
 import org.symbian.tools.mtw.core.projects.IMTWProject;
-import org.symbian.tools.mtw.internal.deployment.DeploymentTargetTypesRegistry;
 import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget;
 import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType;
 
@@ -96,8 +95,8 @@
             checkMemento();
             String type = memento.getString(DEPLOYMENT_PROVIDER);
             if (type != null) {
-                final IDeploymentTargetType provider = DeploymentTargetTypesRegistry.getInstance().getProvider(
-                        type);
+                final IDeploymentTargetType provider = MTWCoreUI.getDefault().getDeploymentTypesRegistry()
+                        .getType(type);
                 if (provider != null) {
                     IDeploymentTarget target = provider.findTarget(project, memento.getString(TARGET));
                     if (target != null) {
--- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/IDeploymentTarget.java	Wed Jul 28 14:07:39 2010 -0700
+++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/IDeploymentTarget.java	Wed Jul 28 15:43:33 2010 -0700
@@ -60,6 +60,12 @@
     String getName();
 
     /**
+     * Provides more details about target. This information is only displayed 
+     * to the user and is not important for the application.
+     */
+    String getDescription();
+
+    /**
      * Deploy application to this target.
      * 
      * @param project project to deploy to the target
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/ITargetDetailsPane.java	Wed Jul 28 15:43:33 2010 -0700
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Symbian Foundation - initial contribution.
+ * Contributors:
+ * Description:
+ * Overview:
+ * Details:
+ * Platforms/Drives/Compatibility:
+ * Assumptions/Requirement/Pre-requisites:
+ * Failures and causes:
+ */
+package org.symbian.tools.mtw.ui.deployment;
+
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * Objects of this class provide UI for the users to visualize or configure
+ * their deployment targets. This object will not be reused between wizard 
+ * deployment wizard restarts.
+ * There will be one instance for the target type. This object will not be 
+ * instantiated for each target.
+ * 
+ * @author Eugene Ostroukhov (eugeneo@symbian.org)
+ */
+public interface ITargetDetailsPane {
+    void init(IWizardPage page);
+
+    void setTarget(IDeploymentTarget target);
+
+    void createControl(Composite parent);
+
+    Control getControl();
+}
--- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/bluetooth/BluetoothTarget.java	Wed Jul 28 14:07:39 2010 -0700
+++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/bluetooth/BluetoothTarget.java	Wed Jul 28 15:43:33 2010 -0700
@@ -314,4 +314,9 @@
     public boolean isDiscovered() {
         return device != null;
     }
+
+    public String getDescription() {
+        return device == null ? "This device was remembered from past sessions and may not be available" : String
+                .format("Remote device with address %s", device.getBluetoothAddress());
+    }
 }