From e49f6111a67ef1ae92bfc2bc2a78e2f69456a1aa Mon Sep 17 00:00:00 2001 From: YAMAZAKI Makoto Date: Sat, 3 Mar 2012 20:05:57 +0900 Subject: fixes a bug that Working Set specified in "New Android Project" wizard is ignored in some cases. In original code, specified Working Set data is set to mValues in ProjectNamePage#canFlipToNextPage(). This hack works in some cases, but not always. canFlipToNextPage is invoked when user changes the name of project, but is not invoked when user changed the data of Working Set. So, if user changes WorkingSet as last action of this page, it is ignored. I moved "mValues.workingSets = getWorkingSets();" from canFlipToNextPage() to getNextPage() because getNextPage() is alwasys invoked at the end of ProjectNamePage. http://code.google.com/p/android/issues/detail?id=21508 Change-Id: I336fe449703144ac7a053cce6a946f931e97bb9f Signed-off-by: YAMAZAKI Makoto --- .../ide/eclipse/adt/internal/wizards/newproject/ProjectNamePage.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'eclipse') diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/ProjectNamePage.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/ProjectNamePage.java index ff77b9f..d4c342c 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/ProjectNamePage.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/newproject/ProjectNamePage.java @@ -40,6 +40,7 @@ import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; import org.eclipse.jface.dialogs.IMessageProvider; import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.osgi.util.TextProcessor; import org.eclipse.swt.SWT; @@ -625,11 +626,11 @@ class ProjectNamePage extends WizardPage implements SelectionListener, ModifyLis } @Override - public boolean canFlipToNextPage() { + public IWizardPage getNextPage() { // Sync working set data to the value object, since the WorkingSetGroup // doesn't let us add listeners to do this lazily mValues.workingSets = getWorkingSets(); - return super.canFlipToNextPage(); + return super.getNextPage(); } } -- cgit v1.1