JBoss Tools SVN: r5456 - in trunk: seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-12-26 13:05:16 -0500 (Wed, 26 Dec 2007)
New Revision: 5456
Added:
trunk/seam/tests/org.jboss.tools.seam.ui.test/seam/
trunk/seam/tests/org.jboss.tools.seam.ui.test/seam/seam-gen/
trunk/seam/tests/org.jboss.tools.seam.ui.test/seam/seam-gen/resources/
trunk/seam/tests/org.jboss.tools.seam.ui.test/seam/seam-gen/src/
trunk/seam/tests/org.jboss.tools.seam.ui.test/seam/seam-gen/view/
Modified:
trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1111 Fixed the bug and added JUnit Test of it.
Modified: trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2007-12-26 16:07:59 UTC (rev 5455)
+++ trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2007-12-26 18:05:16 UTC (rev 5456)
@@ -56,29 +56,28 @@
public class JBossASAdapterInitializer implements IStartup {
public static final String JBOSS_AS_HOME = "../../../../jboss-eap/jboss-as"; // JBoss AS home directory (relative to plugin)- <RHDS_HOME>/jbossas.
-
+
public static final String JBOSS_AS_RUNTIME_TYPE_ID
= "org.jboss.ide.eclipse.as.runtime.42";
-
+
public static final String JBOSS_AS_TYPE_ID = "org.jboss.ide.eclipse.as.42";
-
+
public static final String JBOSS_AS_NAME = "JBoss Application Server 4.2";
-
+
public static final String JBOSS_AS_HOST = "localhost";
-
+
public static final String JBOSS_AS_DEFAULT_CONFIGURATION_NAME = "default";
public static final String FIRST_START_PREFERENCE_NAME = "FIRST_START";
-
-
+
public static final String HSQL_DRIVER_DEFINITION_ID
= "DriverDefn.Hypersonic DB";
-
+
public static final String HSQL_DRIVER_NAME = "Hypersonic DB";
public static final String HSQL_DRIVER_TEMPLATE_ID
= "org.eclipse.datatools.enablement.hsqldb.1_8.driver";
-
+
public static final String DTP_DB_URL_PROPERTY_ID
= "org.eclipse.datatools.connectivity.db.URL";
/**
@@ -93,7 +92,6 @@
* Compare this method with JBossServerWizardFragment#performFinish()
*/
try {
-
JstFirstRunPlugin.getDefault().getPreferenceStore().setDefault(FIRST_START_PREFERENCE_NAME, true);
boolean firstStart = JstFirstRunPlugin.getDefault().getPreferenceStore().getBoolean(FIRST_START_PREFERENCE_NAME);
if(!firstStart) {
@@ -111,8 +109,6 @@
}
IPath jbossAsLocationPath = new Path(jbossASLocation);
- String type = null;
- String version = null;
IServer[] servers = ServerCore.getServers();
for(int i=0; i<servers.length; i++) {
@@ -124,120 +120,22 @@
IRuntimeWorkingCopy runtime = null;
IRuntime[] runtimes = ServerCore.getRuntimes();
- String runtimeId = null;
for(int i=0; i<runtimes.length; i++) {
if(runtimes[0].getLocation().equals(jbossASLocation)) {
runtime = runtimes[0].createWorkingCopy();
- runtimeId = null;
break;
}
}
IProgressMonitor progressMonitor = new NullProgressMonitor();
if(runtime==null) {
- IRuntimeType[] runtimeTypes = ServerUtil.getRuntimeTypes(type, version, JBOSS_AS_RUNTIME_TYPE_ID);
- if(runtimeTypes.length>0) {
- runtime = runtimeTypes[0].createRuntime(runtimeId, progressMonitor);
- runtime.setLocation(jbossAsLocationPath);
- IVMInstall defaultVM = JavaRuntime.getDefaultVMInstall();
- // IJBossServerRuntime.PROPERTY_VM_ID
- ((RuntimeWorkingCopy)runtime).setAttribute("PROPERTY_VM_ID", defaultVM.getId());
- // IJBossServerRuntime.PROPERTY_VM_TYPE_ID
- ((RuntimeWorkingCopy)runtime).setAttribute("PROPERTY_VM_TYPE_ID", defaultVM.getVMInstallType().getId());
- // IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME
- ((RuntimeWorkingCopy)runtime).setAttribute("org.jboss.ide.eclipse.as.core.runtime.configurationName", JBOSS_AS_DEFAULT_CONFIGURATION_NAME);
-
- runtime.save(false, progressMonitor);
- }
+ runtime = createRuntime(jbossASLocation, progressMonitor);
}
-
if(runtime!=null) {
- IServerType serverType = ServerCore.findServerType(JBOSS_AS_TYPE_ID);
- IServerWorkingCopy server = serverType.createServer(null, null, runtime, progressMonitor);
-
- server.setHost(JBOSS_AS_HOST);
- server.setName(JBOSS_AS_NAME);
- // JBossServer.DEPLOY_DIRECTORY
- String deployVal = runtime.getLocation().append( "server").append(JBOSS_AS_DEFAULT_CONFIGURATION_NAME).append("deploy").toOSString();
- ((ServerWorkingCopy)server).setAttribute("org.jboss.ide.eclipse.as.core.server.deployDirectory", deployVal);
-
- // IDeployableServer.TEMP_DEPLOY_DIRECTORY
- String deployTmpFolderVal = runtime.getLocation().append( "server").append(JBOSS_AS_DEFAULT_CONFIGURATION_NAME).append("tmp").append("jbosstoolsTemp").toOSString();
- ((ServerWorkingCopy)server).setAttribute("org.jboss.ide.eclipse.as.core.server.tempDeployDirectory", deployTmpFolderVal);
-
- // If we'd need to set up a username / pw for JMX, do it here.
-// ((ServerWorkingCopy)serverWC).setAttribute(JBossServer.SERVER_USERNAME, authUser);
-// ((ServerWorkingCopy)serverWC).setAttribute(JBossServer.SERVER_PASSWORD, authPass);
-
- server.save(false, progressMonitor);
+ createServer(progressMonitor, runtime);
}
-
- DriverInstance driver = DriverManager.getInstance()
- .getDriverInstanceByName(HSQL_DRIVER_NAME);
- if(driver==null) {
- TemplateDescriptor descr = TemplateDescriptor
- .getDriverTemplateDescriptor(HSQL_DRIVER_TEMPLATE_ID);
- IPropertySet instance = new PropertySetImpl(
- HSQL_DRIVER_NAME,HSQL_DRIVER_DEFINITION_ID);
- instance.setName(HSQL_DRIVER_NAME);
- instance.setID(HSQL_DRIVER_DEFINITION_ID);
- Properties props = new Properties();
- IConfigurationElement[] template = descr.getProperties();
- for (int i = 0; i < template.length; i++) {
- IConfigurationElement prop = template[i];
- String id = prop.getAttribute("id"); //$NON-NLS-1$
-
- String value = prop.getAttribute("value"); //$NON-NLS-1$
- props.setProperty(id, value == null ? ""
- : value);
- }
- props.setProperty(DTP_DB_URL_PROPERTY_ID, "jdbc:hsqldb:.");
- props.setProperty(IDriverMgmtConstants.PROP_DEFN_TYPE,
- descr.getId());
- props.setProperty(IDriverMgmtConstants.PROP_DEFN_JARLIST,
- jbossASLocation+"/server/default/lib/hsqldb.jar");
-
- instance.setBaseProperties(props);
- DriverManager.getInstance().removeDriverInstance(instance.getID());
- System.gc();
- DriverManager.getInstance().addDriverInstance(instance);
-
- }
-
- driver = DriverManager.getInstance().getDriverInstanceByName(HSQL_DRIVER_NAME);
- if(driver!=null) {
- // create profile
- Properties props = new Properties();
- props.setProperty(ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID,
- HSQL_DRIVER_DEFINITION_ID);
- props.setProperty(
- IDBConnectionProfileConstants.CONNECTION_PROPERTIES_PROP_ID,
- "");
- props.setProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID,
- driver.getProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID));
- props.setProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID,
- driver.getProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID));
- props.setProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID,
- driver.getProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID));
- props.setProperty(IDBDriverDefinitionConstants.DATABASE_NAME_PROP_ID,
- "Default");
- props.setProperty(IDBDriverDefinitionConstants.PASSWORD_PROP_ID, "");
- props.setProperty(
- IDBConnectionProfileConstants.SAVE_PASSWORD_PROP_ID, "false");
- props.setProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID,
- driver.getProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID));
- props.setProperty(IDBDriverDefinitionConstants.URL_PROP_ID,
- driver.getProperty(IDBDriverDefinitionConstants.URL_PROP_ID));
-
- ProfileManager.getInstance().createProfile(
- "DefaultDS",
- "The JBoss AS Hypersonic embedded database",
- IDBConnectionProfileConstants.CONNECTION_PROFILE_ID,
- props,
- "", false);
- }
-
+ createDriver(jbossASLocation);
} catch (CoreException e) {
JstFirstRunPlugin.getPluginLog().log(new Status(IStatus.ERROR,
JstFirstRunPlugin.PLUGIN_ID,"Can't create new JBoss Server", e));
@@ -250,4 +148,134 @@
"Connection Profile for JBoss AS Hypersonic embedded database", e));
}
}
-}
+
+ /**
+ * Creates new JBoss AS Runtime, Server and hsqldb driver
+ * @param jbossASLocation location of JBoss Server
+ * @param progressMonitor
+ * @return server working copy
+ * @throws CoreException
+ * @throws ConnectionProfileException
+ */
+ public static IServerWorkingCopy initJBossAS(String jbossASLocation, IProgressMonitor progressMonitor) throws CoreException, ConnectionProfileException {
+ IRuntimeWorkingCopy runtime = createRuntime(jbossASLocation, progressMonitor);
+ IServerWorkingCopy server = null;
+ if(runtime!=null) {
+ createServer(progressMonitor, runtime);
+ }
+ createDriver(jbossASLocation);
+ return server;
+ }
+
+ /**
+ * Creates new JBoss AS Runtime
+ * @param jbossASLocation location of JBoss AS
+ * @param progressMonitor
+ * @return runtime working copy
+ * @throws CoreException
+ */
+ private static IRuntimeWorkingCopy createRuntime(String jbossASLocation, IProgressMonitor progressMonitor) throws CoreException {
+ IRuntimeWorkingCopy runtime = null;
+ String type = null;
+ String version = null;
+ String runtimeId = null;
+ IPath jbossAsLocationPath = new Path(jbossASLocation);
+ IRuntimeType[] runtimeTypes = ServerUtil.getRuntimeTypes(type, version, JBOSS_AS_RUNTIME_TYPE_ID);
+ if(runtimeTypes.length>0) {
+ runtime = runtimeTypes[0].createRuntime(runtimeId, progressMonitor);
+ runtime.setLocation(jbossAsLocationPath);
+ IVMInstall defaultVM = JavaRuntime.getDefaultVMInstall();
+ // IJBossServerRuntime.PROPERTY_VM_ID
+ ((RuntimeWorkingCopy)runtime).setAttribute("PROPERTY_VM_ID", defaultVM.getId());
+ // IJBossServerRuntime.PROPERTY_VM_TYPE_ID
+ ((RuntimeWorkingCopy)runtime).setAttribute("PROPERTY_VM_TYPE_ID", defaultVM.getVMInstallType().getId());
+ // IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME
+ ((RuntimeWorkingCopy)runtime).setAttribute("org.jboss.ide.eclipse.as.core.runtime.configurationName", JBOSS_AS_DEFAULT_CONFIGURATION_NAME);
+
+ runtime.save(false, progressMonitor);
+ }
+ return runtime;
+ }
+
+ /**
+ * Creates new JBoss Server
+ * @param progressMonitor
+ * @param runtime parent JBoss AS Runtime
+ * @return server working copy
+ * @throws CoreException
+ */
+ private static IServerWorkingCopy createServer(IProgressMonitor progressMonitor, IRuntimeWorkingCopy runtime) throws CoreException {
+ IServerType serverType = ServerCore.findServerType(JBOSS_AS_TYPE_ID);
+ IServerWorkingCopy server = serverType.createServer(null, null, runtime, progressMonitor);
+
+ server.setHost(JBOSS_AS_HOST);
+ server.setName(JBOSS_AS_NAME);
+ // JBossServer.DEPLOY_DIRECTORY
+ String deployVal = runtime.getLocation().append("server").append(JBOSS_AS_DEFAULT_CONFIGURATION_NAME).append("deploy").toOSString();
+ ((ServerWorkingCopy)server).setAttribute("org.jboss.ide.eclipse.as.core.server.deployDirectory", deployVal);
+
+ // IDeployableServer.TEMP_DEPLOY_DIRECTORY
+ String deployTmpFolderVal = runtime.getLocation().append("server").append(JBOSS_AS_DEFAULT_CONFIGURATION_NAME).append("tmp").append("jbosstoolsTemp").toOSString();
+ ((ServerWorkingCopy)server).setAttribute("org.jboss.ide.eclipse.as.core.server.tempDeployDirectory", deployTmpFolderVal);
+
+ // If we'd need to set up a username / pw for JMX, do it here.
+// ((ServerWorkingCopy)serverWC).setAttribute(JBossServer.SERVER_USERNAME, authUser);
+// ((ServerWorkingCopy)serverWC).setAttribute(JBossServer.SERVER_PASSWORD, authPass);
+
+ server.save(false, progressMonitor);
+ return server;
+ }
+
+ /**
+ * Creates HSQL DB Driver
+ * @param jbossASLocation location of JBoss AS
+ * @throws ConnectionProfileException
+ * @return driver instance
+ */
+ private static DriverInstance createDriver(String jbossASLocation) throws ConnectionProfileException {
+ DriverInstance driver = DriverManager.getInstance().getDriverInstanceByName(HSQL_DRIVER_NAME);
+ if (driver == null) {
+ TemplateDescriptor descr = TemplateDescriptor.getDriverTemplateDescriptor(HSQL_DRIVER_TEMPLATE_ID);
+ IPropertySet instance = new PropertySetImpl(HSQL_DRIVER_NAME, HSQL_DRIVER_DEFINITION_ID);
+ instance.setName(HSQL_DRIVER_NAME);
+ instance.setID(HSQL_DRIVER_DEFINITION_ID);
+ Properties props = new Properties();
+
+ IConfigurationElement[] template = descr.getProperties();
+ for (int i = 0; i < template.length; i++) {
+ IConfigurationElement prop = template[i];
+ String id = prop.getAttribute("id"); //$NON-NLS-1$
+
+ String value = prop.getAttribute("value"); //$NON-NLS-1$
+ props.setProperty(id, value == null ? "" : value);
+ }
+ props.setProperty(DTP_DB_URL_PROPERTY_ID, "jdbc:hsqldb:.");
+ props.setProperty(IDriverMgmtConstants.PROP_DEFN_TYPE, descr.getId());
+ props.setProperty(IDriverMgmtConstants.PROP_DEFN_JARLIST, jbossASLocation + "/server/default/lib/hsqldb.jar");
+
+ instance.setBaseProperties(props);
+ DriverManager.getInstance().removeDriverInstance(instance.getID());
+ System.gc();
+ DriverManager.getInstance().addDriverInstance(instance);
+ }
+
+ driver = DriverManager.getInstance().getDriverInstanceByName(HSQL_DRIVER_NAME);
+ if (driver != null) {
+ // create profile
+ Properties props = new Properties();
+ props.setProperty(ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID, HSQL_DRIVER_DEFINITION_ID);
+ props.setProperty(IDBConnectionProfileConstants.CONNECTION_PROPERTIES_PROP_ID, "");
+ props.setProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.DATABASE_VENDOR_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.DATABASE_VERSION_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.DATABASE_NAME_PROP_ID, "Default");
+ props.setProperty(IDBDriverDefinitionConstants.PASSWORD_PROP_ID, "");
+ props.setProperty(IDBConnectionProfileConstants.SAVE_PASSWORD_PROP_ID, "false");
+ props.setProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.USERNAME_PROP_ID));
+ props.setProperty(IDBDriverDefinitionConstants.URL_PROP_ID, driver.getProperty(IDBDriverDefinitionConstants.URL_PROP_ID));
+
+ ProfileManager.getInstance().createProfile("DefaultDS", "The JBoss AS Hypersonic embedded database", IDBConnectionProfileConstants.CONNECTION_PROFILE_ID, props, "", false);
+ }
+ return driver;
+ }
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-12-26 16:07:59 UTC (rev 5455)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-12-26 18:05:16 UTC (rev 5456)
@@ -80,29 +80,20 @@
public static final String PAGE_DESCRIPTION = SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_CONFIGURE_SEAM_FACET_SETTINGS;
- /**
- *
- */
private static final DriverClassHelpers HIBERNATE_HELPER = new DriverClassHelpers();
-
+
private static final List<String> DIALECT_CLASSES = getDialectClasses();
- /**
- *
- */
private IDataModel model = null;
- /**
- *
- */
private DataModelValidatorDelegate validatorDelegate;
-
+
private IFieldEditor jBossSeamHomeEditor = IFieldEditorFactory.INSTANCE
.createComboWithButton(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_SEAM_RUNTIME, getRuntimeNames(),
getSeamRuntimeDefaultValue(),
true, new NewSeamRuntimeAction(), (IValidator)null);
-
+
private IFieldEditor jBossAsDeployAsEditor = IFieldEditorFactory.INSTANCE
.createRadioEditor(
ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,
@@ -123,25 +114,25 @@
false, new EditConnectionProfileAction(),
new NewConnectionProfileAction(),
ValidatorFactory.NO_ERRORS_VALIDATOR);
-
+
private IFieldEditor jBossHibernateDbTypeEditor = IFieldEditorFactory.INSTANCE
.createComboEditor(ISeamFacetDataModelProperties.DB_TYPE,
SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DATABASE_TYPE, Arrays.asList(HIBERNATE_HELPER
.getDialectNames()), getDefaultDbType(), false);
-
+
private IFieldEditor dbSchemaName = IFieldEditorFactory.INSTANCE.createTextEditor(
ISeamFacetDataModelProperties.DB_SCHEMA_NAME,
SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DATABASE_SCHEMA_NAME, ""); //$NON-NLS-1$
-
+
private IFieldEditor dbCatalogName = IFieldEditorFactory.INSTANCE.createTextEditor(
ISeamFacetDataModelProperties.DB_CATALOG_NAME,
SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DATABASE_CATALOG_NAME, ""); //$NON-NLS-1$
-
+
private IFieldEditor dbTablesExists = IFieldEditorFactory.INSTANCE
.createCheckboxEditor(
ISeamFacetDataModelProperties.DB_ALREADY_EXISTS,
SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DB_TABLES_ALREADY_EXISTS, false);
-
+
private IFieldEditor recreateTablesOnDeploy = IFieldEditorFactory.INSTANCE
.createCheckboxEditor(
ISeamFacetDataModelProperties.RECREATE_TABLES_AND_DATA_ON_DEPLOY,
@@ -151,13 +142,13 @@
.createTextEditor(
ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME,
SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_SESSION_BEAN_PACKAGE_NAME, ""); //$NON-NLS-1$
-
+
private IFieldEditor entityBeanPkgNameditor = IFieldEditorFactory.INSTANCE
.createTextEditor(
ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME,
SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_ENTITY_BEAN_PACKAGE_NAME,
"com.mydomain.projectname.entity"); //$NON-NLS-1$
-
+
private IFieldEditor testsPkgNameditor = IFieldEditorFactory.INSTANCE
.createTextEditor(
ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME,
@@ -177,7 +168,7 @@
/**
* @return
*/
- private static List getDialectClasses() {
+ private static List<String> getDialectClasses() {
List<String> dialects = new ArrayList<String>();
for (String dialectName : HIBERNATE_HELPER.getDialectNames()) {
dialects.add(HIBERNATE_HELPER.getDialectClass(dialectName));
@@ -189,7 +180,6 @@
* @return
*/
private String getDefaultDbType() {
- // TODO Auto-generated method stub
return SeamProjectPreferences.getStringPreference(
SeamProjectPreferences.HIBERNATE_DEFAULT_DB_TYPE);
}
@@ -224,9 +214,6 @@
.getStringPreference(SeamProjectPreferences.SEAM_DEFAULT_RUNTIME_NAME));
}
- /**
- *
- */
private DataModelSynchronizer sync;
/**
@@ -253,23 +240,21 @@
* Finish has been pressed.
*/
public void transferStateToConfig() {
-
- SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamProjectPreferences.SEAM_DEFAULT_RUNTIME_NAME,
- jBossSeamHomeEditor.getValueAsString());
+ SeamCorePlugin.getDefault().getPluginPreferences().setValue(
+ SeamProjectPreferences.SEAM_DEFAULT_RUNTIME_NAME,
+ jBossSeamHomeEditor.getValueAsString());
- SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamProjectPreferences.SEAM_DEFAULT_CONNECTION_PROFILE,
- connProfileSelEditor.getValueAsString());
-
- SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamProjectPreferences.JBOSS_AS_DEFAULT_DEPLOY_AS,
- this.jBossAsDeployAsEditor.getValueAsString());
-
- SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamProjectPreferences.HIBERNATE_DEFAULT_DB_TYPE,
- this.jBossHibernateDbTypeEditor.getValueAsString());
-
+ SeamCorePlugin.getDefault().getPluginPreferences().setValue(
+ SeamProjectPreferences.SEAM_DEFAULT_CONNECTION_PROFILE,
+ connProfileSelEditor.getValueAsString());
+
+ SeamCorePlugin.getDefault().getPluginPreferences().setValue(
+ SeamProjectPreferences.JBOSS_AS_DEFAULT_DEPLOY_AS,
+ this.jBossAsDeployAsEditor.getValueAsString());
+
+ SeamCorePlugin.getDefault().getPluginPreferences().setValue(
+ SeamProjectPreferences.HIBERNATE_DEFAULT_DB_TYPE,
+ this.jBossHibernateDbTypeEditor.getValueAsString());
}
/**
@@ -303,7 +288,7 @@
}
return result;
}
-
+
/**
* Creates Seam Facet Wizard Page contents
*/
@@ -364,10 +349,7 @@
registerEditor(testsPkgNameditor, generationGroup, 3);
setControl(root);
- NewProjectDataModelFacetWizard wizard = (NewProjectDataModelFacetWizard) getWizard();
- IDataModel model = wizard.getDataModel();
-
if (validatorDelegate == null) {
validatorDelegate = new DataModelValidatorDelegate(this.model, this);
validatorDelegate.addValidatorForProperty(jBossSeamHomeEditor
@@ -406,7 +388,7 @@
);
Dialog.applyDialogFont(parent);
- setPageComplete(false);
+ initDefaultWizardProperties();
}
/**
@@ -421,9 +403,6 @@
}
}
- /*
- *
- */
private List<String> getProfileNameList() {
IConnectionProfile[] profiles = ProfileManager.getInstance()
.getProfilesByCategory("org.eclipse.datatools.connectivity.db.category"); //$NON-NLS-1$
@@ -480,7 +459,6 @@
* selected ConnectionProfile
*
* @author eskimo
- *
*/
public class NewConnectionProfileAction extends
ButtonFieldEditor.ButtonPressedAction {
@@ -530,11 +508,27 @@
/**
* It is overridden to fill Code Generation group with the default package
* names
- * TODO: should be changed to enable finish button on a first step,
- * right after project name is entered and valid
*/
@Override
public void setVisible(boolean visible) {
+ setCodeGenerationProperties();
+ if(visible) {
+ setDefaultSeamRuntime();
+ validate();
+ }
+ super.setVisible(visible);
+ };
+
+ private void initDefaultWizardProperties() {
+ setCodeGenerationProperties();
+ setDefaultSeamRuntime();
+ validate();
+ }
+
+ /*
+ * Fills Code Generation group with the default package names.
+ */
+ private void setCodeGenerationProperties() {
sessionBeanPkgNameditor
.setValue("org.domain." //$NON-NLS-1$
+ model
@@ -550,31 +544,32 @@
+ model
.getProperty(IFacetDataModelProperties.FACET_PROJECT_NAME)
+ ".test"); //$NON-NLS-1$
- if (visible) {
- ITaggedFieldEditor runtimesField = (ITaggedFieldEditor)((CompositeEditor)jBossSeamHomeEditor).getEditors().get(1);
- Object oldValue = runtimesField.getValue();
- Object newValue = ""; //$NON-NLS-1$
- List<String> runtimes = getRuntimeNames(model.getProperty(IFacetDataModelProperties.FACET_VERSION_STR).toString());
- if(oldValue==null || !runtimes.contains(oldValue)) {
- Object defaultRnt = getSeamRuntimeDefaultValue();
- if(defaultRnt!=null && runtimes.contains(defaultRnt)) {
- newValue = defaultRnt;
- } else if(runtimes.size()>0) {
- newValue = runtimes.get(0);
- }
- } else {
- newValue = oldValue;
+ }
+
+ /*
+ * Sets seam runtime field in default value.
+ */
+ private void setDefaultSeamRuntime() {
+ ITaggedFieldEditor runtimesField = (ITaggedFieldEditor) ((CompositeEditor) jBossSeamHomeEditor)
+ .getEditors().get(1);
+ Object oldValue = runtimesField.getValue();
+ Object newValue = ""; //$NON-NLS-1$
+ List<String> runtimes = getRuntimeNames(model.getProperty(
+ IFacetDataModelProperties.FACET_VERSION_STR).toString());
+ if (oldValue == null || !runtimes.contains(oldValue)) {
+ Object defaultRnt = getSeamRuntimeDefaultValue();
+ if (defaultRnt != null && runtimes.contains(defaultRnt)) {
+ newValue = defaultRnt;
+ } else if (runtimes.size() > 0) {
+ newValue = runtimes.get(0);
}
- runtimesField.setValue(newValue);
- runtimesField.setTags(runtimes.toArray(new String[0]));
- validate();
+ } else {
+ newValue = oldValue;
}
- super.setVisible(visible);
- };
+ runtimesField.setValue(newValue);
+ runtimesField.setTags(runtimes.toArray(new String[0]));
+ }
- /**
- *
- */
private void validate() {
String message = validatorDelegate.getFirstValidationError();
this.setPageComplete(message == null);
@@ -657,17 +652,17 @@
}
static class DeploymentTypeValidator implements IValidator {
-
+
String propertyName;
-
+
IDataModel model;
-
+
static final IProjectFacet EJB_FACET = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_EJB_MODULE);
-
+
static final IProjectFacetVersion EJB_30 = EJB_FACET.getVersion("3.0"); //$NON-NLS-1$
static final IProjectFacet EAR_FACET = ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_EAR_MODULE);
-
+
static final IProjectFacetVersion EAR_50 = EAR_FACET.getVersion("5.0"); //$NON-NLS-1$
/**
@@ -681,7 +676,7 @@
* @see IValidator#validate(Object, Object)
*/
public Map<String, String> validate(Object value, Object context) {
-
+
final String deploymentType = value.toString();
if(!ISeamFacetDataModelProperties.DEPLOY_AS_WAR.equals(deploymentType)) {
String runtimeName = model.getProperty(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_RUNTIME).toString();
@@ -692,10 +687,10 @@
NLS.bind(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_CANNOT_USE_SELECTED_DEPLOYMENT6 , new String[]{deploymentType.toUpperCase(),runtimeName}));
}
}
- return ValidatorFactory.NO_ERRORS;
+ return ValidatorFactory.NO_ERRORS;
}
}
-
+
public class NewSeamRuntimeAction extends
ButtonFieldEditor.ButtonPressedAction {
/**
@@ -728,7 +723,7 @@
}
}
}
-
+
public class ConnectionProfileChangeListener implements IProfileListener {
/* (non-Javadoc)
* @see org.eclipse.datatools.connectivity.IProfileListener#profileAdded(org.eclipse.datatools.connectivity.IConnectionProfile)
@@ -761,6 +756,6 @@
*
*/
public void finishPressed() {
- model.removeListener(validatorDelegate);
+ model.removeListener(validatorDelegate);
};
}
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2007-12-26 16:07:59 UTC (rev 5455)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2007-12-26 18:05:16 UTC (rev 5456)
@@ -15,7 +15,14 @@
org.jboss.tools.common.model,
org.eclipse.ui.navigator,
org.jboss.tools.seam.core.test,
- org.jboss.tools.seam.core
+ org.jboss.tools.seam.core,
+ org.eclipse.wst.web.ui,
+ org.eclipse.wst.common.modulecore,
+ org.eclipse.wst.common.project.facet.ui,
+ org.eclipse.wst.common.frameworks,
+ org.jboss.tools.jst.firstrun,
+ org.eclipse.wst.server.core,
+ org.eclipse.datatools.connectivity
Export-Package: org.jboss.tools.seam.ui.test,
org.jboss.tools.seam.ui.test.view,
org.jboss.tools.seam.ui.test.wizard
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java 2007-12-26 16:07:59 UTC (rev 5455)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/wizard/SeamProjectNewWizardTest.java 2007-12-26 18:05:16 UTC (rev 5456)
@@ -10,43 +10,117 @@
******************************************************************************/
package org.jboss.tools.seam.ui.test.wizard;
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
import junit.framework.TestCase;
-import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.datatools.connectivity.ConnectionProfileException;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
import org.jboss.tools.common.util.WorkbenchUtils;
+import org.jboss.tools.jst.firstrun.JBossASAdapterInitializer;
+import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
+import org.jboss.tools.seam.core.project.facet.SeamVersion;
import org.jboss.tools.seam.ui.ISeamUiConstants;
+import org.osgi.framework.Bundle;
/**
- * @author eskimo
+ * @author eskimo, akazakov
*
*/
public class SeamProjectNewWizardTest extends TestCase{
-
+
+ NewProjectDataModelFacetWizard wizard;
+ IWizardPage startSeamPrjWzPg;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ wizard = (NewProjectDataModelFacetWizard)WorkbenchUtils.findWizardByDefId(ISeamUiConstants.NEW_SEAM_PROJECT_WIZARD_ID);
+ WizardDialog dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ wizard);
+ dialog.create();
+ startSeamPrjWzPg = wizard.getStartingPage();
+ assertNotNull("Cannot create seam start wizard page", startSeamPrjWzPg);
+ }
+
/**
*
*/
public void testSeamProjectNewWizardInstanceIsCreated() {
- IWizard
- aWizard = WorkbenchUtils.findWizardByDefId(ISeamUiConstants.NEW_SEAM_PROJECT_WIZARD_ID);
-
-
- WizardDialog dialog = new WizardDialog(
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- aWizard);
- dialog.create();
- IWizardPage startSeamPrjWzPg = aWizard.getStartingPage();
- assertNotNull("Cannot create seam start wizard page",startSeamPrjWzPg);
- IWizardPage projectFacetsWizPg = aWizard.getNextPage(startSeamPrjWzPg);
+ IWizardPage projectFacetsWizPg = wizard.getNextPage(startSeamPrjWzPg);
assertNotNull("Cannot create select facets wizard page",projectFacetsWizPg);
- IWizardPage webModuleWizPg = aWizard.getNextPage(projectFacetsWizPg);
+ IWizardPage webModuleWizPg = wizard.getNextPage(projectFacetsWizPg);
assertNotNull("Cannot create dynamic web project wizard page",webModuleWizPg);
- IWizardPage jsfCapabilitiesWizPg = aWizard.getNextPage(webModuleWizPg);
+ IWizardPage jsfCapabilitiesWizPg = wizard.getNextPage(webModuleWizPg);
assertNotNull("Cannot create JSF capabilities wizard page",jsfCapabilitiesWizPg);
- IWizardPage seamWizPg = aWizard.getNextPage(jsfCapabilitiesWizPg);
+ IWizardPage seamWizPg = wizard.getNextPage(jsfCapabilitiesWizPg);
assertNotNull("Cannot create seam facet wizard page",seamWizPg);
- aWizard.performCancel();
+ wizard.performCancel();
}
-}
+
+ /**
+ * If all fields of all pages are valid then
+ * first page of New Seam Project Wizard must enable Finish button.
+ * See http://jira.jboss.com/jira/browse/JBIDE-1111
+ */
+ public void testSeamProjectNewWizardAllowsToFinishAtFirstPage() {
+ // Check Finish button
+ boolean canFinish = wizard.canFinish();
+ assertFalse("Finish button is enabled at first wizard page before all requerd fileds are valid.", canFinish);
+ wizard.performCancel();
+
+ // Create JBoss AS Runtime, Server, HSQL DB Driver
+ try {
+ JBossASAdapterInitializer.initJBossAS("", new NullProgressMonitor());
+ } catch (CoreException e) {
+ fail("Cannot create JBoss AS Runtime, Server or HSQL Driver for unexisted AS location to test New Seam Project Wizard. " + e.getMessage());
+ } catch (ConnectionProfileException e) {
+ fail("Cannot create HSQL Driver for nonexistent AS location to test New Seam Project Wizard. " + e.getMessage());
+ }
+
+ // Create Seam Runtime and set proper field
+ SeamRuntimeManager manager = SeamRuntimeManager.getInstance();
+
+ Bundle seamTest = Platform.getBundle("org.jboss.tools.seam.ui.test");
+ try {
+ URL seamUrl = FileLocator.resolve(seamTest.getEntry("/seam"));
+ File folder = new File(seamUrl.getPath());
+ manager.addRuntime("Seam 1.2.1", folder.getAbsolutePath(), SeamVersion.SEAM_1_2, true);
+ manager.addRuntime("Seam 2.0", folder.getAbsolutePath(), SeamVersion.SEAM_2_0, true);
+ } catch (IOException e) {
+ fail("Cannot create Seam Runtime to test New Seam Project Wizard. " + e.getMessage());
+ }
+
+ try {
+ setUp();
+ } catch (Exception e) {
+ fail("Cannot create New Seam Project Wizard. " + e.getMessage());
+ }
+
+ // Check Finish button
+ canFinish = wizard.canFinish();
+ assertFalse("Finish button is enabled at first wizard page before user entered the project name.", canFinish);
+
+ // Set project name
+ IDataModel model = wizard.getDataModel();
+ model.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, "testSeamProjectNewWizardAllowsToFinishAtFirstPageProjectName");
+
+ // Check Finish button
+ canFinish = wizard.canFinish();
+ assertTrue("Finish button is disabled at first wizard page in spite of created JBoss AS Runtime, Server, DB Connection and Seam Runtime and valid project name.", canFinish);
+
+ wizard.performCancel();
+ }
+}
\ No newline at end of file
17 years
JBoss Tools SVN: r5455 - in trunk/seam/tests/org.jboss.tools.seam.core.test: src/org/jboss/tools/seam/core/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-12-26 11:07:59 -0500 (Wed, 26 Dec 2007)
New Revision: 5455
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.2
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.3
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.2
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.3
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.java
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1550
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.2
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.2 (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.2 2007-12-26 16:07:59 UTC (rev 5455)
@@ -0,0 +1,42 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.datamodel.DataModelSelectionIndex;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.core.FacesMessages;
+
+@Name("selectionIndexTest")
+public class SelectionIndexTest {
+
+ @Logger private Log log;
+
+ @In FacesMessages facesMessages;
+
+ @DataModel
+ private List<String> messageList=new ArrayList<String>();
+
+ @DataModel
+ private List<String> nameList=new ArrayList<String>();
+
+ @DataModelSelectionIndex int index;
+
+ public List<String> getList(){
+ return messageList;
+ }
+
+ public List<String> getNames(){
+ return nameList;
+ }
+
+ public void selectionIndexTest()
+ {
+ //implement your business logic here
+ log.info("selectionIndexTest.selectionIndexTest() action called");
+ }
+}
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.3
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.3 (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.3 2007-12-26 16:07:59 UTC (rev 5455)
@@ -0,0 +1,42 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.datamodel.DataModelSelectionIndex;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.core.FacesMessages;
+
+@Name("selectionIndexTest")
+public class SelectionIndexTest {
+
+ @Logger private Log log;
+
+ @In FacesMessages facesMessages;
+
+ @DataModel
+ private List<String> messageList=new ArrayList<String>();
+
+ @DataModel
+ private List<String> nameList=new ArrayList<String>();
+
+ @DataModelSelectionIndex("messageList2") int index;
+
+ public List<String> getList(){
+ return messageList;
+ }
+
+ public List<String> getNames(){
+ return nameList;
+ }
+
+ public void selectionIndexTest()
+ {
+ //implement your business logic here
+ log.info("selectionIndexTest.selectionIndexTest() action called");
+ }
+}
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.java 2007-12-26 16:07:59 UTC (rev 5455)
@@ -0,0 +1,42 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.datamodel.DataModelSelectionIndex;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.core.FacesMessages;
+
+@Name("selectionIndexTest")
+public class SelectionIndexTest {
+
+ @Logger private Log log;
+
+ @In FacesMessages facesMessages;
+
+ @DataModel
+ private List<String> messageList=new ArrayList<String>();
+
+ @DataModel
+ private List<String> nameList=new ArrayList<String>();
+
+ @DataModelSelectionIndex("messageList") int index;
+
+ public List<String> getList(){
+ return messageList;
+ }
+
+ public List<String> getNames(){
+ return nameList;
+ }
+
+ public void selectionIndexTest()
+ {
+ //implement your business logic here
+ log.info("selectionIndexTest.selectionIndexTest() action called");
+ }
+}
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.2
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.2 (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.2 2007-12-26 16:07:59 UTC (rev 5455)
@@ -0,0 +1,42 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.datamodel.DataModelSelection;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.core.FacesMessages;
+
+@Name("selectionTest")
+public class SelectionTest {
+
+ @Logger private Log log;
+
+ @In FacesMessages facesMessages;
+
+ @DataModel
+ private List<String> messageList=new ArrayList<String>();
+
+ @DataModel
+ private List<String> nameList=new ArrayList<String>();
+
+ @DataModelSelection String s;
+
+ public List<String> getList(){
+ return messageList;
+ }
+
+ public List<String> getNames(){
+ return nameList;
+ }
+
+ public void selectionTest()
+ {
+ //implement your business logic here
+ log.info("selectionTest.selectionTest() action called");
+ }
+}
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.3
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.3 (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.3 2007-12-26 16:07:59 UTC (rev 5455)
@@ -0,0 +1,42 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.datamodel.DataModelSelection;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.core.FacesMessages;
+
+@Name("selectionTest")
+public class SelectionTest {
+
+ @Logger private Log log;
+
+ @In FacesMessages facesMessages;
+
+ @DataModel
+ private List<String> messageList=new ArrayList<String>();
+
+ @DataModel
+ private List<String> nameList=new ArrayList<String>();
+
+ @DataModelSelection("messageList2") String s;
+
+ public List<String> getList(){
+ return messageList;
+ }
+
+ public List<String> getNames(){
+ return nameList;
+ }
+
+ public void selectionTest()
+ {
+ //implement your business logic here
+ log.info("selectionTest.selectionTest() action called");
+ }
+}
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.java 2007-12-26 16:07:59 UTC (rev 5455)
@@ -0,0 +1,42 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.annotations.datamodel.DataModelSelection;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.core.FacesMessages;
+
+@Name("selectionTest")
+public class SelectionTest {
+
+ @Logger private Log log;
+
+ @In FacesMessages facesMessages;
+
+ @DataModel
+ private List<String> messageList=new ArrayList<String>();
+
+ @DataModel
+ private List<String> nameList=new ArrayList<String>();
+
+ @DataModelSelection("messageList") String s;
+
+ public List<String> getList(){
+ return messageList;
+ }
+
+ public List<String> getNames(){
+ return nameList;
+ }
+
+ public void selectionTest()
+ {
+ //implement your business logic here
+ log.info("selectionTest.selectionTest() action called");
+ }
+}
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2007-12-26 15:39:11 UTC (rev 5454)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2007-12-26 16:07:59 UTC (rev 5455)
@@ -529,11 +529,98 @@
}
public void testBijectionsValidator() {
+ ISeamProject seamProject = getSeamProject(project);
+
+ IFile selectionTestFile = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.java");
+ IFile selectionIndexTestFile = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.java");
+
+ refreshProject(project);
+
+ int number = getMarkersNumber(selectionTestFile);
+ assertTrue("Problem marker was found in SelectionIndexTest.java", number == 0);
+
+ number = getMarkersNumber(selectionIndexTestFile);
+ assertTrue("Problem marker was found in SelectionIndexTest.java", number == 0);
+
// Multiple data binder
System.out.println("Test - Multiple data binder");
+ IFile selectionTestFile2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.2");
+ try{
+ selectionTestFile.setContents(selectionTestFile2.getContents(), true, false, new NullProgressMonitor());
+ selectionTestFile.touch(new NullProgressMonitor());
+ }catch(Exception ex){
+ JUnitUtils.fail("Error in changing 'SelectionTest.java' content to " +
+ "'SelectionTest.2'", ex);
+ }
+
+ IFile selectionIndexTestFile2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.2");
+ try{
+ selectionIndexTestFile.setContents(selectionIndexTestFile2.getContents(), true, false, new NullProgressMonitor());
+ selectionIndexTestFile.touch(new NullProgressMonitor());
+ }catch(Exception ex){
+ JUnitUtils.fail("Error in changing 'SelectionIndexTest.java' content to " +
+ "'SelectionIndexTest.2'", ex);
+ }
+
+ refreshProject(project);
+
+ String[] messages = getMarkersMessage(selectionTestFile);
+ assertTrue("Problem marker 'Multiple data binder", messages[0].startsWith("@DataModelSelection and @DataModelSelectionIndex without name of the DataModel requires the only one @DataModel in the component"));
+
+ int[] lineNumbers = getMarkersNumbersOfLine(selectionTestFile);
+
+ assertTrue("Wrong number of problem markers", lineNumbers.length == messages.length && messages.length == 2);
+
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 21 || lineNumbers[0] == 24);
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 21 || lineNumbers[0] == 24);
+
+ messages = getMarkersMessage(selectionIndexTestFile);
+ assertTrue("Problem marker 'Multiple data binder", messages[0].startsWith("@DataModelSelection and @DataModelSelectionIndex without name of the DataModel requires the only one @DataModel in the component"));
+
+ lineNumbers = getMarkersNumbersOfLine(selectionIndexTestFile);
+
+ assertTrue("Wrong number of problem markers", lineNumbers.length == messages.length && messages.length == 2);
+
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 21 || lineNumbers[0] == 24);
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 21 || lineNumbers[0] == 24);
+
// Unknown @DataModel/@Out name
System.out.println("Test - Unknown @DataModel/@Out name");
+
+ IFile selectionTestFile3 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.3");
+ try{
+ selectionTestFile.setContents(selectionTestFile3.getContents(), true, false, new NullProgressMonitor());
+ selectionTestFile.touch(new NullProgressMonitor());
+ }catch(Exception ex){
+ JUnitUtils.fail("Error in changing 'SelectionTest.java' content to " +
+ "'SelectionTest.3'", ex);
+ }
+
+ IFile selectionIndexTestFile3 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.3");
+ try{
+ selectionIndexTestFile.setContents(selectionIndexTestFile3.getContents(), true, false, new NullProgressMonitor());
+ selectionIndexTestFile.touch(new NullProgressMonitor());
+ }catch(Exception ex){
+ JUnitUtils.fail("Error in changing 'SelectionIndexTest.java' content to " +
+ "'SelectionIndexTest.3'", ex);
+ }
+
+ refreshProject(project);
+
+ messages = getMarkersMessage(selectionTestFile);
+ assertTrue("Problem marker 'Unknown @DataModel/@Out name", messages[0].startsWith("Unknown @DataModel/@Out name: messageList2"));
+
+ lineNumbers = getMarkersNumbersOfLine(selectionTestFile);
+
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 27);
+
+ messages = getMarkersMessage(selectionIndexTestFile);
+ assertTrue("Problem marker 'Unknown @DataModel/@Out name", messages[0].startsWith("Unknown @DataModel/@Out name: messageList2"));
+
+ lineNumbers = getMarkersNumbersOfLine(selectionIndexTestFile);
+
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 27);
}
public void testContextVariablesValidator() {
17 years
JBoss Tools SVN: r5454 - trunk/jsf/docs/userguide/en.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2007-12-26 10:39:11 -0500 (Wed, 26 Dec 2007)
New Revision: 5454
Modified:
trunk/jsf/docs/userguide/en/master.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-226
Modified: trunk/jsf/docs/userguide/en/master.xml
===================================================================
--- trunk/jsf/docs/userguide/en/master.xml 2007-12-26 15:38:43 UTC (rev 5453)
+++ trunk/jsf/docs/userguide/en/master.xml 2007-12-26 15:39:11 UTC (rev 5454)
@@ -33,9 +33,11 @@
</bookinfo>
<toc/>
- &Visual_Web_Tools;
- &features_list;
+
&jsf_support;
+ &Visual_Web_Tools;
+ &features_list;
+
&struts_support;
&editors;
&palette;
17 years
JBoss Tools SVN: r5453 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2007-12-26 10:38:43 -0500 (Wed, 26 Dec 2007)
New Revision: 5453
Modified:
trunk/jsf/docs/userguide/en/modules/struts_support.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-226 update screens, scale parameter is defined
Modified: trunk/jsf/docs/userguide/en/modules/struts_support.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/struts_support.xml 2007-12-26 15:37:44 UTC (rev 5452)
+++ trunk/jsf/docs/userguide/en/modules/struts_support.xml 2007-12-26 15:38:43 UTC (rev 5453)
@@ -578,7 +578,7 @@
<title>Code Assist</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/struts/struts_30.png" scale="75"/>
+ <imagedata fileref="images/struts/struts_30.png" scale="85"/>
</imageobject>
</mediaobject>
</figure>
@@ -598,7 +598,7 @@
<title>Outline View</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/struts/struts_32.png" scale="75"/>
+ <imagedata fileref="images/struts/struts_32.png" scale="85"/>
</imageobject>
</mediaobject>
</figure>
@@ -665,7 +665,7 @@
<title>Source Mode</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/struts/struts_37.png"/>
+ <imagedata fileref="images/struts/struts_37.png" scale="85"/>
</imageobject>
</mediaobject>
</figure>
@@ -677,7 +677,7 @@
<title>Validators Mode</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/struts/struts_38.png"/>
+ <imagedata fileref="images/struts/struts_38.png" scale="75"/>
</imageobject>
</mediaobject>
</figure>
@@ -686,7 +686,7 @@
<title>Validation Rules</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/struts/struts_39.png"/>
+ <imagedata fileref="images/struts/struts_39.png" scale="75"/>
</imageobject>
</mediaobject>
</figure>
17 years
JBoss Tools SVN: r5452 - trunk/jsf/docs/userguide/en/images/struts.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2007-12-26 10:37:44 -0500 (Wed, 26 Dec 2007)
New Revision: 5452
Modified:
trunk/jsf/docs/userguide/en/images/struts/struts_35.png
trunk/jsf/docs/userguide/en/images/struts/struts_37.png
Log:
http://jira.jboss.com/jira/browse/JBDS-226 update screens (96 resolution)
Modified: trunk/jsf/docs/userguide/en/images/struts/struts_35.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/struts/struts_37.png
===================================================================
(Binary files differ)
17 years
JBoss Tools SVN: r5451 - trunk/vpe/plugins/org.jboss.tools.vpe/templates.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2007-12-26 10:18:13 -0500 (Wed, 26 Dec 2007)
New Revision: 5451
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1467
http://jira.jboss.com/jira/browse/JBIDE-1501
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml 2007-12-26 15:17:24 UTC (rev 5450)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml 2007-12-26 15:18:13 UTC (rev 5451)
@@ -671,46 +671,83 @@
</vpe:tag>
<vpe:tag name="h:selectOneListbox" case-sensitive="yes">
- <vpe:template children="yes" modify="yes">
- <select size="{@size}" style="{@style}" class="{@styleClass}" title="{tagstring()}"/>
- <vpe:dnd>
- <vpe:drag start-enable="yes"/>
- <vpe:drop container="yes">
- <vpe:container-child tag-name="selectItem"/>
- <vpe:container-child tag-name="selectItems"/>
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormating>
- </vpe:template>
+ <vpe:if test="attrpresent('size')">
+ <vpe:template children="yes" modify="yes">
+ <select size="{@size}" style="{@style}"
+ class="{@styleClass}" title="{tagstring()}" />
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="selectItem" />
+ <vpe:container-child tag-name="selectItems" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormating>
+ <vpe:format type="UnderlineFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BoldFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ItalicFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontNameFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontSizeFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BackgroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ForegroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ </vpe:textFormating>
+ </vpe:template>
+ </vpe:if>
+ <vpe:template children="yes" modify="yes">
+ <select size="3" style="{@style}" class="{@styleClass}"
+ title="{tagstring()}" />
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="selectItem" />
+ <vpe:container-child tag-name="selectItems" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormating>
+ <vpe:format type="UnderlineFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BoldFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ItalicFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontNameFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontSizeFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BackgroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ForegroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ </vpe:textFormating>
+ </vpe:template>
</vpe:tag>
<vpe:tag name="h:selectManyListbox" case-sensitive="yes">
<vpe:if test="attrpresent('size')">
<vpe:template children="yes" modify="yes">
<select size="{@size}" style="{@style}"
- class="{@styleClass}" title="{tagstring()}" />
+ class="{@styleClass}" title="{tagstring()}" multiple="multiple" />
<vpe:dnd>
<vpe:drag start-enable="yes" />
<vpe:drop container="yes">
@@ -745,7 +782,7 @@
</vpe:if>
<vpe:template children="yes" modify="yes">
<select size="3" style="{@style}" class="{@styleClass}"
- title="{tagstring()}" />
+ title="{tagstring()}" multiple="multiple"/>
<vpe:dnd>
<vpe:drag start-enable="yes" />
<vpe:drop container="yes">
@@ -821,7 +858,7 @@
<vpe:tag name="h:selectManyMenu" case-sensitive="yes">
<vpe:template children="yes" modify="yes">
- <select style="{@style}" class="{@styleClass}" title="{tagstring()}"/>
+ <select style="{@style}" multiple="multiple" class="{@styleClass}" title="{tagstring()}" size="1"/>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
<vpe:drop container="yes">
@@ -859,7 +896,7 @@
<vpe:if test="hasinparents('h:selectManyCheckbox')|hasinparents('x:selectManyCheckbox')|hasinparents('t:selectManyCheckbox')">
<vpe:template children="no" modify="yes">
<span title="{tagstring()}">
- <input type="checkbox"/>
+ <input type="checkbox" />
<vpe:value expr="{jsfvalue(@itemLabel)}"/>
</span>
<vpe:dnd>
@@ -869,12 +906,8 @@
</vpe:template>
</vpe:if>
<vpe:if test="hasinparents('h:selectOneRadio')|hasinparents('x:selectOneRadio')">
- <vpe:template children="no" modify="yes">
- <span title="{tagstring()}">
- <input type="radio"/>
- <vpe:value expr="{jsfvalue(@itemLabel)}"/>
- </span>
- <vpe:breaker type="selectItem"/>
+ <vpe:template children="no" modify="yes" class="org.jboss.tools.vpe.editor.template.JsfRadioSelectItemTemplate">
+
</vpe:template>
</vpe:if>
<vpe:if test="hasinparents('h:selectOneListbox')|
@@ -930,7 +963,7 @@
<vpe:tag name="h:selectOneMenu" case-sensitive="yes">
<vpe:template children="yes" modify="no">
- <select>
+ <select >
</select>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
17 years
JBoss Tools SVN: r5450 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2007-12-26 10:17:24 -0500 (Wed, 26 Dec 2007)
New Revision: 5450
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfRadioSelectItemTemplate.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1467
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfRadioSelectItemTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfRadioSelectItemTemplate.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfRadioSelectItemTemplate.java 2007-12-26 15:17:24 UTC (rev 5450)
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.template;
+
+import org.eclipse.wst.xml.core.internal.document.ElementImpl;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMText;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+/**
+ * @author sdzmitrovich
+ *
+ * template for radio select item
+ *
+ */
+public class JsfRadioSelectItemTemplate extends VpeAbstractTemplate {
+
+ // type of input tag
+ private static final String ATTR_TYPE_VALUE = "radio";
+
+ // common part of the name of element
+ private static final String ATTR_NAME_VALUE = "radio_name_";
+
+ // name of attribute which need represent
+ private static final String ITEM_LABEL_ATTR = "itemLabel";
+
+ // style of span
+ private static final String SPAN_STYLE_VALUE = "-moz-user-modify: read-write;";
+
+ /**
+ *
+ */
+ public JsfRadioSelectItemTemplate() {
+
+ // TODO Auto-generated constructor stub
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.vpe.editor.template.VpeTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext,
+ * org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
+ */
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ // create span element
+ nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
+ // add title attribute to span
+ span.setAttribute(HTML.ATTR_TITLE, getTitle(sourceNode));
+ span.setAttribute(HTML.ATTR_STYLE, SPAN_STYLE_VALUE);
+
+ // create radio element
+ nsIDOMElement radio = visualDocument.createElement(HTML.TAG_INPUT);
+ radio.setAttribute(HTML.ATTR_TYPE, ATTR_TYPE_VALUE);
+
+ // set title
+ radio.setAttribute(HTML.ATTR_TITLE, getTitle(sourceNode));
+
+ // set name
+ radio.setAttribute(HTML.ATTR_NAME, ATTR_NAME_VALUE
+ + getNameSuffix(sourceNode));
+
+ // add radio to span
+ span.appendChild(radio);
+
+ // get label for element
+ String label = getLabel(sourceNode);
+
+ // label exist
+ if (null != label) {
+ // add label to span
+ nsIDOMText text = visualDocument.createTextNode(label);
+ span.appendChild(text);
+ }
+
+ return new VpeCreationData(span);
+ }
+
+ /**
+ * generate title of element
+ *
+ * @param sourceNode
+ * @return
+ */
+ private String getTitle(Node sourceNode) {
+
+ String tagString = " <" + sourceNode.getNodeName();
+ NamedNodeMap attrs = sourceNode.getAttributes();
+ if (attrs != null) {
+ tagString += attrs.getLength() > 0 ? " " : "";
+ for (int i = 0; i < attrs.getLength(); i++) {
+ Node attr = attrs.item(i);
+ tagString += attr.getNodeName() + "=\"" + attr.getNodeValue()
+ + "\"" + (i < (attrs.getLength() - 1) ? " " : "");
+ }
+ }
+ tagString += (sourceNode.hasChildNodes() ? "" : "/") + "> ";
+
+ return tagString;
+ }
+
+ /**
+ * get Label of element
+ *
+ * @param sourceNode
+ * @return
+ */
+ private String getLabel(Node sourceNode) {
+
+ // get value of "itemLabeL" from jsf tag
+ Node attrNode = sourceNode.getAttributes()
+ .getNamedItem(ITEM_LABEL_ATTR);
+
+ // if attribute exist return value
+ if (attrNode != null)
+ return attrNode.getNodeValue();
+
+ return null;
+ }
+
+ /**
+ * generate unique suffix of name for radio as unique suffix use start
+ * position of parent tag ( "h:selectOneRadio" or "x:selectOneRadio")
+ *
+ * @param sourceNode
+ * @return
+ */
+ private String getNameSuffix(Node sourceNode) {
+
+ String name_suffix = "";
+
+ // get parent element
+ Node parent = sourceNode.getParentNode();
+
+ if (parent.getNodeType() == Node.ELEMENT_NODE) {
+
+ ElementImpl element = (ElementImpl) parent;
+
+ // get start position of parent
+ name_suffix = String.valueOf(element.getStartOffset());
+ }
+
+ return name_suffix;
+
+ }
+
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2007-12-26 14:51:28 UTC (rev 5449)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2007-12-26 15:17:24 UTC (rev 5450)
@@ -54,4 +54,8 @@
public static final String ATTR_TYPE ="TYPE";
public static final String ATTR_TEXT ="TEXT";
public static final String ATTR_CLASS ="CLASS";
+ public static final String ATTR_TITLE ="TITLE";
+ public static final String ATTR_NAME ="NAME";
+ public static final String ATTR_VALUE ="VALUE";
+ public static final String ATTR_STYLE ="STYLE";
}
\ No newline at end of file
17 years
JBoss Tools SVN: r5449 - in trunk/seam/plugins/org.jboss.tools.seam.text.ext: src/org/jboss/tools/seam/text/ext/hyperlink and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-12-26 09:51:28 -0500 (Wed, 26 Dec 2007)
New Revision: 5449
Added:
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamViewHyperlink.java
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamViewHyperlinkPartitioner.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.text.ext/plugin.xml
Log:
http://jira.jboss.org/jira/browse/JBIDE-1437 Ctrl+Click/F3 navigation isn't supported for s:button@view and s:link@view attributes
Issue is fixed
Modified: trunk/seam/plugins/org.jboss.tools.seam.text.ext/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/plugin.xml 2007-12-26 14:29:51 UTC (rev 5448)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/plugin.xml 2007-12-26 14:51:28 UTC (rev 5449)
@@ -39,7 +39,7 @@
<hyperlinkPartitioner
id="org.jboss.tools.seam.text.ext.hyperlink.SeamViewHyperlinkPartitioner"
- class="org.jboss.tools.jsf.text.ext.hyperlink.JSFJSPLinkHyperlinkPartitioner">
+ class="org.jboss.tools.seam.text.ext.hyperlink.SeamViewHyperlinkPartitioner">
<contentType id="org.eclipse.jst.jsp.core.jspsource">
<partitionType id="org.jboss.tools.common.text.ext.xml.XML_ATTRIBUTE_VALUE">
<axis path="*/[http://jboss.com/products/seam/taglib]:button/view/" />
@@ -77,6 +77,18 @@
<partitiontype id="org.jboss.tools.seam.text.ext.SEAM_BEAN" />
</contenttypeidentifier>
</hyperlink>
+
+ <hyperlink
+ class="org.jboss.tools.seam.text.ext.hyperlink.SeamViewHyperlink"
+ id="org.jboss.tools.seam.text.ext.hyperlink.SeamViewHyperlink">
+ <contenttypeidentifier id="org.eclipse.jst.jsp.core.jspsource">
+ <partitiontype id="org.jboss.tools.seam.text.ext.SEAM_VIEW_LINK" />
+ </contenttypeidentifier>
+ <contenttypeidentifier id="org.eclipse.wst.html.core.htmlsource">
+ <partitiontype id="org.jboss.tools.seam.text.ext.SEAM_VIEW_LINK" />
+ </contenttypeidentifier>
+ </hyperlink>
+
</extension>
<extension
@@ -89,4 +101,5 @@
</hyperlinkDetector>
</extension>
+
</plugin>
Added: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamViewHyperlink.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamViewHyperlink.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamViewHyperlink.java 2007-12-26 14:51:28 UTC (rev 5449)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.seam.text.ext.hyperlink;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.project.IModelNature;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.text.ext.hyperlink.LinkHyperlink;
+import org.jboss.tools.jst.web.project.list.WebPromptingProvider;
+import org.jboss.tools.seam.text.ext.SeamExtPlugin;
+
+public class SeamViewHyperlink extends LinkHyperlink {
+
+ protected String updateFilenameForModel(String filename, IProject project) {
+ if (filename == null ||
+ !filename.trim().startsWith("/"))
+ return null;
+ WebPromptingProvider provider = WebPromptingProvider.getInstance();
+
+ IModelNature n = EclipseResourceUtil.getModelNature(project);
+ XModel xModel = n == null ? null : n.getModel();
+
+ if (xModel != null) {
+ List list = provider.getList(xModel, WebPromptingProvider.JSF_GET_PATH, filename, null);
+ if (list != null && list.size() > 0) {
+ for (Iterator i = list.iterator(); i.hasNext();) {
+ Object o = i.next();
+ if (o instanceof String) {
+ return (String)o;
+ }
+ }
+ }
+ }
+ return filename;
+ }
+
+ protected IFile getFileFromProject(String fileName) {
+ IFile documentFile = getFile();
+
+ try {
+ IProject project = documentFile.getProject();
+ return super.getFileFromProject(updateFilenameForModel(fileName, project));
+ } catch (Exception x) {
+ SeamExtPlugin.getPluginLog().logError(x);
+ return null;
+ }
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamViewHyperlink.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamViewHyperlinkPartitioner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamViewHyperlinkPartitioner.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamViewHyperlinkPartitioner.java 2007-12-26 14:51:28 UTC (rev 5449)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.seam.text.ext.hyperlink;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.text.IDocument;
+import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
+import org.jboss.tools.common.text.ext.hyperlink.jsp.JSPLinkHyperlinkPartitioner;
+import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
+import org.jboss.tools.seam.internal.core.SeamProject;
+import org.jboss.tools.seam.text.ext.SeamExtPlugin;
+
+public class SeamViewHyperlinkPartitioner extends JSPLinkHyperlinkPartitioner {
+ public static final String SEAM_VIEW_LINK_PARTITION = "org.jboss.tools.seam.text.ext.SEAM_VIEW_LINK";
+
+ private String[] SEAM_PROJECT_NATURES = {
+ SeamProject.NATURE_ID
+ };
+
+ /**
+ * @see org.jboss.tools.common.text.ext.hyperlink.XMLLinkHyperlinkPartitioner#getPartitionType()
+ */
+ protected String getPartitionType() {
+ return SEAM_VIEW_LINK_PARTITION;
+ }
+
+ /**
+ * @see org.jboss.tools.common.text.ext.hyperlink.XMLContextParamLinkHyperlinkPartitioner#recognizeNature(org.eclipse.jface.text.IDocument)
+ */
+ protected boolean recognizeNature(IDocument document) {
+ StructuredModelWrapper smw = new StructuredModelWrapper();
+ try {
+ smw.init(document);
+ IFile documentFile = smw.getFile();
+ IProject project = documentFile.getProject();
+
+ for (int i = 0; i < SEAM_PROJECT_NATURES.length; i++) {
+ if (project.getNature(SEAM_PROJECT_NATURES[i]) != null)
+ return true;
+ }
+ return false;
+ } catch (Exception x) {
+ SeamExtPlugin.getPluginLog().logError(x);
+ return false;
+ } finally {
+ smw.dispose();
+ }
+ }
+
+ /**
+ * @see com.ibm.sse.editor.extensions.hyperlink.IHyperlinkPartitionRecognizer#recognize(org.eclipse.jface.text.IDocument, com.ibm.sse.editor.extensions.hyperlink.IHyperlinkRegion)
+ */
+ public boolean recognize(IDocument document, IHyperlinkRegion region) {
+ return recognizeNature(document) ? super.recognize(document, region) : false;
+ }
+
+}
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/SeamViewHyperlinkPartitioner.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years
JBoss Tools SVN: r5448 - in trunk/as/docs/reference/en: images and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2007-12-26 09:29:51 -0500 (Wed, 26 Dec 2007)
New Revision: 5448
Added:
trunk/as/docs/reference/en/images/quick_start/
trunk/as/docs/reference/en/images/quick_start/quick_start1.png
trunk/as/docs/reference/en/images/quick_start/quick_start2.png
trunk/as/docs/reference/en/images/quick_start/quick_start3.png
trunk/as/docs/reference/en/images/quick_start/quick_start4.png
trunk/as/docs/reference/en/images/quick_start/quick_start5.png
trunk/as/docs/reference/en/images/quick_start/quick_start6.png
trunk/as/docs/reference/en/images/quick_start/quick_start7.png
trunk/as/docs/reference/en/images/quick_start/quick_start8.png
trunk/as/docs/reference/en/modules/quick_start.xml
Modified:
trunk/as/docs/reference/en/images/modules/modules_1.png
trunk/as/docs/reference/en/images/modules/modules_2.png
trunk/as/docs/reference/en/images/perspective/perspective_13.png
trunk/as/docs/reference/en/images/perspective/perspective_15.png
trunk/as/docs/reference/en/images/perspective/perspective_2.png
trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_1.png
trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_2.png
trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_3.png
trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4.png
trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_5.png
trunk/as/docs/reference/en/images/webtools/webtools_1.png
trunk/as/docs/reference/en/images/webtools/webtools_2.png
trunk/as/docs/reference/en/images/webtools/webtools_3.png
trunk/as/docs/reference/en/master.xml
trunk/as/docs/reference/en/modules/perspective.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-199 "Quick Start with JBoss Server" chapter is added.
Modified: trunk/as/docs/reference/en/images/modules/modules_1.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/modules/modules_2.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_13.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_15.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/perspective/perspective_2.png
===================================================================
(Binary files differ)
Added: trunk/as/docs/reference/en/images/quick_start/quick_start1.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/quick_start/quick_start1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/docs/reference/en/images/quick_start/quick_start2.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/quick_start/quick_start2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/docs/reference/en/images/quick_start/quick_start3.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/quick_start/quick_start3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/docs/reference/en/images/quick_start/quick_start4.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/quick_start/quick_start4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/docs/reference/en/images/quick_start/quick_start5.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/quick_start/quick_start5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/docs/reference/en/images/quick_start/quick_start6.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/quick_start/quick_start6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/docs/reference/en/images/quick_start/quick_start7.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/quick_start/quick_start7.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/docs/reference/en/images/quick_start/quick_start8.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/quick_start/quick_start8.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_1.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_2.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_3.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_5.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/webtools/webtools_1.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/webtools/webtools_2.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/images/webtools/webtools_3.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/master.xml
===================================================================
--- trunk/as/docs/reference/en/master.xml 2007-12-26 14:03:59 UTC (rev 5447)
+++ trunk/as/docs/reference/en/master.xml 2007-12-26 14:29:51 UTC (rev 5448)
@@ -2,7 +2,8 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
"../../resources/support/docbook-dtd/docbookx.dtd"
-[<!ENTITY runtimes_servers SYSTEM "modules/runtimes_servers.xml">
+[<!ENTITY quick_start SYSTEM "modules/quick_start.xml">
+<!ENTITY runtimes_servers SYSTEM "modules/runtimes_servers.xml">
<!ENTITY perspective SYSTEM "modules/perspective.xml">
<!ENTITY webtools SYSTEM "modules/webtools.xml">
<!ENTITY modules SYSTEM "modules/modules.xml">
@@ -23,7 +24,8 @@
</bookinfo>
- <toc/>
+ <toc/>
+ &quick_start;
&runtimes_servers;
&perspective;
&webtools;
Modified: trunk/as/docs/reference/en/modules/perspective.xml
===================================================================
--- trunk/as/docs/reference/en/modules/perspective.xml 2007-12-26 14:03:59 UTC (rev 5447)
+++ trunk/as/docs/reference/en/modules/perspective.xml 2007-12-26 14:29:51 UTC (rev 5448)
@@ -12,12 +12,12 @@
</chapterinfo>
<title>JBoss AS Perspective</title>
- <para>This chapter tells how to manage installed JBoss AS servers via JBoss AS Perspective</para>
+ <para>This chapter tells how to manage installed JBoss Servers via <property>JBoss AS Perspective</property>.</para>
<para>The <property>JBoss AS</property> Perspective is similar to the Java perspective, but it contains a few additional views. Two of the additional views are standard views, specifically the <property>Console </property> view and the <property>Properties</property> view.
The other two views that are added are the <property>Project archives</property> view and the <property>JBoss Servers View</property>.</para>
- <section id="JBossServersView">
+ <section id="JBossServerView">
<?dbhtml filename="JBossServerView.html"?>
<title>The JBoss Servers View</title>
<para>This chapter will focus on the the JBoss Server's View. The JBoss Servers View is based on the WTP view, Servers View. The top half of the JBoss Servers View essentially embeds the original Servers View directly into it, making slight changes to the context menu.
Added: trunk/as/docs/reference/en/modules/quick_start.xml
===================================================================
--- trunk/as/docs/reference/en/modules/quick_start.xml (rev 0)
+++ trunk/as/docs/reference/en/modules/quick_start.xml 2007-12-26 14:29:51 UTC (rev 5448)
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<chapter id="quick_start">
+ <title>Quick Start with JBoss Server</title>
+
+ <para>This chapter covers the basics of working with the JBoss server. If you already have installed JBoss server and runtime you can quickly learn
+ how to configure, start, stop the server, to know deployment and archiving processes. How to install runtimes and servers read in the
+ <link linkend="runtimes_servers">Runtimes and Servers in the JBoss AS plugin</link> chapter.</para>
+
+ <para>To start working with JBoss AS, select a <property>JBoss AS Perspective</property> via
+ <emphasis><property>Window > Open Perspective > Other > JBoss AS</property>.</emphasis></para>
+
+<section id="starting">
+ <title>Starting JBoss server</title>
+
+ <para>Starting JBoss server is quite simple. You can control the server behaviour with the help of a special toolbar in the
+ <property>JBoss Server View</property> where you could <property>start</property> it in a regular or debug mode,
+ <property>stop</property> it or <property>restart</property> it, <property>publish</property> to the server.</para>
+
+ <figure>
+ <title>JBoss Server Toolbar</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To launch the server click the green-with-white-arrow icon on the <property>JBoss Server View </property>or right click server name in this view and
+ select <emphasis><property>Start</property></emphasis>. If this view is not open, select <emphasis><property>Window > Show View > Other > Server >
+ JBoss Server View</property>.</emphasis></para>
+
+ <figure>
+ <title>Start JBoss Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+</section>
+
+ <section id="stopping">
+ <title>Stopping JBoss Server</title>
+
+ <para>To stop the server, click the <property>Stop</property> icon in JBoss Server View or right click the server name and press <property>Stop</property>.</para>
+
+ <figure>
+ <title>Stop JBoss Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>When the server is stopped you will see <property>Stopped</property> next to its name in the State column.</para>
+ <para>Learn more about the JBoss Server View <link linkend="JBossServerView">here</link>.</para>
+ </section>
+
+ <section id="deployment">
+ <title>Deploying an Application to a Server</title>
+
+ <para>There are two times to deploy your application:</para>
+ <itemizedlist>
+ <listitem><para>While creating it</para></listitem>
+ <listitem><para>After it already exists</para></listitem>
+ </itemizedlist>
+
+ <para>When you create a new project (Seam, JSF or Struts) with the New Project or Import Project wizards, the one of wizards steps
+ has a Target Runtime and Target Server sections. You can deploy the application through the appropriate selection in these sections.</para>
+
+ <figure>
+ <title>Runtime and Server Sections in the New Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start4.png" scale="68"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can deploy an existing application to a server by right-clicking the target defined server in the <property>JBoss Servers View</property>
+ and then selecting <property>Add and Remove Projects</property> from the context menu.</para>
+
+ <figure>
+ <title>Add and Remove Projects From the Context Menu.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If this application is not assigned to a server, it will be in the left-hand available projects list. Clicking on the <property>Add ></property> button will add it to
+ the right-hand configured projects list and deploy the application to this server.</para>
+
+ <figure>
+ <title>Modifying The Projects that are Configured on the Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ </section>
+
+ <section id="archiving">
+
+ <title>Project Archiving</title>
+
+ <para>JBoss Tools comes with our own archives tool. The Project Archives plugin consists primarily of a view to set up each packaging configuration
+ (<emphasis><property>Window > Show View > Other > JBoss Tools > Project archives</property></emphasis>).</para>
+ <para>Right clicking in the Project archives view you can create War, EJB War or EAR archive.</para>
+
+ <figure>
+ <title>Archive Creating</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Using the context menu on the item you can initiate a full <property>build</property> on archive, <property>edit</property>,
+ <property>delete</property> or <property>publish</property> it.</para>
+
+ <figure>
+ <title>Context Menu on the Item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Learn more about the <property>Project archives View</property> <link linkend="Project_archivesView">here</link>.</para>
+
+ </section>
+
+
+
+</chapter>
17 years
JBoss Tools SVN: r5447 - trunk/documentation/guides/userguide/Legacy-jsf-struts/en/images/struts_validation.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-12-26 09:03:59 -0500 (Wed, 26 Dec 2007)
New Revision: 5447
Modified:
trunk/documentation/guides/userguide/Legacy-jsf-struts/en/images/struts_validation/struts_validation.png
trunk/documentation/guides/userguide/Legacy-jsf-struts/en/images/struts_validation/struts_validation_2.png
Log:
http://jira.jboss.com/jira/browse/JBDS-226 screenshots are updated in legacy guide
Modified: trunk/documentation/guides/userguide/Legacy-jsf-struts/en/images/struts_validation/struts_validation.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/userguide/Legacy-jsf-struts/en/images/struts_validation/struts_validation_2.png
===================================================================
(Binary files differ)
17 years