Author: dgeraskov
Date: 2009-12-15 06:08:41 -0500 (Tue, 15 Dec 2009)
New Revision: 19272
Modified:
branches/jbosstools-3.1.0.RC1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/UpDownListComposite.java
branches/jbosstools-3.1.0.RC1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingElementsSelectionPage2.java
branches/jbosstools-3.1.0.RC1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5403
Modified:
branches/jbosstools-3.1.0.RC1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/UpDownListComposite.java
===================================================================
---
branches/jbosstools-3.1.0.RC1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/UpDownListComposite.java 2009-12-15
09:37:55 UTC (rev 19271)
+++
branches/jbosstools-3.1.0.RC1/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/UpDownListComposite.java 2009-12-15
11:08:41 UTC (rev 19272)
@@ -224,7 +224,7 @@
return button;
}
- private void handleButtonPressed(Button button) {
+ protected void handleButtonPressed(Button button) {
if (button == removeButton) {
handleRemove();
} else if (button == upButton) {
Modified:
branches/jbosstools-3.1.0.RC1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingElementsSelectionPage2.java
===================================================================
---
branches/jbosstools-3.1.0.RC1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingElementsSelectionPage2.java 2009-12-15
09:37:55 UTC (rev 19271)
+++
branches/jbosstools-3.1.0.RC1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingElementsSelectionPage2.java 2009-12-15
11:08:41 UTC (rev 19272)
@@ -15,6 +15,7 @@
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.TableItem;
import org.hibernate.eclipse.jdt.ui.internal.JdtUiMessages;
@@ -25,7 +26,7 @@
*/
public class NewHibernateMappingElementsSelectionPage2 extends WizardPage {
- AddRemoveTableComposite addRemoveTableComposite;
+ private AddRemoveTableComposite addRemoveTableComposite;
private IStructuredSelection selection;
@@ -36,7 +37,13 @@
}
public void createControl(Composite parent) {
- addRemoveTableComposite = new AddRemoveTableComposite(parent, SWT.NONE);
+ addRemoveTableComposite = new AddRemoveTableComposite(parent, SWT.NONE){
+ @Override
+ protected void handleButtonPressed(Button button) {
+ super.handleButtonPressed(button);
+ itemsChanged();
+ }
+ };
addRemoveTableComposite.getTableViewer().setInput(selection.toArray());
setControl(addRemoveTableComposite);
}
@@ -49,5 +56,9 @@
}
return new StructuredSelection(data);
}
+
+ protected void itemsChanged(){
+ getContainer().updateButtons();
+ }
}
Modified:
branches/jbosstools-3.1.0.RC1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java
===================================================================
---
branches/jbosstools-3.1.0.RC1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java 2009-12-15
09:37:55 UTC (rev 19271)
+++
branches/jbosstools-3.1.0.RC1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java 2009-12-15
11:08:41 UTC (rev 19272)
@@ -427,5 +427,10 @@
HibernateConsolePlugin.getDefault().log(e);
}
}
+ }
+
+ @Override
+ public boolean canFinish() {
+ return !page0.getSelection().isEmpty() || cPage.isPageComplete();
}
}