JBoss Tools SVN: r4416 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-10-22 13:04:29 -0400 (Mon, 22 Oct 2007)
New Revision: 4416
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/SeamEntityWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1037 Package Name for New Entity Wizard
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-22 16:40:13 UTC (rev 4415)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2007-10-22 17:04:29 UTC (rev 4416)
@@ -244,7 +244,6 @@
IFieldEditor editor = editorRegistry.get(IParameter.SEAM_PACKAGE_NAME);
if(editor!=null) {
errors = ValidatorFactory.PACKAGE_NAME_VALIDATOR.validate(editor.getValue(), null);
-
if(errors.size()>0) {
setErrorMessage(errors.get(IValidator.DEFAULT_ERROR).toString()); //$NON-NLS-1$
setPageComplete(false);
@@ -338,7 +337,7 @@
setDefaultValue(IParameter.SEAM_PAGE_NAME, valueL);
}
}
- if(event.getPropertyName().equals(IParameter.SEAM_PROJECT_NAME)) {
+ if(event.getPropertyName().equals(IParameter.SEAM_PROJECT_NAME)&& getEditor(IParameter.SEAM_PACKAGE_NAME)!=null) {
String selectedProject = event.getNewValue().toString();
setSeamProjectNameData(selectedProject);
setDefaultValue(IParameter.SEAM_PACKAGE_NAME, getDefaultPackageName(selectedProject));
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java 2007-10-22 16:40:13 UTC (rev 4415)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java 2007-10-22 17:04:29 UTC (rev 4416)
@@ -15,10 +15,12 @@
import java.util.Map;
import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.INewWizard;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.SeamUIMessages;
+import org.jboss.tools.seam.ui.widget.editor.INamedElement;
/**
* @author eskimo
@@ -40,7 +42,7 @@
public void addPages() {
addPage(new SeamEntityWizardPage1(getInitialSelection()));
}
-
+
// TODO move operations to core plugin
public static final IUndoableOperation CREATE_SEAM_ENTITY = new SeamEntityCreateOperation();
/**
@@ -48,7 +50,7 @@
* TODO move operations to core plugin
*/
public static class SeamEntityCreateOperation extends SeamBaseOperation{
-
+
@Override
protected void loadCustomVariables(Map<String, Object> vars) {
String entityClassname = vars.get(IParameter.SEAM_ENTITY_CLASS_NAME).toString();
@@ -70,11 +72,11 @@
else
return ACTION_EAR_MAPPING;
}
-
+
public static final List<String[]> ACTION_WAR_MAPPING = new ArrayList<String[]>();
-
+
public static final List<String[]> ACTION_EAR_MAPPING = new ArrayList<String[]>();
-
+
static {
// initialize war files mapping
ACTION_WAR_MAPPING.add(new String[]{
@@ -93,8 +95,7 @@
ACTION_WAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/view/list.xhtml", //$NON-NLS-1$ //$NON-NLS-2$
"${" + IParameter.SEAM_PROJECT_WEBCONTENT_PATH + "}/${" + IParameter.SEAM_MASTER_PAGE_NAME +"}.xhtml"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
-
+
ACTION_EAR_MAPPING.add(new String[]{
"${" + ISeamFacetDataModelProperties.JBOSS_SEAM_HOME + "}/seam-gen/src/Entity.java", //$NON-NLS-1$ //$NON-NLS-2$
"${" + IParameter.SEAM_EJB_PROJECT_LOCATION_PATH + "}/ejbModule/${" + ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_PATH + "}/${" + IParameter.SEAM_ENTITY_CLASS_NAME +"}.java"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -108,6 +109,14 @@
ACTION_EAR_MAPPING.add(ACTION_WAR_MAPPING.get(3));
ACTION_EAR_MAPPING.add(ACTION_WAR_MAPPING.get(4));
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.wizard.SeamBaseOperation#getEntityBeanPackageName(org.eclipse.core.runtime.preferences.IEclipsePreferences, java.util.Map)
+ */
+ @Override
+ protected String getEntityBeanPackageName(IEclipsePreferences seamFacetPrefs, Map<String, INamedElement> wizardParams) {
+ return wizardParams.get(IParameter.SEAM_PACKAGE_NAME).getValue().toString();
+ }
};
-
-}
+}
\ No newline at end of file
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-22 16:40:13 UTC (rev 4415)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java 2007-10-22 17:04:29 UTC (rev 4416)
@@ -15,13 +15,15 @@
import java.util.Map;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Composite;
+import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.internal.project.facet.IValidator;
import org.jboss.tools.seam.ui.internal.project.facet.ValidatorFactory;
+import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
/**
* @author eskimo
@@ -37,24 +39,30 @@
super("seam.new.entity.page1","Seam Entity", null, is);
setMessage(getDefaultMessageText());
}
-
+
/**
*
*/
@Override
protected void createEditors() {
super.createEditors();
+
+ String selectedProject = SeamWizardUtils.getRootSeamProjectName(initialSelection);
+ String packageName = getDefaultPackageName(selectedProject);
+ addEditor(SeamWizardFactory.createSeamJavaPackageSelectionFieldEditor(packageName));
+ setSeamProjectNameData(selectedProject);
+
addEditor(SeamWizardFactory.createSeamEntityClasNameFieldEditor());
addEditor(SeamWizardFactory.createSeamMasterPageNameFieldEditor());
addEditor(SeamWizardFactory.createSeamPageNameFieldEditor());
}
-
+
@Override
public void createControl(Composite parent) {
setControl(new GridLayoutComposite(parent));
setPageComplete(false);
}
-
+
@Override
public void doFillDefaults(PropertyChangeEvent event) {
if(event.getPropertyName().equals(IParameter.SEAM_ENTITY_CLASS_NAME)) {
@@ -64,50 +72,80 @@
setDefaultValue(IParameter.SEAM_PAGE_NAME, "");
} else {
String value = event.getNewValue().toString();
- String valueU = value.substring(0,1).toUpperCase() + value.substring(1);
String valueL = value.substring(0,1).toLowerCase() + value.substring(1);
setDefaultValue(IParameter.SEAM_MASTER_PAGE_NAME, valueL+"List");
setDefaultValue(IParameter.SEAM_PAGE_NAME, valueL);
}
}
+ if(event.getPropertyName().equals(IParameter.SEAM_PROJECT_NAME)) {
+ String selectedProject = event.getNewValue().toString();
+ setSeamProjectNameData(selectedProject);
+ setDefaultValue(IParameter.SEAM_PACKAGE_NAME, getDefaultPackageName(selectedProject));
+ }
}
-
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.wizard.SeamBaseWizardPage#getDefaultPackageName(org.eclipse.core.runtime.preferences.IEclipsePreferences)
+ */
@Override
+ protected String getDefaultPackageName(IEclipsePreferences seamFacetPrefs) {
+ return seamFacetPrefs.get(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME, "");
+ }
+
+ @Override
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);
+ }
+
IProject project = getSelectedProject();
-
+
if(!isValidRuntimeConfigured(project)) return;
errors = ValidatorFactory.SEAM_COMPONENT_NAME_VALIDATOR.validate(
editorRegistry.get(IParameter.SEAM_ENTITY_CLASS_NAME).getValue(), null);
-
+
if(errors.size()>0) {
setErrorMessage(NLS.bind(errors.get(IValidator.DEFAULT_ERROR).toString(),SeamUIMessages.SEAM_ENTITY_WIZARD_PAGE1_ENTITY_CLASS_NAME));
setPageComplete(false);
return;
}
-
+
+ IFieldEditor editor = editorRegistry.get(IParameter.SEAM_PACKAGE_NAME);
+ if(editor!=null) {
+ errors = ValidatorFactory.PACKAGE_NAME_VALIDATOR.validate(editor.getValue(), null);
+ if(errors.size()>0) {
+ setErrorMessage(errors.get(IValidator.DEFAULT_ERROR).toString()); //$NON-NLS-1$
+ setPageComplete(false);
+ return;
+ }
+ }
+
errors = ValidatorFactory.FILE_NAME_VALIDATOR.validate(
editorRegistry.get(IParameter.SEAM_MASTER_PAGE_NAME).getValue(), new Object[]{SeamUIMessages.SEAM_ENTITY_WIZARD_PAGE1_ENTITY_MASTER_PAGE,project,project});
-
+
if(errors.size()>0) {
setErrorMessage(errors.get(IValidator.DEFAULT_ERROR).toString());
setPageComplete(false);
return;
}
-
+
errors = ValidatorFactory.FILE_NAME_VALIDATOR.validate(
editorRegistry.get(IParameter.SEAM_PAGE_NAME).getValue(), new Object[]{SeamUIMessages.SEAM_ENTITY_WIZARD_PAGE1_PAGE,project});
-
+
if(errors.size()>0) {
setErrorMessage(errors.get(IValidator.DEFAULT_ERROR).toString());
setPageComplete(false);
@@ -124,7 +162,6 @@
*/
@Override
public String getDefaultMessageText() {
- // TODO Auto-generated method stub
return "Create a new Entity";
}
-}
+}
\ No newline at end of file
17 years, 2 months
JBoss Tools SVN: r4415 - in trunk/seam: tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-22 12:40:13 -0400 (Mon, 22 Oct 2007)
New Revision: 4415
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1107 Seam 2 support
lesser fat in the test projects - still issues with ear test project :(
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2007-10-22 16:39:55 UTC (rev 4414)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2007-10-22 16:40:13 UTC (rev 4415)
@@ -85,6 +85,7 @@
.include("commons-jci-janino.*\\.jar") //$NON-NLS-1$
.include("drools-compiler.*\\.jar") //$NON-NLS-1$
.include("drools-core.*\\.jar") //$NON-NLS-1$
+ .include("core.jar") //$NON-NLS-1$
.include("janino.*\\.jar") //$NON-NLS-1$
.include("jboss-seam-debug\\.jar") //$NON-NLS-1$
.include("jboss-seam-ioc\\.jar") //$NON-NLS-1$
@@ -102,44 +103,36 @@
// test/*.jar are duplicated here since the filtering seem to be assymetric when matching
public static AntCopyUtils.FileSet JBOSS_TEST_LIB_FILESET = new AntCopyUtils.FileSet()
- .exclude("jboss-seam.*")
- .exclude("jboss-aop\\.jar")
- .exclude("jboss-container\\.jar")
- .include(".*\\.jar") //$NON-NLS-1$ // TODO: fix this, since test shouldn't need them all ;(
- .include("testng\\.jar") //$NON-NLS-1$
- .include("test/jboss-deployers.jar") //$NON-NLS-1$
- .include("jboss-deployers.jar") //$NON-NLS-1$
- .include("test/jboss-embedded-all.jar") //$NON-NLS-1$
- .include("jboss-embedded-all.jar") //$NON-NLS-1$
- .include("myfaces-api-.*\\.jar") //$NON-NLS-1$
- .include("myfaces-impl-.*\\.jar") //$NON-NLS-1$
- .include("servlet-api\\.jar") //$NON-NLS-1$
+ .include("testng\\.jar") //$NON-NLS-1$
.include("test/hibernate-all\\.jar") //$NON-NLS-1$
.include("hibernate-all\\.jar") //$NON-NLS-1$
+ .include("test/jboss-embedded-all.jar") //$NON-NLS-1$
+ .include("jboss-embedded-all.jar") //$NON-NLS-1$
+ .include("test/jboss-embedded-api.jar") //$NON-NLS-1$
+ .include("jboss-embedded-api.jar") //$NON-NLS-1$
+ .include("test/jboss-deployers.jar") //$NON-NLS-1$
+ .include("jboss-deployers.jar") //$NON-NLS-1$
.include("test/thirdparty-all\\.jar") //$NON-NLS-1$
.include("thirdparty-all\\.jar") //$NON-NLS-1$
- //.include("el-api\\.jar") //$NON-NLS-1$
- //.include("el-ri\\.jar") //$NON-NLS-1$
.exclude(".*/CVS") //$NON-NLS-1$
.exclude(".*/\\.svn"); //$NON-NLS-1$
public static AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_EAR_CONFIG = new AntCopyUtils.FileSet()
- .include("ajax4jsf.*\\.jar") //$NON-NLS-1$
- .include("richfaces.*\\.jar") //$NON-NLS-1$
- .include("commons-beanutils.*\\.jar") //$NON-NLS-1$
- .include("commons-digester.*\\.jar") //$NON-NLS-1$
- .include("commons-collections.*\\.jar") //$NON-NLS-1$
+ .include("richfaces-impl\\.jar") //$NON-NLS-1$
+ .include("richfaces-ui\\.jar") //$NON-NLS-1$
+ .include("commons-beanutils\\.jar") //$NON-NLS-1$
+ .include("commons-digester\\.jar") //$NON-NLS-1$
.include("jboss-seam-debug\\.jar") //$NON-NLS-1$
.include("jboss-seam-ioc\\.jar") //$NON-NLS-1$
.include("jboss-seam-mail\\.jar") //$NON-NLS-1$
.include("jboss-seam-pdf\\.jar") //$NON-NLS-1$
.include("jboss-seam-remoting\\.jar") //$NON-NLS-1$
.include("jboss-seam-ui\\.jar") //$NON-NLS-1$
- .include("jsf-facelets\\.jar") //$NON-NLS-1$
- .include("oscache.*\\.jar"); //$NON-NLS-1$
+ .include("jsf-facelets\\.jar"); //$NON-NLS-1$
+
public static AntCopyUtils.FileSet JBOSS_EAR_CONTENT = new AntCopyUtils.FileSet()
- .include("antlr.*\\.jar") //$NON-NLS-1$
+ .include("antlr-runtime.jar") //$NON-NLS-1$
.include("drools-compiler.*\\.jar") //$NON-NLS-1$
.include("drools-core.*\\.jar") //$NON-NLS-1$
.include("jboss-seam.jar") //$NON-NLS-1$
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2007-10-22 16:39:55 UTC (rev 4414)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2007-10-22 16:40:13 UTC (rev 4415)
@@ -12,12 +12,16 @@
import java.io.File;
import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceProxy;
+import org.eclipse.core.resources.IResourceProxyVisitor;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
@@ -26,7 +30,6 @@
import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
-import org.jboss.tools.seam.internal.core.SeamProject;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
public class Seam2FacetInstallDelegateTest extends AbstractSeamFacetTest {
@@ -76,31 +79,116 @@
}
- public void testWarLibs() {
+ public void testWarLibs() throws CoreException {
+ Set<String> warlibs = new HashSet<String>();
+
+ warlibs.add("core.jar");
+ warlibs.add("antlr-runtime.jar");
+ warlibs.add("commons-beanutils.jar");
+ warlibs.add("commons-digester.jar");
+ warlibs.add("drools-compiler.jar");
+ warlibs.add("drools-core.jar");
+ warlibs.add("core.jar");
+ warlibs.add("jboss-el.jar");
+ warlibs.add("jboss-seam-debug.jar");
+ warlibs.add("jboss-seam-ioc.jar");
+ warlibs.add("jboss-seam.jar");
+ warlibs.add("jboss-seam-mail.jar");
+ warlibs.add("jboss-seam-pdf.jar");
+ warlibs.add("jboss-seam-remoting.jar");
+ warlibs.add("jboss-seam-ui.jar");
+ warlibs.add("jbpm-jpdl.jar");
+ warlibs.add("jsf-facelets.jar");
+ warlibs.add("mvel14.jar");
+ warlibs.add("richfaces-api.jar");
+ warlibs.add("richfaces-impl.jar");
+ warlibs.add("richfaces-ui.jar");
+
+ final IContainer warLibs = (IContainer) warProject.getProject().findMember("WebContent/WEB-INF/lib").getAdapter(IContainer.class);
+ assertOnlyContainsTheseFiles(warlibs, warLibs);
+
+
+ }
+
+ public void testEarLibs() throws CoreException {
- assertNotNull("could not find antlr-runtime.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/antlr-runtime.jar"));
- assertNotNull("could not find commons-beanutils.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/commons-beanutils.jar"));
- assertNotNull("could not find commons-digester.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/commons-digester.jar"));
- assertNotNull("could not find drools-compiler.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/drools-compiler.jar"));
- assertNotNull("could not find drools-core.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/drools-core.jar"));
- assertNotNull("could not find jboss-el.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-el.jar"));
- assertNotNull("could not find jboss-seam-debug.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-seam-debug.jar"));
- assertNotNull("could not find jboss-seam-ioc.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-seam-ioc.jar"));
- assertNotNull("could not find jboss-seam.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-seam.jar"));
- assertNotNull("could not find jboss-seam-mail.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-seam-mail.jar"));
- assertNotNull("could not find jboss-seam-pdf.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-seam-pdf.jar"));
- assertNotNull("could not find jboss-seam-remoting.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-seam-remoting.jar"));
- assertNotNull("could not find jboss-seam-ui.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-seam-ui.jar"));
- assertNotNull("could not find jbpm-jpdl.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jbpm-jpdl.jar"));
- assertNotNull("could not find jsf-facelets.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jsf-facelets.jar"));
- assertNotNull("could not find mvel14.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/mvel14.jar"));
- assertNotNull("could not find richfaces-api.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/richfaces-api.jar"));
- assertNotNull("could not find richfaces-impl.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/richfaces-impl.jar"));
- assertNotNull("could not find richfaces-ui.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/richfaces-ui.jar"));
+ IProject war = earProject.getProject();
+
+ SeamProjectsSet seamProjectsSet = new SeamProjectsSet(earProject.getProject());
+
+ IProject ear = seamProjectsSet.getEarProject();
+
+ Set<String> onlyInWar = new HashSet<String>();
+ Set<String> onlyInEar = new HashSet<String>();
+
+ onlyInEar.add("jboss-seam.jar");
+ onlyInEar.add("antlr-runtime.jar");
+ onlyInEar.add("drools-compiler.jar");
+ onlyInEar.add("drools-core.jar");
+ onlyInEar.add("jboss-el.jar");
+ onlyInEar.add("mvel14.jar");
+ onlyInEar.add("richfaces-api.jar");
+ onlyInEar.add("richfaces-api.jar");
+ onlyInEar.add("jbpm-jpdl.jar");
+ onlyInEar.add("META-INF");
+ onlyInEar.add("security.drl");
+
+ onlyInWar.add("commons-beanutils.jar");
+ onlyInWar.add("commons-digester.jar");
+ onlyInWar.add("jboss-seam-debug.jar");
+ onlyInWar.add("jboss-seam-ioc.jar");
+ onlyInWar.add("jboss-seam-mail.jar");
+ onlyInWar.add("jboss-seam-pdf.jar");
+ onlyInWar.add("jboss-seam-remoting.jar");
+ onlyInWar.add("jboss-seam-ui.jar");
+ onlyInWar.add("jsf-facelets.jar");
+ onlyInWar.add("richfaces-impl.jar");
+ onlyInWar.add("richfaces-ui.jar");
+
+ final IContainer earLibs = (IContainer) ear.findMember("EarContent").getAdapter(IContainer.class);
+
+ assertOnlyContainsTheseFiles(onlyInEar, earLibs);
+
+ //earLibs.findMember(path)
+
+
+ assertOnlyContainsTheseFiles(onlyInWar, (IContainer)war.findMember("WebContent/WEB-INF/lib").getAdapter(IContainer.class));
+
}
-
+
+
+ /**
+ * Fails if set of fileNames is not found in dir or some other filename is found in dir.
+ * @param fileNames set of strings
+ * @param dir directory to scan
+ * @throws CoreException
+ */
+ protected void assertOnlyContainsTheseFiles(Set<String> fileNames,
+ final IResource dir) throws CoreException {
+
+ final Set<String> foundFiles = new HashSet<String>();
+ dir.accept(new IResourceProxyVisitor() {
+
+ public boolean visit(IResourceProxy proxy) throws CoreException {
+ if(dir.getName().equals(proxy.getName())) return true;
+ foundFiles.add(proxy.getName());
+ return false;
+ }
+
+ }, IResource.DEPTH_ZERO);
+
+ if(!foundFiles.containsAll(fileNames)) {
+ fileNames.removeAll(foundFiles);
+ fail("Did not find " + fileNames + " in " + dir);
+ }
+
+ foundFiles.removeAll(fileNames);
+
+ assertTrue("Found additional files (" + foundFiles + " in " + dir, foundFiles.isEmpty());
+ }
+
public void testBootstrapDirPresent() throws CoreException, IOException {
SeamProjectsSet warPs = new SeamProjectsSet(warProject.getProject());
@@ -122,6 +210,15 @@
IProject testProject = warPs.getTestProject();
assertTrue(testProject.exists());
+ Set<String> libs = new HashSet<String>();
+ libs.add("testng.jar");
+ libs.add("hibernate-all.jar");
+ libs.add("jboss-deployers.jar");
+ libs.add("jboss-embedded-all.jar");
+ libs.add("thirdparty-all.jar");
+ libs.add("jboss-embedded-api.jar");
+
+ assertOnlyContainsTheseFiles(libs, testProject.findMember("lib"));
assertNotNull(testProject.findMember("lib/testng.jar"));
assertNotNull(testProject.findMember("lib/hibernate-all.jar"));
assertNotNull(testProject.findMember("lib/jboss-deployers.jar"));
17 years, 2 months
JBoss Tools SVN: r4414 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: widget/editor and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-10-22 12:39:55 -0400 (Mon, 22 Oct 2007)
New Revision: 4414
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ButtonFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizardPage1.java
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/SeamBaseWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SelectJavaPackageAction.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1037
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java 2007-10-22 15:56:28 UTC (rev 4413)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/ValidatorFactory.java 2007-10-22 16:39:55 UTC (rev 4414)
@@ -11,11 +11,11 @@
package org.jboss.tools.seam.ui.internal.project.facet;
import java.io.File;
-import java.text.MessageFormat;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -30,7 +30,9 @@
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTParser;
import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.eclipse.jdt.internal.corext.util.Messages;
+import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
@@ -38,8 +40,6 @@
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
-import org.jboss.tools.seam.core.project.facet.SeamVersion;
-import org.jboss.tools.seam.internal.core.SeamProject;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.SeamUIMessages;
@@ -67,7 +67,6 @@
*/
static public IValidator NO_ERRORS_VALIDATOR = new IValidator() {
public Map<String, String> validate(Object value, Object context) {
- // TODO Auto-generated method stub
return NO_ERRORS;
}
};
@@ -112,7 +111,7 @@
map.put(propertyName, text);
return map;
}
-
+
/**
*
*/
@@ -149,7 +148,7 @@
return errors;
}
String version = (String) context;
-
+
if(version.startsWith("2.0")) {
File seamJarFile = new File(value.toString(), "lib/jboss-seam.jar"); //$NON-NLS-1$
if (!seamJarFile.isFile()) {
@@ -167,7 +166,7 @@
SeamUIMessages.VALIDATOR_FACTORY_LOCATION_THAT_DOES_NOT_LOOK_LIKE_SEAM_HOME_FOLDER);
}
}
-
+
return errors;
}
};
@@ -216,6 +215,19 @@
}
};
+ public static final IValidator PACKAGE_NAME_VALIDATOR = new IValidator() {
+ public Map<String, String> validate(Object value, Object context) {
+ IStatus status = JavaConventions.validatePackageName(value
+ .toString(), CompilerOptions.VERSION_1_5,
+ CompilerOptions.VERSION_1_5);
+ if (status.getSeverity() == IStatus.ERROR) {
+ return createErrormessage((Messages.format(NewWizardMessages.NewTypeWizardPage_error_InvalidPackageName, status.getMessage())));
+ }
+
+ return ValidatorFactory.NO_ERRORS;
+ }
+ };
+
/**
*
*/
@@ -225,7 +237,7 @@
return ValidatorFactory.NO_ERRORS;
};
};
-
+
/**
*
* @author eskimo
@@ -257,7 +269,7 @@
throw new IllegalArgumentException(
"Context parameter should be instance of Object[]"); //$NON-NLS-1$
}
-
+
Object[] contextArray = ((Object[]) context);
IProject project = (IProject) contextArray[1];
@@ -292,7 +304,7 @@
CompilationUnit compilationUnit = createCompilationUnit(
"class ClassName {public void " //$NON-NLS-1$
+ value.toString() + "() {}}",project); //$NON-NLS-1$
-
+
IProblem[] problems = compilationUnit.getProblems();
if (problems.length > 0) {
@@ -378,7 +390,7 @@
return NO_ERRORS;
}
};
-
+
public static final IValidator SEAM_RUNTIME_NAME_VALIDATOR = new IValidator() {
public Map<String, String> validate(Object value, Object context) {
@@ -418,13 +430,13 @@
return errors;
}
};
-
+
public static final IValidator SEAM_RUNTIME_VALIDATOR = new IValidator() {
public java.util.Map<String, String> validate(Object value,
Object context) {
Map<String,String> errors = NO_ERRORS;
String rtName = value.toString();
-
+
if(value==null || "".equals(value)) { //$NON-NLS-1$
errors = createErrormessage(SeamUIMessages.VALIDATOR_FACTORY_SEAM_RT_NOT_CONFIGURED);
} else {
@@ -462,4 +474,4 @@
.createAST(null);
return compilationUnit;
}
-}
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ButtonFieldEditor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ButtonFieldEditor.java 2007-10-22 15:56:28 UTC (rev 4413)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ButtonFieldEditor.java 2007-10-22 16:39:55 UTC (rev 4414)
@@ -49,7 +49,7 @@
@Override
public Object[] getEditorControls() {
- return null;
+ return new Control[]{button.getControl()};
}
@Override
@@ -63,7 +63,7 @@
@Override
public void setEditable(boolean ediatble) {
}
-
+
@Override
public Object[] getEditorControls(Object composite) {
if(button==null && composite!=null) {
@@ -75,11 +75,11 @@
public ButtonPressedAction getButtonaction() {
return buttonAction;
}
-
+
public static class ButtonPressedAction extends Action implements SelectionListener{
-
+
private IFieldEditor editor = null;
-
+
public ButtonPressedAction(String label) {
super(label);
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java 2007-10-22 15:56:28 UTC (rev 4413)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java 2007-10-22 16:39:55 UTC (rev 4414)
@@ -15,10 +15,12 @@
import java.util.Map;
import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.INewWizard;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.SeamUIMessages;
+import org.jboss.tools.seam.ui.widget.editor.INamedElement;
/**
*
@@ -99,5 +101,14 @@
"${" + IParameter.SEAM_TEST_PROJECT_LOCATION_PATH + "}/test-src/${" + ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_PATH + "}/${"+ IParameter.SEAM_LOCAL_INTERFACE_NAME +"}Test.xml"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
ACTION_EAR_MAPPING.add(ACTION_WAR_MAPPING.get(3));
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.seam.ui.wizard.SeamBaseOperation#getSessionBeanPackageName(org.eclipse.core.runtime.preferences.IEclipsePreferences, java.util.Map)
+ */
+ @Override
+ protected String getSessionBeanPackageName(IEclipsePreferences seamFacetPrefs, Map<String, INamedElement> wizardParams) {
+ return wizardParams.get(IParameter.SEAM_PACKAGE_NAME).getValue().toString();
+ }
};
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizardPage1.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizardPage1.java 2007-10-22 15:56:28 UTC (rev 4413)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizardPage1.java 2007-10-22 16:39:55 UTC (rev 4414)
@@ -28,8 +28,16 @@
super("seam.new.action.page1", SeamUIMessages.SEAM_ACTION_WIZARD_PAGE1_SEAM_ACTION, null, is); //$NON-NLS-1$
setMessage(getDefaultMessageText());
}
-
+ @Override
+ protected void createEditors() {
+ super.createEditors();
+ String selectedProject = SeamWizardUtils.getRootSeamProjectName(initialSelection);
+ String packageName = getDefaultPackageName(selectedProject);
+ addEditor(SeamWizardFactory.createSeamJavaPackageSelectionFieldEditor(packageName));
+ setSeamProjectNameData(selectedProject);
+ }
+
/* (non-Javadoc)
* @see org.jboss.tools.seam.ui.wizard.SeamBaseWizardPage#getDefaultMessageText()
*/
@@ -37,4 +45,4 @@
public String getDefaultMessageText() {
return "Create a new Seam action";
}
-}
+}
\ No newline at end of file
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-22 15:56:28 UTC (rev 4413)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2007-10-22 16:39:55 UTC (rev 4414)
@@ -11,10 +11,8 @@
package org.jboss.tools.seam.ui.wizard;
-import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
-import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -27,12 +25,9 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
@@ -47,7 +42,6 @@
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
-import org.jboss.tools.seam.internal.core.project.facet.AntCopyUtils;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.internal.core.project.facet.SeamFacetFilterSetFactory;
import org.jboss.tools.seam.ui.SeamGuiPlugin;
@@ -65,7 +59,6 @@
*/
public SeamBaseOperation(String label) {
super(label);
- // TODO Auto-generated constructor stub
}
/**
@@ -95,10 +88,14 @@
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 = 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);
+
IVirtualComponent com = ComponentCore.createComponent(project);
IVirtualFolder webRootFolder = com.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
IContainer webRootContainer = webRootFolder.getUnderlyingFolder();
@@ -133,7 +130,6 @@
* @see java.lang.Runnable#run()
*/
public void run() {
- // TODO Auto-generated method stub
if(file.length > 0){
IFile iFile = project.getWorkspace().getRoot().getFileForLocation(new Path(file[0].getAbsolutePath()));
try {
@@ -154,6 +150,18 @@
return result;
}
+ protected String getSessionBeanPackageName(IEclipsePreferences seamFacetPrefs, Map<String, INamedElement> wizardParams) {
+ return seamFacetPrefs.get(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME, "");
+ }
+
+ protected String getEntityBeanPackageName(IEclipsePreferences seamFacetPrefs, Map<String, INamedElement> wizardParams) {
+ return seamFacetPrefs.get(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME, "");
+ }
+
+ protected String getTestCasesPackageName(IEclipsePreferences seamFacetPrefs, Map<String, INamedElement> wizardParams) {
+ return seamFacetPrefs.get(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME, "");
+ }
+
/**
* @param fileMapping
* @param vars
@@ -194,7 +202,7 @@
public FilterSetCollection getFilterSetCollection(Map vars) {
return new FilterSetCollection(SeamFacetFilterSetFactory.createFiltersFilterSet(vars));
}
-
+
/* (non-Javadoc)
* @see org.eclipse.core.commands.operations.AbstractOperation#redo(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
*/
@@ -222,12 +230,11 @@
public boolean canUndo() {
return false;
}
-
+
public File getSeamFolder(Map<String, Object> vars) {
return new File(vars.get(ISeamFacetDataModelProperties.JBOSS_SEAM_HOME).toString(),"seam-gen"); //$NON-NLS-1$
}
-
+
protected void loadCustomVariables(Map<String, Object> vars) {
-
}
-}
+}
\ No newline at end of file
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-22 15:56:28 UTC (rev 4413)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2007-10-22 16:39:55 UTC (rev 4414)
@@ -22,6 +22,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -45,7 +46,7 @@
*/
public abstract class SeamBaseWizardPage extends WizardPage implements IAdaptable, PropertyChangeListener {
- private final IStructuredSelection initialSelection;
+ protected final IStructuredSelection initialSelection;
/**
*
@@ -72,21 +73,21 @@
protected void createEditors() {
addEditors(SeamWizardFactory.createBaseFormFieldEditors(SeamWizardUtils.getRootSeamProjectName(initialSelection)));
}
-
+
Map<String,IFieldEditor> editorRegistry = new HashMap<String,IFieldEditor>();
-
+
List<IFieldEditor> editorOrder = new ArrayList<IFieldEditor>();
-
+
/**
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
setControl(new GridLayoutComposite(parent));
-
+
if (!"".equals(editorRegistry.get(IParameter.SEAM_PROJECT_NAME).getValue())){ //$NON-NLS-1$
Map errors = ValidatorFactory.SEAM_PROJECT_NAME_VALIDATOR.validate(
getEditor(IParameter.SEAM_PROJECT_NAME).getValue(), null);
-
+
if(errors.size()>0) {
setErrorMessage(errors.get(IValidator.DEFAULT_ERROR).toString());
getEditor(IParameter.SEAM_BEAN_NAME).setEnabled(false);
@@ -117,7 +118,7 @@
return editorRegistry;
return null;
}
-
+
/**
*
* @param id
@@ -128,7 +129,7 @@
editorOrder.add(editor);
editor.addPropertyChangeListener(this);
}
-
+
/**
*
* @param id
@@ -139,7 +140,7 @@
addEditor(fieldEditor);
}
}
-
+
/**
*
* @param name
@@ -148,18 +149,16 @@
public IFieldEditor getEditor(String name) {
return editorRegistry.get(name);
}
-
-
+
public void setDefaultValue(String name, Object value) {
IFieldEditor editor = getEditor(name);
editor.removePropertyChangeListener(this);
editor.setValue(value);
editor.addPropertyChangeListener(this);
}
+
/**
- *
* @author eskimo
- *
*/
public class GridLayoutComposite extends Composite {
@@ -180,12 +179,12 @@
fieldEditor2.doFillIntoGrid(this);
}
}
-
+
public GridLayoutComposite(Composite parent) {
this(parent, SWT.NONE);
}
}
-
+
/* (non-Javadoc)
* @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent)
*/
@@ -199,67 +198,81 @@
*/
protected void doValidate(PropertyChangeEvent event) {
if(!isValidProjectSelected()) return;
-
+
IProject project = getSelectedProject();
- getEditor(IParameter.SEAM_BEAN_NAME).setEnabled(!isWar());
+ boolean isWar = isWar();
+ getEditor(IParameter.SEAM_BEAN_NAME).setEnabled(!isWar);
+ IFieldEditor packageEditor = getEditor(IParameter.SEAM_PACKAGE_NAME);
+ if(packageEditor!=null) {
+ packageEditor.setEnabled(!isWar);
+ }
if(!isValidRuntimeConfigured(project)) return;
-
+
LabelFieldEditor label = (LabelFieldEditor)((CompositeEditor)getEditor(IParameter.SEAM_LOCAL_INTERFACE_NAME)).getEditors().get(0);
- label.getLabelControl().setText(isWar()?SeamUIMessages.SEAM_BASE_WIZARD_PAGE_POJO_CLASS_NAME: SeamUIMessages.SEAM_BASE_WIZARD_PAGE_LOCAL_CLASS_NAME);
-
+ label.getLabelControl().setText(isWar?SeamUIMessages.SEAM_BASE_WIZARD_PAGE_POJO_CLASS_NAME: SeamUIMessages.SEAM_BASE_WIZARD_PAGE_LOCAL_CLASS_NAME);
+
Map errors = ValidatorFactory.SEAM_COMPONENT_NAME_VALIDATOR.validate(
editorRegistry.get(IParameter.SEAM_COMPONENT_NAME).getValue(), null);
-
+
if(errors.size()>0) {
setErrorMessage(NLS.bind(errors.get(IValidator.DEFAULT_ERROR).toString(),SeamUIMessages.SEAM_BASE_WIZARD_PAGE_SEAM_COMPONENTS));
setPageComplete(false);
return;
}
-
+
errors = ValidatorFactory.SEAM_COMPONENT_NAME_VALIDATOR.validate(
editorRegistry.get(IParameter.SEAM_LOCAL_INTERFACE_NAME).getValue(), null);
-
+
if(errors.size()>0) {
setErrorMessage(NLS.bind(errors.get(IValidator.DEFAULT_ERROR).toString(),SeamUIMessages.SEAM_BASE_WIZARD_PAGE_LOCAL_INTERFACE));
setPageComplete(false);
return;
}
- if(!isWar()) {
+ if(!isWar) {
errors = ValidatorFactory.SEAM_COMPONENT_NAME_VALIDATOR.validate(
editorRegistry.get(IParameter.SEAM_BEAN_NAME).getValue(), null);
-
+
if(errors.size()>0) {
setErrorMessage(NLS.bind(errors.get(IValidator.DEFAULT_ERROR).toString(),"Bean")); //$NON-NLS-1$
setPageComplete(false);
return;
}
- } else {
-
}
-
+
+ IFieldEditor editor = editorRegistry.get(IParameter.SEAM_PACKAGE_NAME);
+ if(editor!=null) {
+ errors = ValidatorFactory.PACKAGE_NAME_VALIDATOR.validate(editor.getValue(), null);
+
+ if(errors.size()>0) {
+ setErrorMessage(errors.get(IValidator.DEFAULT_ERROR).toString()); //$NON-NLS-1$
+ setPageComplete(false);
+ return;
+ }
+ }
+
errors = ValidatorFactory.SEAM_METHOD_NAME_VALIDATOR.validate(
editorRegistry.get(IParameter.SEAM_METHOD_NAME).getValue(), new Object[]{"Method",project}); //$NON-NLS-1$
-
+
if(errors.size()>0) {
setErrorMessage(errors.get(IValidator.DEFAULT_ERROR).toString());
setPageComplete(false);
return;
}
-
+
errors = ValidatorFactory.FILE_NAME_VALIDATOR.validate(
editorRegistry.get(IParameter.SEAM_PAGE_NAME).getValue(), new Object[]{"Page",project}); //$NON-NLS-1$
-
+
if(errors.size()>0) {
setErrorMessage(errors.get(IValidator.DEFAULT_ERROR).toString());
setPageComplete(false);
return;
}
-
+
errors = ValidatorFactory.SEAM_JAVA_INTEFACE_NAME_CONVENTION_VALIDATOR.validate(
editorRegistry.get(IParameter.SEAM_LOCAL_INTERFACE_NAME).getValue(), new Object[]{SeamUIMessages.SEAM_BASE_WIZARD_PAGE_LOCAL_INTERFACE,project});
-
+
if(errors.size()>0) {
setErrorMessage(null);
setMessage(errors.get(IValidator.DEFAULT_ERROR).toString(),IMessageProvider.WARNING);
@@ -290,16 +303,20 @@
protected boolean isValidProjectSelected() {
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);
getEditor(IParameter.SEAM_BEAN_NAME).setEnabled(false);
+ IFieldEditor packageEditor = getEditor(IParameter.SEAM_PACKAGE_NAME);
+ if(packageEditor!=null) {
+ packageEditor.setEnabled(false);
+ }
return false;
- }
+ }
return true;
}
-
+
/**
*
*/
@@ -322,13 +339,36 @@
}
}
if(event.getPropertyName().equals(IParameter.SEAM_PROJECT_NAME)) {
- IFieldEditor editor = getEditor(IParameter.SEAM_PACKAGE_NAME);
- if(editor!=null) {
- editor.setData(IParameter.SEAM_PROJECT_NAME, event.getNewValue());
+ String selectedProject = event.getNewValue().toString();
+ setSeamProjectNameData(selectedProject);
+ setDefaultValue(IParameter.SEAM_PACKAGE_NAME, getDefaultPackageName(selectedProject));
+ }
+ }
+
+ protected String getDefaultPackageName(String selectedProject) {
+ String packageName = "";
+ if(selectedProject!=null && selectedProject.length()>0) {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(selectedProject);
+ if(project!=null) {
+ IEclipsePreferences seamFacetPrefs = SeamCorePlugin.getSeamPreferences(project);
+ packageName = getDefaultPackageName(seamFacetPrefs);
}
}
+
+ return packageName;
}
+ protected String getDefaultPackageName(IEclipsePreferences seamFacetPrefs) {
+ return seamFacetPrefs.get(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME, "");
+ }
+
+ protected void setSeamProjectNameData(String projectName) {
+ IFieldEditor editor = getEditor(IParameter.SEAM_PACKAGE_NAME);
+ if(editor!=null) {
+ editor.setData(IParameter.SEAM_PROJECT_NAME, projectName);
+ }
+ }
+
/**
* @return
*/
@@ -337,12 +377,12 @@
editorRegistry.get(IParameter.SEAM_PROJECT_NAME).getValueAsString());
return (IProject)project;
}
-
+
public boolean isWar() {
if(getSelectedProject()==null ||
SeamCorePlugin.getSeamPreferences(getSelectedProject().getProject())==null) return true;
return "war".equals(SeamCorePlugin.getSeamPreferences(getSelectedProject().getProject()).get(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,"war")); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
public abstract String getDefaultMessageText();
-}
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SelectJavaPackageAction.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SelectJavaPackageAction.java 2007-10-22 15:56:28 UTC (rev 4413)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SelectJavaPackageAction.java 2007-10-22 16:39:55 UTC (rev 4414)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.seam.ui.wizard;
+import java.util.ArrayList;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jdt.core.IJavaElement;
@@ -40,6 +42,9 @@
@Override
public void run() {
String projectName = (String)getFieldEditor().getData(IParameter.SEAM_PROJECT_NAME);
+ if(projectName == null) {
+ return;
+ }
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
if(project == null) {
SeamGuiPlugin.getPluginLog().logError("Can't find java project with name: " + projectName);
@@ -85,12 +90,29 @@
packages = new IJavaElement[0];
}
+ String initialValue = getFieldEditor().getValue().toString();
+ IJavaElement initialElement = null;
+ ArrayList packagesWithouDefaultPackage = new ArrayList();
+ for (IJavaElement packageElement : packages) {
+ String packageName = packageElement.getElementName();
+ if(packageName.length()>0) {
+ packagesWithouDefaultPackage.add(packageElement);
+ if(packageName.equals(initialValue)) {
+ initialElement = packageElement;
+ }
+ }
+ }
+
+ packages = (IJavaElement[])packagesWithouDefaultPackage.toArray(new IJavaElement[packagesWithouDefaultPackage.size()]);
ElementListSelectionDialog dialog = new ElementListSelectionDialog(Display.getCurrent().getActiveShell(), new JavaElementLabelProvider(
JavaElementLabelProvider.SHOW_DEFAULT));
dialog.setTitle(J2EEUIMessages.PACKAGE_SELECTION_DIALOG_TITLE);
dialog.setMessage(J2EEUIMessages.PACKAGE_SELECTION_DIALOG_DESC);
dialog.setEmptyListMessage(J2EEUIMessages.PACKAGE_SELECTION_DIALOG_MSG_NONE);
dialog.setElements(packages);
+ if(initialElement!=null) {
+ dialog.setInitialSelections(new Object[]{initialElement});
+ }
if (dialog.open() == Window.OK) {
IPackageFragment fragment = (IPackageFragment) dialog.getFirstResult();
if (fragment != null) {
17 years, 2 months
JBoss Tools SVN: r4413 - trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2007-10-22 11:56:28 -0400 (Mon, 22 Oct 2007)
New Revision: 4413
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/Richfaces3_1.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1132 Add RichFaces jQuery template
Modified: trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/Richfaces3_1.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/Richfaces3_1.xml 2007-10-22 15:56:24 UTC (rev 4412)
+++ trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/Richfaces3_1.xml 2007-10-22 15:56:28 UTC (rev 4413)
@@ -10065,7 +10065,7 @@
<attribute type="boundaryDatesMode"/>
</element-type>
<element-type body-content="allowed" content="mixed"
- end-tag="required" name="treeNodes" start-tag="required">
+ end-tag="required" name="treeNodesAdaptor" start-tag="required">
<description/>
<attribute-type name="active" required="false">
<description>active</description>
@@ -10114,7 +10114,7 @@
<attribute type="id"/>
</element-type>
<element-type body-content="allowed" content="mixed"
- end-tag="required" name="recursiveTreeNodes" start-tag="required">
+ end-tag="required" name="recursiveTreeNodesAdaptor" start-tag="required">
<description/>
<attribute-type name="active" required="false">
<description>active</description>
@@ -10973,5 +10973,58 @@
<description>Every component may have a unique id that is automatically created if omitted</description>
</attribute-type>
<attribute type="id"/>
+ </element-type>
+ <element-type body-content="refused" content="mixed"
+ end-tag="required" name="jQuery" start-tag="required">
+ <description/>
+ <attribute-type name="name" required="false">
+ <description>The name of the function that will be generated to
+execute the query.
+</description>
+ </attribute-type>
+ <attribute type="name"/>
+ <attribute-type name="query" required="false">
+ <description>The query string that will be executed for given
+selector.
+</description>
+ </attribute-type>
+ <attribute type="query"/>
+ <attribute-type name="selector" required="false">
+ <description>Selector for query.</description>
+ </attribute-type>
+ <attribute type="selector"/>
+ <attribute-type name="timing" required="false">
+ <description>When to peform the query.</description>
+ <proposal type="enumeration">
+ <param value="immediate"/>
+ <param value="onload"/>
+ <param value="onJScall"/>
+ </proposal>
+ </attribute-type>
+ <attribute type="timing"/>
+ <attribute-type name="rendered" required="false">
+ <description>If "false", this component is not rendered</description>
+ <proposal type="beanProperty"/>
+ <proposal type="bundleProperty"/>
+ <proposal type="jsfVariables"/>
+ <proposal type="enumeration">
+ <param value="true"/>
+ <param value="false"/>
+ </proposal>
+ </attribute-type>
+ <attribute type="rendered"/>
+ <attribute-type name="binding" required="false">
+ <description>The attribute takes a value-binding expression for a component property of
+a backing bean</description>
+ <proposal type="jsfVariables"/>
+ <proposal type="beanProperty">
+ <param name="type" value="javax.faces.component.UIComponent"/>
+ </proposal>
+ </attribute-type>
+ <attribute type="binding"/>
+ <attribute-type name="id" required="false">
+ <description>Every component may have a unique id that is automatically created if omitted</description>
+ </attribute-type>
+ <attribute type="id"/>
</element-type>
</schema>
17 years, 2 months
JBoss Tools SVN: r4412 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2007-10-22 11:56:24 -0400 (Mon, 22 Oct 2007)
New Revision: 4412
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1132 Add RichFaces jQuery template
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-22 15:56:20 UTC (rev 4411)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-22 15:56:24 UTC (rev 4412)
@@ -597,6 +597,13 @@
<span style="display:none">
</span>
</vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="rich:jQuery" case-sensitive="yes">
+ <vpe:template children="no" modify="yes">
+ <span style="display:none">
+ </span>
+ </vpe:template>
</vpe:tag>
<vpe:tag name="rich:insert" case-sensetive="yes">
17 years, 2 months
JBoss Tools SVN: r4411 - trunk/common/plugins/org.jboss.tools.common.model/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2007-10-22 11:56:20 -0400 (Mon, 22 Oct 2007)
New Revision: 4411
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/options_general.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1132 Add RichFaces jQuery template
Modified: trunk/common/plugins/org.jboss.tools.common.model/resources/meta/options_general.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/resources/meta/options_general.xml 2007-10-22 14:07:45 UTC (rev 4410)
+++ trunk/common/plugins/org.jboss.tools.common.model/resources/meta/options_general.xml 2007-10-22 15:56:20 UTC (rev 4411)
@@ -1964,10 +1964,15 @@
NAME="dataGrid" REFORMAT="yes" SCOPE="project"
STARTTEXT="<dataGrid>" />
<MacroHTML
- DESCRIPTION="<b>Syntax:</b><br><code>&lt;rich:treeNodes&gt;</code><br><code>&lt;/rich:treeNodes&gt;</code><br><b>Attributes:</b><br><code>active, var, rendered, nodes, binding, id</code>"
- ENDTEXT="</treeNodes>" ENTITY="SharableMacroHTML" ICON=""
- NAME="treeNodes" REFORMAT="yes" SCOPE="project"
- STARTTEXT="<treeNodes>" />
+ DESCRIPTION="<b>Syntax:</b><br><code>&lt;rich:treeNodesAdaptor&gt;</code><br><code>&lt;/rich:treeNodesAdaptor&gt;</code><br><b>Attributes:</b><br><code>active, var, rendered, nodes, binding, id</code>"
+ ENDTEXT="</treeNodesAdaptor>" ENTITY="SharableMacroHTML" ICON=""
+ NAME="treeNodesAdaptor" REFORMAT="yes" SCOPE="project"
+ STARTTEXT="<treeNodesAdaptor>" />
+ <MacroHTML
+ DESCRIPTION="<b>Syntax:</b><br><code>&lt;rich:jQuery&gt;</code><br><code>&lt;/rich:jQuery&gt;</code><br><b>Attributes:</b><br><code>query, name, timing, id, rendered, binding, selector</code>"
+ ENDTEXT="</jQuery>" ENTITY="SharableMacroHTML" ICON=""
+ NAME="jQuery" REFORMAT="yes" SCOPE="project"
+ STARTTEXT="<jQuery>" />
<MacroHTML
DESCRIPTION="<b>Syntax:</b><br><code>&lt;rich:menuGroup&gt;</code><br><code>&lt;/rich:menuGroup&gt;</code><br><b>Attributes:</b><br><code><b>value</b>, onclose, iconClass, rendered, showDelay, iconDisabled, id, onopen, styleClass, icon, style, onmouseover, iconFolderDisabled, converter, disabled, selectClass, selectStyle, onmouseout, direction, iconStyle, event, binding, onmousemove, iconFolder</code>"
ENDTEXT="</menuGroup>" ENTITY="SharableMacroHTML" ICON=""
@@ -2073,10 +2078,10 @@
NAME="panelMenuGroup" REFORMAT="yes" SCOPE="project"
STARTTEXT="<panelMenuGroup>" />
<MacroHTML
- DESCRIPTION="<b>Syntax:</b><br><code>&lt;rich:recursiveTreeNodes&gt;</code><br><code>&lt;/rich:recursiveTreeNodes&gt;</code><br><b>Attributes:</b><br><code>active, var, activeRoot, rendered, nodes, id, root, binding, activeNodes</code>"
- ENDTEXT="</recursiveTreeNodes>" ENTITY="SharableMacroHTML"
- ICON="" NAME="recursiveTreeNodes" REFORMAT="yes" SCOPE="project"
- STARTTEXT="<recursiveTreeNodes>" />
+ DESCRIPTION="<b>Syntax:</b><br><code>&lt;rich:recursiveTreeNodesAdaptor&gt;</code><br><code>&lt;/rich:recursiveTreeNodesAdaptor&gt;</code><br><b>Attributes:</b><br><code>active, var, activeRoot, rendered, nodes, id, root, binding, activeNodes</code>"
+ ENDTEXT="</recursiveTreeNodesAdaptor>" ENTITY="SharableMacroHTML"
+ ICON="" NAME="recursiveTreeNodesAdaptor" REFORMAT="yes" SCOPE="project"
+ STARTTEXT="<recursiveTreeNodesAdaptor>" />
<MacroHTML
DESCRIPTION="<b>Syntax:</b><br><code>&lt;rich:simpleTogglePanel&gt;</code><br><code>&lt;/rich:simpleTogglePanel&gt;</code><br><b>Attributes:</b><br><code>actionListener, width, oncomplete, bodyClass, rendered, reRender, focus, id, styleClass, bypassUpdates, switchType, height, onkeypress, limitToList, ondblclick, ajaxSingle, style, onmouseover, onkeyup, action, value, timeout, actionExpression, onclick, headerClass, status, onmouseout, onkeydown, onmousedown, requestDelay, opened, eventsQueue, label, immediate, data, onmouseup, ignoreDupResponses, binding, onmousemove</code>"
ENDTEXT="</simpleTogglePanel>" ENTITY="SharableMacroHTML"
17 years, 2 months
JBoss Tools SVN: r4410 - trunk/documentation/GettingStartedGuide/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2007-10-22 10:07:45 -0400 (Mon, 22 Oct 2007)
New Revision: 4410
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-187 minor corrections
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml 2007-10-22 13:51:07 UTC (rev 4409)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml 2007-10-22 14:07:45 UTC (rev 4410)
@@ -11,7 +11,7 @@
</keywordset>
</chapterinfo>
<title>Manage JBoss AS from Red Hat Developer Studio</title>
- <para>Red Hat Developer Studio ships with <property>JBoss EAP v.4.2</property> bundled. When you followed the default installation of Red Hat Developer Studio, you should already have a JBoss 4.2 server installed and defined. To run JBoss AS 4.2 you need <property>JDK 1.5.</property>, JDK 6 is not formally supported yet, although you may be able to start the server with it.</para>
+ <para>Red Hat Developer Studio ships with <property>JBoss EAP v.4.2</property> bundled. When you followed the default installation of Red Hat Developer Studio, you should already have a JBoss 4.2 server installed and defined. To run JBoss AS 4.2 you need JDK 1.5, JDK 6 is not formally supported yet, although you may be able to start the server with it.</para>
<section id="JBossbundled">
<?dbhtml filename="JBossbundled.html"?>
<title>How to Manage the JBoss AS Bundled in RHDS</title>
@@ -87,7 +87,7 @@
<section id="ServerPreferences">
<?dbhtml filename="ServerPreferences.html"?>
<title>Server Container Preferences</title>
- <para>You can control how Red Hat Developer Studio interacts with <property>servlet containers</property> in Preferences. Select <emphasis><property>Window > Preferences > JBoss Tools > JBoss Servers</property></emphasis> and switch to the desired server:</para>
+ <para>You can control how Red Hat Developer Studio interacts with servlet containers in Preferences. Select <emphasis><property>Window > Preferences > JBoss Tools > JBoss Servers</property></emphasis> and switch to the desired server:</para>
<figure>
<title>Server Preferences</title>
<mediaobject>
@@ -287,8 +287,8 @@
</imageobject>
</mediaobject>
</figure>
- <para>The <property>modules</property> section shows what modules are currently deployed to the server, and allows you to remove them
- from the server, or force a full republish upon them. It only shows which modules have been deployed through eclipse,
+ <para>The <property>Modules</property> section shows what modules are currently deployed to the server, and allows you to remove them
+ from the server, or force a full republish upon them. It only shows which modules have been deployed through Eclipse,
not any and all modules that happen to be in the deploy directory.</para>
<figure>
<title>Modules Action</title>
@@ -298,7 +298,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>The Event Log will show relevent information to your server's startup, shutdown, and publish processes. This allows
+ <para>The <property>Event Log</property> will show relevent information to your server's startup, shutdown, and publish processes. This allows
you to keep an eye on what's going on (such as automatic incremental deployment if you have it enabled).
The only action available is to clear the event log. However if the properties view is opened, you can receive further
information on each event log item (when available).</para>
@@ -311,18 +311,18 @@
</mediaobject>
</figure>
<figure>
- <title></title>
+ <title>Stopping the Server</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/JBVServerisstopped.png"/>
</imageobject>
</mediaobject>
</figure>
- <para>The XML Configuration category allows you to quickly browse to descriptor files in your server's deploy directory and
- check or change the values. It's use requires the properties view. Basically, an xpath is a path used to access
+ <para>The <property>XML Configuration</property> category allows you to quickly browse to descriptor files in your server's deploy directory and
+ check or change the values. It's use requires the Properties view. Basically, XML Configuration are XML XPaths where a xpath is a path used to access
some specific part of an xml document.</para>
<figure>
- <title>XML Configuration and Properties</title>
+ <title>XML Configuration and Properties View</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/JBVxmlconfigandprop.png"/>
@@ -363,7 +363,7 @@
should be left blank and your xpath should end with port.
If, on the other hand, your desired field is the port attribute of <fieldName port="35">, then your xpath will end
with fieldName and your Attribute Name will be "port".
- When finished, you can click <emphasis><property>preview</property></emphasis> to see how many matches you have for that particular xpath, as shown below.</para>
+ When finished, you can click <emphasis><property>Preview</property></emphasis> to see how many matches you have for that particular xpath, as shown below.</para>
<figure>
<title>XPath Preview</title>
<mediaobject>
@@ -378,7 +378,7 @@
<para>Every application, whether plain old Java, J2EE, or some other language altogether, needs to be packaged in some way. In Java-related projects,
many people use ANT. Red Hat Developer Studio comes with our own archives tool with a bit easier and less-verbose XML and a handy user interface.</para>
<para>The Project Archives plugin consists primarily of a view to set up each packaging configuration. Each project can enable or disable its builder, or depend on the global setting.</para>
- <para>The packaging configuration for each project is stored in that project's root folder, and is in a file named .packages, which has a fairly simple XML
+ <para>The packaging configuration for each project is stored in that project's root folder, and is in a file named <property>.packages</property>, which has a fairly simple XML
structure. Modifying the file by hand is neither required nor reccommended, and using the UI is the official way of modifying your packaging structure.</para>
<para>Aside from the builder, the other preferences for the plugin are mostly cosmetic, allowing you to show full or truncated paths, show the project at the
root, etc. None of these have any effect on the functionality of the packaging plugin.</para>
@@ -469,7 +469,7 @@
<section id="Deploy to Server">
<?dbhtml filename="DeployToServer.html"?>
<title>Deploy to Server</title>
- <para>In the context menu of files there is a <property>Deploy to server</property> option that allows a single file deployment. To deploy these non-WTP files/projects right click on the file (-ds.xml, .ear, .jar etc.) and select <emphasis><property>Deploy To server</property></emphasis> and it will be automatically deployed.</para>
+ <para>In the context menu of files there is a <property>Deploy To Server</property> option that allows a single file deployment. To deploy these non-WTP files/projects right click on the file (-ds.xml, .ear, .jar etc.) and select <emphasis><property>Deploy To server</property></emphasis> and it will be automatically deployed.</para>
<figure>
<title>Deploy to Sever</title>
<mediaobject>
17 years, 2 months
JBoss Tools SVN: r4409 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-22 09:51:07 -0400 (Mon, 22 Oct 2007)
New Revision: 4409
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
Log:
JBIDE-1133
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-10-22 13:51:04 UTC (rev 4408)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-10-22 13:51:07 UTC (rev 4409)
@@ -184,6 +184,8 @@
boolean useDefaultRuntime = d != null && d.getName().equals(runtimeName);
if(useDefaultRuntime) {
this.runtimeName = null;
+ } else {
+ this.runtimeName = runtimeName;
}
storeRuntime();
}
17 years, 2 months
JBoss Tools SVN: r4408 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-10-22 09:51:04 -0400 (Mon, 22 Oct 2007)
New Revision: 4408
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencePage.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1133
Added method performOk
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencePage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencePage.java 2007-10-22 13:18:54 UTC (rev 4407)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencePage.java 2007-10-22 13:51:04 UTC (rev 4408)
@@ -119,4 +119,10 @@
setMessage(null);
performApply();
}
+
+ @Override
+ public boolean performOk() {
+ performApply();
+ return super.performOk();
+ }
}
17 years, 2 months
JBoss Tools SVN: r4407 - trunk/struts/plugins/org.jboss.tools.struts.verification/src/org/jboss/tools/struts/verification.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-22 09:18:54 -0400 (Mon, 22 Oct 2007)
New Revision: 4407
Modified:
trunk/struts/plugins/org.jboss.tools.struts.verification/src/org/jboss/tools/struts/verification/CheckInitParam.java
Log:
JBIDE-1078
Modified: trunk/struts/plugins/org.jboss.tools.struts.verification/src/org/jboss/tools/struts/verification/CheckInitParam.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.verification/src/org/jboss/tools/struts/verification/CheckInitParam.java 2007-10-22 12:22:59 UTC (rev 4406)
+++ trunk/struts/plugins/org.jboss.tools.struts.verification/src/org/jboss/tools/struts/verification/CheckInitParam.java 2007-10-22 13:18:54 UTC (rev 4407)
@@ -26,6 +26,10 @@
XModelObject o = ((VObjectImpl)object).getModelObject();
String paramName = o.getAttributeValue("param-name");
if(paramName == null) return null;
+ XModelObject parent = o.getParent();
+ if(parent == null || !"WebAppServlet".equals(parent.getModelEntity().getName())) {
+ return null;
+ }
if(!paramName.equals("config") && !paramName.startsWith("config/")) return null;
String value = o.getAttributeValue("param-value");
17 years, 2 months