[Bug 8811] Only track feature for first and last open editor. RCL_2_0
authordadubrow
Tue, 07 Apr 2009 08:57:43 -0500
branchRCL_2_0
changeset 64 ec516ff8610b
parent 63 6f3cc8fac9c7
child 65 1b0016f16612
[Bug 8811] Only track feature for first and last open editor.
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 08:57:24 2009 -0500
+++ b/uidesigner/com.nokia.sdt.symbian.ui/src/com/nokia/sdt/symbian/ui/appeditor/ApplicationEditor.java	Tue Apr 07 08:57:43 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);
 	}
 		
 	/**