org.symbian.tools.mtw.ui/src/org/symbian/tools/tmw/ui/TMWCoreUI.java
changeset 463 aea4c83725d8
parent 461 7a8f9fa8d278
child 468 a05c6e5cc7d9
equal deleted inserted replaced
462:cdc4995b1677 463:aea4c83725d8
     8 import org.eclipse.core.runtime.Status;
     8 import org.eclipse.core.runtime.Status;
     9 import org.eclipse.jface.resource.ImageRegistry;
     9 import org.eclipse.jface.resource.ImageRegistry;
    10 import org.eclipse.ui.plugin.AbstractUIPlugin;
    10 import org.eclipse.ui.plugin.AbstractUIPlugin;
    11 import org.osgi.framework.BundleContext;
    11 import org.osgi.framework.BundleContext;
    12 import org.symbian.tools.tmw.core.projects.IMTWProject;
    12 import org.symbian.tools.tmw.core.projects.IMTWProject;
    13 import org.symbian.tools.tmw.internal.deployment.DeploymentTargetPresentationsManager;
    13 import org.symbian.tools.tmw.internal.ui.deployment.DeploymentTargetPresentationsManager;
    14 import org.symbian.tools.tmw.internal.deployment.DeploymentTargetTypesRegistry;
    14 import org.symbian.tools.tmw.internal.ui.deployment.DeploymentTargetTypesRegistry;
       
    15 import org.symbian.tools.tmw.internal.ui.project.ProjectTemplateManagerImpl;
       
    16 import org.symbian.tools.tmw.ui.project.IProjectTemplateManager;
    15 
    17 
    16 /**
    18 /**
    17  * The activator class controls the plug-in life cycle
    19  * The activator class controls the plug-in life cycle
    18  */
    20  */
    19 public class TMWCoreUI extends AbstractUIPlugin {
    21 public class TMWCoreUI extends AbstractUIPlugin {
    23     // The plug-in ID
    25     // The plug-in ID
    24     public static final String PLUGIN_ID = "org.symbian.tools.tmw.ui"; //$NON-NLS-1$
    26     public static final String PLUGIN_ID = "org.symbian.tools.tmw.ui"; //$NON-NLS-1$
    25 
    27 
    26     // The shared instance
    28     // The shared instance
    27     private static TMWCoreUI plugin;
    29     private static TMWCoreUI plugin;
       
    30     private IProjectTemplateManager projectTemplateManager;
    28     private Images images;
    31     private Images images;
    29     private final DeploymentTargetPresentationsManager presentations = new DeploymentTargetPresentationsManager();
    32     private final DeploymentTargetPresentationsManager presentations = new DeploymentTargetPresentationsManager();
    30 
       
    31     /**
       
    32      * The constructor
       
    33      */
       
    34     public TMWCoreUI() {
       
    35     }
       
    36 
    33 
    37     @Override
    34     @Override
    38     protected void initializeImageRegistry(ImageRegistry reg) {
    35     protected void initializeImageRegistry(ImageRegistry reg) {
    39         super.initializeImageRegistry(reg);
    36         super.initializeImageRegistry(reg);
    40     }
    37     }
    41 
    38 
    42     /*
       
    43      * (non-Javadoc)
       
    44      * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
       
    45      */
       
    46     public void start(BundleContext context) throws Exception {
    39     public void start(BundleContext context) throws Exception {
    47         super.start(context);
    40         super.start(context);
       
    41         projectTemplateManager = new ProjectTemplateManagerImpl();
    48         plugin = this;
    42         plugin = this;
    49     }
    43     }
    50 
    44 
    51     /*
       
    52      * (non-Javadoc)
       
    53      * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
       
    54      */
       
    55     public void stop(BundleContext context) throws Exception {
    45     public void stop(BundleContext context) throws Exception {
    56         plugin = null;
    46         plugin = null;
    57         super.stop(context);
    47         super.stop(context);
    58     }
    48     }
    59 
    49 
   103     }
    93     }
   104 
    94 
   105     public DeploymentTargetPresentationsManager getPresentations() {
    95     public DeploymentTargetPresentationsManager getPresentations() {
   106         return presentations;
    96         return presentations;
   107     }
    97     }
       
    98 
       
    99     public static IProjectTemplateManager getProjectTemplateManager() {
       
   100         return getDefault().projectTemplateManager;
       
   101     }
   108 }
   102 }