iMaker plugin updated
authorhaismail <hussein.ismail@nokia.com>
Tue, 09 Feb 2010 17:10:58 +0200
changeset 2 a91cb670dd8e
parent 1 7ff23301fe22
child 3 9b808d6f55be
iMaker plugin updated
imakerplugin/com.nokia.carbide.extensions.imaker/feature.xml
imakerplugin/com.nokia.s60tools.imaker.doc.user/META-INF/MANIFEST.MF
imakerplugin/com.nokia.s60tools.imaker.tests/META-INF/MANIFEST.MF
imakerplugin/com.nokia.s60tools.imaker.tests/src/com/nokia/s60tools/imaker/internal/tests/EnvironmentTest.java
imakerplugin/com.nokia.s60tools.imaker.tests/src/com/nokia/s60tools/imaker/internal/tests/IMakerWrapperTest.java
imakerplugin/com.nokia.s60tools.imaker.tests/src/com/nokia/s60tools/imaker/internal/tests/SettingsViewerTest.java
imakerplugin/com.nokia.s60tools.imaker.tests/src/com/nokia/s60tools/imaker/internal/tests/UIConfigurationTest.java
imakerplugin/com.nokia.s60tools.imaker/META-INF/MANIFEST.MF
imakerplugin/com.nokia.s60tools.imaker/about.properties
imakerplugin/com.nokia.s60tools.imaker/doc/Test_Summary_ iMakerPlugin_2_2_4.xls
imakerplugin/com.nokia.s60tools.imaker/doc/Test_Summary_ iMakerPlugin_3_0_0.xls
imakerplugin/com.nokia.s60tools.imaker/doc/change_log_2_2_4.txt
imakerplugin/com.nokia.s60tools.imaker/doc/change_log_3_0_0.txt
imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/IIMakerWrapper.java
imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/UIConfiguration.java
imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/model/Environment.java
imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/viewers/DebugTab.java
imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/viewers/PreferencesTab.java
imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/wrapper/IMakerWrapper.java
--- a/imakerplugin/com.nokia.carbide.extensions.imaker/feature.xml	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.carbide.extensions.imaker/feature.xml	Tue Feb 09 17:10:58 2010 +0200
@@ -2,7 +2,7 @@
 <feature
       id="com.nokia.carbide.extensions.imaker"
       label="Carbide.c++ Extensions - IMaker"
-      version="2.2.4"
+      version="3.0.0"
       provider-name="Nokia"
       plugin="com.nokia.s60tools.imaker">
 
--- a/imakerplugin/com.nokia.s60tools.imaker.doc.user/META-INF/MANIFEST.MF	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker.doc.user/META-INF/MANIFEST.MF	Tue Feb 09 17:10:58 2010 +0200
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: Carbide.c++ Extensions - iMaker Help
 Bundle-SymbolicName: com.nokia.s60tools.imaker.doc.user;singleton:=true
-Bundle-Version: 2.2.4
+Bundle-Version: 3.0.0
 Bundle-Activator: com.nokia.s60tools.imaker.help.internal.HelpPlugin
 Bundle-Vendor: Nokia
 Bundle-Localization: plugin
--- a/imakerplugin/com.nokia.s60tools.imaker.tests/META-INF/MANIFEST.MF	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker.tests/META-INF/MANIFEST.MF	Tue Feb 09 17:10:58 2010 +0200
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: Tests
 Bundle-SymbolicName: com.nokia.s60tools.imaker.tests
-Bundle-Version: 2.2.4
+Bundle-Version: 3.0.0
 Bundle-Activator: com.nokia.s60tools.imaker.internal.tests.Activator
 Bundle-Vendor: NOKIA
 Bundle-Localization: plugin
