|
From: <caw...@us...> - 2007-07-10 19:44:45
|
Revision: 2741
http://svn.sourceforge.net/rubyeclipse/?rev=2741&view=rev
Author: cawilliams
Date: 2007-07-10 11:32:09 -0700 (Tue, 10 Jul 2007)
Log Message:
-----------
fix #5033 - Folder field ignored in Ruby Class wizard
Modified Paths:
--------------
trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/wizards/NewTypeWizardPage.java
Modified: trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/wizards/NewTypeWizardPage.java
===================================================================
--- trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/wizards/NewTypeWizardPage.java 2007-07-10 17:14:42 UTC (rev 2740)
+++ trunk/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/ui/wizards/NewTypeWizardPage.java 2007-07-10 18:32:09 UTC (rev 2741)
@@ -94,6 +94,8 @@
private final static String PAGE_NAME= "NewTypeWizardPage"; //$NON-NLS-1$
+ /** Field ID of the package input field. */
+ protected final static String PACKAGE= PAGE_NAME + ".package"; //$NON-NLS-1$
/** Field ID of the enclosing type input field. */
protected final static String ENCLOSING= PAGE_NAME + ".enclosing"; //$NON-NLS-1$
/** Field ID of the enclosing type checkbox. */
@@ -608,7 +610,8 @@
ISourceFolderRoot root = getSourceFolderRoot();
ISourceFolder pack= getSourceFolder();
if (pack == null) {
- pack= root.getSourceFolder(new String[] {}); }
+ pack= root.getSourceFolder(new String[] {});
+ }
if (!pack.exists()) {
String packName= pack.getElementName();
@@ -807,8 +810,14 @@
*/
private void typePageDialogFieldChanged(DialogField field) {
String fieldName= null;
- if (field == fTypeNameDialogField) {
+ if (field == fPackageDialogField) {
+ /*fPackageStatus=*/ packageChanged();
+// updatePackageStatusLabel();
fTypeNameStatus= typeNameChanged();
+ fSuperClassStatus= superClassChanged();
+ fieldName= PACKAGE;
+ } else if (field == fTypeNameDialogField) {
+ fTypeNameStatus= typeNameChanged();
fieldName= TYPENAME;
} else if (field == fSuperClassDialogField) {
fSuperClassStatus= superClassChanged();
@@ -905,7 +914,13 @@
*/
protected void handleFieldChanged(String fieldName) {
super.handleFieldChanged(fieldName);
-
+ if (fieldName == CONTAINER) {
+ /*fPackageStatus=*/ packageChanged();
+// fEnclosingTypeStatus= enclosingTypeChanged();
+ fTypeNameStatus= typeNameChanged();
+ fSuperClassStatus= superClassChanged();
+ fSuperModulesStatus= superInterfacesChanged();
+ }
doStatusUpdate();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|