Author: dgolovin
Date: 2007-10-24 19:58:21 -0400 (Wed, 24 Oct 2007)
New Revision: 4484
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1157
surplus fields were removed and auto completion was restored
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2007-10-24
21:33:42 UTC (rev 4483)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2007-10-24
23:58:21 UTC (rev 4484)
@@ -88,10 +88,6 @@
loadCustomVariables(vars);
-// String actionFolder =
vars.get(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME).toString();
-// String entityFolder =
vars.get(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME).toString();
-// String testFolder =
vars.get(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME).toString();
-
String actionFolder = getSessionBeanPackageName(seamFacetPrefs, params);
String entityFolder = getEntityBeanPackageName(seamFacetPrefs, params);
String testFolder = getTestCasesPackageName(seamFacetPrefs, params);
@@ -124,7 +120,7 @@
FileUtils.getFileUtils().copyFile(new File(mapping[0]), file[index],filters,true);
index++;
}
- seamPrjSet.refreshLocal(monitor);
+
Display.getCurrent().asyncExec(new Runnable() {
/* (non-Javadoc)
* @see java.lang.Runnable#run()
@@ -140,13 +136,21 @@
}
}
});
- } catch (CoreException e) {
- result = new Status(IStatus.ERROR,SeamGuiPlugin.PLUGIN_ID,e.getMessage(),e);
+
} catch (BackingStoreException e) {
result = new Status(IStatus.ERROR,SeamGuiPlugin.PLUGIN_ID,e.getMessage(),e);
} catch (IOException e) {
result = new Status(IStatus.ERROR,SeamGuiPlugin.PLUGIN_ID,e.getMessage(),e);
- }
+ } finally {
+ try {
+ seamPrjSet.refreshLocal(monitor);
+ } catch (CoreException e) {
+ result = new Status(IStatus.ERROR,SeamGuiPlugin.PLUGIN_ID,e.getMessage(),e);
+ }
+ }
+ if (result.getSeverity()==IStatus.ERROR) {
+ SeamGuiPlugin.getDefault().getLog().log(result);
+ }
return result;
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizard.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizard.java 2007-10-24
21:33:42 UTC (rev 4483)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizard.java 2007-10-24
23:58:21 UTC (rev 4484)
@@ -12,6 +12,7 @@
package org.jboss.tools.seam.ui.wizard;
import java.lang.reflect.InvocationTargetException;
+import java.text.MessageFormat;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.operations.IOperationHistory;
@@ -77,9 +78,10 @@
} catch (ExecutionException e) {
result = new Status(IStatus.ERROR,SeamGuiPlugin.PLUGIN_ID,e.getMessage(),e);
SeamCorePlugin.getPluginLog().logError(e);
- ErrorDialog.openError(Display.getCurrent().getActiveShell(), "Seam wizard
error", result.getMessage(), result);
}
- //ErrorDialog.openError(Display.getCurrent().getActiveShell(),
SeamUIMessages.SeamBaseWizard_0, result.getMessage(), result);
+ if(result.getSeverity()==IStatus.ERROR) {
+ ErrorDialog.openError(Display.getCurrent().getActiveShell(), "Error",
MessageFormat.format("Error occur during creating {0}. Please, check Error Log View
for details." , SeamBaseWizard.this.getWindowTitle()),result);
+ }
}
});
} catch (InvocationTargetException e) {
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2007-10-24
21:33:42 UTC (rev 4483)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2007-10-24
23:58:21 UTC (rev 4484)
@@ -112,9 +112,8 @@
if(selectdProject!=null && !"".equals(selectdProject) &&
isValidProjectSelected()) {
isValidRuntimeConfigured(getSelectedProject());
- } else {
- setPageComplete(false);
}
+ setPageComplete(false);
}
/* (non-Javadoc)
@@ -313,12 +312,17 @@
if(errors.size()>0) {
setErrorMessage(errors.get(IValidator.DEFAULT_ERROR).toString());
setPageComplete(false);
- getEditor(IParameter.SEAM_BEAN_NAME).setEnabled(false);
+ IFieldEditor beanEditor = getEditor(IParameter.SEAM_BEAN_NAME);
+ if(beanEditor!=null) {
+ beanEditor.setEnabled(false);
+ }
IFieldEditor packageEditor = getEditor(IParameter.SEAM_PACKAGE_NAME);
if(packageEditor!=null) {
packageEditor.setEnabled(false);
}
return false;
+ } else {
+
}
return true;
}
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java 2007-10-24
21:33:42 UTC (rev 4483)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java 2007-10-24
23:58:21 UTC (rev 4484)
@@ -45,9 +45,10 @@
*/
@Override
protected void createEditors() {
- super.createEditors();
-
+ addEditor(SeamWizardFactory.createSeamProjectSelectionFieldEditor(SeamWizardUtils.getRootSeamProjectName(initialSelection)));
addEditor(SeamWizardFactory.createSeamEntityClasNameFieldEditor());
+ String packageName =
getDefaultPackageName(SeamWizardUtils.getRootSeamProjectName(initialSelection));
+ addEditor(SeamWizardFactory.createSeamJavaPackageSelectionFieldEditor(packageName));
addEditor(SeamWizardFactory.createSeamMasterPageNameFieldEditor());
addEditor(SeamWizardFactory.createSeamPageNameFieldEditor());
}
@@ -97,15 +98,6 @@
protected void doValidate(PropertyChangeEvent event) {
if(!isValidProjectSelected()) return;
- Map errors = ValidatorFactory.SEAM_PROJECT_NAME_VALIDATOR.validate(
- editorRegistry.get(IParameter.SEAM_PROJECT_NAME).getValue(), null);
-
- if(errors.size()>0) {
- setErrorMessage(errors.get(IValidator.DEFAULT_ERROR).toString());
- setPageComplete(false);
- return;
- }
- getEditor(IParameter.SEAM_BEAN_NAME).setEnabled(true);
IFieldEditor packageEditor = getEditor(IParameter.SEAM_PACKAGE_NAME);
if(packageEditor!=null) {
packageEditor.setEnabled(true);
@@ -115,7 +107,7 @@
if(!isValidRuntimeConfigured(project)) return;
- errors = ValidatorFactory.SEAM_COMPONENT_NAME_VALIDATOR.validate(
+ Map errors = ValidatorFactory.SEAM_COMPONENT_NAME_VALIDATOR.validate(
editorRegistry.get(IParameter.SEAM_ENTITY_CLASS_NAME).getValue(), null);
if(errors.size()>0) {