--- a/imakerplugin/com.nokia.s60tools.imaker.tests/src/com/nokia/s60tools/imaker/internal/tests/EnvironmentTest.java	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker.tests/src/com/nokia/s60tools/imaker/internal/tests/EnvironmentTest.java	Tue Feb 09 17:10:58 2010 +0200
@@ -57,10 +57,10 @@
 	public void testLoad() throws Exception {
 		assertFalse(environment.isLoaded());
 		List<UIConfiguration> confs = new ArrayList<UIConfiguration>();
-		confs.add(new UIConfiguration(IQRFFactory.eINSTANCE.createConfiguration()));
+		confs.add(new UIConfiguration(IQRFFactory.eINSTANCE.createConfiguration(),null));
 		int numberOfconfs = confs.size();
-		expect(wrapperMock.getConfigurations(isA(IProgressMonitor.class)))
-		.andReturn(confs);
+		wrapperMock.getConfigurations(isA(IProgressMonitor.class),null);
+		expectLastCall().andReturn(confs).once();
 		
 		replay(wrapperMock);
 		List<UIConfiguration> configurations = environment.load();
--- a/imakerplugin/com.nokia.s60tools.imaker.tests/src/com/nokia/s60tools/imaker/internal/tests/IMakerWrapperTest.java	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker.tests/src/com/nokia/s60tools/imaker/internal/tests/IMakerWrapperTest.java	Tue Feb 09 17:10:58 2010 +0200
@@ -50,11 +50,8 @@
 			assertTrue("iMakerWrapper failed with stub " + stub, version.length()>1);
 			assertTrue("iMakerWrapper failed with stub " + stub, version.startsWith("iMaker"));
 
-			List<UIConfiguration> configs = wrapper.getConfigurations(null);
+			List<UIConfiguration> configs = wrapper.getConfigurations(null,null);
 			assertTrue("iMakerWrapper failed with stub " + stub, !configs.isEmpty());
-			UIConfiguration config = configs.get(0);
-			assertTrue("iMakerWrapper failed with stub " + stub, !config.getAllTargets().isEmpty());
-			assertTrue("iMakerWrapper failed with stub " + stub, !config.getVariables().isEmpty());
 
 			ArrayList<String> params = new ArrayList<String>();
 			params.add("test");
--- a/imakerplugin/com.nokia.s60tools.imaker.tests/src/com/nokia/s60tools/imaker/internal/tests/SettingsViewerTest.java	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker.tests/src/com/nokia/s60tools/imaker/internal/tests/SettingsViewerTest.java	Tue Feb 09 17:10:58 2010 +0200
@@ -144,7 +144,7 @@
 		result.addTarget(target1);
 		result.addTarget(target2);
 		
-		UIConfiguration uiConfig = new UIConfiguration(conf);
+		UIConfiguration uiConfig = new UIConfiguration(conf,null);
 		settingsViewer = new SettingsViewer(composite);
 		settingsViewer.setUiConfiguration(uiConfig);
 
--- a/imakerplugin/com.nokia.s60tools.imaker.tests/src/com/nokia/s60tools/imaker/internal/tests/UIConfigurationTest.java	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker.tests/src/com/nokia/s60tools/imaker/internal/tests/UIConfigurationTest.java	Tue Feb 09 17:10:58 2010 +0200
@@ -84,7 +84,7 @@
 		result.addTarget(target1);
 		result.addTarget(target2);
 		
-		uiConfig = new UIConfiguration(conf);
+		uiConfig = new UIConfiguration(conf,null);
 		
 	}
 
--- a/imakerplugin/com.nokia.s60tools.imaker/META-INF/MANIFEST.MF	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker/META-INF/MANIFEST.MF	Tue Feb 09 17:10:58 2010 +0200
@@ -3,7 +3,7 @@
 Bundle-Name: %plugin.Name
 Bundle-SymbolicName: com.nokia.s60tools.imaker;singleton:=true
 Bundle-ToolName: iMaker - Carbide.c++ extension
-Bundle-Version: 2.2.4
+Bundle-Version: 3.0.0
 Bundle-Date: 01-10-2009
 Bundle-RepositoryVersion: n/a
 Bundle-Activator: com.nokia.s60tools.imaker.IMakerPlugin
