JBoss Tools SVN: r20219 - trunk/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/tests.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-02-10 10:01:56 -0500 (Wed, 10 Feb 2010)
New Revision: 20219
Modified:
trunk/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708
Modified: trunk/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java 2010-02-10 14:54:17 UTC (rev 20218)
+++ trunk/tests/tests/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractResourceMarkerTest.java 2010-02-10 15:01:56 UTC (rev 20219)
@@ -45,12 +45,22 @@
public static int findMarkerLine(IResource resource, String type, String pattern)
throws CoreException {
int number = -1;
+ List<Integer> lines = findMarkerLines(resource, type, pattern);
+ if(!lines.isEmpty()) {
+ number = lines.get(0);
+ }
+ return number;
+ }
+
+ public static List<Integer> findMarkerLines(IResource resource, String type,
+ String pattern) throws CoreException {
+ List<Integer> numbers = new ArrayList<Integer>();
IMarker[] markers = findMarkers(resource, type, pattern);
for (int i = 0; i < markers.length; i++) {
- number = markers[i].getAttribute(IMarker.LINE_NUMBER, -1);
+ numbers.add(markers[i].getAttribute(IMarker.LINE_NUMBER, -1));
}
- return number;
+ return numbers;
}
public static IMarker[] findMarkers(IResource resource, String type, String pattern) throws CoreException {
@@ -69,17 +79,44 @@
assertMarkerIsCreated(resource, markerData.type, markerData.pattern, markerData.line);
}
- public static void assertMarkerIsCreated(IResource resource, String type, String pattern, int expectedLine)
+ public static void assertMarkerIsCreated(IResource resource, String type, String pattern, int... expectedLines)
throws CoreException {
- int line = findMarkerLine(
+ List<Integer> lines = findMarkerLines(
resource, type, pattern);
- assertTrue("Marker matches the '" + pattern + "' pattern wasn't found", //$NON-NLS-1$ //$NON-NLS-2$
- line != -1);
+ assertFalse("Marker matches the '" + pattern + "' pattern wasn't found", //$NON-NLS-1$ //$NON-NLS-2$
+ lines.isEmpty());
- assertEquals("Marker matches the '" + pattern + "' pattern was found at wrong line", //$NON-NLS-1$//$NON-NLS-2$
- expectedLine,line);
+ assertEquals("Wrong number of found marker matches the '" + pattern + "' pattern", //$NON-NLS-1$//$NON-NLS-2$
+ expectedLines.length, lines.size());
+
+ StringBuffer expectedString = new StringBuffer();
+ StringBuffer realString = new StringBuffer();
+ int i = 1;
+ for (int line : lines) {
+ realString.append(line);
+ if(lines.size()>i++) {
+ realString.append(", ");
+ }
+ }
+ for (int expected : expectedLines) {
+ expectedString.append(expected);
+ if(expectedLines.length>i++) {
+ expectedString.append(", ");
+ }
+ }
+ for (int line : lines) {
+ boolean found = false;
+ for (int expected : expectedLines) {
+ if(line==expected) {
+ found = true;
+ break;
+ }
+ }
+ assertTrue("Marker matches the '" + pattern + "' pattern was found at wrong lines. Expected: " + expectedString + " but were: " + realString, //$NON-NLS-1$//$NON-NLS-2$
+ found);
+ }
}
public static void assertMarkerIsNotCreated(IResource resource, String type, String pattern) throws CoreException {
14 years, 8 months
JBoss Tools SVN: r20218 - in trunk/cdi: plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-02-10 09:54:17 -0500 (Wed, 10 Feb 2010)
New Revision: 20218
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2708
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-02-10 14:46:31 UTC (rev 20217)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-02-10 14:54:17 UTC (rev 20218)
@@ -37,6 +37,7 @@
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IParametedType;
import org.jboss.tools.cdi.core.IQualifierDeclaration;
+import org.jboss.tools.cdi.core.IScopeDeclaration;
import org.jboss.tools.cdi.core.IStereotype;
import org.jboss.tools.cdi.core.ITypeDeclaration;
import org.jboss.tools.cdi.core.preferences.CDIPreferences;
@@ -239,11 +240,19 @@
validationContext.addVariableNameForELValidation(name);
}
- // 2.2.2. Restricting the bean types of a bean
- // - bean class or producer method or field specifies a @Typed annotation,
- // and the value member specifies a class which does not correspond to a type
- // in the unrestricted set of bean types of a bean
- int i = 0;
+ validateTyped(bean);
+ validateBeanScope(bean);
+
+ // TODO
+ }
+
+ /*
+ * 2.2.2. Restricting the bean types of a bean
+ * - bean class or producer method or field specifies a @Typed annotation,
+ * and the value member specifies a class which does not correspond to a type
+ * in the unrestricted set of bean types of a bean
+ */
+ private void validateTyped(IBean bean) {
Set<ITypeDeclaration> typedDeclarations = bean.getRestrictedTypeDeclaratios();
if(!typedDeclarations.isEmpty()) {
Set<IParametedType> allTypes = bean.getAllTypes();
@@ -263,9 +272,21 @@
}
}
}
- // TODO
}
+ /*
+ * 2.4.3. Declaring the bean scope
+ * - bean class or producer method or field specifies multiple scope type annotations
+ */
+ private void validateBeanScope(IBean bean) {
+ Set<IScopeDeclaration> scopes = bean.getScopeDeclarations();
+ if(scopes.size()>1) {
+ for (IScopeDeclaration scope : scopes) {
+ addError(CDIValidationMessages.MULTIPLE_SCOPE_TYPE_ANNOTATIONS, CDIPreferences.MULTIPLE_SCOPE_TYPE_ANNOTATIONS, scope, bean.getResource());
+ }
+ }
+ }
+
/**
* Validates a stereotype.
* 2.7.1.3. Declaring a @Named stereotype
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-02-10 14:46:31 UTC (rev 20217)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-02-10 14:54:17 UTC (rev 20218)
@@ -55,10 +55,10 @@
CDICorePlugin.PLUGIN_ID
);
-// private static SectionDescription SECTION_SCOPE = new SectionDescription(
-// CDIPreferencesMessages.CDIValidatorConfigurationBlock_section_scope,
-// new String[][]{
-// {CDIPreferences.MULTIPLE_SCOPE_TYPE_ANNOTATIONS, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_multipleScopeTypeAnnotations_label},
+ private static SectionDescription SECTION_SCOPE = new SectionDescription(
+ CDIPreferencesMessages.CDIValidatorConfigurationBlock_section_scope,
+ new String[][]{
+ {CDIPreferences.MULTIPLE_SCOPE_TYPE_ANNOTATIONS, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_multipleScopeTypeAnnotations_label},
// {CDIPreferences.MISSING_SCOPE_WHEN_THERE_IS_NO_DEFAULT_SCOPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingScopeWhenThereIsNoDefaultScope_label},
// {CDIPreferences.STEREOTYPE_DECLARES_MORE_THAN_ONE_SCOPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_stereotypeDeclaresMoreThanOneScope_label},
// {CDIPreferences.ILLEGAL_SCOPE_FOR_MANAGED_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalScopeForManagedBean_label},
@@ -68,9 +68,9 @@
// {CDIPreferences.ILLEGAL_SCOPE_WHEN_TYPE_INJECTIONPOINT_IS_INJECTED, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalScopeWhenTypeInjectionPointIsInjected_label},
// {CDIPreferences.ILLEGAL_SCOPE_FOR_INTERCEPTOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalScopeForInterceptor_label},
// {CDIPreferences.ILLEGAL_SCOPE_FOR_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_illegalScopeForDecorator_label},
-// },
-// CDICorePlugin.PLUGIN_ID
-// );
+ },
+ CDICorePlugin.PLUGIN_ID
+ );
// private static SectionDescription SECTION_MEMBER = new SectionDescription(
// CDIPreferencesMessages.CDIValidatorConfigurationBlock_section_member,
@@ -145,7 +145,7 @@
private static SectionDescription[] ALL_SECTIONS = new SectionDescription[]{
SECTION_NAME,
SECTION_TYPE,
-// SECTION_SCOPE,
+ SECTION_SCOPE,
// SECTION_MEMBER,
// SECTION_INTERCEPTOR,
// SECTION_SPECIALIZATION,
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-02-10 14:46:31 UTC (rev 20217)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-02-10 14:54:17 UTC (rev 20218)
@@ -65,6 +65,19 @@
cleanProject("/definition/stereotype");
}
+ /*
+ * 2.4.3. Declaring the bean scope
+ * - bean class or producer method or field specifies multiple scope type annotations
+ */
+ public void testBeanScope() throws Exception {
+ IProject p = importPreparedProject("/definition/scope");
+ IFile file = p.getFile("JavaSource/org/jboss/jsr299/tck/tests/definition/scope/broken/tooManyScopes/BeanWithTooManyScopeTypes_Broken.java");
+ AbstractResourceMarkerTest.assertMarkerIsCreated(file, AbstractResourceMarkerTest.MARKER_TYPE, "Bean class or producer method or field specifies multiple scope type annotations", 6, 7);
+ int markerNumbers = getMarkersNumber(file);
+ assertEquals("StereotypeWithTyped_Broken.java should has two error markers.", markerNumbers, 2);
+ cleanProject("/definition/scope");
+ }
+
public static int getMarkersNumber(IResource resource) {
return AbstractResourceMarkerTest.getMarkersNumberByGroupName(resource, null);
}
14 years, 8 months
JBoss Tools SVN: r20217 - trunk/seam/plugins/org.jboss.tools.seam.xml.ui.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-02-10 09:46:31 -0500 (Wed, 10 Feb 2010)
New Revision: 20217
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-1253
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/plugin.xml 2010-02-10 14:45:57 UTC (rev 20216)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/plugin.xml 2010-02-10 14:46:31 UTC (rev 20217)
@@ -101,7 +101,7 @@
<xmlEditor
class="org.jboss.tools.jst.web.ui.editors.WebCompoundEditor"
contributorClass="org.jboss.tools.common.model.ui.texteditors.MultiPageContributor"
- entities="FileDSDatasources,FileDSConnectionFactories,FileDSDatasources50d,FileDSConnectionFactories50d"
+ entities="FileDSDatasources,FileDSConnectionFactories,FileDSDatasources50d,FileDSConnectionFactories50d,FileDSDatasources50s,FileDSConnectionFactories50s"
icon="$nl$/images/xstudio/editors/seam-components.gif"
name="%editors.spring-beans.name">
</xmlEditor>
14 years, 8 months
JBoss Tools SVN: r20216 - in trunk/seam/plugins/org.jboss.tools.seam.xml: src/org/jboss/tools/seam/xml/ds/model and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-02-10 09:45:57 -0500 (Wed, 10 Feb 2010)
New Revision: 20216
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/ds.meta
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/ds/model/DSConstants.java
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/ds/model/DSEntityRecognizer.java
trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/ds/model/DSFileLoaderUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1253
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/ds.meta
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/ds.meta 2010-02-10 10:25:07 UTC (rev 20215)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/meta/ds.meta 2010-02-10 14:45:57 UTC (rev 20216)
@@ -7,8 +7,10 @@
<MAPPING name="FileVersions">
<PAIR name="DSConnectionFactories1.5" value="FileDSConnectionFactories"/>
<PAIR name="DSConnectionFactories5.0dtd" value="FileDSConnectionFactories50d"/>
+ <PAIR name="DSConnectionFactories5.0xsd" value="FileDSConnectionFactories50s"/>
<PAIR name="DSDatasources1.5" value="FileDSDatasources"/>
<PAIR name="DSDatasources5.0dtd" value="FileDSDatasources50d"/>
+ <PAIR name="DSDatasources5.0xsd" value="FileDSDatasources50s"/>
</MAPPING>
<MAPPING name="Implementations">
<PAIR name="DS_Datasource" value="org.jboss.tools.seam.xml.ds.model.DatasourceImpl"/>
@@ -392,6 +394,10 @@
<XModelAttributeReference
attributes="blocking-timeout-millis,idle-timeout-minutes"
entity="DSHALocalTXDatasource" name="timeout"/>
+ <XModelAttribute PROPERTIES="category=advanced"
+ name="allocation-retry" xmlname="allocation-retry.#text"/>
+ <XModelAttribute PROPERTIES="category=advanced"
+ name="allocation-retry-wait-millis" xmlname="allocation-retry-wait-millis.#text"/>
<XModelAttributeReference attributes="no-tx-separate-pools"
entity="DSHALocalTXDatasource" name="no-tx-separate-pools"/>
<XModelAttributeReference
@@ -579,6 +585,9 @@
<XModelAttributeReference
attributes="blocking-timeout-millis,idle-timeout-minutes"
entity="DSHALocalTXDatasource" name="timeout"/>
+ <XModelAttributeReference
+ attributes="allocation-retry,allocation-retry-wait-millis"
+ entity="DSHALocalTXDatasource50" name="allocation"/>
<XModelAttributeReference attributes="no-tx-separate-pools"
entity="DSHALocalTXDatasource" name="no-tx-separate-pools"/>
<XModelAttribute PROPERTIES="category=advanced"
@@ -859,6 +868,9 @@
entity="DSHALocalTXDatasource" name="validate-on-match"/>
<XModelAttributeReference attributes="idle-timeout-minutes"
entity="DSHALocalTXDatasource" name="idle-timeout"/>
+ <XModelAttributeReference
+ attributes="allocation-retry,allocation-retry-wait-millis"
+ entity="DSHALocalTXDatasource50" name="allocation"/>
<XModelAttributeReference attributes="no-tx-separate-pools"
entity="DSHALocalTXDatasource" name="no-tx-separate-pools"/>
<XModelAttributeReference
@@ -1053,6 +1065,9 @@
entity="DSLocalTXDatasource50" name="background"/>
<XModelAttributeReference attributes="idle-timeout-minutes"
entity="DSHALocalTXDatasource" name="idle-timeout"/>
+ <XModelAttributeReference
+ attributes="allocation-retry,allocation-retry-wait-millis"
+ entity="DSHALocalTXDatasource50" name="allocation"/>
<XModelAttributeReference attributes="prefill,use-fast-fail"
entity="DSLocalTXDatasource" name="prefill"/>
<XModelAttributeReference attributes="metadata,type-mapping"
@@ -1227,6 +1242,9 @@
entity="DSLocalTXDatasource50" name="background"/>
<XModelAttributeReference attributes="idle-timeout-minutes"
entity="DSHALocalTXDatasource" name="idle-timeout"/>
+ <XModelAttributeReference
+ attributes="allocation-retry,allocation-retry-wait-millis"
+ entity="DSHALocalTXDatasource50" name="allocation"/>
<XModelAttributeReference attributes="validate-on-match"
entity="DSHALocalTXDatasource" name="validate-on-match"/>
<XModelAttributeReference
@@ -1401,6 +1419,9 @@
entity="DSLocalTXDatasource50" name="background"/>
<XModelAttributeReference attributes="idle-timeout-minutes"
entity="DSHALocalTXDatasource" name="idle-timeout"/>
+ <XModelAttributeReference
+ attributes="allocation-retry,allocation-retry-wait-millis"
+ entity="DSHALocalTXDatasource50" name="allocation"/>
<XModelAttributeReference attributes="no-tx-separate-pools"
entity="DSHALocalTXDatasource" name="no-tx-separate-pools"/>
<XModelAttributeReference attributes="prefill,use-fast-fail"
@@ -1601,6 +1622,9 @@
entity="DSLocalTXDatasource50" name="background"/>
<XModelAttributeReference attributes="idle-timeout-minutes"
entity="DSHALocalTXDatasource" name="idle-timeout"/>
+ <XModelAttributeReference
+ attributes="allocation-retry,allocation-retry-wait-millis"
+ entity="DSHALocalTXDatasource50" name="allocation"/>
<XModelAttributeReference attributes="validate-on-match"
entity="DSHALocalTXDatasource" name="validate-on-match"/>
<XModelAttributeReference attributes="no-tx-separate-pools"
@@ -1956,6 +1980,154 @@
</XActionItem>
<XDependencies/>
</XModelEntity>
+ <XModelEntity
+ ImplementationLoadingClass="org.jboss.tools.seam.xml.ds.model.DSFileLoader"
+ ImplementingClass="org.jboss.tools.common.model.filesystems.impl.SimpleFileImpl"
+ ObjectEditorClass="%XML%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.SeamXMLFormLayoutData"
+ XMLSUBPATH="connection-factories" name="FileDSConnectionFactories50s">
+ <XChildrenEntities>
+ <XChildEntity maxCount="1" name="DSLoaderRepository" required="yes"/>
+ <XChildEntity name="DSTXConnectionFactory50"/>
+ <XChildEntity name="DSNoTXConnectionFactory50"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.ds.file" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="connection-factories" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="name" xmlname="NAME"/>
+ <XModelAttribute default="xml" name="extension" xmlname="EXTENSION">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ <XModelAttribute loader="ElementType" name="_lateload" visibility="false">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute default="no" name="isIncorrect" visibility="false">
+ <Constraint loader="List">
+ <value name="yes"/>
+ <value name="no"/>
+ </Constraint>
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute name="incorrectBody" visibility="false"/>
+ <XModelAttribute PROPERTIES="save=always"
+ default="http://www.jboss.com/xml/ns/javaee" name="xmlns" xmlname="xmlns"/>
+ <XModelAttribute PROPERTIES="save=always"
+ default="http://www.w3.org/2001/XMLSchema-instance" name="xmlns:xsi" xmlname="xmlns:xsi"/>
+ <XModelAttribute PROPERTIES="save=always"
+ default="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ds_5_0.xsd"
+ name="xsi:schemaLocation" xmlname="xsi:schemaLocation"/>
+ <XModelAttribute name="encoding">
+ <Constraint loader="ListString">
+ <value name="ISO-8859-1"/>
+ <value name="UTF-8"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem BaseActionName="Open" HandlerClassName="%Open%"
+ ICON="action.empty" displayName="Open" kind="action" name="Open"/>
+ <XActionItem displayName="Open With" group="1" kind="list" name="OpenWith">
+ <XActionItem HIDE="always"
+ HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.OpenWithExternalHandler"
+ ICON="action.empty" PROPERTIES="extension=struts-config"
+ displayName="Open with External Program" kind="action" name="OpenWithSelected"/>
+ <XActionItem HIDE="always"
+ HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.OpenWithChoiceHandler"
+ ICON="action.empty" PROPERTIES="extension=struts-config"
+ displayName="Choose Program..." kind="action" name="OpenWithChoice">
+ <EntityData EntityName="OpenWithHelper">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="default"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem kind="list" name="EditActions">
+ <XActionItem HIDE="always"
+ HandlerClassName="org.jboss.tools.jsf.model.handlers.RenameFacesConfigHandler"
+ ICON="action.empty" PROPERTIES="validator.edit=true"
+ WizardClassName="%Default%" displayName="Rename..." kind="action" name="Rename">
+ <EntityData EntityName="FacesConfig">
+ <AttributeData AttributeName="name"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem
+ HandlerClassName="org.jboss.tools.common.model.filesystems.impl.handlers.RenameEclipseFileHandler"
+ ICON="action.empty" displayName="Rename..." kind="action" name="RenameEclipse"/>
+ </XActionItem>
+ <XActionItem kind="list" name="SaveActions">
+ <XActionItem HIDE="always" HandlerClassName="%SaveFile%"
+ ICON="action.save" displayName="Save" kind="action" name="Save"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="TX Connection Factory..." kind="action" name="AddTXConnectionFactory">
+ <EntityData EntityName="DSTXConnectionFactory50">
+ <AttributeData AttributeName="jndi-name"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="No TX Connection Factory..." kind="action" name="AddNoTXConnectionFactory">
+ <EntityData EntityName="DSNoTXConnectionFactory50">
+ <AttributeData AttributeName="jndi-name"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"
+ ICON="action.copy" displayName="Copy" kind="action" name="Copy"/>
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.cut" displayName="Cut" kind="action" name="Cut"/>
+ <XActionItem BaseActionName="Paste" HandlerClassName="%Paste%"
+ ICON="action.paste" displayName="Paste" kind="action" name="Paste"/>
+ </XActionItem>
+ <XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete"
+ HandlerClassName="org.jboss.tools.jsf.model.handlers.DeleteFacesConfigHandler"
+ ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HandlerClassName="%Properties%" ICON="action.empty"
+ displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ <XActionItem kind="list" name="DiscardActions">
+ <XActionItem HIDE="always"
+ HandlerClassName="org.jboss.tools.jsf.model.handlers.DiscardConfigHandler"
+ ICON="action.delete"
+ PROPERTIES="significanceMessageClass=org.jboss.tools.common.model.filesystems.impl.DiscardFileSignificanceMessage"
+ displayName="Discard Changes" kind="action" name="Discard"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity name="FileDSConnectionFactories50s_EditorActionList">
+ <XChildrenEntities/>
+ <XEntityRenderer/>
+ <XModelAttributes/>
+ <XActionItem kind="list">
+ <XActionItemReference entity="FileDSConnectionFactories50s" name="CreateActions"/>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HIDE="always" HandlerClassName="%Properties%"
+ ICON="action.empty" displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ <XActionItem kind="list" name="VerifyActions">
+ <XActionItem kind="list" name="StaticActions"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
<XModelEntity name="FileDSConnectionFactories_EditorActionList">
<XChildrenEntities/>
<XEntityRenderer/>
@@ -2320,6 +2492,167 @@
</XActionItem>
<XDependencies/>
</XModelEntity>
+ <XModelEntity
+ ImplementationLoadingClass="org.jboss.tools.seam.xml.ds.model.DSFileLoader"
+ ImplementingClass="org.jboss.tools.common.model.filesystems.impl.SimpleFileImpl"
+ ObjectEditorClass="%XML%"
+ PROPERTIES="formFactory=%Default%;formLayout=org.jboss.tools.seam.xml.ui.editor.form.SeamXMLFormLayoutData"
+ XMLSUBPATH="datasources" name="FileDSDatasources50s">
+ <XChildrenEntities>
+ <XChildEntity maxCount="1" name="DSLoaderRepository" required="yes"/>
+ <XChildEntity name="DSLocalTXDatasource50"/>
+ <XChildEntity name="DSNoTXDatasource50"/>
+ <XChildEntity name="DSXADatasource50"/>
+ </XChildrenEntities>
+ <XEntityRenderer>
+ <ICONS>
+ <ICON info="main.ds.file" type="main"/>
+ </ICONS>
+ </XEntityRenderer>
+ <XModelAttributes>
+ <XModelAttribute default="datasources" loader="ElementType" name="element type">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute PROPERTIES="category=general" name="name" xmlname="NAME"/>
+ <XModelAttribute default="xml" name="extension" xmlname="EXTENSION">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute TRIM="no" name="comment" visibility="false" xmlname="#comment">
+ <Editor name="Note"/>
+ </XModelAttribute>
+ <XModelAttribute loader="ElementType" name="_lateload" visibility="false">
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute default="no" name="isIncorrect" visibility="false">
+ <Constraint loader="List">
+ <value name="yes"/>
+ <value name="no"/>
+ </Constraint>
+ <Editor name="Uneditable"/>
+ </XModelAttribute>
+ <XModelAttribute name="incorrectBody" visibility="false"/>
+ <XModelAttribute PROPERTIES="save=always"
+ default="http://www.jboss.com/xml/ns/javaee" name="xmlns" xmlname="xmlns"/>
+ <XModelAttribute PROPERTIES="save=always"
+ default="http://www.w3.org/2001/XMLSchema-instance" name="xmlns:xsi" xmlname="xmlns:xsi"/>
+ <XModelAttribute PROPERTIES="save=always"
+ default="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ds_5_0.xsd"
+ name="xsi:schemaLocation" xmlname="xsi:schemaLocation"/>
+ <XModelAttribute name="encoding">
+ <Constraint loader="ListString">
+ <value name="ISO-8859-1"/>
+ <value name="UTF-8"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
+ </XModelAttributes>
+ <XActionItem kind="list">
+ <XActionItem BaseActionName="Open" HandlerClassName="%Open%"
+ ICON="action.empty" displayName="Open" kind="action" name="Open"/>
+ <XActionItem displayName="Open With" group="1" kind="list" name="OpenWith">
+ <XActionItem HIDE="always"
+ HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.OpenWithExternalHandler"
+ ICON="action.empty" PROPERTIES="extension=struts-config"
+ displayName="Open with External Program" kind="action" name="OpenWithSelected"/>
+ <XActionItem HIDE="always"
+ HandlerClassName="org.jboss.tools.common.meta.action.impl.handlers.OpenWithChoiceHandler"
+ ICON="action.empty" PROPERTIES="extension=struts-config"
+ displayName="Choose Program..." kind="action" name="OpenWithChoice">
+ <EntityData EntityName="OpenWithHelper">
+ <AttributeData AttributeName="name"/>
+ <AttributeData AttributeName="default"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem kind="list" name="EditActions">
+ <XActionItem HIDE="always"
+ HandlerClassName="org.jboss.tools.jsf.model.handlers.RenameFacesConfigHandler"
+ ICON="action.empty" PROPERTIES="validator.edit=true"
+ WizardClassName="%Default%" displayName="Rename..." kind="action" name="Rename">
+ <EntityData EntityName="FacesConfig">
+ <AttributeData AttributeName="name"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem
+ HandlerClassName="org.jboss.tools.common.model.filesystems.impl.handlers.RenameEclipseFileHandler"
+ ICON="action.empty" displayName="Rename..." kind="action" name="RenameEclipse"/>
+ </XActionItem>
+ <XActionItem kind="list" name="SaveActions">
+ <XActionItem HIDE="always" HandlerClassName="%SaveFile%"
+ ICON="action.save" displayName="Save" kind="action" name="Save"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" displayName="New" group="1"
+ kind="list" name="CreateActions">
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="Local TX Datasource..." kind="action" name="AddLocalTXDatasource">
+ <EntityData EntityName="DSLocalTXDatasource50">
+ <AttributeData AttributeName="jndi-name"/>
+ <AttributeData AttributeName="connection-url"/>
+ <AttributeData AttributeName="driver-class" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="XA Datasource..." kind="action" name="AddXADatasource">
+ <EntityData EntityName="DSXADatasource50">
+ <AttributeData AttributeName="jndi-name"/>
+ <AttributeData AttributeName="xa-datasource-class"/>
+ </EntityData>
+ </XActionItem>
+ <XActionItem HandlerClassName="%Create%" ICON="action.empty"
+ PROPERTIES="validator.add=true" WizardClassName="%Default%"
+ displayName="No TX Datasource..." kind="action" name="AddNoDatasource">
+ <EntityData EntityName="DSNoTXDatasource50">
+ <AttributeData AttributeName="jndi-name"/>
+ <AttributeData AttributeName="connection-url"/>
+ <AttributeData AttributeName="driver-class" Mandatory="no"/>
+ </EntityData>
+ </XActionItem>
+ </XActionItem>
+ <XActionItem ICON="action.copy" displayName="Copy" kind="list" name="CopyActions">
+ <XActionItem BaseActionName="Copy" HandlerClassName="%Copy%"
+ ICON="action.copy" displayName="Copy" kind="action" name="Copy"/>
+ <XActionItem BaseActionName="Cut" HandlerClassName="%Cut%"
+ ICON="action.cut" displayName="Cut" kind="action" name="Cut"/>
+ <XActionItem BaseActionName="Paste" HandlerClassName="%Paste%"
+ ICON="action.paste" displayName="Paste" kind="action" name="Paste"/>
+ </XActionItem>
+ <XActionItem ICON="action.delete" displayName="Delete" kind="list" name="DeleteActions">
+ <XActionItem BaseActionName="Delete"
+ HandlerClassName="org.jboss.tools.jsf.model.handlers.DeleteFacesConfigHandler"
+ ICON="action.delete" displayName="Delete" kind="action" name="Delete"/>
+ </XActionItem>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HandlerClassName="%Properties%" ICON="action.empty"
+ displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ <XActionItem kind="list" name="DiscardActions">
+ <XActionItem HIDE="always"
+ HandlerClassName="org.jboss.tools.jsf.model.handlers.DiscardConfigHandler"
+ ICON="action.delete"
+ PROPERTIES="significanceMessageClass=org.jboss.tools.common.model.filesystems.impl.DiscardFileSignificanceMessage"
+ displayName="Discard Changes" kind="action" name="Discard"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
+ <XModelEntity name="FileDSDatasources50s_EditorActionList">
+ <XChildrenEntities/>
+ <XEntityRenderer/>
+ <XModelAttributes/>
+ <XActionItem kind="list">
+ <XActionItemReference entity="FileDSDatasources50s" name="CreateActions"/>
+ <XActionItem ICON="action.empty" kind="list" name="Properties">
+ <XActionItem HIDE="always" HandlerClassName="%Properties%"
+ ICON="action.empty" displayName="Properties..." kind="action" name="Properties"/>
+ </XActionItem>
+ <XActionItem kind="list" name="VerifyActions">
+ <XActionItem kind="list" name="StaticActions"/>
+ </XActionItem>
+ </XActionItem>
+ <XDependencies/>
+ </XModelEntity>
<XModelEntity name="FileDSDatasources_EditorActionList">
<XChildrenEntities/>
<XEntityRenderer/>
@@ -2340,8 +2673,10 @@
<XChildrenEntities>
<XChildEntity name="FileDSDatasources"/>
<XChildEntity name="FileDSDatasources50d"/>
+ <XChildEntity name="FileDSDatasources50s"/>
<XChildEntity name="FileDSConnectionFactories"/>
<XChildEntity name="FileDSConnectionFactories50d"/>
+ <XChildEntity name="FileDSConnectionFactories50s"/>
</XChildrenEntities>
<XActionItem kind="list">
<XActionItem ICON="action.empty" displayName="New" group="1"
@@ -2388,8 +2723,10 @@
<XChildrenEntities>
<XChildEntity name="FileDSDatasources"/>
<XChildEntity name="FileDSDatasources50d"/>
+ <XChildEntity name="FileDSDatasources50s"/>
<XChildEntity name="FileDSConnectionFactories"/>
<XChildEntity name="FileDSConnectionFactories50d"/>
+ <XChildEntity name="FileDSConnectionFactories50s"/>
</XChildrenEntities>
<XActionItem kind="list">
<XActionItem ICON="action.empty" displayName="New" group="1"
@@ -2436,8 +2773,10 @@
<XChildrenEntities>
<XChildEntity name="FileDSDatasources"/>
<XChildEntity name="FileDSDatasources50d"/>
+ <XChildEntity name="FileDSDatasources50s"/>
<XChildEntity name="FileDSConnectionFactories"/>
<XChildEntity name="FileDSConnectionFactories50d"/>
+ <XChildEntity name="FileDSConnectionFactories50s"/>
</XChildrenEntities>
<XActionItem kind="list"/>
</XEntityExtension>
@@ -2445,8 +2784,10 @@
<XChildrenEntities>
<XChildEntity name="FileDSDatasources"/>
<XChildEntity name="FileDSDatasources50d"/>
+ <XChildEntity name="FileDSDatasources50s"/>
<XChildEntity name="FileDSConnectionFactories"/>
<XChildEntity name="FileDSConnectionFactories50d"/>
+ <XChildEntity name="FileDSConnectionFactories50s"/>
</XChildrenEntities>
<XActionItem kind="list"/>
</XEntityExtension>
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/ds/model/DSConstants.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/ds/model/DSConstants.java 2010-02-10 10:25:07 UTC (rev 20215)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/ds/model/DSConstants.java 2010-02-10 14:45:57 UTC (rev 20216)
@@ -10,10 +10,14 @@
public String ENT_CONNECTION_FACTORIES_FILE = "FileDSConnectionFactories"; //$NON-NLS-1$
public String SUFF_50_DTD = "50d"; //$NON-NLS-1$
+ public String SUFF_50_XSD = "50s"; //$NON-NLS-1$
public String ENT_DATASOURCES_FILE_50_DTD = ENT_DATASOURCES_FILE + SUFF_50_DTD;
public String ENT_CONNECTION_FACTORIES_FILE_50_DTD = ENT_CONNECTION_FACTORIES_FILE + SUFF_50_DTD;
+ public String ENT_DATASOURCES_FILE_50_XSD = ENT_DATASOURCES_FILE + SUFF_50_XSD;
+ public String ENT_CONNECTION_FACTORIES_FILE_50_XSD = ENT_CONNECTION_FACTORIES_FILE + SUFF_50_XSD;
+
public String ATTR_TRACK_CONN = "track-connection-by-tx"; //$NON-NLS-1$
public String ATTR_TRANSACTION = "transaction"; //$NON-NLS-1$
public String ATTR_SECURITY_TYPE = "security-type"; //$NON-NLS-1$
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/ds/model/DSEntityRecognizer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/ds/model/DSEntityRecognizer.java 2010-02-10 10:25:07 UTC (rev 20215)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/ds/model/DSEntityRecognizer.java 2010-02-10 14:45:57 UTC (rev 20216)
@@ -36,9 +36,33 @@
if("datasources".equals(root)) return ENT_DATASOURCES_FILE_50_DTD;
if("connection-factories".equals(root)) return ENT_CONNECTION_FACTORIES_FILE_50_DTD;
}
+ } else {
+ if(isDatasourcesSchema(body)) {
+ return ENT_DATASOURCES_FILE_50_XSD;
+ } else if(isConnectionFactoriesSchema(body)) {
+ return ENT_CONNECTION_FACTORIES_FILE_50_XSD;
+ }
+
}
return null;
}
+ private boolean isDatasourcesSchema(String body) {
+ int i = body.indexOf("<datasources"); //$NON-NLS-1$
+ if(i < 0) return false;
+ int j = body.indexOf(">", i); //$NON-NLS-1$
+ if(j < 0) return false;
+ String s = body.substring(i, j);
+ return s.indexOf("http://www.jboss.org/j2ee/schema/jboss-ds_5_0.xsd") > 0; //$NON-NLS-1$
+ }
+
+ private boolean isConnectionFactoriesSchema(String body) {
+ int i = body.indexOf("<connection-factories"); //$NON-NLS-1$
+ if(i < 0) return false;
+ int j = body.indexOf(">", i); //$NON-NLS-1$
+ if(j < 0) return false;
+ String s = body.substring(i, j);
+ return s.indexOf("http://www.jboss.org/j2ee/schema/jboss-ds_5_0.xsd") > 0; //$NON-NLS-1$
+ }
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/ds/model/DSFileLoaderUtil.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/ds/model/DSFileLoaderUtil.java 2010-02-10 10:25:07 UTC (rev 20215)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/src/org/jboss/tools/seam/xml/ds/model/DSFileLoaderUtil.java 2010-02-10 14:45:57 UTC (rev 20216)
@@ -1,5 +1,8 @@
package org.jboss.tools.seam.xml.ds.model;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
import java.util.Set;
import org.jboss.tools.common.meta.XAttribute;
@@ -9,6 +12,8 @@
import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
import org.jboss.tools.common.xml.XMLUtilities;
import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
public class DSFileLoaderUtil extends XModelObjectLoaderUtil implements DSConstants {
@@ -25,8 +30,13 @@
public boolean save(Element parent, XModelObject o) {
if(!needToSave(o)) return true;
- boolean b = super.save(parent, o);
+ return super.save(parent, o);
+ }
+
+ public boolean saveChildren(Element element, XModelObject o) {
+ boolean b = super.saveChildren(element, o);
//TODO check dtd
+ moveProperties(element);
return b;
}
@@ -109,4 +119,67 @@
}
return children;
}
+
+ static Set<String> beforeXADatasourceProperty = new HashSet<String>();
+ static Set<String> beforeConnectionProperty = new HashSet<String>();
+ static Set<String> beforeConfigProperty = new HashSet<String>();
+
+ static Map<String, Set<String>> propertiesToMove = new HashMap<String, Set<String>>();
+
+ static {
+ beforeXADatasourceProperty.add("xa-datasource-class");
+
+ String[] beforeConfigNames = {"connection-definition", "rar-name", "track-connection-by-tx", "xa-transaction", "local-transaction", "jndi-name"};
+ for (String n: beforeConfigNames) beforeConfigProperty.add(n);
+
+ String[] beforeConnectionNames = {"driver-class", "transaction-isolation"};
+ for (String n: beforeConnectionNames) beforeConnectionProperty.add(n);
+
+ propertiesToMove.put("xa-datasource-property", beforeXADatasourceProperty);
+ propertiesToMove.put("connection-property", beforeConnectionProperty);
+ propertiesToMove.put("config-property", beforeConfigProperty);
+ }
+
+ void moveProperties(Element parent) {
+ NodeList ns = parent.getChildNodes();
+ String childName = null;
+ for (int i = 0; i < ns.getLength(); i++) {
+ Node n = ns.item(i);
+ if(!(n instanceof Element)) continue;
+ String name = n.getNodeName();
+ if(propertiesToMove.containsKey(name)) {
+ childName = name;
+ break;
+ }
+ }
+ if(childName != null) {
+ moveChildren(parent, childName, propertiesToMove.get(childName));
+ }
+ }
+
+ void moveChildren(Element parent, String childName, Set<String> namesBeforeChild) {
+ Element[] ps = XMLUtilities.getChildren(parent, childName);
+ if(ps == null || ps.length == 0) return;
+ Node after = null;
+ Node before = null;
+ NodeList ns = parent.getChildNodes();
+ for (int i = 0; i < ns.getLength(); i++) {
+ Node n = ns.item(i);
+ if(!(n instanceof Element)) continue;
+ if(namesBeforeChild.contains(n.getNodeName())) {
+ after = n;
+ } else {
+ if(after != null) {
+ before = n;
+ break;
+ }
+ }
+
+ }
+ if(before == null || before == ps[0]) return;
+
+ for (int i = 0; i < ps.length; i++) {
+ parent.insertBefore(ps[i], before);
+ }
+ }
}
14 years, 8 months
JBoss Tools SVN: r20215 - in trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core: messages and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2010-02-10 05:25:07 -0500 (Wed, 10 Feb 2010)
New Revision: 20215
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImplCommand.java
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties
trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java
Log:
JBIDE-4806:Cannot create WS artifacts for POJO when in default package
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImplCommand.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImplCommand.java 2010-02-10 10:14:17 UTC (rev 20214)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/commands/ValidateWSImplCommand.java 2010-02-10 10:25:07 UTC (rev 20215)
@@ -16,7 +16,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.common.frameworks.datamodel.AbstractDataModelOperation;
@@ -43,26 +43,28 @@
String implClass = model.getServiceClasses().get(0);
String project = model.getWebProjectName();
- ICompilationUnit unit = null;
try {
- if (JBossWSCreationUtils.getJavaProjectByName(project).findType(
- implClass) != null) {
- unit = JBossWSCreationUtils.getJavaProjectByName(project)
- .findType(implClass).getCompilationUnit();
+ IType type = JBossWSCreationUtils.getJavaProjectByName(project)
+ .findType(implClass);
+ if (type != null) {
+ if(!type.getPackageFragment().exists()|| type.getPackageFragment().isDefaultPackage()){
+ return StatusUtils.errorStatus(JBossWSCreationCoreMessages.Error_No_Package);
+ }
+ if (!type.getAnnotation(
+ JBossWSCreationCoreMessages.Webservice_Annotation)
+ .exists()
+ && !type
+ .getAnnotation(
+ JBossWSCreationCoreMessages.Webservice_Annotation_Prefix)
+ .exists()) {
+ return StatusUtils
+ .errorStatus(JBossWSCreationCoreMessages.Error_No_Annotation);
+ }
} else {
return StatusUtils.errorStatus(NLS.bind(
JBossWSCreationCoreMessages.Error_No_Class,
new String[] { implClass, project }));
}
- if (!unit.getSource().contains(
- JBossWSCreationCoreMessages.Webservice_Annotation)
- && !unit
- .getSource()
- .contains(
- JBossWSCreationCoreMessages.Webservice_Annotation_Prefix)) {
- return StatusUtils
- .errorStatus(JBossWSCreationCoreMessages.Error_No_Annotation);
- }
} catch (JavaModelException e) {
JBossWSCreationCore.getDefault().logError(e);
return StatusUtils.errorStatus(NLS.bind(
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2010-02-10 10:14:17 UTC (rev 20214)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCore.properties 2010-02-10 10:25:07 UTC (rev 20215)
@@ -26,8 +26,8 @@
# START NON-TRANSLATABLE
Separator_Java=/
WebserviceClient_Annotation=@WebServiceClient
-Webservice_Annotation=@WebService
-Webservice_Annotation_Prefix=(a)javax.jws.WebService
+Webservice_Annotation=WebService
+Webservice_Annotation_Prefix=javax.jws.WebService
Webservice_Annotation_Check=@WebService(
Client_Sample_Package_Name=.clientsample
Client_Sample_Class_Name=ClientSample
@@ -37,6 +37,7 @@
Error_No_Class= The class {0} cannot be loaded via project {1}.Check that the project contains the class, or that the class is loadable according to the Java Build Path of the project.
Error_WS_Location=The JBoss WS Runtime Location is NULL. Please set the location on JBoss WS preferences page.
Error_Create_Client_Sample=When create a client sample, a error comes up. Please check the generated files.
+Error_No_Package=The service implementation selected does not follow Java naming conventions. This may result in not being able to generate your WebService.
Error_WS_Chose_runtime=Select a JBoss Web Service runtime. If a server supplied JBoss Web Service runtime is chosen ,\n the chosen server adapter must be capable of providing the JBoss Web Service runtime
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java 2010-02-10 10:14:17 UTC (rev 20214)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/src/org/jboss/tools/ws/creation/core/messages/JBossWSCreationCoreMessages.java 2010-02-10 10:25:07 UTC (rev 20215)
@@ -48,6 +48,7 @@
public static String Error_No_Annotation;
public static String WebserviceClient_Annotation;
public static String Error_No_Class;
+ public static String Error_No_Package;
public static String Error_WS_Location;
public static String Error_WS_No_Runtime_Specifed;
public static String Error_WS_Chose_runtime;
14 years, 8 months
JBoss Tools SVN: r20214 - in trunk: jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/templates and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2010-02-10 05:14:17 -0500 (Wed, 10 Feb 2010)
New Revision: 20214
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/templates/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/templates/EditedTemplateForUnknownTag.xml
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/templates/SetTemplateForUnknownTag.xml
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/templates/UnknownTemplate.xml
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/CSSStyleDialogVariables.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/UnknownTagDialogVariables.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/SetTemplateForUnknownTagTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/UnknownTemplateTest.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllBotTests.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/WidgetVariables.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
Log:
SWTBot tests for unknown tags were added.
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/templates/EditedTemplateForUnknownTag.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/templates/EditedTemplateForUnknownTag.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/templates/EditedTemplateForUnknownTag.xml 2010-02-10 10:14:17 UTC (rev 20214)
@@ -0,0 +1,44 @@
+<BODY ID="__content__area__">
+<DIV STYLE="-moz-user-modify: read-write;">
+<DIV STYLE="display: none; -moz-user-modify: read-only;">
+<H1 STYLE="-moz-user-modify: read-write;">
+Input User Name Page
+</H1>
+</DIV>
+<DIV>
+<TABLE STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px; width: 100%;">
+<TR>
+<TD>
+<DIV>
+<H1 STYLE="-moz-user-modify: read-write;">
+<SPAN CLASS="vpe-text">
+Hello Demo Application
+</SPAN>
+</H1>
+<B CLASS="__any__tag__caption" STYLE="border: 1px solid green; -moz-user-modify: read-only;">
+</B>
+<UL STYLE="color: red; -moz-user-modify: read-only;">
+<LI>
+Error Messages
+</LI>
+</UL>
+<FORM STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px;">
+<SPAN CLASS="vpe-text">
+Name:
+</SPAN>
+<SPAN CLASS="vpe-text">
+<SPAN CLASS="vpe-text">
+</SPAN>
+<INPUT VALUE="#{user.name}"/>
+
+</SPAN>
+<INPUT TYPE="button" VALUE="Say Hello!" STYLE="-moz-user-modify: read-only;"/>
+
+</FORM>
+</DIV>
+</TD>
+</TR>
+</TABLE>
+</DIV>
+</DIV>
+</BODY>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/templates/SetTemplateForUnknownTag.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/templates/SetTemplateForUnknownTag.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/templates/SetTemplateForUnknownTag.xml 2010-02-10 10:14:17 UTC (rev 20214)
@@ -0,0 +1,46 @@
+<BODY ID="__content__area__">
+<DIV STYLE="-moz-user-modify: read-write;">
+<DIV STYLE="display: none; -moz-user-modify: read-only;">
+<H1 STYLE="-moz-user-modify: read-write;">
+Input User Name Page
+</H1>
+</DIV>
+<DIV>
+<TABLE STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px; width: 100%;">
+<TR>
+<TD>
+<DIV>
+<H1 STYLE="-moz-user-modify: read-write;">
+<SPAN CLASS="vpe-text">
+Hello Demo Application
+</SPAN>
+</H1>
+<B CLASS="__any__tag__caption" STYLE="border: 1px solid green; font-family: Arial; color: black; -moz-user-modify: read-only;">
+myValue<BR STYLE="font-style: italic; color: green; -moz-user-modify: read-only;"/>
+
+</B>
+<UL STYLE="color: red; -moz-user-modify: read-only;">
+<LI>
+Error Messages
+</LI>
+</UL>
+<FORM STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px;">
+<SPAN CLASS="vpe-text">
+Name:
+</SPAN>
+<SPAN CLASS="vpe-text">
+<SPAN CLASS="vpe-text">
+</SPAN>
+<INPUT VALUE="#{user.name}"/>
+
+</SPAN>
+<INPUT TYPE="button" VALUE="Say Hello!" STYLE="-moz-user-modify: read-only;"/>
+
+</FORM>
+</DIV>
+</TD>
+</TR>
+</TABLE>
+</DIV>
+</DIV>
+</BODY>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/templates/UnknownTemplate.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/templates/UnknownTemplate.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/resources/templates/UnknownTemplate.xml 2010-02-10 10:14:17 UTC (rev 20214)
@@ -0,0 +1,46 @@
+<BODY ID="__content__area__">
+<DIV STYLE="-moz-user-modify: read-write;">
+<DIV STYLE="display: none; -moz-user-modify: read-only;">
+<H1 STYLE="-moz-user-modify: read-write;">
+Input User Name Page
+</H1>
+</DIV>
+<DIV>
+<TABLE STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px; width: 100%;">
+<TR>
+<TD>
+<DIV>
+<H1 STYLE="-moz-user-modify: read-write;">
+<SPAN CLASS="vpe-text">
+Hello Demo Application
+</SPAN>
+</H1>
+<DIV CLASS="__any__tag__caption" STYLE="border: 1px solid green; -moz-user-modify: read-only;">
+h:unknowntag<BR STYLE="font-style: italic; color: green; -moz-user-modify: read-only;"/>
+
+</DIV>
+<UL STYLE="color: red; -moz-user-modify: read-only;">
+<LI>
+Error Messages
+</LI>
+</UL>
+<FORM STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px;">
+<SPAN CLASS="vpe-text">
+Name:
+</SPAN>
+<SPAN CLASS="vpe-text">
+<SPAN CLASS="vpe-text">
+</SPAN>
+<INPUT VALUE="#{user.name}"/>
+
+</SPAN>
+<INPUT TYPE="button" VALUE="Say Hello!" STYLE="-moz-user-modify: read-only;"/>
+
+</FORM>
+</DIV>
+</TD>
+</TR>
+</TABLE>
+</DIV>
+</DIV>
+</BODY>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/CSSStyleDialogVariables.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/CSSStyleDialogVariables.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/CSSStyleDialogVariables.java 2010-02-10 10:14:17 UTC (rev 20214)
@@ -0,0 +1,17 @@
+package org.jboss.tools.jsf.ui.bot.test;
+
+public class CSSStyleDialogVariables {
+
+ public static final String CSS_STYLE_DIALOG_TITLE = "CSS Style"; //$NON-NLS-1$
+ public static final String TEXT_FONT_TAB = "Text/Font"; //$NON-NLS-1$
+ public static final String BACKGROUND_TAB = "Background"; //$NON-NLS-1$
+ public static final String BOXES_TAB = "Boxes"; //$NON-NLS-1$
+ public static final String PROPERTIES_TAB = "Property Sheet"; //$NON-NLS-1$
+ public static final String EDITED_PROPERTIES = "Edited properties"; //$NON-NLS-1$
+ public static final String FONT_FAMILY_FIELD = "Font Family:"; //$NON-NLS-1$
+ public static final String COLOR_FIELD = "Color:"; //$NON-NLS-1$
+ public static final String FONT_SIZE_FIELD = "Font Size:"; //$NON-NLS-1$
+ public static final String TEXT_DECORATION_FIELD = "Text Decoration:"; //$NON-NLS-1$
+
+
+}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllBotTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllBotTests.java 2010-02-10 08:49:50 UTC (rev 20213)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllBotTests.java 2010-02-10 10:14:17 UTC (rev 20214)
@@ -10,6 +10,8 @@
import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE4391Test;
import org.jboss.tools.jsf.ui.bot.test.smoke.AddRemoveJSFCapabilitiesTest;
import org.jboss.tools.jsf.ui.bot.test.smoke.CreateNewJSFProjectTest;
+import org.jboss.tools.jsf.ui.bot.test.templates.SetTemplateForUnknownTagTest;
+import org.jboss.tools.jsf.ui.bot.test.templates.UnknownTemplateTest;
/**
*
@@ -26,6 +28,8 @@
suite.addTestSuite(JBIDE3577Test.class);
suite.addTestSuite(JBIDE3579Test.class);
suite.addTestSuite(JBIDE3920Test.class);
+ suite.addTestSuite(UnknownTemplateTest.class);
+ suite.addTestSuite(SetTemplateForUnknownTagTest.class);
return suite;
}
}
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java 2010-02-10 08:49:50 UTC (rev 20213)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java 2010-02-10 10:14:17 UTC (rev 20214)
@@ -3,17 +3,74 @@
import java.io.IOException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.ui.bot.test.WidgetVariables;
import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
-public abstract class JSFAutoTestCase extends VPEAutoTestCase{
-
+public abstract class JSFAutoTestCase extends VPEAutoTestCase {
+
+ private String editorText;
+ private SWTBotEclipseEditor editor;
+
+ String getEditorText() {
+ return editorText;
+ }
+
+ protected void setEditorText(String textEditor) {
+ this.editorText = textEditor;
+ }
+
+ protected SWTBotEclipseEditor getEditor() {
+ return editor;
+ }
+
+ protected void setEditor(SWTBotEclipseEditor editor) {
+ this.editor = editor;
+ }
+
@Override
- protected String getPathToResources(String testPage) throws IOException{
- return FileLocator.toFileURL(Platform.getBundle(Activator.PLUGIN_ID).getEntry("/")).getFile()+"resources/"+testPage ; //$NON-NLS-1$ //$NON-NLS-2$
+ protected String getPathToResources(String testPage) throws IOException {
+ return FileLocator
+ .toFileURL(
+ Platform.getBundle(Activator.PLUGIN_ID).getEntry("/")).getFile() + "resources/" + testPage; //$NON-NLS-1$ //$NON-NLS-2$
}
- protected abstract void closeUnuseDialogs();
-
- protected abstract boolean isUnuseDialogOpened();
-
+ protected void openTestPage() {
+ SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER)
+ .bot();
+ SWTBotTree tree = innerBot.tree();
+ tree.expandNode(JBT_TEST_PROJECT_NAME)
+ .expandNode("WebContent").expandNode("pages").getNode(TEST_PAGE).doubleClick(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ protected void checkVPE(String testPage) throws Throwable {
+ waitForBlockingJobsAcomplished(VISUAL_UPDATE);
+ performContentTestByDocument(testPage, bot
+ .multiPageEditorByTitle(TEST_PAGE));
+ }
+ @Override
+ protected void closeUnuseDialogs() {
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ return false;
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+
+ // Restore page state before tests
+ if (editor != null) {
+ editor.setFocus();
+ bot.menu("Edit").menu("Select All").click(); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$ //$NON-NLS-2$
+ editor.setText(editorText);
+ editor.save();
+ }
+ super.tearDown();
+ }
+
}
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/UnknownTagDialogVariables.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/UnknownTagDialogVariables.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/UnknownTagDialogVariables.java 2010-02-10 10:14:17 UTC (rev 20214)
@@ -0,0 +1,14 @@
+package org.jboss.tools.jsf.ui.bot.test;
+
+public class UnknownTagDialogVariables {
+
+ public static final String DIALOG_TITLE = "Unknown tag template"; //$NON-NLS-1$
+ public static final String TAG_NAME_FIELD = "Tag Name:"; //$NON-NLS-1$
+ public static final String TAG_URI_FIELD = "Tag URI:"; //$NON-NLS-1$
+ public static final String DISPLAY_TAG = "Tag For Display:"; //$NON-NLS-1$
+ public static final String ALLOW_CHILDREN_CHECKBOX = "Allow tag children:"; //$NON-NLS-1$
+ public static final String VALUE_FIELD = "Value:"; //$NON-NLS-1$
+ public static final String TAG_STYLE_FIELD = "Tag style:"; //$NON-NLS-1$
+ public static final String EDIT_TAG_STYLE_TIP = "Edit style"; //$NON-NLS-1$
+
+}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java 2010-02-10 08:49:50 UTC (rev 20213)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java 2010-02-10 10:14:17 UTC (rev 20214)
@@ -9,8 +9,8 @@
public class JBIDE3148and4441Test extends JSFAutoTestCase{
- private static String CSS_FILE_NAME = "JBIDE3148";
- private static String CSS_CLASS_NAME = "cssclass";
+ private static String CSS_FILE_NAME = "JBIDE3148"; //$NON-NLS-1$
+ private static String CSS_CLASS_NAME = "cssclass"; //$NON-NLS-1$
public void testJBIDE3148and4441() {
@@ -19,67 +19,67 @@
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).
- getNode(CSS_FILE_NAME+".css").doubleClick();
- bot.editorByTitle(CSS_FILE_NAME+".css").setFocus();
- bot.menu("Edit").menu("Select All").click();
- bot.menu("Edit").menu("Delete").click();
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")). //$NON-NLS-1$
+ getNode(CSS_FILE_NAME+".css").doubleClick(); //$NON-NLS-1$
+ bot.editorByTitle(CSS_FILE_NAME+".css").setFocus(); //$NON-NLS-1$
+ bot.menu("Edit").menu("Select All").click(); //$NON-NLS-1$//$NON-NLS-2$
+ bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$ //$NON-NLS-2$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
- bot.menu("File").menu("New").menu("CSS File").click();
- bot.shell("New CSS File").activate();
- bot.textWithLabel("Name*").setText(CSS_FILE_NAME);
- bot.button("Finish").click();
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select(); //$NON-NLS-1$
+ bot.menu("File").menu("New").menu("CSS File").click(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ bot.shell("New CSS File").activate(); //$NON-NLS-1$
+ bot.textWithLabel("Name*").setText(CSS_FILE_NAME); //$NON-NLS-1$
+ bot.button("Finish").click(); //$NON-NLS-1$
}
- SWTBotEclipseEditor eclipseEditor = bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor();
+ SWTBotEclipseEditor eclipseEditor = bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor(); //$NON-NLS-1$
eclipseEditor.setFocus();
- eclipseEditor.insertText("\rcssclass{\r\tcolor:green;\r\t" +
- "background-color:red;\r}");
- eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" +
- "background-color:green;\r}");
+ eclipseEditor.insertText("\rcssclass{\r\tcolor:green;\r\t" + //$NON-NLS-1$
+ "background-color:red;\r}"); //$NON-NLS-1$
+ eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" + //$NON-NLS-1$
+ "background-color:green;\r}"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click();
+ eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
//Test edit attrs of the first Class
- bot.shell("CSS Class").activate();
- bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME);
- bot.tabItem("Text/Font").activate();
- bot.comboBoxWithLabel("Text Decoration:").setSelection("underline");
- bot.comboBoxWithLabel("Font Weight:").setSelection("bold");
+ bot.shell("CSS Class").activate(); //$NON-NLS-1$
+ bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME); //$NON-NLS-1$
+ bot.tabItem("Text/Font").activate(); //$NON-NLS-1$
+ bot.comboBoxWithLabel("Text Decoration:").setSelection("underline"); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.comboBoxWithLabel("Font Weight:").setSelection("bold"); //$NON-NLS-1$ //$NON-NLS-2$
//Test edit attrs of the second class
- bot.shell("CSS Class").activate();
- bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME+"(2)");
- bot.tabItem("Text/Font").activate();
- bot.comboBoxWithLabel("Text Decoration:").setSelection("overline");
- bot.comboBoxWithLabel("Font Weight:").setSelection("lighter");
- bot.button("Apply").click();
- bot.button("OK").click();
+ bot.shell("CSS Class").activate(); //$NON-NLS-1$
+ bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME+"(2)"); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.tabItem("Text/Font").activate(); //$NON-NLS-1$
+ bot.comboBoxWithLabel("Text Decoration:").setSelection("overline"); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.comboBoxWithLabel("Font Weight:").setSelection("lighter"); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.button("Apply").click(); //$NON-NLS-1$
+ bot.button("OK").click(); //$NON-NLS-1$
//Test check CSS file content
- assertTrue("Content of CSS file in Editor is not as expected.\n" +
- "Content: " + bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText(),
- JBIDE3148and4441Test.testCssFileEditorContent(bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor(),
- "cssclass{",
- "color: red;",
- "background-color: green;",
- "font-weight: bold;",
- "text-decoration: underline",
- "}",
- "cssclass{",
- "color: green;",
- "background-color: red;",
- "font-weight: lighter;",
- "text-decoration: overline",
- "}"));
- bot.editorByTitle(CSS_FILE_NAME+".css").close();
+ assertTrue("Content of CSS file in Editor is not as expected.\n" + //$NON-NLS-1$
+ "Content: " + bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText(), //$NON-NLS-1$ //$NON-NLS-2$
+ JBIDE3148and4441Test.testCssFileEditorContent(bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor(), //$NON-NLS-1$
+ "cssclass{", //$NON-NLS-1$
+ "color: red;", //$NON-NLS-1$
+ "background-color: green;", //$NON-NLS-1$
+ "font-weight: bold;", //$NON-NLS-1$
+ "text-decoration: underline", //$NON-NLS-1$
+ "}", //$NON-NLS-1$
+ "cssclass{", //$NON-NLS-1$
+ "color: green;", //$NON-NLS-1$
+ "background-color: red;", //$NON-NLS-1$
+ "font-weight: lighter;", //$NON-NLS-1$
+ "text-decoration: overline", //$NON-NLS-1$
+ "}")); //$NON-NLS-1$
+ bot.editorByTitle(CSS_FILE_NAME+".css").close(); //$NON-NLS-1$
}
@Override
protected void closeUnuseDialogs() {
try {
- bot.shell("CSS Class").close();
+ bot.shell("CSS Class").close(); //$NON-NLS-1$
} catch (WidgetNotFoundException e) {
}
}
@@ -88,7 +88,7 @@
protected boolean isUnuseDialogOpened() {
boolean isOpened = false;
try {
- bot.shell("CSS Class").activate();
+ bot.shell("CSS Class").activate(); //$NON-NLS-1$
isOpened = true;
} catch (WidgetNotFoundException e) {
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java 2010-02-10 08:49:50 UTC (rev 20213)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java 2010-02-10 10:14:17 UTC (rev 20214)
@@ -9,8 +9,8 @@
public class JBIDE3577Test extends JSFAutoTestCase{
- private static String CSS_FILE_NAME = "JBIDE3577";
- private static String CSS_CLASS_NAME = "cssclass";
+ private static String CSS_FILE_NAME = "JBIDE3577"; //$NON-NLS-1$
+ private static String CSS_CLASS_NAME = "cssclass"; //$NON-NLS-1$
public void testJBIDE3577(){
@@ -19,42 +19,42 @@
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).
- getNode(CSS_FILE_NAME+".css").doubleClick();
- bot.editorByTitle(CSS_FILE_NAME+".css").setFocus();
- bot.menu("Edit").menu("Select All").click();
- bot.menu("Edit").menu("Delete").click();
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")). //$NON-NLS-1$
+ getNode(CSS_FILE_NAME+".css").doubleClick(); //$NON-NLS-1$
+ bot.editorByTitle(CSS_FILE_NAME+".css").setFocus(); //$NON-NLS-1$
+ bot.menu("Edit").menu("Select All").click(); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$//$NON-NLS-2$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
- bot.menu("File").menu("New").menu("CSS File").click();
- bot.shell("New CSS File").activate();
- bot.textWithLabel("Name*").setText(CSS_FILE_NAME);
- bot.button("Finish").click();
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select(); //$NON-NLS-1$
+ bot.menu("File").menu("New").menu("CSS File").click(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ bot.shell("New CSS File").activate(); //$NON-NLS-1$
+ bot.textWithLabel("Name*").setText(CSS_FILE_NAME); //$NON-NLS-1$
+ bot.button("Finish").click(); //$NON-NLS-1$
}
- SWTBotEclipseEditor eclipseEditor = bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor();
+ SWTBotEclipseEditor eclipseEditor = bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor(); //$NON-NLS-1$
eclipseEditor.setFocus();
- eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" +
- "background-color:green;\r}");
+ eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" + //$NON-NLS-1$
+ "background-color:green;\r}"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click();
+ eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
//Test Clear all attributes
- bot.shell("CSS Class").activate();
- bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME);
- bot.tabItem("Preview").activate();
- bot.button("Clear").click();
- bot.button("Apply").click();
- bot.button("OK").click();
- assertEquals("cssclass{\r\t\r}", bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText());
- bot.editorByTitle(CSS_FILE_NAME+".css").close();
+ bot.shell("CSS Class").activate(); //$NON-NLS-1$
+ bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME); //$NON-NLS-1$
+ bot.tabItem("Preview").activate(); //$NON-NLS-1$
+ bot.button("Clear").click(); //$NON-NLS-1$
+ bot.button("Apply").click(); //$NON-NLS-1$
+ bot.button("OK").click(); //$NON-NLS-1$
+ assertEquals("cssclass{\r\t\r}", bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText()); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.editorByTitle(CSS_FILE_NAME+".css").close(); //$NON-NLS-1$
}
@Override
protected void closeUnuseDialogs() {
try {
- bot.shell("CSS Class").close();
+ bot.shell("CSS Class").close(); //$NON-NLS-1$
} catch (WidgetNotFoundException e) {
}
}
@@ -63,7 +63,7 @@
protected boolean isUnuseDialogOpened() {
boolean isOpened = false;
try {
- bot.shell("CSS Class").activate();
+ bot.shell("CSS Class").activate(); //$NON-NLS-1$
isOpened = true;
} catch (WidgetNotFoundException e) {
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java 2010-02-10 08:49:50 UTC (rev 20213)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java 2010-02-10 10:14:17 UTC (rev 20214)
@@ -9,8 +9,8 @@
public class JBIDE3579Test extends JSFAutoTestCase{
- private static String CSS_FILE_NAME = "JBIDE3579";
- private static String CSS_CLASS_NAME = "newCSSclass";
+ private static String CSS_FILE_NAME = "JBIDE3579"; //$NON-NLS-1$
+ private static String CSS_CLASS_NAME = "newCSSclass"; //$NON-NLS-1$
public void testJBIDE3579(){
@@ -19,42 +19,42 @@
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).
- getNode(CSS_FILE_NAME+".css").doubleClick();
- bot.editorByTitle(CSS_FILE_NAME+".css").setFocus();
- bot.menu("Edit").menu("Select All").click();
- bot.menu("Edit").menu("Delete").click();
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")). //$NON-NLS-1$
+ getNode(CSS_FILE_NAME+".css").doubleClick(); //$NON-NLS-1$
+ bot.editorByTitle(CSS_FILE_NAME+".css").setFocus(); //$NON-NLS-1$
+ bot.menu("Edit").menu("Select All").click(); //$NON-NLS-1$//$NON-NLS-2$
+ bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$ //$NON-NLS-2$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
- bot.menu("File").menu("New").menu("CSS File").click();
- bot.shell("New CSS File").activate();
- bot.textWithLabel("Name*").setText(CSS_FILE_NAME);
- bot.button("Finish").click();
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select(); //$NON-NLS-1$
+ bot.menu("File").menu("New").menu("CSS File").click(); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ bot.shell("New CSS File").activate(); //$NON-NLS-1$
+ bot.textWithLabel("Name*").setText(CSS_FILE_NAME); //$NON-NLS-1$
+ bot.button("Finish").click(); //$NON-NLS-1$
}
- SWTBotEclipseEditor eclipseEditor = bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor();
+ SWTBotEclipseEditor eclipseEditor = bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor(); //$NON-NLS-1$
eclipseEditor.setFocus();
- eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" +
- "background-color:green;\r}");
+ eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" + //$NON-NLS-1$
+ "background-color:green;\r}"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click();
+ eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
//Test Create new CSS class
- bot.shell("CSS Class").activate();
- bot.button("Add CSS Class").click();
- bot.shell("Enter New CSS Class Name").activate();
- bot.textWithLabel("Enter New CSS Class Name").setText(CSS_CLASS_NAME);
- bot.button("OK").click();
- bot.button("Apply").click();
- bot.button("OK").click();
- bot.editorByTitle(CSS_FILE_NAME+".css").close();
+ bot.shell("CSS Class").activate(); //$NON-NLS-1$
+ bot.button("Add CSS Class").click(); //$NON-NLS-1$
+ bot.shell("Enter New CSS Class Name").activate(); //$NON-NLS-1$
+ bot.textWithLabel("Enter New CSS Class Name").setText(CSS_CLASS_NAME); //$NON-NLS-1$
+ bot.button("OK").click(); //$NON-NLS-1$
+ bot.button("Apply").click(); //$NON-NLS-1$
+ bot.button("OK").click(); //$NON-NLS-1$
+ bot.editorByTitle(CSS_FILE_NAME+".css").close(); //$NON-NLS-1$
}
@Override
protected void closeUnuseDialogs() {
try {
- bot.shell("CSS Class").close();
+ bot.shell("CSS Class").close(); //$NON-NLS-1$
} catch (WidgetNotFoundException e) {
}
}
@@ -63,7 +63,7 @@
protected boolean isUnuseDialogOpened() {
boolean isOpened = false;
try {
- bot.shell("CSS Class").activate();
+ bot.shell("CSS Class").activate(); //$NON-NLS-1$
isOpened = true;
} catch (WidgetNotFoundException e) {
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java 2010-02-10 08:49:50 UTC (rev 20213)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java 2010-02-10 10:14:17 UTC (rev 20214)
@@ -9,42 +9,42 @@
public class JBIDE3920Test extends JSFAutoTestCase{
- private static String CSS_FILE_NAME = "JBIDE3920";
- private static String CSS_CLASS_NAME = "cssclass";
+ private static String CSS_FILE_NAME = "JBIDE3920"; //$NON-NLS-1$
+ private static String CSS_CLASS_NAME = "cssclass"; //$NON-NLS-1$
public void testJBIDE3920(){
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).
- getNode(CSS_FILE_NAME+".css").doubleClick();
- bot.editorByTitle(CSS_FILE_NAME+".css").setFocus();
- bot.menu("Edit").menu("Select All").click();
- bot.menu("Edit").menu("Delete").click();
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")). //$NON-NLS-1$
+ getNode(CSS_FILE_NAME+".css").doubleClick(); //$NON-NLS-1$
+ bot.editorByTitle(CSS_FILE_NAME+".css").setFocus(); //$NON-NLS-1$
+ bot.menu("Edit").menu("Select All").click(); //$NON-NLS-1$//$NON-NLS-2$
+ bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$ //$NON-NLS-2$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
- bot.menu("File").menu("New").menu("CSS File").click();
- bot.shell("New CSS File").activate();
- bot.textWithLabel("Name*").setText(CSS_FILE_NAME);
- bot.button("Finish").click();
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select(); //$NON-NLS-1$
+ bot.menu("File").menu("New").menu("CSS File").click(); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+ bot.shell("New CSS File").activate(); //$NON-NLS-1$
+ bot.textWithLabel("Name*").setText(CSS_FILE_NAME); //$NON-NLS-1$
+ bot.button("Finish").click(); //$NON-NLS-1$
}
- SWTBotEclipseEditor eclipseEditor = bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor();
+ SWTBotEclipseEditor eclipseEditor = bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor(); //$NON-NLS-1$
eclipseEditor.setFocus();
- eclipseEditor.insertText(CSS_CLASS_NAME+"{");
+ eclipseEditor.insertText(CSS_CLASS_NAME+"{"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click();
- bot.shell("CSS Class").activate();
- bot.tabItem("Text/Font").activate();
- bot.comboBoxWithLabel("Font Style:").setSelection("italic");
- bot.comboBoxWithLabel("Text Decoration:").setSelection("underline");
- bot.button("OK").click();
- bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().close();
+ eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
+ bot.shell("CSS Class").activate(); //$NON-NLS-1$
+ bot.tabItem("Text/Font").activate(); //$NON-NLS-1$
+ bot.comboBoxWithLabel("Font Style:").setSelection("italic"); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.comboBoxWithLabel("Text Decoration:").setSelection("underline"); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.button("OK").click(); //$NON-NLS-1$
+ bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().close(); //$NON-NLS-1$
}
@Override
protected void closeUnuseDialogs() {
try {
- bot.shell("CSS Class").close();
+ bot.shell("CSS Class").close(); //$NON-NLS-1$
} catch (WidgetNotFoundException e) {
}
}
@@ -53,7 +53,7 @@
protected boolean isUnuseDialogOpened() {
boolean isOpened = false;
try {
- bot.shell("CSS Class").activate();
+ bot.shell("CSS Class").activate(); //$NON-NLS-1$
isOpened = true;
} catch (WidgetNotFoundException e) {
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java 2010-02-10 08:49:50 UTC (rev 20213)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java 2010-02-10 10:14:17 UTC (rev 20214)
@@ -9,8 +9,8 @@
public class JBIDE4391Test extends JSFAutoTestCase{
- private static String CSS_FILE_NAME = "JBIDE4391";
- private static String CSS_CLASS_NAME = "cssclass";
+ private static String CSS_FILE_NAME = "JBIDE4391"; //$NON-NLS-1$
+ private static String CSS_CLASS_NAME = "cssclass"; //$NON-NLS-1$
public void testJBIDE4391(){
@@ -19,43 +19,43 @@
SWTBot innerBot= bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName")).
- getNode(CSS_FILE_NAME+".css").doubleClick();
- bot.editorByTitle(CSS_FILE_NAME+".css").setFocus();
- bot.menu("Edit").menu("Select All").click();
- bot.menu("Edit").menu("Delete").click();
+ tree.expandNode(projectProperties.getProperty("JSFProjectName")). //$NON-NLS-1$
+ getNode(CSS_FILE_NAME+".css").doubleClick(); //$NON-NLS-1$
+ bot.editorByTitle(CSS_FILE_NAME+".css").setFocus(); //$NON-NLS-1$
+ bot.menu("Edit").menu("Select All").click(); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$ //$NON-NLS-2$
} catch (WidgetNotFoundException e) {
- tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select();
- bot.menu("File").menu("New").menu("CSS File").click();
- bot.shell("New CSS File").activate();
- bot.textWithLabel("Name*").setText(CSS_FILE_NAME);
- bot.button("Finish").click();
+ tree.getTreeItem(projectProperties.getProperty("JSFProjectName")).select(); //$NON-NLS-1$
+ bot.menu("File").menu("New").menu("CSS File").click(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ bot.shell("New CSS File").activate(); //$NON-NLS-1$
+ bot.textWithLabel("Name*").setText(CSS_FILE_NAME); //$NON-NLS-1$
+ bot.button("Finish").click(); //$NON-NLS-1$
}
- SWTBotEclipseEditor eclipseEditor = bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor();
+ SWTBotEclipseEditor eclipseEditor = bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor(); //$NON-NLS-1$
eclipseEditor.setFocus();
- eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" +
- "background-color:green;\r}");
+ eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" + //$NON-NLS-1$
+ "background-color:green;\r}"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click();
+ eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
//Test incorrect attribute
- bot.shell("CSS Class").activate();
- bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME);
- bot.tabItem("Text/Font").activate();
- bot.comboBoxWithLabel("Text Decoration:").setText(";;;;");
- bot.comboBoxWithLabel("Font Weight:").setSelection("bold");
- bot.button("Cancel").click();
- assertEquals("cssclass{\r\tcolor:red;\r\t" +
- "background-color:green;\r}", bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText());
- bot.editorByTitle(CSS_FILE_NAME+".css").close();
+ bot.shell("CSS Class").activate(); //$NON-NLS-1$
+ bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME); //$NON-NLS-1$
+ bot.tabItem("Text/Font").activate(); //$NON-NLS-1$
+ bot.comboBoxWithLabel("Text Decoration:").setText(";;;;"); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.comboBoxWithLabel("Font Weight:").setSelection("bold"); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.button("Cancel").click(); //$NON-NLS-1$
+ assertEquals("cssclass{\r\tcolor:red;\r\t" + //$NON-NLS-1$
+ "background-color:green;\r}", bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText()); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.editorByTitle(CSS_FILE_NAME+".css").close(); //$NON-NLS-1$
}
@Override
protected void closeUnuseDialogs() {
try {
- bot.shell("CSS Class").close();
+ bot.shell("CSS Class").close(); //$NON-NLS-1$
} catch (WidgetNotFoundException e) {
}
}
@@ -64,7 +64,7 @@
protected boolean isUnuseDialogOpened() {
boolean isOpened = false;
try {
- bot.shell("CSS Class").activate();
+ bot.shell("CSS Class").activate(); //$NON-NLS-1$
isOpened = true;
} catch (WidgetNotFoundException e) {
}
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/SetTemplateForUnknownTagTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/SetTemplateForUnknownTagTest.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/SetTemplateForUnknownTagTest.java 2010-02-10 10:14:17 UTC (rev 20214)
@@ -0,0 +1,137 @@
+package org.jboss.tools.jsf.ui.bot.test.templates;
+
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.jboss.tools.jsf.ui.bot.test.CSSStyleDialogVariables;
+import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
+import org.jboss.tools.jsf.ui.bot.test.UnknownTagDialogVariables;
+import org.jboss.tools.ui.bot.test.WidgetVariables;
+
+public class SetTemplateForUnknownTagTest extends JSFAutoTestCase {
+
+ private static final String TAG_NAME = "h:unknowntag";//$NON-NLS-1$
+ private static final String TAG_URI = "http://java.sun.com/jsf/html";//$NON-NLS-1$
+ private static final String DISPALY_TAG = "b";//$NON-NLS-1$
+ private static final String CHILDREN_ALLOWS = "yes";//$NON-NLS-1$
+
+ public void testSetTemplateForUnknownTag() throws Throwable{
+ openTestPage();
+ setEditor(bot.editorByTitle(TEST_PAGE).toTextEditor());
+ setEditorText(getEditor().getText());
+ getEditor().navigateTo(13, 0);
+ getEditor().insertText("<h:unknowntag></h:unknowntag>");//$NON-NLS-1$
+ getEditor().navigateTo(13,5);
+ setUpTemplate();
+ editTemplate();
+ removeTemplate();
+ }
+
+ private void setUpTemplate() throws Throwable{
+ bot.toolbarButtonWithTooltip(WidgetVariables.PREFERENCES).click();
+ bot.shell(WidgetVariables.PREF_FILTER_SHELL_TITLE).activate();
+ bot.tabItem(WidgetVariables.VPE_TEMPLATES_TAB).activate();
+ bot.button(WidgetVariables.ADD_BUTTON).click();
+ bot.shell(UnknownTagDialogVariables.DIALOG_TITLE).activate();
+ bot.textWithLabel(UnknownTagDialogVariables.TAG_NAME_FIELD).setText(TAG_NAME);
+ bot.textWithLabel(UnknownTagDialogVariables.TAG_URI_FIELD).setText(TAG_URI);
+ bot.textWithLabel(UnknownTagDialogVariables.DISPLAY_TAG).setText(DISPALY_TAG);
+ bot.checkBoxWithLabel(UnknownTagDialogVariables.ALLOW_CHILDREN_CHECKBOX).click();
+ bot.textWithLabel(UnknownTagDialogVariables.VALUE_FIELD).setText("myValue");//$NON-NLS-1$
+ bot.textWithLabel(UnknownTagDialogVariables.TAG_STYLE_FIELD).setText("color:red");//$NON-NLS-1$
+ bot.buttonWithTooltip(UnknownTagDialogVariables.EDIT_TAG_STYLE_TIP).click();
+ String returnValue = setStyles();
+ assertEquals("font-family:Arial;color:black;", returnValue);//$NON-NLS-1$
+ bot.button(WidgetVariables.OK_BUTTON).click();
+ bot.shell(WidgetVariables.PREF_FILTER_SHELL_TITLE).activate();
+ bot.button(WidgetVariables.OK_BUTTON).click();
+ checkVPE("templates/SetTemplateForUnknownTag.xml");//$NON-NLS-1$
+ }
+
+ private void editTemplate() throws Throwable{
+ bot.toolbarButtonWithTooltip(WidgetVariables.PREFERENCES).click();
+ bot.shell(WidgetVariables.PREF_FILTER_SHELL_TITLE).activate();
+ bot.tabItem(WidgetVariables.VPE_TEMPLATES_TAB).activate();
+ bot.table().select(0);
+ checkTable(bot.table());
+ bot.button(WidgetVariables.EDIT_BUTTON).click();
+ bot.shell(UnknownTagDialogVariables.DIALOG_TITLE).activate();
+ bot.textWithLabel(UnknownTagDialogVariables.TAG_URI_FIELD).setText(""); //$NON-NLS-1$
+ bot.checkBoxWithLabel(UnknownTagDialogVariables.ALLOW_CHILDREN_CHECKBOX).click();
+ bot.textWithLabel(UnknownTagDialogVariables.VALUE_FIELD).setText(""); //$NON-NLS-1$
+ bot.textWithLabel(UnknownTagDialogVariables.TAG_STYLE_FIELD).setText(""); //$NON-NLS-1$
+ bot.button(WidgetVariables.OK_BUTTON).click();
+ bot.shell(WidgetVariables.PREF_FILTER_SHELL_TITLE).activate();
+ bot.button(WidgetVariables.OK_BUTTON).click();
+ checkVPE("templates/EditedTemplateForUnknownTag.xml"); //$NON-NLS-1$
+ }
+
+ private void removeTemplate() throws Throwable{
+ bot.toolbarButtonWithTooltip(WidgetVariables.PREFERENCES).click();
+ bot.shell(WidgetVariables.PREF_FILTER_SHELL_TITLE).activate();
+ bot.tabItem(WidgetVariables.VPE_TEMPLATES_TAB).activate();
+ bot.table().select(0);
+ bot.button(WidgetVariables.REMOVE_BUTTON).click();
+ bot.shell(WidgetVariables.PREF_FILTER_SHELL_TITLE).activate();
+ bot.button(WidgetVariables.OK_BUTTON).click();
+ checkVPE("templates/UnknownTemplate.xml"); //$NON-NLS-1$
+ }
+
+ private String setStyles(){
+ bot.shell(CSSStyleDialogVariables.CSS_STYLE_DIALOG_TITLE).activate();
+ bot.tabItem(CSSStyleDialogVariables.TEXT_FONT_TAB).activate();
+ bot.textWithLabel(CSSStyleDialogVariables.FONT_FAMILY_FIELD).setText("Arial"); //$NON-NLS-1$
+ String colorText = bot.textWithLabel(CSSStyleDialogVariables.COLOR_FIELD).getText();
+ assertEquals("red", colorText); //$NON-NLS-1$
+ bot.textWithLabel(CSSStyleDialogVariables.COLOR_FIELD).setText("black"); //$NON-NLS-1$
+ bot.textWithLabel(CSSStyleDialogVariables.TEXT_DECORATION_FIELD).setText("underline"); //$NON-NLS-1$
+ bot.button(WidgetVariables.OK_BUTTON).click();
+ bot.shell(UnknownTagDialogVariables.DIALOG_TITLE).activate();
+ String returnValue = bot.textWithLabel(UnknownTagDialogVariables.TAG_STYLE_FIELD).getText();
+ return returnValue;
+ }
+
+ private void checkTable(SWTBotTable table){
+ assertEquals(TAG_NAME, table.cell(0, 0));
+ assertEquals(DISPALY_TAG, table.cell(0, 1));
+ assertEquals(TAG_URI, table.cell(0, 2));
+ assertEquals(CHILDREN_ALLOWS, table.cell(0, 3));
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ boolean isOpened = false;
+ try {
+ bot.shell(CSSStyleDialogVariables.CSS_STYLE_DIALOG_TITLE).activate();
+ isOpened = true;
+ } catch (WidgetNotFoundException e) {
+ }
+ try {
+ bot.shell(UnknownTagDialogVariables.DIALOG_TITLE).activate();
+ isOpened = true;
+ } catch (WidgetNotFoundException e) {
+ }
+ try {
+ bot.shell(WidgetVariables.PREF_FILTER_SHELL_TITLE).activate();
+ isOpened = true;
+ } catch (WidgetNotFoundException e) {
+ }
+ return isOpened;
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+ try {
+ bot.shell(CSSStyleDialogVariables.CSS_STYLE_DIALOG_TITLE).close();
+ } catch (WidgetNotFoundException e) {
+ }
+ try {
+ bot.shell(UnknownTagDialogVariables.DIALOG_TITLE).close();
+ } catch (WidgetNotFoundException e) {
+ }
+ try {
+ bot.shell(WidgetVariables.PREF_FILTER_SHELL_TITLE).close();
+ } catch (WidgetNotFoundException e) {
+ }
+ }
+
+}
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/UnknownTemplateTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/UnknownTemplateTest.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/UnknownTemplateTest.java 2010-02-10 10:14:17 UTC (rev 20214)
@@ -0,0 +1,22 @@
+package org.jboss.tools.jsf.ui.bot.test.templates;
+
+import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
+
+public class UnknownTemplateTest extends JSFAutoTestCase {
+
+ public void testUnknownTemplate() throws Throwable{
+
+ openTestPage();
+
+ setEditor(bot.editorByTitle(TEST_PAGE).toTextEditor());
+ setEditorText(getEditor().getText());
+
+ getEditor().navigateTo(13, 0);
+
+ getEditor().insertText("<h:unknowntag></h:unknowntag>"); //$NON-NLS-1$
+
+ checkVPE("templates/UnknownTemplate.xml"); //$NON-NLS-1$
+
+ }
+
+}
Modified: trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/WidgetVariables.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/WidgetVariables.java 2010-02-10 08:49:50 UTC (rev 20213)
+++ trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/WidgetVariables.java 2010-02-10 10:14:17 UTC (rev 20214)
@@ -23,4 +23,13 @@
public static final String FINISH_BUTTON = "Finish"; //$NON-NLS-1$
public static final String CONTINUE_BUTTON = "Continue"; //$NON-NLS-1$
public static final String NEW_BUTTON = "New..."; //$NON-NLS-1$
+ public static final String WINDOW_MENU = "Window"; //$NON-NLS-1$
+ public static final String PREFERENCES = "Preferences"; //$NON-NLS-1$
+ public static final String VPE_TEMPLATES_TAB = "Templates"; //$NON-NLS-1$
+ public static final String PREF_FILTER_SHELL_TITLE = "Preferences (Filtered)"; //$NON-NLS-1$
+ public static final String ADD_BUTTON = "Add"; //$NON-NLS-1$
+ public static final String EDIT_BUTTON = "Edit"; //$NON-NLS-1$
+ public static final String REMOVE_BUTTON = "Remove"; //$NON-NLS-1$
+ public static final String CSS_STYLE_DIALOG_TITLE = "CSS Style"; //$NON-NLS-1$
+
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java 2010-02-10 08:49:50 UTC (rev 20213)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeEditAnyDialog.java 2010-02-10 10:14:17 UTC (rev 20214)
@@ -239,7 +239,7 @@
*/
Button button = new Button(composite, SWT.PUSH);
button.setLayoutData(new GridData(SWT.LEFT, SWT.NONE, false, false, 1, 1));
- button.setToolTipText(VpeUIMessages.BACKGROUND_COLOR_TIP);
+ button.setToolTipText(VpeUIMessages.EDIT_STYLE_TIP);
ImageDescriptor colorDesc = JspEditorPlugin
.getImageDescriptor(Constants.IMAGE_COLORLARGE_FILE_LOCATION);
Image im = colorDesc.createImage();
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-02-10 08:49:50 UTC (rev 20213)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-02-10 10:14:17 UTC (rev 20214)
@@ -99,7 +99,7 @@
public static String MAX_SOURCE_PANE;
public static String MAX_VISUAL_PANE;
public static String RESTORE_PREVIOUS_LOCATION;
- public static String BACKGROUND_COLOR_TIP;
+ public static String EDIT_STYLE_TIP;
public static String BaseActionManager_InsertAfter;
public static String BaseActionManager_InsertAround;
public static String BaseActionManager_InsertBefore;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-02-10 08:49:50 UTC (rev 20213)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-02-10 10:14:17 UTC (rev 20214)
@@ -81,7 +81,7 @@
MAX_SOURCE_PANE=Maximize Source Pane
MAX_VISUAL_PANE=Maximize Visual Pane
RESTORE_PREVIOUS_LOCATION=Restore Previous Location
-BACKGROUND_COLOR_TIP=Choose background color
+EDIT_STYLE_TIP=Edit style
BaseActionManager_InsertAfter=Insert After
BaseActionManager_InsertAround=Insert Around
BaseActionManager_InsertBefore=Insert Before
14 years, 8 months
JBoss Tools SVN: r20213 - in trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-02-10 03:49:50 -0500 (Wed, 10 Feb 2010)
New Revision: 20213
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ImportUnknownTagsWizardTest.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2795, adding SWTBot Test.
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2010-02-10 04:48:29 UTC (rev 20212)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2010-02-10 08:49:50 UTC (rev 20213)
@@ -23,6 +23,7 @@
import org.jboss.tools.vpe.ui.bot.test.smoke.RenameJSPFileTest;
import org.jboss.tools.vpe.ui.bot.test.smoke.RenameXHTMLFileTest;
import org.jboss.tools.vpe.ui.bot.test.smoke.XHTMLPageCreationTest;
+import org.jboss.tools.vpe.ui.bot.test.wizard.ImportUnknownTagsWizardTest;
public class VPEAllBotTests extends SWTBotTestCase{
public static Test suite(){
@@ -47,6 +48,8 @@
suite.addTestSuite(RenameFacesConfigFileTest.class);
suite.addTestSuite(RenameJSPFileTest.class);
suite.addTestSuite(RenameXHTMLFileTest.class);
+ suite.addTestSuite(ImportUnknownTagsWizardTest.class);
+
return new TestSetup(suite);
}
}
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ImportUnknownTagsWizardTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ImportUnknownTagsWizardTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ImportUnknownTagsWizardTest.java 2010-02-10 08:49:50 UTC (rev 20213)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * 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.ui.bot.test.wizard;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.ui.bot.test.WidgetVariables;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
+
+public class ImportUnknownTagsWizardTest extends VPEAutoTestCase {
+
+ private final String STORED_TAGS_PATH = "storedTags.xml"; //$NON-NLS-1$
+
+ public ImportUnknownTagsWizardTest() {
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ return false;
+ }
+
+ public void _testImportWizard() throws Throwable {
+ bot.menu("File").menu("Import...").click(); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.shell("Import").activate(); //$NON-NLS-1$
+ SWTBotTree importTree = bot.tree();
+ importTree.expandNode("Other").select("Unknown tags templates"); //$NON-NLS-1$ //$NON-NLS-2$
+ bot.button(WidgetVariables.NEXT_BUTTON).click();
+ bot.text().setText(STORED_TAGS_PATH);
+ }
+
+ protected void openPage() {
+ SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
+ SWTBotTree tree = innerBot.tree();
+ tree.expandNode(JBT_TEST_PROJECT_NAME)
+ .expandNode("WebContent").expandNode("pages").getNode(TEST_PAGE).doubleClick(); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+}
14 years, 8 months
JBoss Tools SVN: r20212 - trunk/documentation/guides/JBDS_3.0_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-02-09 23:48:29 -0500 (Tue, 09 Feb 2010)
New Revision: 20212
Modified:
trunk/documentation/guides/JBDS_3.0_Release_Notes/en-US/Fixed_Issues.xml
Log:
updated release notes with new JIRA
Modified: trunk/documentation/guides/JBDS_3.0_Release_Notes/en-US/Fixed_Issues.xml
===================================================================
--- trunk/documentation/guides/JBDS_3.0_Release_Notes/en-US/Fixed_Issues.xml 2010-02-10 01:17:46 UTC (rev 20211)
+++ trunk/documentation/guides/JBDS_3.0_Release_Notes/en-US/Fixed_Issues.xml 2010-02-10 04:48:29 UTC (rev 20212)
@@ -148,6 +148,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-5124">JBIDE-5124</ulink>: In the Hibernate Diagram Viewer new functionality has been added that allows a user to choose between two different connection routers: Manhattan connection router for small diagrams and Fan connection router for larger diagrams.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5031">JBIDE-5031</ulink>: To close a database connection a user would have to close the <application>JBoss Developer Studio</application> and then restart the application to continue work without the connection. The database connection can now be closed from within the <application>JBoss Developer Studio</application> by choosing the <guimenuitem>Close Configuration</guimenuitem> menu item from the right-click menu in <guilabel>Hibernate Configurations</guilabel> tab.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -200,6 +205,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-5089">JBIDE-5089</ulink>: JSF Expression Language (EL) validation has been added for message bundles. This improves the performance of the <classname>PageContextFactory</classname>.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5015">JBIDE-5015</ulink>: Support for JSF 2.0 composition components has been added in this update.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -212,6 +222,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-5743">JBIDE-5743</ulink>: Content assistance in coding did not show anything for the tag <property><rich:menuItem ... icon="|" /></property>. The content assistance has been corrected by adding the <property>icon</property> attribute to the <filename>RichFaces.xml</filename> tag library.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5025">JBIDE-5025</ulink>: The RichFaces libraries have been updated to version 3.3.2.SR1.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -256,6 +271,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-5170">JBIDE-5170</ulink>: When changing, adding or removing a Seam runtime from within <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Preferences</guimenuitem><guimenuitem>JBoss Tools</guimenuitem><guimenuitem>Web</guimenuitem><guimenuitem>Seam</guimenuitem></menuchoice>, Seam projects would not be built or validated. The behavior has been changed to build and validate Seam projects upon changes in the <guimenuitem>Preferences</guimenuitem> section to ensure correct functioning of the project. The <filename>SeamRuntimeManager.java</filename> file was updated to correct this.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5012">JBIDE-5012</ulink>: The Booking and DVDStore Seam examples have been updated for Seam 2.2 within the <application>JBoss Enterprise Application Platform</application>.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -270,9 +290,14 @@
</listitem>
<listitem>
<para>
- <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5088">JBIDE-5088</ulink>:
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5088">JBIDE-5088</ulink>: When opening an existing Smooks configuration file it wouldn't contain any process information. To correct this an input task is automatically created and the Smooks configuration file is analyzed to add any missing task types if necessary. During the course of this update a <exceptionname>NullPointerException</exceptionname> was also fixed.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5086">JBIDE-5086</ulink>: A default layout is added in the Java-Mapping viewer. This allows for the layout of the information in the Smooks editor to be rearranged into a predefined default layout.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -334,7 +359,7 @@
</listitem>
<listitem>
<para>
- The <methodname>createPartControl()</methodname> method in the <classname>MozillaEditor</classname> and <classname>MozillaPreview</classname> classes create <classname>XullRunnerEditor</classname> as an inner class. The issue was that the <classname>XullRunnerEditor</classname> class retained a reference to <classname>MozillaEditor(MozillaPreview)</classname> that caused it not to be released and instead retain references to WST and EMF classes. This has now been corrected so that classname>MozillaEditor(MozillaPreview)</classname> is now released after use and referecnes are not retained.
+ The <methodname>createPartControl()</methodname> method in the <classname>MozillaEditor</classname> and <classname>MozillaPreview</classname> classes create <classname>XullRunnerEditor</classname> as an inner class. The issue was that the <classname>XullRunnerEditor</classname> class retained a reference to <classname>MozillaEditor(MozillaPreview)</classname> that caused it not to be released and instead retain references to WST and EMF classes. This has now been corrected so that <classname>MozillaEditor(MozillaPreview)</classname> is now released after use and referecnes are not retained.
</para>
</listitem>
</itemizedlist>
@@ -349,6 +374,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-5091">JBIDE-5091</ulink>: Support for JSF 2.0 Composition components that come packaged into the Web Application Root has been added to the Visual Page Editor.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5065">JBIDE-5065</ulink>: The icons in the Visual Page Editor have been redesigned for improved aesthetic appearance.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -400,9 +430,41 @@
</listitem>
<listitem>
<para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5048">JBIDE-5048</ulink>: SSH deployment has been added to the <application>JBoss Developer Studio</application> with this update. Specifically the following improvements have been made:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ A server type has been created that accepts SSH deployment for Eclipse Web Tools Platform (WTP) archives
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ WTP, single-file and project archives can now be published
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Java Secure Channel (JSch) errors are now verified
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ All situations return IStatus objects and their associated user interface (an IStatus object represents the outcome of an operation)
+ </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-5041">JBIDE-5041</ulink>: The <keycap>menu</keycap> key on the keyboard would not work in the <guilabel>Web Projects</guilabel> view, <guilabel>Seam Components</guilabel> view or JBoss Tools XML Editor. The functioning of this key has now been corrected so it behaves as a user would expect.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-5005">JBIDE-5005</ulink>: A new export wizard has been added to the <application>JBoss Developer Studio</application>. The new wizard allows the export operation to utilize IModule objects. This added feature reduces redundancy and inconsistancy for the export operation.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
14 years, 8 months
JBoss Tools SVN: r20211 - trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-02-09 20:17:46 -0500 (Tue, 09 Feb 2010)
New Revision: 20211
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/FixDialog.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
workspace/examples/project-examples-3.1.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-5700 Simplify project examples update process
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF 2010-02-09 23:52:03 UTC (rev 20210)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF 2010-02-10 01:17:46 UTC (rev 20211)
@@ -25,7 +25,10 @@
org.eclipse.wst.server.core,
org.jboss.tools.seam.core,
org.eclipse.wst.common.project.facet.core,
- org.jboss.tools.common
+ org.jboss.tools.common,
+ org.eclipse.equinox.p2.ui,
+ org.eclipse.equinox.p2.ui.sdk,
+ org.eclipse.equinox.p2.metadata
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Export-Package: org.jboss.tools.project.examples,
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/FixDialog.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/FixDialog.java 2010-02-09 23:52:03 UTC (rev 20210)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/dialog/FixDialog.java 2010-02-10 01:17:46 UTC (rev 20211)
@@ -16,9 +16,12 @@
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
@@ -28,14 +31,27 @@
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.project.examples.model.Project;
import org.jboss.tools.project.examples.model.ProjectFix;
+import org.jboss.tools.project.examples.wizard.NewProjectExamplesWizardPage;
public class FixDialog extends Dialog {
+ private static final int FIX_BUTTON = 1;
private TableViewer tableViewer;
private List<ProjectFix> fixes;
+ private Button fixButton;
+ private ProjectFix fix;
+ private NewProjectExamplesWizardPage page;
- public FixDialog(Shell parentShell, IStructuredSelection selection) {
+ public FixDialog(Shell parentShell, NewProjectExamplesWizardPage page) {
super(parentShell);
+ setShellStyle(SWT.CLOSE | SWT.MAX | SWT.TITLE | SWT.BORDER
+ | SWT.MODELESS | SWT.RESIZE | getDefaultOrientation());
+ this.page = page;
+ refresh();
+ }
+
+ private void refresh() {
+ IStructuredSelection selection = page.getSelection();
Iterator iterator = selection.iterator();
fixes = new ArrayList<ProjectFix>();
while (iterator.hasNext()) {
@@ -56,12 +72,12 @@
gd.heightHint = 300;
contents.setLayoutData(gd);
contents.setLayout(new GridLayout());
- getShell().setText("Fixes");
+ getShell().setText("Fixing Requirements");
applyDialogFont(contents);
initializeDialogUnits(area);
Label fixesLabel = new Label(contents, SWT.NULL);
- fixesLabel.setText("Fixes:");
+ fixesLabel.setText("Requirements:");
tableViewer = new TableViewer(contents, SWT.H_SCROLL | SWT.V_SCROLL
| SWT.BORDER | SWT.SINGLE);
Table table = tableViewer.getTable();
@@ -96,10 +112,14 @@
public void selectionChanged(SelectionChangedEvent event) {
description.setText(""); //$NON-NLS-1$
ISelection selection = event.getSelection();
+ fix = null;
+ fixButton.setEnabled(false);
if (selection instanceof IStructuredSelection) {
- Object fix = ((IStructuredSelection) selection).getFirstElement();
- if (fix instanceof ProjectFix) {
- description.setText(((ProjectFix) fix).getProperties().get(ProjectFix.DESCRIPTION));
+ Object object = ((IStructuredSelection) selection).getFirstElement();
+ if (object instanceof ProjectFix) {
+ fix = (ProjectFix) object;
+ fixButton.setEnabled(fix.isFixable());
+ description.setText(fix.getProperties().get(ProjectFix.DESCRIPTION));
}
}
}
@@ -111,10 +131,36 @@
@Override
protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
+ fixButton = createButton(parent, FIX_BUTTON, "Fix", true);
+ if (fix == null) {
+ fixButton.setEnabled(false);
+ } else {
+ fixButton.setEnabled(fix.isFixable());
+ }
+ fixButton.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (fix != null) {
+ fix.fix();
+ page.refresh(true);
+ refresh();
+ tableViewer.setInput(fixes);
+ //tableViewer.refresh();
+ }
+ }
+
+ });
+ createButton(parent, IDialogConstants.OK_ID, "Finish",
true);
}
+ @Override
+ protected void buttonPressed(int buttonId) {
+ if (FIX_BUTTON != buttonId) {
+ super.buttonPressed(buttonId);
+ }
+ }
private class FixLabelProvider extends LabelProvider implements
ITableLabelProvider {
@@ -129,7 +175,7 @@
return fix.getType();
}
if (columnIndex == 1) {
- return fix.getProperties().get(ProjectFix.SHORT_DESCRIPTION);
+ return fix.getShortDescription();
}
}
return null;
@@ -153,7 +199,7 @@
}
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-
+ fixes = (List<ProjectFix>) newInput;
}
}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java 2010-02-09 23:52:03 UTC (rev 20210)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java 2010-02-10 01:17:46 UTC (rev 20211)
@@ -3,6 +3,20 @@
import java.util.HashMap;
import java.util.Map;
+import org.eclipse.equinox.internal.p2.ui.sdk.ProvSDKUIActivator;
+import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
+import org.eclipse.equinox.internal.provisional.p2.ui.IProvHelpContextIds;
+import org.eclipse.equinox.internal.provisional.p2.ui.QueryableMetadataRepositoryManager;
+import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.InstallWizard;
+import org.eclipse.equinox.internal.provisional.p2.ui.dialogs.ProvisioningWizardDialog;
+import org.eclipse.equinox.internal.provisional.p2.ui.policy.Policy;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
+
public class ProjectFix {
public final static String WTP_RUNTIME = "wtpruntime"; //$NON-NLS-1$
@@ -15,12 +29,26 @@
public final static String ID = "id"; //$NON-NLS-1$
public final static String VERSION = "VERSION"; //$NON-NLS-1$
public final static String DESCRIPTION = "description"; //$NON-NLS-1$
- public final static String SHORT_DESCRIPTION = "short-description"; //$NON-NLS-1$
public final static String ANY = "any"; //$NON-NLS-1$
+ public static final String SEAM_PREFERENCES_ID = "org.jboss.tools.common.model.ui.seam";
+ public static final String WTP_PREFERENCES_ID = "org.eclipse.wst.server.ui.runtime.preferencePage";
private String type;
private Map<String,String> properties = new HashMap<String,String>();
+ private static Map<String,String> shortDescriptions = new HashMap<String, String>();
+ private static Map<String,Boolean> fixableMaps = new HashMap<String, Boolean>();
+ static {
+ shortDescriptions.put(WTP_RUNTIME, "Missing WTP Runtime");
+ shortDescriptions.put(SEAM_RUNTIME, "Missing Seam Runtime");
+ shortDescriptions.put(PLUGIN_TYPE, "Missing plugin");
+ shortDescriptions.put(DROOLS_RUNTIME, "Missing Drools Runtime");
+ fixableMaps.put(WTP_RUNTIME,true);
+ fixableMaps.put(SEAM_RUNTIME,true);
+ fixableMaps.put(PLUGIN_TYPE,true);
+ fixableMaps.put(DROOLS_RUNTIME,true);
+ }
+
public String getType() {
return type;
}
@@ -34,4 +62,61 @@
this.properties = properties;
}
+ public String getShortDescription() {
+ if (type == null) {
+ return ""; //$NON-NLS-1$
+ }
+ String shortDescription = shortDescriptions.get(type);
+ if (shortDescription == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return shortDescription;
+ }
+
+ public boolean isFixable() {
+ if (type == null) {
+ return false;
+ }
+ Boolean fixable = fixableMaps.get(type);
+ if (fixable == null) {
+ return false;
+ }
+ return fixable;
+ }
+ public void fix() {
+ if (SEAM_RUNTIME.equals(type)) {
+ Shell shell = getShell();
+ PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(shell,SEAM_PREFERENCES_ID, new String[] {SEAM_PREFERENCES_ID},null);
+ if (dialog != null) {
+ dialog.open();
+ }
+ }
+ if (WTP_RUNTIME.equals(type)) {
+ Shell shell = getShell();
+ PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(shell,WTP_PREFERENCES_ID, new String[] {SEAM_PREFERENCES_ID},null);
+ if (dialog != null) {
+ dialog.open();
+ }
+ }
+ if (PLUGIN_TYPE.equals(type)) {
+ try {
+ final String profileId = ProvSDKUIActivator.getSelfProfileId();
+ final QueryableMetadataRepositoryManager manager = new QueryableMetadataRepositoryManager(Policy.getDefault().getQueryContext(), false);
+ InstallWizard wizard = new InstallWizard(Policy.getDefault(), profileId, null, null, manager);
+ WizardDialog dialog = new ProvisioningWizardDialog(getShell(), wizard);
+ dialog.create();
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IProvHelpContextIds.INSTALL_WIZARD);
+ dialog.open();
+ } catch (ProvisionException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ ProjectExamplesActivator.log(e);
+ }
+
+ }
+ }
+ private Shell getShell() {
+ Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+ return shell;
+ }
}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2010-02-09 23:52:03 UTC (rev 20210)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2010-02-10 01:17:46 UTC (rev 20211)
@@ -21,6 +21,7 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
@@ -38,6 +39,7 @@
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
@@ -180,38 +182,7 @@
projectURL.setText(""); //$NON-NLS-1$
projectSize.setText(""); //$NON-NLS-1$
}
- boolean canFinish = false;
- Iterator iterator = selection.iterator();
- while (iterator.hasNext()) {
- Object object = iterator.next();
- if (object instanceof Project) {
- canFinish=true;
- Project project = (Project) object;
- if (project.getUnsatisfiedFixes() == null) {
- List<ProjectFix> fixes = project.getFixes();
- List<ProjectFix> unsatisfiedFixes = new ArrayList<ProjectFix>();
- project.setUnsatisfiedFixes(unsatisfiedFixes);
- for (ProjectFix fix:fixes) {
- if (!canFix(project, fix)) {
- unsatisfiedFixes.add(fix);
- }
- }
- }
- if (project.getUnsatisfiedFixes().size() > 0) {
- notesPageBook.showPage(noteComposite);
- noteComposite.setVisible(true);
- noteEmptyComposite.setVisible(false);
- } else {
- notesPageBook.showPage(noteEmptyComposite);
- noteComposite.setVisible(false);
- noteEmptyComposite.setVisible(true);
- }
-
- } else {
- canFinish=false;
- break;
- }
- }
+ boolean canFinish = refresh(false);
setPageComplete(canFinish);
}
@@ -226,36 +197,44 @@
noteEmptyComposite = new Composite( notesPageBook, SWT.NONE );
noteEmptyComposite.setLayout( new GridLayout(1, false));
//notesEmptyComposite.setVisible( false );
- gd=new GridData(GridData.FILL_HORIZONTAL);
+ gd=new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
noteEmptyComposite.setLayoutData(gd);
noteComposite = new Composite(notesPageBook, SWT.NONE);
noteComposite.setLayout(new GridLayout(2,false));
- //notesComposite.setText("Note");
- gd=new GridData(GridData.FILL_HORIZONTAL);
+ gd=new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
noteComposite.setLayoutData(gd);
noteComposite.setVisible(false);
notesPageBook.showPage(noteEmptyComposite);
- Label noteLabel = new Label(noteComposite,SWT.NONE);
- gd=new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- noteLabel.setText("Note:");
+ Composite messageComposite = new Composite(noteComposite, SWT.BORDER);
+ messageComposite.setLayout(new GridLayout(2, false));
+ gd=new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
+
+ messageComposite.setLayoutData(gd);
+
+ Label noteLabel = new Label(messageComposite,SWT.NONE);
+ gd=new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false);
noteLabel.setLayoutData(gd);
- noteText = new Text(noteComposite, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
+ Image image = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING);
+ image.setBackground(noteLabel.getBackground());
+ noteLabel.setImage(image);
+
+ noteText = new Text(messageComposite, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
noteText.setText(""); //$NON-NLS-1$
gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
gd.heightHint=50;
+ gd.widthHint = 400;
noteText.setLayoutData(gd);
- noteText.setText("You could face a problem when importing this project example. For more details click the Details button.");
+ noteText.setText("This example has some requirements that could not be automatically configured. When importing the example you might see some errors which would need fixing manually or via Quick Fixes. Click \"Details\" to see more.");
details = new Button(noteComposite, SWT.PUSH);
details.setText("Details...");
details.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- Dialog dialog = new FixDialog(getShell(), getSelection());
+ Dialog dialog = new FixDialog(getShell(), NewProjectExamplesWizardPage.this);
dialog.open();
}
});
@@ -415,4 +394,40 @@
}
return false;
}
+
+ public boolean refresh(boolean force) {
+ boolean canFinish = false;
+ Iterator iterator = selection.iterator();
+ while (iterator.hasNext()) {
+ Object object = iterator.next();
+ if (object instanceof Project) {
+ canFinish=true;
+ Project project = (Project) object;
+ if (force || project.getUnsatisfiedFixes() == null) {
+ List<ProjectFix> fixes = project.getFixes();
+ List<ProjectFix> unsatisfiedFixes = new ArrayList<ProjectFix>();
+ project.setUnsatisfiedFixes(unsatisfiedFixes);
+ for (ProjectFix fix:fixes) {
+ if (!canFix(project, fix)) {
+ unsatisfiedFixes.add(fix);
+ }
+ }
+ }
+ if (project.getUnsatisfiedFixes().size() > 0) {
+ notesPageBook.showPage(noteComposite);
+ noteComposite.setVisible(true);
+ noteEmptyComposite.setVisible(false);
+ } else {
+ notesPageBook.showPage(noteEmptyComposite);
+ noteComposite.setVisible(false);
+ noteEmptyComposite.setVisible(true);
+ }
+
+ } else {
+ canFinish=false;
+ break;
+ }
+ }
+ return canFinish;
+ }
}
Modified: workspace/examples/project-examples-3.1.xml
===================================================================
--- workspace/examples/project-examples-3.1.xml 2010-02-09 23:52:03 UTC (rev 20210)
+++ workspace/examples/project-examples-3.1.xml 2010-02-10 01:17:46 UTC (rev 20211)
@@ -129,21 +129,18 @@
<fixes>
<fix type="wtpruntime">
<property name="allowed-types">org.jboss.ide.eclipse.as.runtime.eap.50</property>
- <property name="short-description">Missing WTP Runtime</property>
<property name="eclipse-projects">booking22,booking22-ejb,booking22-ear</property>
<property name="description">This project example requires the JBoss EAP 5.0</property>
</fix>
<fix type="seam">
<property name="allowed-versions">2.2.0</property>
- <property name="short-description">Missing Seam Runtime</property>
<property name="eclipse-projects">booking22</property>
<property name="description">This project example requires Seam version 2.2.0</property>
</fix>
<fix type="plugin">
<property name="id">org.testng.eclipse</property>
<property name="versions">5.8.0, 5.9.0</property>
- <property name="short-description">Missing TestNG plugin</property>
<property name="description">The TestNG plugin is required if you want to run Seam tests. You can install it using the following update site: http://beust.com/eclipse</property>
</fix>
</fixes>
14 years, 8 months
JBoss Tools SVN: r20210 - in trunk/hibernatetools: tests/org.hibernate.eclipse.console.test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2010-02-09 18:52:03 -0500 (Tue, 09 Feb 2010)
New Revision: 20210
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/.classpath
Log:
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java 2010-02-09 23:02:24 UTC (rev 20209)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java 2010-02-09 23:52:03 UTC (rev 20210)
@@ -138,6 +138,11 @@
}
revalidateProjects(root);
}
+
+ public void configurationReset(ConsoleConfiguration ccfg) {
+ // TODO Auto-generated method stub
+
+ }
});
}
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/.classpath
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/.classpath 2010-02-09 23:02:24 UTC (rev 20209)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/.classpath 2010-02-09 23:52:03 UTC (rev 20210)
@@ -17,6 +17,5 @@
<classpathentry exported="true" kind="lib" path="lib/jmock-2.5.1/jmock-legacy-2.5.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jmock-2.5.1/jmock-script-2.5.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jmock-2.5.1/objenesis-1.0.jar"/>
- <classpathentry kind="lib" path="C:/Bin/mysql-connector-java-5.0.7/mysql-connector-java-5.0.7-bin.jar" sourcepath="C:/Bin/mysql-connector-java-5.0.7/src"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
14 years, 8 months