# HG changeset patch # User fturovic # Date 1239129728 18000 # Node ID edeb86665d73fd0ae1ba311ce6bbe83aef722881 # Parent 47ecdc260147cef07d82b66cf2090a50ef1f1096# Parent 1b0016f16612299b158caa0987a498fb1542b729 merged heads diff -r 47ecdc260147 -r edeb86665d73 uidesigner/com.nokia.carbide.cpp.uiq.ui/src/com/nokia/carbide/cpp/uiq/ui/viewwizard/ViewWizardManager.java --- a/uidesigner/com.nokia.carbide.cpp.uiq.ui/src/com/nokia/carbide/cpp/uiq/ui/viewwizard/ViewWizardManager.java Tue Apr 07 13:41:27 2009 -0500 +++ b/uidesigner/com.nokia.carbide.cpp.uiq.ui/src/com/nokia/carbide/cpp/uiq/ui/viewwizard/ViewWizardManager.java Tue Apr 07 13:42:08 2009 -0500 @@ -17,9 +17,13 @@ /* START_USECASES: CU1, CU2 END_USECASES */ package com.nokia.carbide.cpp.uiq.ui.viewwizard; +import com.nokia.carbide.cpp.uiq.ui.UIQUserInterfacePlugin; import com.nokia.carbide.internal.api.templatewizard.ui.IWizardDataPage; import com.nokia.carbide.internal.api.templatewizard.ui.TemplateWizard; import com.nokia.carbide.template.engine.ITemplate; +import com.nokia.cpp.internal.api.utils.core.Check; +import com.nokia.cpp.internal.api.utils.core.Logging; +import com.nokia.cpp.internal.api.utils.ui.UITaskUtils; import com.nokia.sdt.component.*; import com.nokia.sdt.component.adapter.CommonAttributes; import com.nokia.sdt.component.adapter.IAttributes; @@ -34,16 +38,11 @@ import com.nokia.sdt.editor.EditorServices; import com.nokia.sdt.editor.IDesignerDataModelEditor; import com.nokia.sdt.emf.dm.*; -import com.nokia.carbide.cpp.internal.featureTracker.FeatureUseTrackerConsts; -import com.nokia.carbide.cpp.internal.featureTracker.FeatureUseTrackerPlugin; -import com.nokia.carbide.cpp.uiq.ui.UIQUserInterfacePlugin; import com.nokia.sdt.sourcegen.*; import com.nokia.sdt.symbian.dm.*; import com.nokia.sdt.symbian.ui.UIPlugin; import com.nokia.sdt.symbian.workspace.ISymbianProjectContext; import com.nokia.sdt.symbian.workspace.impl.ProjectContextProvider; -import com.nokia.cpp.internal.api.utils.core.*; -import com.nokia.cpp.internal.api.utils.ui.UITaskUtils; import com.nokia.sdt.workspace.*; import org.eclipse.cdt.core.model.*; @@ -271,7 +270,6 @@ * */ public ViewWizardManager() { - FeatureUseTrackerPlugin.getFeatureUseProxy().startUsingFeature(FeatureUseTrackerConsts.CARBIDE_UI_DESIGNER); dataModelProvider = new DesignerDataModelProvider(); ComponentSystem cs = ComponentSystem.getComponentSystem(); try { @@ -1023,7 +1021,6 @@ disposeStoredModel(ROOT_MODEL_KEY); } disposeStoredModel(VIEW_MODEL_KEY); - FeatureUseTrackerPlugin.getFeatureUseProxy().stopUsingFeature(FeatureUseTrackerConsts.CARBIDE_UI_DESIGNER); } public void disposeStoredModel(String modelKey) { diff -r 47ecdc260147 -r edeb86665d73 uidesigner/com.nokia.sdt.series60.componentlibrary/src/com/nokia/sdt/series60/viewwizard/ViewWizardManager.java --- a/uidesigner/com.nokia.sdt.series60.componentlibrary/src/com/nokia/sdt/series60/viewwizard/ViewWizardManager.java Tue Apr 07 13:41:27 2009 -0500 +++ b/uidesigner/com.nokia.sdt.series60.componentlibrary/src/com/nokia/sdt/series60/viewwizard/ViewWizardManager.java Tue Apr 07 13:42:08 2009 -0500 @@ -228,7 +228,6 @@ * */ public ViewWizardManager() { - FeatureUseTrackerPlugin.getFeatureUseProxy().startUsingFeature(FeatureUseTrackerConsts.CARBIDE_UI_DESIGNER); dataModelProvider = new DesignerDataModelProvider(); ComponentSystem cs = ComponentSystem.getComponentSystem(); try { @@ -916,7 +915,6 @@ disposeStoredModel(ROOT_MODEL_KEY); } disposeStoredModel(VIEW_MODEL_KEY); - FeatureUseTrackerPlugin.getFeatureUseProxy().stopUsingFeature(FeatureUseTrackerConsts.CARBIDE_UI_DESIGNER); } public void disposeStoredModel(String modelKey) { diff -r 47ecdc260147 -r edeb86665d73 uidesigner/com.nokia.sdt.symbian.ui/src/com/nokia/sdt/symbian/ui/appeditor/ApplicationEditor.java --- a/uidesigner/com.nokia.sdt.symbian.ui/src/com/nokia/sdt/symbian/ui/appeditor/ApplicationEditor.java Tue Apr 07 13:41:27 2009 -0500 +++ b/uidesigner/com.nokia.sdt.symbian.ui/src/com/nokia/sdt/symbian/ui/appeditor/ApplicationEditor.java Tue Apr 07 13:42:08 2009 -0500 @@ -155,7 +155,8 @@ } protected IStatus preLoadInput(IProgressMonitor monitor) { - FeatureUseTrackerPlugin.getFeatureUseProxy().startUsingFeature(FeatureUseTrackerConsts.CARBIDE_UI_DESIGNER); + if (!EditorServices.isAnyEditorOpen()) + FeatureUseTrackerPlugin.getFeatureUseProxy().startUsingFeature(FeatureUseTrackerConsts.CARBIDE_UI_DESIGNER); IFile file = ResourceUtil.getFile(getEditorInput()); WorkspaceContext wc = WorkspaceContext.getContext(); IDesignerDataModelSpecifier modelSpecifier = wc.findSpecifierForResource(file); @@ -292,8 +293,9 @@ * Subclasses may extend. */ public void dispose() { - FeatureUseTrackerPlugin.getFeatureUseProxy().stopUsingFeature(FeatureUseTrackerConsts.CARBIDE_UI_DESIGNER); super.dispose(); + if (!EditorServices.isAnyEditorOpen()) + FeatureUseTrackerPlugin.getFeatureUseProxy().stopUsingFeature(FeatureUseTrackerConsts.CARBIDE_UI_DESIGNER); } /** diff -r 47ecdc260147 -r edeb86665d73 uidesigner/com.nokia.sdt.uidesigner/src/com/nokia/sdt/uidesigner/ui/DesignerEditor.java --- a/uidesigner/com.nokia.sdt.uidesigner/src/com/nokia/sdt/uidesigner/ui/DesignerEditor.java Tue Apr 07 13:41:27 2009 -0500 +++ b/uidesigner/com.nokia.sdt.uidesigner/src/com/nokia/sdt/uidesigner/ui/DesignerEditor.java Tue Apr 07 13:42:08 2009 -0500 @@ -20,6 +20,7 @@ import com.nokia.carbide.cpp.internal.featureTracker.FeatureUseTrackerConsts; import com.nokia.carbide.cpp.internal.featureTracker.FeatureUseTrackerPlugin; +import com.nokia.sdt.editor.EditorServices; import com.nokia.sdt.uidesigner.ui.utils.Strings; import com.nokia.cpp.internal.api.utils.core.Logging; import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils; @@ -56,7 +57,8 @@ @Override protected IStatus doLoadInput(IProgressMonitor monitor) { - FeatureUseTrackerPlugin.getFeatureUseProxy().startUsingFeature(FeatureUseTrackerConsts.CARBIDE_UI_DESIGNER); + if (!EditorServices.isAnyEditorOpen()) + FeatureUseTrackerPlugin.getFeatureUseProxy().startUsingFeature(FeatureUseTrackerConsts.CARBIDE_UI_DESIGNER); return super.doLoadInput(monitor); } @@ -64,7 +66,8 @@ public void dispose() { super.dispose(); designerEditorPage = null; // page will be disposed by superclass - FeatureUseTrackerPlugin.getFeatureUseProxy().stopUsingFeature(FeatureUseTrackerConsts.CARBIDE_UI_DESIGNER); + if (!EditorServices.isAnyEditorOpen()) + FeatureUseTrackerPlugin.getFeatureUseProxy().stopUsingFeature(FeatureUseTrackerConsts.CARBIDE_UI_DESIGNER); } @Override