--- a/imakerplugin/com.nokia.s60tools.imaker/about.properties	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker/about.properties	Tue Feb 09 17:10:58 2010 +0200
@@ -22,7 +22,7 @@
 
 productBlurb=Carbide.c++ Extensions - iMaker \n\
 \n\
-Version: 2.2.4\n\
+Version: 3.0.0\n\
 Build id: {0}\n\
 \n\
 \n\
Binary file imakerplugin/com.nokia.s60tools.imaker/doc/Test_Summary_ iMakerPlugin_2_2_4.xls has changed
Binary file imakerplugin/com.nokia.s60tools.imaker/doc/Test_Summary_ iMakerPlugin_3_0_0.xls has changed
--- a/imakerplugin/com.nokia.s60tools.imaker/doc/change_log_2_2_4.txt	Mon Jan 25 12:26:21 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-Product Description:
-====================
-The iMaker extension for Carbide.c++ is a tool for building ROM images. Its core functionality is implemented in a command line executable called imaker.cmd. 
-The iMaker offers a Carbide.c++ integration that provides a graphical user interface for the imaker.cmd command line tool. The iMaker enables you to set and 
-modify the build parameters that are used by iMaker.
-
-Image building process is started by launching iMaker dialog by choosing the Open iMaker Dialog... menu item from iMaker pulldown menu (hammer with 'i') on the Carbide.c++ toolbar.
-The ROM image is built using the preferences configured in this dialog. Although not necessary, these preferences can be saved for future use for image building if needed. 
-Once preferences are configured, an image can be built by clicking the Run button in the dialog.
-
-
-Version 2.2.4
-===========================================
-New Features
-Ticket #1052: As a SW developer I don't want to have pop-up suggesting to add generated makefile to bld.inf because I consider that as a temporary file
-Ui changes to debug tab related to Ticket #1053. Ability to remember environment specific previous run. Only enabled entries in the debug tab are included to the images.
-Ticket #1053: As a SW developer I want to add automatically all build files to debug dialog so that my manual work is minimized
-Ticket #1115: As a Carbide.c++ developer I want to use iMaker plugin API to create images with .imp file
-
-Enhancements
-iMaker plugin code separated to internal and public API
-
-Error fixes
-iMaker plugin to show appropriate error message if iMaker Core execution fails
-
-Version 2.2.0
-===========================================
-New Features
-- New simplified UI
-- Automatic environment recognition based on Carbide.c++ workspace/project
-- Automatic selection of default product and variant of the environment (needs AMPI configuration in iMaker makefiles)
-- Summary for the created images in console window
-- Platsim integration
-- Support for adding binaries to image in urel/udeb mode.
-- Possibility to cancel fetching on configurations
-
-Enhancements
-- Handling of imp files
-
-Error fixes
-
-Version 2.1.2
-===========================================
-New Features
-
-Enhancements
-- Help updated
-- code cleaned
-- copy right headers updated
-
-Error fixes
-- two error fixed relating to the interface with iMaker core 
-
-Version 2.1.1
-===========================================
-New Features
-#365 The imaker plugin should be able to notice the success/failure of imaker image creation
-#630 Better integration to S60 Configuration Tool
-
-Enhancements
-
-Error fixes
-Fixed to work with iMaker 08.4x.xx interface changes
- 
-Version 2.1.0
-===========================================
-New Features:
-- The structure and implementation has been changed. 
-- The preferences pages are no longer used. 
-- An independent dialog has been implemented for the iMaker extension. 
-- New way of managing preferences files have been implemented. 
-- A list has been added which displays prefereneces files and which allows deletation and creatation of new file. 
-- Renaming of preferences files has been added. 
-- The detailed settings page has been made editable. 
-- Better integration with S60 Configuration Tool has been implemented. 
-
-Enhancements:
-- Querying of configuration from the environment has been enhanced. 
-- Editing and saving has been enhanced.
-- Querying of targets and variables from one product. 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/imakerplugin/com.nokia.s60tools.imaker/doc/change_log_3_0_0.txt	Tue Feb 09 17:10:58 2010 +0200
@@ -0,0 +1,94 @@
+Product Description:
+====================
+The iMaker extension for Carbide.c++ is a tool for building ROM images. Its core functionality is implemented in a command line executable called imaker.cmd. 
+The iMaker offers a Carbide.c++ integration that provides a graphical user interface for the imaker.cmd command line tool. The iMaker enables you to set and 
+modify the build parameters that are used by iMaker.
+
+Image building process is started by launching iMaker dialog by choosing the Open iMaker Dialog... menu item from iMaker pulldown menu (hammer with 'i') on the Carbide.c++ toolbar.
+The ROM image is built using the preferences configured in this dialog. Although not necessary, these preferences can be saved for future use for image building if needed. 
+Once preferences are configured, an image can be built by clicking the Run button in the dialog.
+
+Version 3.0.0
+===========================================
+New Features
+Ticket #1136: As a iMaker plugin user I don't want to load all the product configurations when starting the plugin (takes too long)
+Ticket #1188: As a Carbide.c++ user I want to modify my .IMP file using iMaker plugin
+Ticket #1137: Rename debug tab in iMaker plugin to something else
+Ticket #1055: As a SW developer I don't want to have temporary files in my Carbide.c++ workspace
+
+Enhancements
+License changed from SFL to EPL
+Total number of unit tests almost doubled
+
+Error fixes
+
+
+Version 2.2.4
+===========================================
+New Features
+Ticket #1052: As a SW developer I don't want to have pop-up suggesting to add generated makefile to bld.inf because I consider that as a temporary file
+Ui changes to debug tab related to Ticket #1053. Ability to remember environment specific previous run. Only enabled entries in the debug tab are included to the images.
+Ticket #1053: As a SW developer I want to add automatically all build files to debug dialog so that my manual work is minimized
+Ticket #1115: As a Carbide.c++ developer I want to use iMaker plugin API to create images with .imp file
+
+Enhancements
+iMaker plugin code separated to internal and public API
+
+Error fixes
+iMaker plugin to show appropriate error message if iMaker Core execution fails
+
+Version 2.2.0
+===========================================
+New Features
+- New simplified UI
+- Automatic environment recognition based on Carbide.c++ workspace/project
+- Automatic selection of default product and variant of the environment (needs AMPI configuration in iMaker makefiles)
+- Summary for the created images in console window
+- Platsim integration
+- Support for adding binaries to image in urel/udeb mode.
+- Possibility to cancel fetching on configurations
+
+Enhancements
+- Handling of imp files
+
+Error fixes
+
+Version 2.1.2
+===========================================
+New Features
+
+Enhancements
+- Help updated
+- code cleaned
+- copy right headers updated
+
+Error fixes
+- two error fixed relating to the interface with iMaker core 
+
+Version 2.1.1
+===========================================
+New Features
+#365 The imaker plugin should be able to notice the success/failure of imaker image creation
+#630 Better integration to S60 Configuration Tool
+
+Enhancements
+
+Error fixes
+Fixed to work with iMaker 08.4x.xx interface changes
+ 
+Version 2.1.0
+===========================================
+New Features:
+- The structure and implementation has been changed. 
+- The preferences pages are no longer used. 
+- An independent dialog has been implemented for the iMaker extension. 
+- New way of managing preferences files have been implemented. 
+- A list has been added which displays prefereneces files and which allows deletation and creatation of new file. 
+- Renaming of preferences files has been added. 
+- The detailed settings page has been made editable. 
+- Better integration with S60 Configuration Tool has been implemented. 
+
+Enhancements:
+- Querying of configuration from the environment has been enhanced. 
+- Editing and saving has been enhanced.
+- Querying of targets and variables from one product. 
\ No newline at end of file
--- a/imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/IIMakerWrapper.java	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/IIMakerWrapper.java	Tue Feb 09 17:10:58 2010 +0200
@@ -51,7 +51,7 @@
 	 * @throws IMakerCoreNotFoundException 
 	 * @throws InterruptedException 
 	 */
