sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.wizards/src/com/nokia/carbide/cpp/internal/pi/wizards/ui/NewPIWizardPageBupMapTask.java
equal
deleted
inserted
replaced
22 import java.util.HashSet; |
22 import java.util.HashSet; |
23 import java.util.Set; |
23 import java.util.Set; |
24 |
24 |
25 import org.eclipse.jface.layout.GridDataFactory; |
25 import org.eclipse.jface.layout.GridDataFactory; |
26 import org.eclipse.jface.layout.GridLayoutFactory; |
26 import org.eclipse.jface.layout.GridLayoutFactory; |
|
27 import org.eclipse.jface.viewers.AbstractTreeViewer; |
27 import org.eclipse.jface.viewers.ISelectionChangedListener; |
28 import org.eclipse.jface.viewers.ISelectionChangedListener; |
|
29 import org.eclipse.jface.viewers.IStructuredSelection; |
28 import org.eclipse.jface.viewers.SelectionChangedEvent; |
30 import org.eclipse.jface.viewers.SelectionChangedEvent; |
29 import org.eclipse.jface.viewers.StructuredSelection; |
31 import org.eclipse.jface.viewers.StructuredSelection; |
30 import org.eclipse.swt.SWT; |
32 import org.eclipse.swt.SWT; |
31 import org.eclipse.swt.widgets.Composite; |
33 import org.eclipse.swt.widgets.Composite; |
32 import org.eclipse.swt.widgets.Label; |
34 import org.eclipse.swt.widgets.Label; |
103 /* (non-Javadoc) |
105 /* (non-Javadoc) |
104 * @see com.nokia.carbide.cpp.internal.pi.wizards.ui.INewPIWizardSettings#setupPageFromFromNewPIWizardSettings() |
106 * @see com.nokia.carbide.cpp.internal.pi.wizards.ui.INewPIWizardSettings#setupPageFromFromNewPIWizardSettings() |
105 */ |
107 */ |
106 public void setupPageFromFromNewPIWizardSettings() { |
108 public void setupPageFromFromNewPIWizardSettings() { |
107 if (settings.keyMapProfile != null) { |
109 if (settings.keyMapProfile != null) { |
108 profileTreeViewer.collapseAll(); |
110 profileTreeViewer.expandAll(); |
|
111 profileTreeViewer.setSelection(new StructuredSelection(settings.keyMapProfile)); |
109 profileTreeViewer.reveal(settings.keyMapProfile); |
112 profileTreeViewer.reveal(settings.keyMapProfile); |
110 profileTreeViewer.setSelection(new StructuredSelection(settings.keyMapProfile)); |
|
111 } |
113 } |
112 } |
114 } |
113 |
115 |
114 /* (non-Javadoc) |
116 /* (non-Javadoc) |
115 * @see com.nokia.carbide.cpp.internal.pi.wizards.ui.INewPIWizardSettings#validatePage() |
117 * @see com.nokia.carbide.cpp.internal.pi.wizards.ui.INewPIWizardSettings#validatePage() |
167 if (settings.haveRomOnly || settings.haveAppRom) { |
169 if (settings.haveRomOnly || settings.haveAppRom) { |
168 ArrayList<IBupEventMapProfile> profiles = BupEventMapManager.getInstance().getProfilesFromSDK(settings.romSdk); |
170 ArrayList<IBupEventMapProfile> profiles = BupEventMapManager.getInstance().getProfilesFromSDK(settings.romSdk); |
169 if (profiles.size() == 1) { |
171 if (profiles.size() == 1) { |
170 IBupEventMapProfile profile = profiles.get(0); |
172 IBupEventMapProfile profile = profiles.get(0); |
171 rationaleText.setText(Messages.getString("NewPIWizardPageBupMapTask.6") + profile.getProfileId() + Messages.getString("NewPIWizardPageBupMapTask.7") + profile.getSDK().getUniqueId()+ Messages.getString("NewPIWizardPageBupMapTask.8")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
173 rationaleText.setText(Messages.getString("NewPIWizardPageBupMapTask.6") + profile.getProfileId() + Messages.getString("NewPIWizardPageBupMapTask.7") + profile.getSDK().getUniqueId()+ Messages.getString("NewPIWizardPageBupMapTask.8")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
172 profileTreeViewer.collapseAll(); |
174 profileTreeViewer.setSelection(new StructuredSelection(profile)); |
173 profileTreeViewer.reveal(profile); |
175 profileTreeViewer.reveal(profile); |
174 profileTreeViewer.setSelection(new StructuredSelection(profile)); |
|
175 return true; |
176 return true; |
176 |
177 |
177 } else { |
178 } else { |
178 if (profiles.size() == 0) { |
179 if (profiles.size() == 0) { |
179 if (new File(BupEventMapManager.getInstance().profileLocatationInSDK(settings.romSdk)).exists() == false) { |
180 if (new File(BupEventMapManager.getInstance().profileLocatationInSDK(settings.romSdk)).exists() == false) { |
201 if (sdks.size() == 1) { |
202 if (sdks.size() == 1) { |
202 ArrayList<IBupEventMapProfile> profiles = BupEventMapManager.getInstance().getProfilesFromSDK(sdks.get(0)); |
203 ArrayList<IBupEventMapProfile> profiles = BupEventMapManager.getInstance().getProfilesFromSDK(sdks.get(0)); |
203 if (profiles.size() == 1) { |
204 if (profiles.size() == 1) { |
204 IBupEventMapProfile profile = profiles.get(0); |
205 IBupEventMapProfile profile = profiles.get(0); |
205 rationaleText.setText(Messages.getString("NewPIWizardPageBupMapTask.11") + profile.getProfileId() + Messages.getString("NewPIWizardPageBupMapTask.12") + profile.getSDK().getUniqueId()+ Messages.getString("NewPIWizardPageBupMapTask.13")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
206 rationaleText.setText(Messages.getString("NewPIWizardPageBupMapTask.11") + profile.getProfileId() + Messages.getString("NewPIWizardPageBupMapTask.12") + profile.getSDK().getUniqueId()+ Messages.getString("NewPIWizardPageBupMapTask.13")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
206 profileTreeViewer.collapseAll(); |
207 profileTreeViewer.setSelection(new StructuredSelection(profile)); |
207 profileTreeViewer.reveal(profile); |
208 profileTreeViewer.reveal(profile); |
208 profileTreeViewer.setSelection(new StructuredSelection(profile)); |
|
209 return true; |
209 return true; |
210 } else { |
210 } else { |
211 rationaleText.setText(Messages.getString("NewPIWizardPageBupMapTask.14") + sdks.get(0).getUniqueId()+ Messages.getString("NewPIWizardPageBupMapTask.15")); //$NON-NLS-1$ //$NON-NLS-2$ |
211 rationaleText.setText(Messages.getString("NewPIWizardPageBupMapTask.14") + sdks.get(0).getUniqueId()+ Messages.getString("NewPIWizardPageBupMapTask.15")); //$NON-NLS-1$ //$NON-NLS-2$ |
212 } |
212 } |
213 } else { |
213 } else { |
217 } |
217 } |
218 rationaleText.setText(Messages.getString("NewPIWizardPageBupMapTask.19") + sdkList); //$NON-NLS-1$ |
218 rationaleText.setText(Messages.getString("NewPIWizardPageBupMapTask.19") + sdkList); //$NON-NLS-1$ |
219 } |
219 } |
220 } |
220 } |
221 |
221 |
222 profileTreeViewer.collapseAll(); |
222 IBupEventMapProfile profile = BupEventMapManager.getInstance().getPrefSelectedProfile(); |
223 profileTreeViewer.reveal(BupEventMapManager.getInstance().getPrefSelectedProfile()); |
223 profileTreeViewer.setSelection(new StructuredSelection(profile)); |
224 profileTreeViewer.setSelection(new StructuredSelection(BupEventMapManager.getInstance().getPrefSelectedProfile())); |
224 profileTreeViewer.reveal(profile); |
225 |
225 |
226 return false; |
226 return false; |
227 } |
227 } |
228 |
228 |
229 public void setVisible(boolean visable) { |
229 public void setVisible(boolean visable) { |
230 super.setVisible(visable); |
230 super.setVisible(visable); |