-	public abstract List<UIConfiguration> getConfigurations(IProgressMonitor monitor) throws IMakerCoreNotFoundException,
+	public abstract List<UIConfiguration> getConfigurations(IProgressMonitor monitor, String makefile) throws IMakerCoreNotFoundException,
 	IMakerCoreExecutionException;
 
 
--- a/imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/UIConfiguration.java	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/UIConfiguration.java	Tue Feb 09 17:10:58 2010 +0200
@@ -18,6 +18,7 @@
 package com.nokia.s60tools.imaker;
 
 
+import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
@@ -26,6 +27,14 @@
 import java.util.Set;
 import java.util.StringTokenizer;
 
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+
+import com.nokia.s60tools.imaker.exceptions.IMakerCoreExecutionException;
+import com.nokia.s60tools.imaker.exceptions.IMakerCoreNotFoundException;
 import com.nokia.s60tools.imaker.internal.iqrf.Configuration;
 import com.nokia.s60tools.imaker.internal.iqrf.ConfigurationElement;
 import com.nokia.s60tools.imaker.internal.iqrf.Setting;
@@ -65,18 +74,21 @@
 	private List<UITarget>   targets      = null;
 	private List<UIVariable> variables    = null;
 	private boolean          defaultConfig = false;
-	private String           defaultTarget = null;
 	
 
 	private Set<ISettingViewer> changeListeners = new HashSet<ISettingViewer>();
+	private IIMakerWrapper wrapper;
+	private boolean loaded = false;
 	
 	/**
 	 * Default constructor. Gets a Configuration object as a parameter
 	 * and goes through it to find the needed data.
 	 * 
 	 * @param conf Configuration object to analyze
+	 * @param wrapper 
 	 */
-	public UIConfiguration(Configuration conf) {
+	public UIConfiguration(Configuration conf, IIMakerWrapper wrapper) {
+		this.wrapper = wrapper;
 		if (conf != null) {
 			makeFileName = conf.getName();
 			filePath     = conf.getFilePath();
@@ -162,10 +174,6 @@
 		}
 		return null;
 	}
-
-	public void setDefaultTarget(String target) {
-		this.defaultTarget = target;
-	}
 	
 	/**
 	 * Get method for productName
@@ -305,12 +313,54 @@
 	}
 
 	public UITarget getTarget(String name) {
-		String ret = null;
 		for (UITarget t: getAllTargets()) {
 			if(name.equals(t.getName())) {
 				return t;
 			}
 		}
 		return null;
-	}	
+	}
+
+	public void load() throws Throwable {
+		if(loaded ) {
+			return;
+		}
+		Display display = PlatformUI.getWorkbench().getDisplay();
+		IRunnableWithProgress op = new IMakerCoreRunnable();
+		ProgressMonitorDialog progressMonitorDialog = new ProgressMonitorDialog(display.getActiveShell());
+		try {
+			progressMonitorDialog.run(true, false, op);
+		} catch (InvocationTargetException e) {
+			throw e.getTargetException();
+		} catch (InterruptedException e) {
+			throw e;
+		}
+		loaded=true;		
+	}
+
+	private class IMakerCoreRunnable implements IRunnableWithProgress {
+		public void run(IProgressMonitor monitor)
+		throws InvocationTargetException, InterruptedException {
+			try {
+				List<UIConfiguration> confs = wrapper.getConfigurations(monitor,getFilePath());
+				if(!confs.isEmpty()) {
+					UIConfiguration configuration = confs.get(0);
+					targets.clear();
+					targets.addAll(configuration.getAllTargets());
+					variables.clear();
+					variables.addAll(configuration.getVariables());
+					makeFileName = configuration.getConfigurationName();
+					filePath     = configuration.getFilePath();
+					productName = configuration.getProductName();
+					platformName = configuration.getPlatformName();					
+				}
+			} catch (IMakerCoreExecutionException e) {
+				InvocationTargetException te = new InvocationTargetException(e);
+				throw te;
+			} catch (IMakerCoreNotFoundException e) {
+				InvocationTargetException te = new InvocationTargetException(e);
+				throw te;
+			}
+		}
+	}
 }
--- a/imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/model/Environment.java	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/model/Environment.java	Tue Feb 09 17:10:58 2010 +0200
@@ -140,7 +140,7 @@
 		public void run(IProgressMonitor monitor)
 		throws InvocationTargetException, InterruptedException {
 			try {
-				configurations = getImakerWrapper().getConfigurations(monitor);
+				configurations = getImakerWrapper().getConfigurations(monitor,null);
 				if(configurations.size()==0) {
 					IMakerCoreExecutionException ex = new IMakerCoreExecutionException(Messages.getString("Error.1"));
 					InvocationTargetException te = new InvocationTargetException(ex);
--- a/imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/viewers/DebugTab.java	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/viewers/DebugTab.java	Tue Feb 09 17:10:58 2010 +0200
@@ -322,7 +322,7 @@
 			
 			private boolean isWarning(Object element) {
 				IbyEntry entry = getEntry(element);
-				String location = "-"+entry.getLocation().toString().toUpperCase();
+				String location = " "+entry.getLocation().toString().toUpperCase()+" ";
 				String targets[] = mainTab.getSelectedTargets();
 				UIConfiguration pr = mainTab.getSelectedProduct();
 				for (int i = 0; i < targets.length; i++) {
--- a/imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/viewers/PreferencesTab.java	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/viewers/PreferencesTab.java	Tue Feb 09 17:10:58 2010 +0200
@@ -139,17 +139,6 @@
 		setControl(createControl(parent));
 	}
 	
-//	public void displayCurrentProperties() {
-//		selectedProperties = workstation.getCurrentProperties();
-//		if(selectedProperties!=null) {
-//			displayProperties(selectedProperties);
-//			if(!selectedProperties.getFilename().equals(ImakerProperties.CREATE_NEW)) {
-//				nameState = NAME_STATE.NAMED;
-//				changeEditState(EDIT_STATE.SAVED);				
-//			}
-//		}
-//		setTextField();
-//	}
 
 	private Control createControl(CTabFolder parent) {
 		// Create Top composite in top of the parent composite
@@ -569,9 +558,15 @@
 
 	private void refreshProduct(UIConfiguration product) {
 		if(product==null) return;
+		clearWidgets();
+		try {
+			product.load();
+		} catch (Throwable e) {
+			StatusHandler.handle(IStatus.ERROR,"An error has occurred while executing iMaker Core.",e);
+			return;
+		}
 		textProduct.setText(product.getConfigurationName());
 		textProduct.setData(product);
-		clearWidgets();
 		activeEnvironment.setCurrentProduct(product);
 
 		List<UITarget> targets = product.getFilteredTargets();
@@ -592,6 +587,9 @@
 		listSource.removeAll();
 		listTarget.removeAll();
 		resetAdditionalFields();
+		settingsTab.setInput(null);
+		tabDebug.clear();
+		platsimTab.clear();
 	}
 
 	private void fixVersionText() {
--- a/imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/wrapper/IMakerWrapper.java	Mon Jan 25 12:26:21 2010 +0200
+++ b/imakerplugin/com.nokia.s60tools.imaker/src/com/nokia/s60tools/imaker/internal/wrapper/IMakerWrapper.java	Tue Feb 09 17:10:58 2010 +0200
@@ -136,52 +136,67 @@
 	/* (non-Javadoc)
 	 * @see com.nokia.s60tools.imakerplugin.wrapper.IIMakerWrapper#getConfigurations(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
 	 */
-	public List<UIConfiguration> getConfigurations(IProgressMonitor monitor) 
+	public List<UIConfiguration> getConfigurations(IProgressMonitor monitor, String makefile) 
 	throws IMakerCoreExecutionException, IMakerCoreNotFoundException {
 		this.monitor = monitor;
 		verifyCompatibility();
-		List<UIConfiguration> configurations = getConfigurations((String)null);
+		List<UIConfiguration> configurations = getConfigurations(makefile);
 		return configurations;
 	}
 
 	private List<UIConfiguration> getConfigurations(String makefile) throws IMakerCoreExecutionException {
 		List<UIConfiguration> uiConfigs = new ArrayList<UIConfiguration>();
 		List<String> makeFiles=null;
+		loadDefaultData();
 		if(makefile==null||makefile.equals("")) {
+			if (monitor != null) {
+				monitor.beginTask(Messages.getString("IMakerWrapper.3"), 1);
+			}
 			makeFiles = queryMakefiles();
+			
+			for (String mk : makeFiles) {
+				Configuration item = createConfiguration(mk);
+				uiConfigs.add(new UIConfiguration(item,this));
+			}
+			
+			if(dProduct!=null) {
+				for(UIConfiguration config: uiConfigs) {
+					String pname = config.getConfigurationName();
+					if(pname != null && pname.equals(dProduct)) {
+						config.setDefaultConfig(true);
+						break;
+					}
+				}			
+			}
+			
+			if (monitor != null) {
+				monitor.done();
+			}
 		} else {
 			makeFiles = new ArrayList<String>();
 			makeFiles.add(makefile);
+			
+			if (monitor != null) {
+				monitor.beginTask(Messages.getString("IMakerWrapper.3"), (makeFiles.size()*2));
+			}
+			
+			Result result = parseResult(makeFiles);
+			
+			// Get configurations out of the result object
+			Iterator<Configuration> configIter = result.getConfigurations().iterator();
+			while (configIter.hasNext()) {
+				Configuration item = configIter.next();
+				if(item.getTargetrefs().size()==0) continue;
+				uiConfigs.add(new UIConfiguration(item,this));
+			}
+			if(uiConfigs.isEmpty()) {
+				throw lastImakerException;
+			}			
+			if (monitor != null) {
+				monitor.done();
+			}
 		}
 		
-		if (monitor != null) {
-			monitor.beginTask(Messages.getString("IMakerWrapper.3"), (makeFiles.size()*2));
-		}
-		loadDefaultData();
-		Result result = parseResult(makeFiles);
-		
-		// Get configurations out of the result object
-		Iterator<Configuration> configIter = result.getConfigurations().iterator();
-		while (configIter.hasNext()) {
-			Configuration item = configIter.next();
-			if(item.getTargetrefs().size()==0) continue;
-			uiConfigs.add(new UIConfiguration(item));
-		}
-		if(uiConfigs.isEmpty()) {
-			throw lastImakerException;
-		}
-		if (monitor != null) {
-			monitor.done();
-		}
-		if(dProduct!=null) {
-			for(UIConfiguration config: uiConfigs) {
-				String pname = config.getConfigurationName();
-				if(pname != null && pname.equals(dProduct)) {
-					config.setDefaultConfig(true);
-					break;
-				}
-			}			
-		}
 		return uiConfigs;
 	}
 
@@ -192,7 +207,6 @@
 		params.clear();
 		params.add(IMakerWrapperPreferences.DEFAULT_DATA);// + configPath
 		Pattern product = Pattern.compile("\\s*IMAKER_CONFMK.*image_conf_(.*)\\.mk.\\s*");
-//		Pattern target  = Pattern.compile("\\s*TARGET_DEFAULT\\s*=\\s*.(.*).\\s*");
 		try {
 			List<String> lines = executeCommand(params,null);
 			for (String line : lines) {
@@ -204,15 +218,6 @@
 						break;
 					}
 				}
-//				matcher = target.matcher(line);
-//				if(matcher.matches()) {
-//					String tr = matcher.group(1);
-//					if(!tr.equals("")) {
-//						dTarget = tr;
-//						System.out.println("default target = " + tr);
-//						continue;
-//					}
-//				}
 			}
 		} catch (IMakerCoreExecutionException e) {
 			e.printStackTrace();
@@ -277,7 +282,7 @@
 		if (monitor != null) {
 			monitor.done();
 		}
-		return new UIConfiguration(config);
+		return new UIConfiguration(config,this);
 	}
 	
 	/* (non-Javadoc)