JBoss Tools SVN: r15578 - in trunk/jsf/docs/userguide/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: chukhutsina
Date: 2009-05-28 06:51:21 -0400 (Thu, 28 May 2009)
New Revision: 15578
Modified:
trunk/jsf/docs/userguide/en/images/palette/palette_10.png
trunk/jsf/docs/userguide/en/images/palette/palette_6.png
trunk/jsf/docs/userguide/en/images/palette/palette_7.png
trunk/jsf/docs/userguide/en/modules/palette.xml
Log:
<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Sans Serif">
<p>https://jira.jboss.org/jira/browse/JBDS-707 - Visual Web Tools Reference Guide was updated with inline graphic . </p>
</body></html>
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_10.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_6.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_7.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/modules/palette.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/palette.xml 2009-05-28 10:39:16 UTC (rev 15577)
+++ trunk/jsf/docs/userguide/en/modules/palette.xml 2009-05-28 10:51:21 UTC (rev 15578)
@@ -98,14 +98,9 @@
new one, as well.</para>
<para>To open the editor, click on the <emphasis>
<property>Palette Editor</property>
- </emphasis> icon: <figure>
- <title>Palette Editor Icon</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/palette/palette_7.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ </emphasis> icon(<inlinemediaobject> <imageobject>
+ <imagedata fileref="images/palette/palette_7.png"/>
+ </imageobject></inlinemediaobject>).
</para>
<para>The window has two parts. There is a reflected grouped list of components on the
left side of the palette editor. Each group is divided into multiple groups, every
@@ -331,17 +326,12 @@
<listitem>
<para>Click <emphasis>
<property>Show/Hide</property>
- </emphasis> button, at the top right side of the JBoss Tools Palette.</para>
+ </emphasis> button(<inlinemediaobject> <imageobject>
+ <imagedata fileref="images/palette/palette_10.png"/>
+ </imageobject></inlinemediaobject>), at the top right side of the JBoss Tools Palette.</para>
</listitem>
</itemizedlist>
- <figure>
- <title>Show/Hide Button</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/palette/palette_10.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+
<itemizedlist>
<listitem>
<para>In the dialog Show/Hide Drawers check the groups the libraries of which
@@ -528,16 +518,10 @@
<title>Import Button</title>
<para>The same you can do with <emphasis>
<property>Import</property>
- </emphasis> button. You can see this button at the top right side of the JBoss
- Tools Palette.</para>
- <figure>
- <title>Import Button</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/palette/palette_6.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ </emphasis> button(<inlinemediaobject> <imageobject>
+ <imagedata fileref="images/palette/palette_6.png"/>
+ </imageobject></inlinemediaobject>).You can see this button at the top right side of the JBoss Tools Palette.
+ </para>
<para>By clicking on the <emphasis>
<property>Import button</property>
</emphasis> you will see the Import Tag window a similar like in the <link
15 years, 8 months
JBoss Tools SVN: r15577 - in trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test: refactoring and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-05-28 06:39:16 -0400 (Thu, 28 May 2009)
New Revision: 15577
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
Log:
System out was commented https://jira.jboss.org/jira/browse/JBIDE-4386
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-28 10:09:22 UTC (rev 15576)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-28 10:39:16 UTC (rev 15577)
@@ -146,7 +146,7 @@
assertEquals("Problem marker was found in components.xml file", 1, number);
// Duplicate component name
- System.out.println("Test - Duplicate component name");
+ //System.out.println("Test - Duplicate component name");
IFile bbcComponentFile2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/BbcComponent.2");
try{
@@ -171,7 +171,7 @@
assertEquals("Problem marker has wrong line number", 7, lineNumbers[0]);
// Stateful component does not contain @Remove method
- System.out.println("Test - Stateful component does not contain @Remove method");
+ //System.out.println("Test - Stateful component does not contain @Remove method");
IFile statefulComponentFile2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.2");
try{
@@ -194,7 +194,7 @@
assertEquals("Problem marker has wrong line number", 16, lineNumbers[0]);
// Stateful component does not contain @Destroy method
- System.out.println("Test - Stateful component does not contain @Destroy method");
+ //System.out.println("Test - Stateful component does not contain @Destroy method");
IFile statefulComponentFile3 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.3");
try{
@@ -217,7 +217,7 @@
assertEquals("Problem marker has wrong line number", 16, lineNumbers[0]);
// Stateful component has wrong scope
- System.out.println("Test - Stateful component has wrong scope");
+ //System.out.println("Test - Stateful component has wrong scope");
IFile statefulComponentFile4 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.4");
try{
@@ -240,7 +240,7 @@
assertEquals("Problem marker has wrong line number", 16, lineNumbers[0]);
// Component class name cannot be resolved to a type
- System.out.println("Test - Component class name cannot be resolved to a type");
+ //System.out.println("Test - Component class name cannot be resolved to a type");
IFile componentsFile2 = project.getFile("WebContent/WEB-INF/components.2");
@@ -264,7 +264,7 @@
assertEquals("Problem marker has wrong line number", 15, lineNumbers[0]);
// Component class does not contain setter for property
- System.out.println("Test - Component class does not contain setter for property");
+ //System.out.println("Test - Component class does not contain setter for property");
IFile componentsFile3 = project.getFile("WebContent/WEB-INF/components.3");
@@ -313,7 +313,7 @@
assertTrue("Problem marker was found in abcEntity.java", number == 0);
// Entity component has wrong scope
- System.out.println("Test - Entity component has wrong scope");
+ //System.out.println("Test - Entity component has wrong scope");
IFile abcEntityFile2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/entity/abcEntity.2");
try{
@@ -345,7 +345,7 @@
final String NEW_CONTENT_FILE_NAME6 = "src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.6";
// Duplicate @Destroy method
- System.out.println("Test - Duplicate @Destroy method");
+ //System.out.println("Test - Duplicate @Destroy method");
refreshProject(project);
@@ -358,7 +358,7 @@
TARGET_FILE_NAME, ".*\"destroyMethod2\"", 39);
// Duplicate @Create method
- System.out.println("Test - Duplicate @Create method");
+ //System.out.println("Test - Duplicate @Create method");
final String NEW_CONTENT_FILE_NAME7 = "src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.7";
@@ -368,7 +368,7 @@
TARGET_FILE_NAME, ".*(a)Create.*\"createMethod2\".*", 41);
// Duplicate @Unwrap method
- System.out.println("Test - Duplicate @Unwrap method");
+ //System.out.println("Test - Duplicate @Unwrap method");
final String NEW_CONTENT_FILE_NAME8 = "src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.8";
assertMarkerIsCreated(
@@ -386,14 +386,14 @@
refreshProject(project);
// Only JavaBeans and stateful session beans support @Destroy methods
- System.out.println("Test - Only JavaBeans and stateful session beans support @Destroy methods");
+ //System.out.println("Test - Only JavaBeans and stateful session beans support @Destroy methods");
final String NEW_CONTENT_FILE_NAME9 = "src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.9";
assertMarkerIsCreated(
TARGET_FILE_NAME,NEW_CONTENT_FILE_NAME9, ".*(a)Destroy.*\"destroyMethod\".*", 25);
// Only component class can have @Create method
- System.out.println("Test - Only component class can have @Create method");
+ //System.out.println("Test - Only component class can have @Create method");
final String NEW_CONTENT_FILE_NAME10 = "src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.10";
@@ -401,7 +401,7 @@
TARGET_FILE_NAME,NEW_CONTENT_FILE_NAME10, ".*(a)Create.*\"createMethod\".*", 25);
// Only component class can have @Unwrap method
- System.out.println("Test - Only component class can have @Unwrap method");
+ //System.out.println("Test - Only component class can have @Unwrap method");
final String NEW_CONTENT_FILE_NAME11 = "src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.11";
@@ -409,7 +409,7 @@
TARGET_FILE_NAME,NEW_CONTENT_FILE_NAME11, "Only component class can have @Unwrap method \"unwrapMethod\"", 26);
// Only component class can have @Observer method
- System.out.println("Test - Only component class can have @Observer method");
+ //System.out.println("Test - Only component class can have @Observer method");
final String NEW_CONTENT_FILE_NAME12 = "src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.12";
@@ -485,7 +485,7 @@
assertEquals("Problem marker was found in Component12.java", 0, number);
// Unknown factory name
- System.out.println("Test - Unknown factory name");
+ //System.out.println("Test - Unknown factory name");
IFile component12File2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/Component12.2");
try{
@@ -535,7 +535,7 @@
assertEquals("Problem marker was found in SelectionIndexTest.java", 0, number);
// Multiple data binder
- System.out.println("Test - Multiple data binder");
+ //System.out.println("Test - Multiple data binder");
IFile selectionTestFile2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.2");
try{
@@ -582,7 +582,7 @@
assertTrue("Problem marker has wrong line number", lineNumbers[0] == 21 || lineNumbers[0] == 24);
// Unknown @DataModel/@Out name
- System.out.println("Test - Unknown @DataModel/@Out name");
+ //System.out.println("Test - Unknown @DataModel/@Out name");
IFile selectionTestFile3 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.3");
try{
@@ -626,7 +626,7 @@
public void testContextVariablesValidator() {
modifyPreferences();
IPreferenceStore store = SeamCorePlugin.getDefault().getPreferenceStore();
- System.out.println("UNKNOWN_EL_VARIABLE_NAME value- "+store.getString(SeamPreferences.UNKNOWN_EL_VARIABLE_NAME));
+ //System.out.println("UNKNOWN_EL_VARIABLE_NAME value- "+store.getString(SeamPreferences.UNKNOWN_EL_VARIABLE_NAME));
IFile contextVariableTestFile = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/ContextVariableTest.java");
@@ -636,7 +636,7 @@
assertEquals("Problem marker was found in contextVariableTestFile.java", 0, number);
// Duplicate variable name
- System.out.println("Test - Duplicate variable name");
+ //System.out.println("Test - Duplicate variable name");
IFile contextVariableTestFile2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/ContextVariableTest.2");
try{
@@ -661,7 +661,7 @@
assertTrue("Problem marker has wrong line number", (lineNumbers[i] == 36)||(lineNumbers[i] == 41));
// Unknown variable name
- System.out.println("Test - Unknown variable name");
+ //System.out.println("Test - Unknown variable name");
IFile contextVariableTestFile3 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/ContextVariableTest.3");
try{
@@ -689,9 +689,9 @@
public void testExpressionLanguageValidator() throws CoreException {
modifyPreferences();
IPreferenceStore store = SeamCorePlugin.getDefault().getPreferenceStore();
- System.out.println("UNKNOWN_EL_VARIABLE_PROPERTY_NAME value- "+store.getString(SeamPreferences.UNKNOWN_EL_VARIABLE_PROPERTY_NAME));
- System.out.println("UNKNOWN_VARIABLE_NAME value- "+store.getString(SeamPreferences.UNKNOWN_VARIABLE_NAME));
- System.out.println("UNPAIRED_GETTER_OR_SETTER value- "+store.getString(SeamPreferences.UNPAIRED_GETTER_OR_SETTER));
+ //System.out.println("UNKNOWN_EL_VARIABLE_PROPERTY_NAME value- "+store.getString(SeamPreferences.UNKNOWN_EL_VARIABLE_PROPERTY_NAME));
+ //System.out.println("UNKNOWN_VARIABLE_NAME value- "+store.getString(SeamPreferences.UNKNOWN_VARIABLE_NAME));
+ //System.out.println("UNPAIRED_GETTER_OR_SETTER value- "+store.getString(SeamPreferences.UNPAIRED_GETTER_OR_SETTER));
IFile abcComponentXHTMLFile = project.getFile("WebContent/abcComponent.xhtml");
IFile abcComponentFile = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/AbcComponent.java");
@@ -705,7 +705,7 @@
assertEquals("Problem marker was found in AbcComponent.java", 0, number);
// Context variable cannot be resolved
- System.out.println("Test - Context variable cannot be resolved");
+ //System.out.println("Test - Context variable cannot be resolved");
IFile abcComponentXHTMLFile2 = project.getFile("WebContent/abcComponent.2");
try{
@@ -729,7 +729,7 @@
assertEquals("Problem marker has wrong line number", 22, lineNumbers[0]);
// Property cannot be resolved
- System.out.println("Test - Property cannot be resolved");
+ //System.out.println("Test - Property cannot be resolved");
IFile abcComponentXHTMLFile3 = project.getFile("WebContent/abcComponent.3");
try{
@@ -753,7 +753,7 @@
assertEquals("Problem marker has wrong line number", 22, lineNumbers[0]);
// Unpaired Getter/Setter
- System.out.println("Test - Unpaired Getter/Setter");
+ //System.out.println("Test - Unpaired Getter/Setter");
IFile abcComponentXHTMLFile4 = project.getFile("WebContent/abcComponent.4");
try{
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-28 10:09:22 UTC (rev 15576)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-28 10:39:16 UTC (rev 15577)
@@ -53,7 +53,7 @@
private ISeamProject loadSeamProject(IProject project) throws CoreException {
JobUtils.waitForIdle();
- System.out.println("Project - "+project);
+ //System.out.println("Project - "+project);
ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
assertNotNull("Seam project for " + project.getName() + " is null", seamProject);
@@ -138,7 +138,7 @@
IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
String content = null;
content = FileUtil.readStream(file.getContents());
- System.out.println("File - "+file.getName()+" offset - "+changeStructure.getOffset()+" expected - ["+changeStructure.getText()+"] actual - ["+content.substring(changeStructure.getOffset(), changeStructure.getOffset()+changeStructure.getLength())+"]");
+ //System.out.println("File - "+file.getName()+" offset - "+changeStructure.getOffset()+" expected - ["+changeStructure.getText()+"] actual - ["+content.substring(changeStructure.getOffset(), changeStructure.getOffset()+changeStructure.getLength())+"]");
assertEquals(changeStructure.getText(), content.substring(changeStructure.getOffset(), changeStructure.getOffset()+changeStructure.getLength()));
}
}
15 years, 8 months
JBoss Tools SVN: r15576 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context: java and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-05-28 06:09:22 -0400 (Thu, 28 May 2009)
New Revision: 15576
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3507
Check @GenericGenerator.strategy is class,
the class implements interface org.hibernate.id.IdentifierGenerator.
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java 2009-05-28 06:44:30 UTC (rev 15575)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java 2009-05-28 10:09:22 UTC (rev 15576)
@@ -23,5 +23,7 @@
String STRATEGY_CLASS_NOT_FOUND = "STRATEGY_CLASS_NOT_FOUND"; //$NON-NLS-1$
String STRATEGY_CANT_BE_EMPTY = "STRATEGY_CANT_BE_EMPTY"; //$NON-NLS-1$
+
+ String STRATEGY_INTERFACE = "STRATEGY_INTERFACE"; //$NON-NLS-1$
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties 2009-05-28 06:44:30 UTC (rev 15575)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties 2009-05-28 10:09:22 UTC (rev 15576)
@@ -1,4 +1,5 @@
NOT_A_FILE= Resource \"{0}\" is not a file.
CONFIG_FILE_NOT_FOUND = Configuration file named \"{0}\" could not be found.
STRATEGY_CLASS_NOT_FOUND = Strategy class \"{0}\" could not be found.
-STRATEGY_CANT_BE_EMPTY = Strategy could not be empty.
\ No newline at end of file
+STRATEGY_CANT_BE_EMPTY = Strategy could not be empty.
+STRATEGY_INTERFACE = Strategy class \"{0}\" should implement interface \"org.hibernate.id.IdentifierGenerator\".
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java 2009-05-28 06:44:30 UTC (rev 15575)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java 2009-05-28 10:09:22 UTC (rev 15576)
@@ -11,6 +11,7 @@
package org.jboss.tools.hibernate.jpt.core.internal.context.java;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import org.eclipse.jdt.core.IType;
@@ -23,17 +24,6 @@
import org.eclipse.jpt.core.utility.TextRange;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.hibernate.id.Assigned;
-import org.hibernate.id.ForeignGenerator;
-import org.hibernate.id.GUIDGenerator;
-import org.hibernate.id.IdentityGenerator;
-import org.hibernate.id.IncrementGenerator;
-import org.hibernate.id.SelectGenerator;
-import org.hibernate.id.SequenceGenerator;
-import org.hibernate.id.SequenceHiLoGenerator;
-import org.hibernate.id.SequenceIdentityGenerator;
-import org.hibernate.id.TableHiLoGenerator;
-import org.hibernate.id.UUIDHexGenerator;
import org.jboss.tools.hibernate.jpt.core.internal.context.Messages;
import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnit.LocalMessage;
@@ -51,7 +41,7 @@
private static List<String> generatorClasses = new ArrayList<String>();
//see org.hibernate.id.IdentifierGeneratorFactory.GENERATORS
- static{
+ static {
generatorClasses.add( "uuid");
generatorClasses.add( "hilo");
generatorClasses.add( "assigned");
@@ -165,38 +155,63 @@
validateStrategy(messages, reporter, astRoot);
}
+ /**
+ * Method validates GenericGenerator.strategy. Generator strategy either a predefined Hibernate
+ * strategy or a fully qualified class name.
+ *
+ * @param messages
+ * @param reporter
+ * @param astRoot
+ */
protected void validateStrategy(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot){
- if (strategy != null){
- if (strategy.trim().length() == 0){
- IMessage message = new LocalMessage(Messages.class.getName(), IMessage.HIGH_SEVERITY,
- STRATEGY_CANT_BE_EMPTY, new String[]{}, getResource());
- if (getValidationTextRange(astRoot) != null){
- message.setLineNo(getValidationTextRange(astRoot).getLineNumber());
- }
- messages.add(message);
- } else if (!generatorClasses.contains(strategy)){
+ if (strategy != null) {
+ int lineNum = getValidationTextRange(astRoot) == null ? 0 : getValidationTextRange(astRoot).getLineNumber();
+ if (strategy.trim().length() == 0) {
+ messages.add(creatErrorMessage(STRATEGY_CANT_BE_EMPTY, new String[]{}, lineNum));
+ } else if (!generatorClasses.contains(strategy)){
IType lwType = null;
try {
lwType = getJpaProject().getJavaProject().findType(strategy);
- if (lwType == null && strategy.indexOf('.') < 0
- && astRoot.getPackage() != null){
- String pack = astRoot.getPackage().getName().getFullyQualifiedName();
- if (pack != null && pack.length() > 0)
- lwType = getJpaProject().getJavaProject().findType(pack+'.'+strategy);
+ if (lwType == null || !lwType.isClass()){
+ messages.add(creatErrorMessage(STRATEGY_CLASS_NOT_FOUND, new String[]{strategy}, lineNum));
+ } else {
+ if (!isImplementsIdentifierInterface(lwType)){
+ messages.add(creatErrorMessage(STRATEGY_INTERFACE, new String[]{strategy}, lineNum));
+ }
}
} catch (JavaModelException e) {
// just ignore it!
}
- if (lwType == null){
- IMessage message = new LocalMessage(Messages.class.getName(), IMessage.HIGH_SEVERITY,
- STRATEGY_CLASS_NOT_FOUND, new String[]{strategy}, getResource());
- if (getValidationTextRange(astRoot) != null){
- message.setLineNo(getValidationTextRange(astRoot).getLineNumber());
- }
- messages.add(message);
- }
+
}
}
}
+
+ /**
+ *
+ * @param lwType
+ * @return <code>true</code> if type implements IdentifierGenerator interface.
+ * @throws JavaModelException
+ */
+ protected boolean isImplementsIdentifierInterface(IType type) throws JavaModelException{
+ if (type == null) return false;
+ String[] interfaces = type.getSuperInterfaceNames();
+ if (Arrays.binarySearch(interfaces, "org.hibernate.id.IdentifierGenerator") >= 0) {//$NON-NLS-1$
+ return true;
+ } else if (type.getSuperclassName() != null){
+ IType parentType = getJpaProject().getJavaProject().findType(type.getSuperclassName());
+ if (parentType != null){
+ return isImplementsIdentifierInterface(parentType);
+ }
+ }
+ return false;
+ }
+
+ protected IMessage creatErrorMessage(String strmessage, String[] params, int lineNum){
+ IMessage message = new LocalMessage(Messages.class.getName(), IMessage.HIGH_SEVERITY,
+ strmessage, params, getResource());
+ message.setLineNo(lineNum);
+ return message;
+ }
}
15 years, 8 months
JBoss Tools SVN: r15575 - in trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal: taglib and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-05-28 02:44:30 -0400 (Thu, 28 May 2009)
New Revision: 15575
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2808
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java 2009-05-28 04:47:10 UTC (rev 15574)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java 2009-05-28 06:44:30 UTC (rev 15575)
@@ -29,6 +29,9 @@
import org.jboss.tools.jst.web.kb.internal.taglib.AbstractTagLib;
import org.jboss.tools.jst.web.kb.internal.taglib.FaceletTag;
import org.jboss.tools.jst.web.kb.internal.taglib.FaceletTagLibrary;
+import org.jboss.tools.jst.web.kb.internal.taglib.FacesConfigAttribute;
+import org.jboss.tools.jst.web.kb.internal.taglib.FacesConfigComponent;
+import org.jboss.tools.jst.web.kb.internal.taglib.FacesConfigTagLibrary;
import org.jboss.tools.jst.web.kb.internal.taglib.TLDAttribute;
import org.jboss.tools.jst.web.kb.internal.taglib.TLDLibrary;
import org.jboss.tools.jst.web.kb.internal.taglib.TLDTag;
@@ -199,7 +202,39 @@
}
private void parseFacesConfig(XModelObject o, IPath source, IKbProject sp, LoadedDeclarations ds) {
+ FacesConfigTagLibrary library = new FacesConfigTagLibrary();
+ library.setId(o);
+ library.setURI("TODO"); //TODO what is the URI?
+ ds.getLibraries().add(library);
+
+ XModelObject componentFolder = o.getChildByPath("Components");
+ if(componentFolder == null) return;
+ XModelObject[] os = componentFolder.getChildren();
+ for (XModelObject c: os) {
+ FacesConfigComponent component = new FacesConfigComponent();
+ component.setId(c);
+ component.setName(new XMLValueInfo(c, "component-type"));
+ //TODO what else can we take for the name? only attribute 'component-type' is available
+
+ component.setComponentClass(new XMLValueInfo(c, "component-class"));
+ component.setComponentType(c.getAttributeValue("component-type"));
+ component.setDescription(new XMLValueInfo(c, "description"));
+
+ XModelObject[] as = c.getChildren();
+ for (XModelObject child: as) {
+ String entity = child.getModelEntity().getName();
+ if(entity.startsWith("JSFAttribute")) {
+ FacesConfigAttribute attr = new FacesConfigAttribute();
+
+ component.addAttribute(attr);
+ } else if(entity.startsWith("JSFFacet")) {
+ //TODO
+ }
+ }
+ library.addComponent(component);
+ }
+
}
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2009-05-28 04:47:10 UTC (rev 15574)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2009-05-28 06:44:30 UTC (rev 15575)
@@ -351,6 +351,8 @@
AbstractAttribute c = null;
if(KbXMLStoreConstants.CLS_TLD_LIBRARY.equals(cls)) {
c = new TLDAttribute();
+ } else if(KbXMLStoreConstants.CLS_FACESCONFIG_LIBRARY.equals(cls)) {
+ c = new FacesConfigAttribute();
} else {
//consider other cases;
}
Added: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java 2009-05-28 06:44:30 UTC (rev 15575)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.kb.internal.taglib;
+
+import java.util.Properties;
+
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.project.ext.store.XMLStoreConstants;
+import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
+import org.jboss.tools.jst.web.model.project.ext.store.XMLValueInfo;
+import org.w3c.dom.Element;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class FacesConfigAttribute extends AbstractAttribute {
+
+ public String getXMLClass() {
+ return KbXMLStoreConstants.CLS_FACESCONFIG_LIBRARY;
+ }
+
+ @Override
+ protected void loadAttributesInfo(Element element, Properties context) {
+ if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId()) {
+ XModelObject a = (XModelObject)getId();
+ attributesInfo.put(XMLStoreConstants.ATTR_NAME, new XMLValueInfo(a, "attribute-name"));
+ //TODO how to define required?
+ attributesInfo.put(AbstractComponent.DESCRIPTION, new XMLValueInfo(a, AbstractComponent.DESCRIPTION));
+// attributesInfo.put(REQUIRED, new XMLValueInfo(a, REQUIRED));
+ } else {
+ super.loadAttributesInfo(element, context);
+ }
+ }
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 8 months
JBoss Tools SVN: r15574 - in trunk: common/plugins/org.jboss.tools.common.meta.ui/.settings and 14 other directories.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-05-28 00:47:10 -0400 (Thu, 28 May 2009)
New Revision: 15574
Added:
trunk/common/plugins/org.jboss.tools.common.meta.ui/.settings/
trunk/common/plugins/org.jboss.tools.common.meta.ui/.settings/org.eclipse.jdt.core.prefs
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/Messages.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/messages.properties
trunk/common/plugins/org.jboss.tools.common.model.ui/.settings/org.eclipse.jdt.core.prefs
trunk/common/plugins/org.jboss.tools.common.model/.settings/
trunk/common/plugins/org.jboss.tools.common.model/.settings/org.eclipse.jdt.core.prefs
Modified:
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/MetaCompoundEditor.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/EditorListAdapter.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/HandlerListAdapter.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/ImplementationListAdapter.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/PropertiesStringFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateHelpKeysHandler.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateKeysGloballyHandler.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MappingHelper.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeDataImpl.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeEditorImpl.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementImpl.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementOrderedImpl.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaEntityDataImpl.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaIconTypeImpl.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaLoaderUtil.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ActionListFormLayoutData.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/AttributeFormLayoutData.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/EntityFormLayoutData.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ExtensionFormLayoutData.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/GroupFormLayoutData.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/IconFormLayoutData.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MappingFormLayoutData.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MetaConstants.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchPage.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchQuery.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResult.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResultPage.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XAttributeDataImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XEntityDataImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CssReferencesComposite.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ElVariablesComposite.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalize English strings
Added: trunk/common/plugins/org.jboss.tools.common.meta.ui/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/.settings/org.eclipse.jdt.core.prefs 2009-05-28 04:47:10 UTC (rev 15574)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Added: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/Messages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/Messages.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/Messages.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -0,0 +1,54 @@
+package org.jboss.tools.common.meta.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.common.meta.ui.messages"; //$NON-NLS-1$
+ public static String ActionListFormLayoutData_Action;
+ public static String ActionListFormLayoutData_ActionList;
+ public static String ActionListFormLayoutData_Advanced;
+ public static String ActionListFormLayoutData_EntityData;
+ public static String ActionListFormLayoutData_Items;
+ public static String AttributeFormLayoutData_Advanced;
+ public static String AttributeFormLayoutData_Attribute;
+ public static String AttributeFormLayoutData_AttributeReference;
+ public static String AttributeFormLayoutData_AttributesFolder;
+ public static String AttributeFormLayoutData_AttributesList;
+ public static String AttributeFormLayoutData_Constraint;
+ public static String AttributeFormLayoutData_ConstraintDefinitions;
+ public static String AttributeFormLayoutData_Editor;
+ public static String AttributeFormLayoutData_Items;
+ public static String EntityFormLayoutData_Advanced;
+ public static String EntityFormLayoutData_AttributesFolder;
+ public static String EntityFormLayoutData_ChildrenFolder;
+ public static String EntityFormLayoutData_ChildrenList;
+ public static String EntityFormLayoutData_Entity;
+ public static String ExtensionFormLayoutData_ActionList;
+ public static String ExtensionFormLayoutData_EntityExtension;
+ public static String GroupFormLayoutData_Entities;
+ public static String GroupFormLayoutData_Extensions;
+ public static String GroupFormLayoutData_MetaGroup;
+ public static String IconFormLayoutData_IconGroup;
+ public static String IconFormLayoutData_Icons;
+ public static String IconFormLayoutData_IconsDefinitions;
+ public static String IconFormLayoutData_Subgroups;
+ public static String MappingFormLayoutData_Items;
+ public static String MappingFormLayoutData_MappingDefinitions;
+ public static String MappingFormLayoutData_MappingsFolder;
+ public static String MappingFormLayoutData_MappingsList;
+ public static String MetaCompoundEditor_PageTitle;
+ public static String MetaSearchQuery_Label;
+ public static String MetaSearchResult_Label;
+ public static String MetaSearchResult_MetaSearchTextToFindNMatches;
+ public static String MetaSearchResult_Tooltip;
+ public static String MetaSearchResultPage_Label;
+ public static String MetaSearchResultPage_MetaAttributeLabel;
+ public static String MetaSearchResultPage_TextToFindNMatches;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/MetaCompoundEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/MetaCompoundEditor.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/MetaCompoundEditor.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -21,7 +21,7 @@
protected void doCreatePages() {
if(isAppropriateNature()) {
treeFormPage = createTreeFormPage();
- treeFormPage.setTitle("Meta Editor");
+ treeFormPage.setTitle(Messages.MetaCompoundEditor_PageTitle);
treeFormPage.initialize(object);
addFormPage(treeFormPage);
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/EditorListAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/EditorListAdapter.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/EditorListAdapter.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -36,7 +36,7 @@
protected void loadTags() {
MappingHelper h = MappingHelper.getMappingHelper(model);
- tags = h.getList("AttributeEditor");
+ tags = h.getList("AttributeEditor"); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/HandlerListAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/HandlerListAdapter.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/HandlerListAdapter.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -38,9 +38,9 @@
protected void loadTags() {
MappingHelper h = MappingHelper.getMappingHelper(model);
- tags = h.getList("Handlers");
+ tags = h.getList("Handlers"); //$NON-NLS-1$
for (int i = 0; i < tags.length; i++) {
- tags[i] = "%" + tags[i] + "%";
+ tags[i] = "%" + tags[i] + "%"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/ImplementationListAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/ImplementationListAdapter.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/ImplementationListAdapter.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -38,9 +38,9 @@
protected void loadTags() {
MappingHelper h = MappingHelper.getMappingHelper(model);
- tags = h.getList("Implementations");
+ tags = h.getList("Implementations"); //$NON-NLS-1$
for (int i = 0; i < tags.length; i++) {
- tags[i] = "%" + tags[i] + "%";
+ tags[i] = "%" + tags[i] + "%"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/PropertiesStringFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/PropertiesStringFieldEditor.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/PropertiesStringFieldEditor.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -48,7 +48,7 @@
public PropertiesStringFieldEditor(IWidgetSettings settings) {
super(settings);
- object = PreferenceModelUtilities.getPreferenceModel().createModelObject("FilePROPERTIES", null);
+ object = PreferenceModelUtilities.getPreferenceModel().createModelObject("FilePROPERTIES", null); //$NON-NLS-1$
table = new XChildrenEditorImpl();
table.setObject(object);
}
@@ -93,15 +93,15 @@
for (int i = 0; i < cs.length; i++) {
cs[i].removeFromParent();
}
- StringTokenizer st = new StringTokenizer(value, ",;");
+ StringTokenizer st = new StringTokenizer(value, ",;"); //$NON-NLS-1$
while(st.hasMoreTokens()) {
String t = st.nextToken();
int h = t.indexOf('=');
String n = (h < 0) ? t : t.substring(0, h);
String v = t.substring(h + 1);
- XModelObject p = object.getModel().createModelObject("Property", null);
- p.setAttributeValue("name", n);
- p.setAttributeValue("value", v);
+ XModelObject p = object.getModel().createModelObject("Property", null); //$NON-NLS-1$
+ p.setAttributeValue("name", n); //$NON-NLS-1$
+ p.setAttributeValue("value", v); //$NON-NLS-1$
object.addChild(p);
}
table.update();
@@ -164,7 +164,7 @@
return new Helper();
}
protected String getAddActionPath() {
- return "CreateActions.CreateProperty";
+ return "CreateActions.CreateProperty"; //$NON-NLS-1$
}
public void action(String command) {
super.action(command);
@@ -180,8 +180,8 @@
StringBuffer sb = new StringBuffer();
XModelObject[] os = object.getChildren();
for (int i = 0; i < os.length; i++) {
- String n = os[i].getAttributeValue("name");
- String v = os[i].getAttributeValue("value");
+ String n = os[i].getAttributeValue("name"); //$NON-NLS-1$
+ String v = os[i].getAttributeValue("value"); //$NON-NLS-1$
if(n.length() == 0 && v.length() == 0) continue;
if(sb.length() > 0) sb.append(';');
sb.append(n).append('=').append(v);
@@ -190,7 +190,7 @@
}
class Helper extends AbstractTableHelper {
- String[] HEADER = new String[]{"name", "value"};
+ String[] HEADER = new String[]{"name", "value"}; //$NON-NLS-1$ //$NON-NLS-2$
public String[] getHeader() {
return HEADER;
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateHelpKeysHandler.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateHelpKeysHandler.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateHelpKeysHandler.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -24,19 +24,19 @@
}
public void executeHandler(XModelObject object, Properties p) throws XModelException {
- defpath = action.getProperty("default");
+ defpath = action.getProperty("default"); //$NON-NLS-1$
XModelObject q = findOrCreateProperties(object);
- XModelObject[] fs = object.getChildren("FileMETA");
+ XModelObject[] fs = object.getChildren("FileMETA"); //$NON-NLS-1$
for (int i = 0; i < fs.length; i++) processFile(fs[i], q);
q.setModified(true);
}
private XModelObject findOrCreateProperties(XModelObject p) {
- XModelObject q = p.getChildByPath("keys.properties");
+ XModelObject q = p.getChildByPath("keys.properties"); //$NON-NLS-1$
if(q == null) {
- q = p.getModel().createModelObject("FilePROPERTIES", new Properties());
- q.setAttributeValue("name", "keys");
- q.setAttributeValue("extension", "properties");
+ q = p.getModel().createModelObject("FilePROPERTIES", new Properties()); //$NON-NLS-1$
+ q.setAttributeValue("name", "keys"); //$NON-NLS-1$ //$NON-NLS-2$
+ q.setAttributeValue("extension", "properties"); //$NON-NLS-1$ //$NON-NLS-2$
p.addChild(q);
}
return q;
@@ -44,21 +44,21 @@
private void validateProperty(XModelObject q, String name, String value) {
if(q.getChildByPath(name) != null) return;
- XModelObject v = q.getModel().createModelObject("Property", new Properties());
- v.setAttributeValue("name", name);
- if(value != null) v.setAttributeValue("value", value);
+ XModelObject v = q.getModel().createModelObject("Property", new Properties()); //$NON-NLS-1$
+ v.setAttributeValue("name", name); //$NON-NLS-1$
+ if(value != null) v.setAttributeValue("value", value); //$NON-NLS-1$
q.addChild(v);
}
private void processFile(XModelObject f, XModelObject q) {
- XModelObject[] es = f.getChildren("MetaEntity");
+ XModelObject[] es = f.getChildren("MetaEntity"); //$NON-NLS-1$
for (int i = 0; i < es.length; i++) processEntity(es[i], q);
- es = f.getChildren("MetaEntityExtension");
+ es = f.getChildren("MetaEntityExtension"); //$NON-NLS-1$
for (int i = 0; i < es.length; i++) processEntityExtension(es[i], q);
}
private void processEntity(XModelObject e, XModelObject q) {
- boolean impl = (e.getAttributeValue("implementation").length() > 0);
+ boolean impl = (e.getAttributeValue("implementation").length() > 0); //$NON-NLS-1$
if(impl) {
// validateProperty(q, e.getAttributeValue("name"), defpath);
}
@@ -71,7 +71,7 @@
private void processActions(XModelObject e, XModelObject q, boolean impl) {
XModelObject[] as = collectActions(e);
- String pref = e.getAttributeValue("name") + "_";
+ String pref = e.getAttributeValue("name") + "_"; //$NON-NLS-1$ //$NON-NLS-2$
for (int i = 0; i < as.length; i++) processAction(pref, as[i], q);
if(impl) {
// validateProperty(q, pref + "Properties", defpath);
@@ -85,82 +85,82 @@
}
private void collectActions(XModelObject e, ArrayList l) {
- XModelObject[] as = e.getChildren("MetaActionList");
+ XModelObject[] as = e.getChildren("MetaActionList"); //$NON-NLS-1$
for (int i = 0; i < as.length; i++) collectActions(as[i], l);
- as = e.getChildren("MetaAction");
+ as = e.getChildren("MetaAction"); //$NON-NLS-1$
for (int i = 0; i < as.length; i++) l.add(as[i]);
}
private void processAction(String pref, XModelObject a, XModelObject q) {
- String n = a.getAttributeValue("name");
- String dn = a.getAttributeValue("display name");
- if(dn.endsWith("...")) dn = dn.substring(0, dn.length() - 3);
- if(n.startsWith("Add") || n.startsWith("Create")) {
+ String n = a.getAttributeValue("name"); //$NON-NLS-1$
+ String dn = a.getAttributeValue("display name"); //$NON-NLS-1$
+ if(dn.endsWith("...")) dn = dn.substring(0, dn.length() - 3); //$NON-NLS-1$
+ if(n.startsWith("Add") || n.startsWith("Create")) { //$NON-NLS-1$ //$NON-NLS-2$
Properties p = getProperties(a);
- String key = p.getProperty("key");
+ String key = p.getProperty("key"); //$NON-NLS-1$
if(key == null) {
key = pref + n;
}
String wt = dn;
- if(!wt.startsWith("Add") && !wt.startsWith("New")) {
- wt = "Add " + wt;
+ if(!wt.startsWith("Add") && !wt.startsWith("New")) { //$NON-NLS-1$ //$NON-NLS-2$
+ wt = "Add " + wt; //$NON-NLS-1$
}
- validateProperty(q, key + ".WindowTitle", wt);
+ validateProperty(q, key + ".WindowTitle", wt); //$NON-NLS-1$
String on = getObjectName(a);
if(on == null) on = dn;
- validateProperty(q, key + ".Title", on);
- } else if(n.equals("Properties")) {
+ validateProperty(q, key + ".Title", on); //$NON-NLS-1$
+ } else if(n.equals("Properties")) { //$NON-NLS-1$
String key = pref + n;
// validateProperty(q, key + ".WindowTitle", "Properties");
XModelObject b = a;
- while(b != null && b.getModelEntity().getName().toLowerCase().indexOf("entity") < 0) {
+ while(b != null && b.getModelEntity().getName().toLowerCase().indexOf("entity") < 0) { //$NON-NLS-1$
b = b.getParent();
}
String on = (b == null) ? dn : getObjectName2(b);
if(on == null) on = dn;
- validateProperty(q, key + ".Title", on);
- } else if(a.getAttributeValue("wizard").length() > 0) {
+ validateProperty(q, key + ".Title", on); //$NON-NLS-1$
+ } else if(a.getAttributeValue("wizard").length() > 0) { //$NON-NLS-1$
Properties p = getProperties(a);
- String key = p.getProperty("key");
+ String key = p.getProperty("key"); //$NON-NLS-1$
if(key == null) {
key = pref + n;
}
// validateProperty(q, key, defpath);
- validateProperty(q, key + ".WindowTitle", dn);
- validateProperty(q, key + ".Title", "");
- validateProperty(q, key + ".Message", "");
- } else if(isSpecialWizard(a.getAttributeValue("handler"))) {
+ validateProperty(q, key + ".WindowTitle", dn); //$NON-NLS-1$
+ validateProperty(q, key + ".Title", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ validateProperty(q, key + ".Message", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ } else if(isSpecialWizard(a.getAttributeValue("handler"))) { //$NON-NLS-1$
int m = a.getChildren().length;
for (int i = 0; i < m; i++) {
- String key = pref + n + "_" + i;
+ String key = pref + n + "_" + i; //$NON-NLS-1$
// validateProperty(q, key, defpath);
- validateProperty(q, key + ".WindowTitle", dn);
- validateProperty(q, key + ".Title", "");
- validateProperty(q, key + ".Message", "");
+ validateProperty(q, key + ".WindowTitle", dn); //$NON-NLS-1$
+ validateProperty(q, key + ".Title", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ validateProperty(q, key + ".Message", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
- } else if(n.indexOf("Edit") >= 0) {
+ } else if(n.indexOf("Edit") >= 0) { //$NON-NLS-1$
String key = pref + n;
// validateProperty(q, key, defpath);
- validateProperty(q, key + ".WindowTitle", dn);
- validateProperty(q, key + ".Title", "");
- validateProperty(q, key + ".Message", "");
+ validateProperty(q, key + ".WindowTitle", dn); //$NON-NLS-1$
+ validateProperty(q, key + ".Title", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ validateProperty(q, key + ".Message", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
}
private boolean isSpecialWizard(String s) {
- return s.equals("org.jboss.tools.common.meta.action.impl.handlers.DefaultSpecialHandler")
- || s.equals("%SpecialWizard%");
+ return s.equals("org.jboss.tools.common.meta.action.impl.handlers.DefaultSpecialHandler") //$NON-NLS-1$
+ || s.equals("%SpecialWizard%"); //$NON-NLS-1$
}
private String getObjectName(XModelObject a) {
XModelObject[] cs = a.getChildren();
if(cs == null || cs.length == 0) return null;
- String n = cs[0].getAttributeValue("entity name");
+ String n = cs[0].getAttributeValue("entity name"); //$NON-NLS-1$
return getObjectName(n);
}
private String getObjectName2(XModelObject a) {
- return getObjectName(a.getAttributeValue("name"));
+ return getObjectName(a.getAttributeValue("name")); //$NON-NLS-1$
}
private String getObjectName(String n) {
@@ -179,9 +179,9 @@
private Properties getProperties(XModelObject a) {
Properties p = new Properties();
- String ps = a.getAttributeValue("properties");
+ String ps = a.getAttributeValue("properties"); //$NON-NLS-1$
if(ps == null || ps.length() == 0) return p;
- StringTokenizer st = new StringTokenizer(ps, ";");
+ StringTokenizer st = new StringTokenizer(ps, ";"); //$NON-NLS-1$
while(st.hasMoreTokens()) {
String t = st.nextToken();
int i = t.indexOf('=');
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateKeysGloballyHandler.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateKeysGloballyHandler.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateKeysGloballyHandler.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -19,7 +19,7 @@
public class GenerateKeysGloballyHandler extends AbstractHandler {
//TODO ask in wizard
- String root = "C:/Documents and Settings/glory/RedHat-3.4";
+ String root = "C:/Documents and Settings/glory/RedHat-3.4"; //$NON-NLS-1$
public GenerateKeysGloballyHandler() {}
@@ -34,11 +34,11 @@
Set<String> allKeys = new HashSet<String>();
for (int i = 0; i < plugins.length; i++) {
if(!plugins[i].isDirectory()) continue;
- File pxml = new File(plugins[i], "plugin.xml");
+ File pxml = new File(plugins[i], "plugin.xml"); //$NON-NLS-1$
if(!pxml.isFile()) continue;
- File meta = new File(plugins[i], "resources/meta");
+ File meta = new File(plugins[i], "resources/meta"); //$NON-NLS-1$
if(!meta.isDirectory()) continue;
- File helpFolder = new File(plugins[i], "resources/help");
+ File helpFolder = new File(plugins[i], "resources/help"); //$NON-NLS-1$
if(!helpFolder.isDirectory()) {
//TODO create folder
@@ -51,18 +51,18 @@
PluginData pluginData = new PluginData();
pluginData.rootFolder = plugins[i];
pluginData.rootObject = parent;
- pluginData.metaFolder = parent.getChildByPath("resources/meta");
+ pluginData.metaFolder = parent.getChildByPath("resources/meta"); //$NON-NLS-1$
relevantPlugins.add(pluginData);
XModelObject[] cs = parent.getChildren();
if(!helpFolder.isDirectory()) {
- System.out.println("No help folder");
+ System.out.println("No help folder"); //$NON-NLS-1$
}
- XModelObject helpFolderObject = parent.getChildByPath("resources/help");
+ XModelObject helpFolderObject = parent.getChildByPath("resources/help"); //$NON-NLS-1$
if(helpFolderObject != null) {
- XModelObject[] hf = helpFolderObject.getChildren("FilePROPERTIES");
+ XModelObject[] hf = helpFolderObject.getChildren("FilePROPERTIES"); //$NON-NLS-1$
for (int j = 0; j < hf.length; j++) {
XModelObject[] ps = hf[j].getChildren();
- for (int k = 0; k < ps.length; k++) allKeys.add(ps[k].getAttributeValue("name"));
+ for (int k = 0; k < ps.length; k++) allKeys.add(ps[k].getAttributeValue("name")); //$NON-NLS-1$
}
}
}
@@ -70,7 +70,7 @@
}
- System.out.println("Total keys count = " + allKeys.size());
+ System.out.println("Total keys count = " + allKeys.size()); //$NON-NLS-1$
generateAttributeNameKeys(allKeys, relevantPlugins);
@@ -79,29 +79,29 @@
private void generateAttributeNameKeys(Set<String> allKeys, List<PluginData> relevantPlugins) throws XModelException {
for (PluginData d: relevantPlugins) {
- XModelObject[] ms = d.metaFolder.getChildren("FileMETA");
+ XModelObject[] ms = d.metaFolder.getChildren("FileMETA"); //$NON-NLS-1$
for (int i = 0; i < ms.length; i++) {
- XModelObject version = ms[i].getChildByPath("Version");
- String module = version.getAttributeValue("module");
+ XModelObject version = ms[i].getChildByPath("Version"); //$NON-NLS-1$
+ String module = version.getAttributeValue("module"); //$NON-NLS-1$
- String attrKeysFileName = "keys-" + module.toLowerCase() + "-attrs";
+ String attrKeysFileName = "keys-" + module.toLowerCase() + "-attrs"; //$NON-NLS-1$ //$NON-NLS-2$
XModelObject attrKeys = findOrCreatePropertiesFile(d.rootObject, attrKeysFileName);
if(attrKeys == null) {
continue;
}
- XModelObject[] es = ms[i].getChildren("MetaEntity");
+ XModelObject[] es = ms[i].getChildren("MetaEntity"); //$NON-NLS-1$
for (int j = 0; j < es.length; j++) {
- XModelObject[] as = es[j].getChildByPath("Attributes").getChildren();
+ XModelObject[] as = es[j].getChildByPath("Attributes").getChildren(); //$NON-NLS-1$
for (int k = 0; k < as.length; k++) {
- if(as[k].getModelEntity().getName().equals("MetaAttribute")) {
+ if(as[k].getModelEntity().getName().equals("MetaAttribute")) { //$NON-NLS-1$
addAttributeFieldDisplayName(attrKeys, module, allKeys, es[j], as[k]);
}
}
}
if(attrKeys.getChildren().length > 0) {
- System.out.println(attrKeysFileName + " " + attrKeys.getChildren().length);
+ System.out.println(attrKeysFileName + " " + attrKeys.getChildren().length); //$NON-NLS-1$
((FolderImpl)attrKeys.getParent()).saveChild(attrKeys);
}
}
@@ -109,19 +109,19 @@
}
private void addAttributeFieldDisplayName(XModelObject attrKeys, String module, Set<String> allKeys, XModelObject ent, XModelObject attr) throws XModelException {
- String name = attr.getAttributeValue("name");
- String key_att_1 = ent.getAttributeValue("name") + "_" + name.replace(' ', '_');
+ String name = attr.getAttributeValue("name"); //$NON-NLS-1$
+ String key_att_1 = ent.getAttributeValue("name") + "_" + name.replace(' ', '_'); //$NON-NLS-1$ //$NON-NLS-2$
if(allKeys.contains(key_att_1)) {
// System.out.println("--->" + key_att_1);
return;
}
- key_att_1 = ent.getAttributeValue("name") + "." + name.replace(' ', '_');
+ key_att_1 = ent.getAttributeValue("name") + "." + name.replace(' ', '_'); //$NON-NLS-1$ //$NON-NLS-2$
if(allKeys.contains(key_att_1)) {
// System.out.println("--->" + key_att_1);
return;
}
- String key_att_2 = module + "." + name.replace(' ', '_').replace(':', '_');
- boolean invisible = "false".equals(attr.getAttributeValue("visibility"));
+ String key_att_2 = module + "." + name.replace(' ', '_').replace(':', '_'); //$NON-NLS-1$
+ boolean invisible = "false".equals(attr.getAttributeValue("visibility")); //$NON-NLS-1$ //$NON-NLS-2$
if(attrKeys.getChildByPath(key_att_2) != null) {
if(invisible) {
// DefaultRemoveHandler.removeFromParent(attrKeys.getChildByPath(key_att_2));
@@ -129,68 +129,68 @@
return;
}
if(invisible) return;
- XModelObject po = attrKeys.getModel().createModelObject("Property", new Properties());
- po.setAttributeValue("name", key_att_2);
- po.setAttributeValue("value", WizardKeys.toDisplayName(name));
+ XModelObject po = attrKeys.getModel().createModelObject("Property", new Properties()); //$NON-NLS-1$
+ po.setAttributeValue("name", key_att_2); //$NON-NLS-1$
+ po.setAttributeValue("value", WizardKeys.toDisplayName(name)); //$NON-NLS-1$
DefaultCreateHandler.addCreatedObject(attrKeys, po, 2);
}
private void generateMenuNameKeys(Set<String> allKeys, List<PluginData> relevantPlugins) throws XModelException {
Set<String> mk = new HashSet<String>(); //Temp
for (PluginData d: relevantPlugins) {
- XModelObject[] ms = d.metaFolder.getChildren("FileMETA");
+ XModelObject[] ms = d.metaFolder.getChildren("FileMETA"); //$NON-NLS-1$
for (int i = 0; i < ms.length; i++) {
- XModelObject version = ms[i].getChildByPath("Version");
- String module = version.getAttributeValue("module");
+ XModelObject version = ms[i].getChildByPath("Version"); //$NON-NLS-1$
+ String module = version.getAttributeValue("module"); //$NON-NLS-1$
- String menuKeysFileName = "keys-" + module.toLowerCase() + "-menu";
+ String menuKeysFileName = "keys-" + module.toLowerCase() + "-menu"; //$NON-NLS-1$ //$NON-NLS-2$
XModelObject menuKeys = findOrCreatePropertiesFile(d.rootObject, menuKeysFileName);
if(menuKeys == null) {
continue;
}
- XModelObject[] es = ms[i].getChildren("MetaEntity");
+ XModelObject[] es = ms[i].getChildren("MetaEntity"); //$NON-NLS-1$
for (int j = 0; j < es.length; j++) {
- XModelObject list = es[j].getChildByPath("ActionList");
+ XModelObject list = es[j].getChildByPath("ActionList"); //$NON-NLS-1$
if(list != null) {
generateMenuNameKeys(allKeys, menuKeys, list, mk);
}
}
if(menuKeys.getChildren().length > 0) {
- System.out.println(menuKeysFileName + " " + menuKeys.getChildren().length);
+ System.out.println(menuKeysFileName + " " + menuKeys.getChildren().length); //$NON-NLS-1$
((FolderImpl)menuKeys.getParent()).saveChild(menuKeys);
}
}
}
- System.out.println("action menu names " + mk.size());
+ System.out.println("action menu names " + mk.size()); //$NON-NLS-1$
for (String s: mk) System.out.println(s);
}
private void generateMenuNameKeys(Set<String> allKeys, XModelObject menuKeys, XModelObject list, Set<String> mk) throws XModelException {
- String n = list.getAttributeValue("name");
- String g = list.getAttributeValue("group");
- if("1".equals(g)) {
+ String n = list.getAttributeValue("name"); //$NON-NLS-1$
+ String g = list.getAttributeValue("group"); //$NON-NLS-1$
+ if("1".equals(g)) { //$NON-NLS-1$
mk.add(n);
}
XModelObject[] cs = list.getChildren();
for (int i = 0; i < cs.length; i++) {
String entity = cs[i].getModelEntity().getName();
- if("MetaActionList".equals(entity)) {
+ if("MetaActionList".equals(entity)) { //$NON-NLS-1$
generateMenuNameKeys(allKeys, menuKeys, cs[i], mk);
} else {
- String na = cs[i].getAttributeValue("name");
+ String na = cs[i].getAttributeValue("name"); //$NON-NLS-1$
mk.add(na);
}
}
}
private XModelObject findOrCreatePropertiesFile(XModelObject root, String name) {
- XModelObject parent = root.getChildByPath("resources/help");
+ XModelObject parent = root.getChildByPath("resources/help"); //$NON-NLS-1$
if(parent == null) return null;
- XModelObject o = parent.getChildByPath(name + ".properties");
+ XModelObject o = parent.getChildByPath(name + ".properties"); //$NON-NLS-1$
if(o == null) {
- o = parent.getModel().createModelObject("FilePROPERTIES", new Properties());
- o.setAttributeValue("name", name);
+ o = parent.getModel().createModelObject("FilePROPERTIES", new Properties()); //$NON-NLS-1$
+ o.setAttributeValue("name", name); //$NON-NLS-1$
parent.addChild(o);
parent.setModified(true);
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MappingHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MappingHelper.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MappingHelper.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -18,7 +18,7 @@
public class MappingHelper {
public static MappingHelper getMappingHelper(XModel model) {
- MappingHelper h = (MappingHelper)model.getManager("MappingHelper");
+ MappingHelper h = (MappingHelper)model.getManager("MappingHelper"); //$NON-NLS-1$
if(h == null) {
h = new MappingHelper();
h.setModel(model);
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeDataImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeDataImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeDataImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -16,7 +16,7 @@
public MetaAttributeDataImpl() {}
public String name() {
- return (String)properties.get("AttributeName");
+ return (String)properties.get("AttributeName"); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeEditorImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeEditorImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeEditorImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -16,7 +16,7 @@
public MetaAttributeEditorImpl() {}
public String getPathPart() {
- return "Editor";
+ return "Editor"; //$NON-NLS-1$
}
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -18,7 +18,7 @@
public MetaElementImpl() {}
public String name() {
- return (String)properties.get("name");
+ return (String)properties.get("name"); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementOrderedImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementOrderedImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementOrderedImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -18,7 +18,7 @@
public MetaElementOrderedImpl() {}
public String name() {
- return (String)properties.get("name");
+ return (String)properties.get("name"); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaEntityDataImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaEntityDataImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaEntityDataImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -16,7 +16,7 @@
public MetaEntityDataImpl() {}
public String name() {
- return (String)properties.get("EntityName");
+ return (String)properties.get("EntityName"); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaIconTypeImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaIconTypeImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaIconTypeImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -16,6 +16,6 @@
public MetaIconTypeImpl() {}
public String name() {
- return (String)properties.get("type");
+ return (String)properties.get("type"); //$NON-NLS-1$
}
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaLoaderUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaLoaderUtil.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaLoaderUtil.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -20,7 +20,7 @@
public MetaLoaderUtil() {
Hashtable _singular = new Hashtable();
- _singular.put("kind", "kind");
+ _singular.put("kind", "kind"); //$NON-NLS-1$ //$NON-NLS-2$
setup(_singular, false);
}
@@ -100,9 +100,9 @@
private static String calculateEntity(Element element, String def) {
String entity = getModelEntityAttribute(element);
if(entity != null) return entity;
- if(def.equals("MetaActionList")) {
- String k = element.getAttribute("kind");
- if("action".equals(k)) return "MetaAction";
+ if(def.equals("MetaActionList")) { //$NON-NLS-1$
+ String k = element.getAttribute("kind"); //$NON-NLS-1$
+ if("action".equals(k)) return "MetaAction"; //$NON-NLS-1$ //$NON-NLS-2$
}
return def;
}
@@ -114,8 +114,8 @@
boolean needToSave(XModelObject o) {
if(o == null) return false;
String entity = o.getModelEntity().getName();
- if("MetaAttributeConstraint".equals(entity)
- || "MetaAttributeEditor".equals(entity)) {
+ if("MetaAttributeConstraint".equals(entity) //$NON-NLS-1$
+ || "MetaAttributeEditor".equals(entity)) { //$NON-NLS-1$
return (hasSetAttributes(o)
|| o.getChildren().length > 0
);
@@ -128,11 +128,11 @@
for (int i = 0; i < as.length; i++) {
String xml = as[i].getXMLName();
// it would be more safe to check isSavable
- if(xml == null || xml.length() == 0 || "NAME".equals(xml)) continue;
+ if(xml == null || xml.length() == 0 || "NAME".equals(xml)) continue; //$NON-NLS-1$
String v = o.getAttributeValue(as[i].getName());
if(v != null && v.length() > 0 && !v.equals(as[i].getDefaultValue())) return true;
}
- String finalComment = o.get("#final-comment");
+ String finalComment = o.get("#final-comment"); //$NON-NLS-1$
if(finalComment != null && finalComment.length() > 0) return true;
return false;
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ActionListFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ActionListFormLayoutData.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ActionListFormLayoutData.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.form;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
import org.jboss.tools.common.model.ui.forms.FormData;
import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
@@ -19,16 +20,16 @@
private final static IFormData[] ACTION_LIST_DEFINITIONS = new IFormData[] {
new FormData(
- "Action List",
- "", //"Description
+ Messages.ActionListFormLayoutData_ActionList,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ACTION_LIST_ENTITY)
),
new FormData(
- "Items",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("element type", 30)},
+ Messages.ActionListFormLayoutData_Items,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("element type", 30)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{ACTION_LIST_ENTITY, ACTION_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddItem")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddItem") //$NON-NLS-1$
)
};
@@ -38,20 +39,20 @@
private final static IFormData[] ACTION_DEFINITIONS = new IFormData[] {
new FormData(
- "Action",
- "", //"Description
+ Messages.ActionListFormLayoutData_Action,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ACTION_ENTITY)
),
new FormData(
- "Items",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("entity name", 70), new FormAttributeData("mandatory", 30)},
+ Messages.ActionListFormLayoutData_Items,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("entity name", 70), new FormAttributeData("mandatory", 30)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{ENTITY_DATA_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMetaEntityData")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMetaEntityData") //$NON-NLS-1$
),
new FormData(
- "Advanced",
- "", //"Description
+ Messages.ActionListFormLayoutData_Advanced,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createAdvancedFormAttributeData(ACTION_ENTITY)
),
};
@@ -62,16 +63,16 @@
private final static IFormData[] ENTITY_DATA_DEFINITIONS = new IFormData[] {
new FormData(
- "Entity Data",
- "", //"Description
+ Messages.ActionListFormLayoutData_EntityData,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ENTITY_DATA_ENTITY)
),
new FormData(
- "Items",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("attribute name", 70), new FormAttributeData("mandatory", 30)},
+ Messages.ActionListFormLayoutData_Items,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("attribute name", 70), new FormAttributeData("mandatory", 30)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{ATTRIBUTE_DATA_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMetaAttributeData")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMetaAttributeData") //$NON-NLS-1$
),
};
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/AttributeFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/AttributeFormLayoutData.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/AttributeFormLayoutData.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.form;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
import org.jboss.tools.common.model.ui.forms.FormData;
import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
@@ -19,53 +20,53 @@
private final static IFormData[] ATTRIBUTE_DEFINITIONS = new IFormData[] {
new FormData(
- "Attribute",
- "", //"Description
+ Messages.AttributeFormLayoutData_Attribute,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ATTRIBUTE_ENTITY)
),
new FormData(
- "Constraint",
- "", //"Description
- "Constraint",
+ Messages.AttributeFormLayoutData_Constraint,
+ "", //"Description //$NON-NLS-1$
+ "Constraint", //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ATTRIBUTE_CONSTRAINT_ENTITY)
),
new FormData(
- "Editor",
- "", //"Description
- "Editor",
+ Messages.AttributeFormLayoutData_Editor,
+ "", //"Description //$NON-NLS-1$
+ "Editor", //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ATTRIBUTE_EDITOR_ENTITY)
),
new FormData(
- "Advanced",
- "", //"Description
+ Messages.AttributeFormLayoutData_Advanced,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createAdvancedFormAttributeData(ATTRIBUTE_ENTITY)
),
};
private final static IFormData[] ATTRIBUTE_REF_DEFINITIONS = new IFormData[] {
new FormData(
- "Attribute Reference",
- "", //"Description
+ Messages.AttributeFormLayoutData_AttributeReference,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ATTRIBUTE_REF_ENTITY)
),
};
final static IFormData ATTRIBUTES_FOLDER_DEFINITION = new FormData(
- "Attributes",
- "", //"Description,
- "Attributes",
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.AttributeFormLayoutData_AttributesFolder,
+ "", //"Description, //$NON-NLS-1$
+ "Attributes", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{ATTRIBUTE_ENTITY,ATTRIBUTE_REF_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateAttribute")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateAttribute") //$NON-NLS-1$
);
final static IFormData ATTRIBUTES_LIST_DEFINITION = new FormData(
- "Attributes",
- "", //"Description,
+ Messages.AttributeFormLayoutData_AttributesList,
+ "", //"Description, //$NON-NLS-1$
ATTRIBUTES_ENTITY,
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{ATTRIBUTE_ENTITY,ATTRIBUTE_REF_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateAttribute")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateAttribute") //$NON-NLS-1$
);
final static IFormData ATTRIBUTE_DEFINITION = new FormData(
@@ -78,16 +79,16 @@
private final static IFormData[] ATTRIBUTE_CONSTRAINT_DEFINITIONS = new IFormData[] {
new FormData(
- "Constraint",
- "", //"Description
+ Messages.AttributeFormLayoutData_ConstraintDefinitions,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ATTRIBUTE_CONSTRAINT_ENTITY)
),
new FormData(
- "Items",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.AttributeFormLayoutData_Items,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{CONSTRAINT_ITEM_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateConstraintItem")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateConstraintItem") //$NON-NLS-1$
),
};
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/EntityFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/EntityFormLayoutData.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/EntityFormLayoutData.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.form;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
import org.jboss.tools.common.model.ui.forms.FormData;
import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
@@ -18,42 +19,42 @@
public class EntityFormLayoutData implements MetaConstants {
final static IFormData CHILDREN_FOLDER_DEFINITION = new FormData(
- "Children",
- "", //"Description
- "Children",
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.EntityFormLayoutData_ChildrenFolder,
+ "", //"Description //$NON-NLS-1$
+ "Children", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{CHILD_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateChild")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateChild") //$NON-NLS-1$
);
final static IFormData CHILDREN_LIST_DEFINITION = new FormData(
- "Children",
- "", //"Description
+ Messages.EntityFormLayoutData_ChildrenList,
+ "", //"Description //$NON-NLS-1$
CHILDREN_ENTITY,
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{CHILD_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateChild")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateChild") //$NON-NLS-1$
);
private final static IFormData[] ENTITY_DEFINITIONS = new IFormData[] {
new FormData(
- "Entity",
- "", //"Description
+ Messages.EntityFormLayoutData_Entity,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ENTITY_ENTITY)
),
CHILDREN_FOLDER_DEFINITION,
AttributeFormLayoutData.ATTRIBUTES_FOLDER_DEFINITION,
new FormData(
- "Action List",
- "", //"Description
- "ActionList",
- new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("element type", 30)},
+ Messages.EntityFormLayoutData_AttributesFolder,
+ "", //"Description //$NON-NLS-1$
+ "ActionList", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("element type", 30)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{ACTION_LIST_ENTITY, ACTION_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddItem")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddItem") //$NON-NLS-1$
),
new FormData(
- "Advanced",
- "", //"Description
+ Messages.EntityFormLayoutData_Advanced,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createAdvancedFormAttributeData(ENTITY_ENTITY)
)
};
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ExtensionFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ExtensionFormLayoutData.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ExtensionFormLayoutData.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.form;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
import org.jboss.tools.common.model.ui.forms.FormData;
import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
@@ -19,18 +20,18 @@
private final static IFormData[] EXTENSION_DEFINITIONS = new IFormData[] {
new FormData(
- "Entity Extension",
- "", //"Description
+ Messages.ExtensionFormLayoutData_EntityExtension,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(EXTENSION_ENTITY)
),
EntityFormLayoutData.CHILDREN_FOLDER_DEFINITION,
new FormData(
- "Action List",
- "", //"Description
- "ActionList",
- new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("element type", 30)},
+ Messages.ExtensionFormLayoutData_ActionList,
+ "", //"Description //$NON-NLS-1$
+ "ActionList", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("element type", 30)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{ACTION_LIST_ENTITY, ACTION_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddItem")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddItem") //$NON-NLS-1$
)
};
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/GroupFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/GroupFormLayoutData.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/GroupFormLayoutData.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.form;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
import org.jboss.tools.common.model.ui.forms.FormData;
import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
@@ -19,23 +20,23 @@
private final static IFormData[] GROUP_DEFINITIONS = new IFormData[] {
new FormData(
- "Meta Group",
- "", //"Description
+ Messages.GroupFormLayoutData_MetaGroup,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(GROUP_ENTITY)
),
new FormData(
- "Entities",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.GroupFormLayoutData_Entities,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{ENTITY_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateEntity")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateEntity") //$NON-NLS-1$
),
new FormData(
- "Extensions",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.GroupFormLayoutData_Extensions,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{EXTENSION_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateEntityExtension")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateEntityExtension") //$NON-NLS-1$
),
MappingFormLayoutData.MAPPING_FOLDER_DEFINITION
};
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/IconFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/IconFormLayoutData.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/IconFormLayoutData.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.form;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
import org.jboss.tools.common.model.ui.forms.FormData;
import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
@@ -19,23 +20,23 @@
private final static IFormData[] ICON_GROUP_DEFINITIONS = new IFormData[] {
new FormData(
- "Icon Group",
- "", //"Description
+ Messages.IconFormLayoutData_IconGroup,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ICON_GROUP_ENTITY)
),
new FormData(
- "Subgroups",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.IconFormLayoutData_Subgroups,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{ICON_GROUP_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateIconGroup")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateIconGroup") //$NON-NLS-1$
),
new FormData(
- "Icons",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 30), new FormAttributeData("path", 70)},
+ Messages.IconFormLayoutData_Icons,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 30), new FormAttributeData("path", 70)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{ICON_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateIcon")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateIcon") //$NON-NLS-1$
)
};
@@ -45,11 +46,11 @@
private final static IFormData[] ICONS_DEFINITIONS = new IFormData[] {
new FormData(
- "Icon Groups",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.IconFormLayoutData_IconsDefinitions,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{ICON_GROUP_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateIconGroup")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateIconGroup") //$NON-NLS-1$
),
};
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MappingFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MappingFormLayoutData.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MappingFormLayoutData.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.form;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
import org.jboss.tools.common.model.ui.forms.FormData;
import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
@@ -18,35 +19,35 @@
public class MappingFormLayoutData implements MetaConstants {
final static IFormData MAPPING_FOLDER_DEFINITION = new FormData(
- "Mappings",
- "", //"Description
- "Mappings",
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.MappingFormLayoutData_MappingsFolder,
+ "", //"Description //$NON-NLS-1$
+ "Mappings", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{MAPPING_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMapping")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMapping") //$NON-NLS-1$
);
final static IFormData MAPPING_LIST_DEFINITION = new FormData(
- "Mappings",
- "", //"Description
+ Messages.MappingFormLayoutData_MappingsList,
+ "", //"Description //$NON-NLS-1$
MAPPINGS_ENTITY,
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{MAPPING_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMapping")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMapping") //$NON-NLS-1$
);
private final static IFormData[] MAPPING_DEFINITIONS = new IFormData[] {
new FormData(
- "Mapping",
- "", //"Description
+ Messages.MappingFormLayoutData_MappingDefinitions,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(MAPPING_ENTITY)
),
new FormData(
- "Items",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 30), new FormAttributeData("value", 70)},
+ Messages.MappingFormLayoutData_Items,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 30), new FormAttributeData("value", 70)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{MAPPING_ITEM_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateItem")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateItem") //$NON-NLS-1$
)
};
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MetaConstants.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MetaConstants.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MetaConstants.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -11,25 +11,25 @@
package org.jboss.tools.common.meta.ui.form;
public interface MetaConstants {
- String GROUP_ENTITY = "FileMETA";
- String ENTITY_ENTITY = "MetaEntity";
- String EXTENSION_ENTITY = "MetaEntityExtension";
- String CHILDREN_ENTITY = "MetaChildren";
- String CHILD_ENTITY = "MetaChild";
- String ATTRIBUTE_ENTITY = "MetaAttribute";
- String ATTRIBUTE_REF_ENTITY = "MetaAttributeReference";
- String ATTRIBUTES_ENTITY = "MetaAttributes";
- String ACTION_ENTITY = "MetaAction";
- String ACTION_LIST_ENTITY = "MetaActionList";
- String ATTRIBUTE_CONSTRAINT_ENTITY = "MetaAttributeConstraint";
- String CONSTRAINT_ITEM_ENTITY = "MetaConstraintItem";
- String ATTRIBUTE_EDITOR_ENTITY = "MetaAttributeEditor";
- String ENTITY_DATA_ENTITY = "MetaEntityData";
- String ATTRIBUTE_DATA_ENTITY = "MetaAttributeData";
- String MAPPINGS_ENTITY = "MetaMappings";
- String MAPPING_ENTITY = "MetaMapping";
- String MAPPING_ITEM_ENTITY = "MetaMappingItem";
- String ICONS_ENTITY = "MetaIcons";
- String ICON_GROUP_ENTITY = "MetaIconGroup";
- String ICON_ENTITY = "MetaIcon";
+ String GROUP_ENTITY = "FileMETA"; //$NON-NLS-1$
+ String ENTITY_ENTITY = "MetaEntity"; //$NON-NLS-1$
+ String EXTENSION_ENTITY = "MetaEntityExtension"; //$NON-NLS-1$
+ String CHILDREN_ENTITY = "MetaChildren"; //$NON-NLS-1$
+ String CHILD_ENTITY = "MetaChild"; //$NON-NLS-1$
+ String ATTRIBUTE_ENTITY = "MetaAttribute"; //$NON-NLS-1$
+ String ATTRIBUTE_REF_ENTITY = "MetaAttributeReference"; //$NON-NLS-1$
+ String ATTRIBUTES_ENTITY = "MetaAttributes"; //$NON-NLS-1$
+ String ACTION_ENTITY = "MetaAction"; //$NON-NLS-1$
+ String ACTION_LIST_ENTITY = "MetaActionList"; //$NON-NLS-1$
+ String ATTRIBUTE_CONSTRAINT_ENTITY = "MetaAttributeConstraint"; //$NON-NLS-1$
+ String CONSTRAINT_ITEM_ENTITY = "MetaConstraintItem"; //$NON-NLS-1$
+ String ATTRIBUTE_EDITOR_ENTITY = "MetaAttributeEditor"; //$NON-NLS-1$
+ String ENTITY_DATA_ENTITY = "MetaEntityData"; //$NON-NLS-1$
+ String ATTRIBUTE_DATA_ENTITY = "MetaAttributeData"; //$NON-NLS-1$
+ String MAPPINGS_ENTITY = "MetaMappings"; //$NON-NLS-1$
+ String MAPPING_ENTITY = "MetaMapping"; //$NON-NLS-1$
+ String MAPPING_ITEM_ENTITY = "MetaMappingItem"; //$NON-NLS-1$
+ String ICONS_ENTITY = "MetaIcons"; //$NON-NLS-1$
+ String ICON_GROUP_ENTITY = "MetaIconGroup"; //$NON-NLS-1$
+ String ICON_ENTITY = "MetaIcon"; //$NON-NLS-1$
}
Added: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/messages.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/messages.properties 2009-05-28 04:47:10 UTC (rev 15574)
@@ -0,0 +1,40 @@
+ActionListFormLayoutData_Action=Action
+ActionListFormLayoutData_ActionList=Action List
+ActionListFormLayoutData_Advanced=Advanced
+ActionListFormLayoutData_EntityData=Entity Data
+ActionListFormLayoutData_Items=Items
+AttributeFormLayoutData_Advanced=Advanced
+AttributeFormLayoutData_Attribute=Attribute
+AttributeFormLayoutData_AttributeReference=Attribute Reference
+AttributeFormLayoutData_AttributesFolder=Attributes
+AttributeFormLayoutData_AttributesList=Attributes
+AttributeFormLayoutData_Constraint=Constraint
+AttributeFormLayoutData_ConstraintDefinitions=Constraint
+AttributeFormLayoutData_Editor=Editor
+AttributeFormLayoutData_Items=Items
+EntityFormLayoutData_Advanced=Advanced
+EntityFormLayoutData_AttributesFolder=Action List
+EntityFormLayoutData_ChildrenFolder=Children
+EntityFormLayoutData_ChildrenList=Children
+EntityFormLayoutData_Entity=Entity
+ExtensionFormLayoutData_ActionList=Action List
+ExtensionFormLayoutData_EntityExtension=Entity Extension
+GroupFormLayoutData_Entities=Entities
+GroupFormLayoutData_Extensions=Extensions
+GroupFormLayoutData_MetaGroup=Meta Group
+IconFormLayoutData_IconGroup=Icon Group
+IconFormLayoutData_Icons=Icons
+IconFormLayoutData_IconsDefinitions=Icon Groups
+IconFormLayoutData_Subgroups=Subgroups
+MappingFormLayoutData_Items=Items
+MappingFormLayoutData_MappingDefinitions=Mapping
+MappingFormLayoutData_MappingsFolder=Mappings
+MappingFormLayoutData_MappingsList=Mappings
+MetaCompoundEditor_PageTitle=Meta Editor
+MetaSearchQuery_Label=Meta Search
+MetaSearchResult_Label=Meta Search
+MetaSearchResult_MetaSearchTextToFindNMatches=Meta Search - ''{0}'' - {1} matches
+MetaSearchResult_Tooltip=Meta Search
+MetaSearchResultPage_Label=Meta Search
+MetaSearchResultPage_MetaAttributeLabel={0} - entity {1} - {2}
+MetaSearchResultPage_TextToFindNMatches="{0}" - {1} matches
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchPage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchPage.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchPage.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -58,10 +58,11 @@
}
private XEntityData getSearchEntityData() {
- String[][] ds = new String[][]{{"SearchValue", "yes"},
- {"text to find", "yes"},
- {"property name", "no"},
- {"ignore case", "no"}};
+ // TODO might need to make use of setDisplayName if these strings appear in the UI
+ String[][] ds = new String[][]{{"SearchValue", "yes"}, //$NON-NLS-1$//$NON-NLS-2$
+ {"text to find", "yes"}, //$NON-NLS-1$//$NON-NLS-2$
+ {"property name", "no"}, //$NON-NLS-1$//$NON-NLS-2$
+ {"ignore case", "no"}}; //$NON-NLS-1$//$NON-NLS-2$
XEntityData d = XEntityDataImpl.create(ds);
XAttributeData[] as = d.getAttributeData();
for (int i = 0; i < as.length; i++) {
@@ -95,9 +96,9 @@
org.eclipse.search.ui.NewSearchUI.activateSearchResultView();
MetaSearchQuery wsJob = new MetaSearchQuery();
- wsJob.setTextToFind(data.getValue("text to find"));
- wsJob.setIgnoreCase("true".equals(data.getValue("ignore case")));
- wsJob.setAttributeMask(data.getValue("property name"));
+ wsJob.setTextToFind(data.getValue("text to find")); //$NON-NLS-1$
+ wsJob.setIgnoreCase("true".equals(data.getValue("ignore case"))); //$NON-NLS-1$ //$NON-NLS-2$
+ wsJob.setAttributeMask(data.getValue("property name")); //$NON-NLS-1$
wsJob.setScope(scope);
if (forground) {
IStatus status= NewSearchUI.runQueryInForeground(getRunnableContext(), wsJob);
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchQuery.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchQuery.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchQuery.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -16,14 +16,15 @@
import org.eclipse.search.ui.*;
import org.jboss.tools.common.meta.XAttribute;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
public class MetaSearchQuery implements ISearchQuery {
MetaSearchResult result;
- String text = "=";
+ String text = "="; //$NON-NLS-1$
boolean ignoreCase = true;
- String attributeMask = "*";
+ String attributeMask = "*"; //$NON-NLS-1$
List scope = new ArrayList();
public void setScope(List scope) {
@@ -54,7 +55,7 @@
for (int i = 0; i < rs.length; i++) {
processResource(rs[i]);
}
- return new Status(IStatus.OK, "org.jboss.common.meta.ui", 0, "", null);
+ return new Status(IStatus.OK, "org.jboss.common.meta.ui", 0, "", null); //$NON-NLS-1$//$NON-NLS-2$
}
private void processResource(IResource resource) {
@@ -65,7 +66,7 @@
if(rs != null) for (int i = 0; i < rs.length; i++) processResource(rs[i]);
} else if(resource instanceof IFile) {
IFile f = (IFile)resource;
- if(!f.getName().endsWith(".meta")) return;
+ if(!f.getName().endsWith(".meta")) return; //$NON-NLS-1$
XModelObject o = EclipseResourceUtil.getObjectByResource(f);
if(o == null) o = EclipseResourceUtil.createObjectForResource(f);
if(o == null) return;
@@ -78,7 +79,7 @@
for (int i = 0; i < as.length; i++) {
if(!as[i].isVisible()) continue;
String n = as[i].getName();
- if(!attributeMask.equals("*") && attributeMask.length() > 0 && !attributeMask.equals(n)) continue;
+ if(!attributeMask.equals("*") && attributeMask.length() > 0 && !attributeMask.equals(n)) continue; //$NON-NLS-1$
String v = o.getAttributeValue(n);
if(v == null) continue;
if(ignoreCase) {
@@ -96,7 +97,7 @@
}
public String getLabel() {
- return "Meta Search";
+ return Messages.MetaSearchQuery_Label;
}
public boolean canRerun() {
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResult.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResult.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResult.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,9 +10,11 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.search;
+import java.text.MessageFormat;
import java.util.*;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.search.ui.*;
+import org.jboss.tools.common.meta.ui.Messages;
public class MetaSearchResult implements ISearchResult {
Set listeners = new HashSet();
@@ -35,13 +37,14 @@
public String getLabel() {
if(query instanceof MetaSearchQuery) {
MetaSearchQuery q = (MetaSearchQuery)query;
- return "Meta Search - '" + q.getTextToFind() + "' - " + objects.size() + " matches";
+ return MessageFormat.format(Messages.MetaSearchResult_MetaSearchTextToFindNMatches,
+ q.getTextToFind(), objects.size());
}
- return "Meta Search";
+ return Messages.MetaSearchResult_Label;
}
public String getTooltip() {
- return "Meta Search";
+ return Messages.MetaSearchResult_Tooltip;
}
public ImageDescriptor getImageDescriptor() {
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResultPage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResultPage.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResultPage.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.search;
+import java.text.MessageFormat;
+
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.navigator.NavigatorLabelProvider;
import org.eclipse.jface.viewers.*;
import org.eclipse.search.ui.*;
@@ -75,10 +78,11 @@
ISearchQuery query = search.getQuery();
if(query instanceof MetaSearchQuery) {
MetaSearchQuery q = (MetaSearchQuery)query;
- return "\"" + q.getTextToFind() + "\"" + " - " + search.getObjects().size() + " matches";
+ return MessageFormat.format(Messages.MetaSearchResultPage_TextToFindNMatches, q.getTextToFind(),
+ search.getObjects().size());
}
}
- return "Meta Search";
+ return Messages.MetaSearchResultPage_Label;
}
public IPageSite getSite() {
@@ -183,15 +187,16 @@
XModelObject o = (XModelObject)element;
XModelObject f = o;
while(f != null && f.getFileType() == XModelObject.NONE) f = f.getParent();
- String file = f == null ? "" : FileAnyImpl.toFileName(f);
+ String file = f == null ? "" : FileAnyImpl.toFileName(f); //$NON-NLS-1$
String entity = o.getModelEntity().getName();
- if("MetaEntity".equals(entity)) {
- return super.getText(element) + " - " + file;
- } else if("MetaAttribute".equals(entity)) {
+ if("MetaEntity".equals(entity)) { //$NON-NLS-1$
+ return super.getText(element) + " - " + file; //$NON-NLS-1$
+ } else if("MetaAttribute".equals(entity)) { //$NON-NLS-1$
XModelObject p = o.getParent().getParent();
- return super.getText(element) + " - entity " + p.getPresentationString() + " - " + file;
+ return MessageFormat.format(Messages.MetaSearchResultPage_MetaAttributeLabel,
+ super.getText(element), p.getPresentationString(), file);
} else {
- return super.getText(element) + " - " + file;
+ return super.getText(element) + " - " + file; //$NON-NLS-1$
}
}
return super.getText(element);
Added: trunk/common/plugins/org.jboss.tools.common.model/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model/.settings/org.eclipse.jdt.core.prefs 2009-05-28 04:47:10 UTC (rev 15574)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XAttributeDataImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XAttributeDataImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XAttributeDataImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -61,12 +61,12 @@
}
public void load(Element el) {
- attributename = el.getAttribute("AttributeName");
- entityname = ((Element)el.getParentNode()).getAttribute("EntityName");
- String m = el.getAttribute("Mandatory");
- mandatory = "yes".equals(m) || "".equals(m);
- m = el.getAttribute("Advanced");
- isAdvanced = "yes".equals(m);
+ attributename = el.getAttribute("AttributeName"); //$NON-NLS-1$
+ entityname = ((Element)el.getParentNode()).getAttribute("EntityName"); //$NON-NLS-1$
+ String m = el.getAttribute("Mandatory"); //$NON-NLS-1$
+ mandatory = "yes".equals(m) || "".equals(m); //$NON-NLS-1$//$NON-NLS-2$
+ m = el.getAttribute("Advanced"); //$NON-NLS-1$
+ isAdvanced = "yes".equals(m); //$NON-NLS-1$
}
public String getAttributeName() {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XEntityDataImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XEntityDataImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XEntityDataImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -48,9 +48,9 @@
}
public void load(Element el) {
- entityname = el.getAttribute("EntityName");
- mandatory = "yes".equals(el.getAttribute("Mandatory"));
- Element[] cs = XMetaDataLoader.getChildrenElements(el, "AttributeData");
+ entityname = el.getAttribute("EntityName"); //$NON-NLS-1$
+ mandatory = "yes".equals(el.getAttribute("Mandatory")); //$NON-NLS-1$ //$NON-NLS-2$
+ Element[] cs = XMetaDataLoader.getChildrenElements(el, "AttributeData"); //$NON-NLS-1$
attributes = new XAttributeDataImpl[cs.length];
for (int i = 0; i < cs.length; i++) {
attributes[i] = new XAttributeDataImpl();
@@ -65,12 +65,12 @@
public static XEntityDataImpl create(String[][] data) {
XEntityDataImpl impl = new XEntityDataImpl();
impl.entityname = data[0][0];
- impl.mandatory = data[0].length > 1 && "yes".equals(data[0][1]);
+ impl.mandatory = data[0].length > 1 && "yes".equals(data[0][1]); //$NON-NLS-1$
impl.attributes = new XAttributeDataImpl[data.length - 1];
for (int i = 0; i < impl.attributes.length; i++) {
impl.attributes[i] = XAttributeDataImpl.create(impl.entityname,
data[i + 1][0],
- (data[i + 1].length > 1 && "yes".equals(data[i + 1][1])));
+ (data[i + 1].length > 1 && "yes".equals(data[i + 1][1]))); //$NON-NLS-1$
}
return impl;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -77,7 +77,7 @@
}
public void setDefaultValue(String value) {
- m_DefValue = replace(value, "%cr%", "\n");
+ m_DefValue = replace(value, "%cr%", "\n"); //$NON-NLS-1$//$NON-NLS-2$
}
public boolean isTrimmable() {
@@ -125,7 +125,7 @@
}
public boolean isFake() {
- return "FAKE".equals(m_XMLName);
+ return "FAKE".equals(m_XMLName); //$NON-NLS-1$
}
public void load(Element el){
@@ -144,8 +144,8 @@
setDefaultValue(el.getAttribute(DEFAULT_VALUE));
setXMLName(el.getAttribute(XML_NAME));
loadAdapter(el);
- trimmable = !"no".equals(el.getAttribute("TRIM"));
- copyable = !"no".equals(el.getAttribute("COPYABLE"));
+ trimmable = !"no".equals(el.getAttribute("TRIM")); //$NON-NLS-1$//$NON-NLS-2$
+ copyable = !"no".equals(el.getAttribute("COPYABLE")); //$NON-NLS-1$//$NON-NLS-2$
loadProperties(el);
}
@@ -153,27 +153,27 @@
return getName();
}
- public static final String LOADER = "loader";
+ public static final String LOADER = "loader"; //$NON-NLS-1$
public static final String CONSTRAINT_PREFIX =
- "org.jboss.tools.common.meta.constraint.impl.XAttributeConstraint";
+ "org.jboss.tools.common.meta.constraint.impl.XAttributeConstraint"; //$NON-NLS-1$
public static final String ATTRIBUTE_PREFIX =
- "org.jboss.tools.common.meta.impl.adapters.XAdapter";
+ "org.jboss.tools.common.meta.impl.adapters.XAdapter"; //$NON-NLS-1$
public void loadConstraint(Element element) {
if(element == null) return;
String loader = element.getAttribute(LOADER);
if(!XMetaDataLoader.hasAttribute(element, LOADER) || loader.trim().length() == 0) {
- loader = "";
+ loader = ""; //$NON-NLS-1$
}
- if(loader != null && loader.startsWith("%")) {
- loader = expand(loader, "AttributeConstraints");
+ if(loader != null && loader.startsWith("%")) { //$NON-NLS-1$
+ loader = expand(loader, "AttributeConstraints"); //$NON-NLS-1$
}
constraint.init(loader, element);
}
public void loadAdapter(Element element) {
String loader = element.getAttribute(LOADER);
- if(loader.length() == 0 && getXMLName().length() > 0) loader = "ModelElement";
+ if(loader.length() == 0 && getXMLName().length() > 0) loader = "ModelElement"; //$NON-NLS-1$
adapter.init(this, loader, element);
loadValueListeners(element);
}
@@ -239,7 +239,7 @@
adapter = (XAdapter)ModelFeatureFactory.getInstance().createFeatureInstance(clsname);
}
} catch (ClassCastException e) {
- ModelPlugin.getPluginLog().logError("XAttributeImpl:loadAdapter:" + e.getMessage());
+ ModelPlugin.getPluginLog().logError("XAttributeImpl:loadAdapter:" + e.getMessage()); //$NON-NLS-1$
}
}
if(adapter == null) adapter = new XAdapter();
@@ -287,7 +287,7 @@
constraint = (XAttributeConstraint)ModelFeatureFactory.getInstance().createFeatureInstance(clsname);
}
} catch (ClassCastException e) {
- ModelPlugin.getPluginLog().logError("XAttributeImpl:loadConstraint:" + e.getMessage(), e);
+ ModelPlugin.getPluginLog().logError("XAttributeImpl:loadConstraint:" + e.getMessage(), e); //$NON-NLS-1$
}
if(constraint == null) constraint = new XAttributeConstraintImpl();
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -32,7 +32,7 @@
public final static boolean turnOffDTDCheck = true;
public boolean isIncorrect() {
- return ("yes".equals(get("isIncorrect")));
+ return ("yes".equals(get("isIncorrect"))); //$NON-NLS-1$//$NON-NLS-2$
}
public AbstractXMLFileImpl() {
@@ -67,16 +67,16 @@
for (int i = 0; i < errors.length; i++) {
String er = errors[i];
int q = er.lastIndexOf(':');
- String pos = (q < 0) ? "" : er.substring(q + 1);
+ String pos = (q < 0) ? "" : er.substring(q + 1); //$NON-NLS-1$
if(q >= 0) er = er.substring(0, q);
q = er.lastIndexOf(':');
- String ln = (q < 0) ? "" : er.substring(q + 1), ln1 = ln;
+ String ln = (q < 0) ? "" : er.substring(q + 1), ln1 = ln; //$NON-NLS-1$
if(q >= 0) er = er.substring(0, q);
int iln = -1;
try {
if(q >= 0 && ln1.length() > 0) {
iln = Integer.parseInt(ln1);
- ln1 = "" + (iln - 1);
+ ln1 = "" + (iln - 1); //$NON-NLS-1$
}
} catch (NumberFormatException e) {
ModelPlugin.getPluginLog().logError(e);
@@ -88,17 +88,17 @@
this.errors[i] = ep;
}
String s = sb.toString();
- if(s.equals(get("errors"))) return;
- super.set("incorrectBody", body);
- set("errors", s);
- setAttributeValue("isIncorrect", (errors.length == 0 && loaderError == null) ? "no" : "yes");
+ if(s.equals(get("errors"))) return; //$NON-NLS-1$
+ super.set("incorrectBody", body); //$NON-NLS-1$
+ set("errors", s); //$NON-NLS-1$
+ setAttributeValue("isIncorrect", (errors.length == 0 && loaderError == null) ? "no" : "yes"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
if(!isOverlapped()) markers.update();
}
protected boolean isOverlapped() {
XModelObject p = getParent();
- while(p != null && !"true".equals(p.get("overlapped"))) p = p.getParent();
+ while(p != null && !"true".equals(p.get("overlapped"))) p = p.getParent(); //$NON-NLS-1$ //$NON-NLS-2$
return (p != null);
}
@@ -109,7 +109,7 @@
}
protected String[] getErrors() {
if(!isIncorrect()) return new String[0];
- String es = (String)get("errors");
+ String es = (String)get("errors"); //$NON-NLS-1$
if(es == null || es.length() == 0) return new String[0];
return errors;
}
Added: trunk/common/plugins/org.jboss.tools.common.model.ui/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/.settings/org.eclipse.jdt.core.prefs 2009-05-28 04:47:10 UTC (rev 15574)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -175,7 +175,7 @@
public void initialize(Object model) {
this.xmo = (XModelObject)model;
if(xmo == null) {
- ModelUIPlugin.getPluginLog().logInfo( "Error to create form "+formData.getHeader()+". Model object cannot be null.", new IllegalArgumentException("Parameter cannot be null"));
+ ModelUIPlugin.getPluginLog().logInfo( "Error to create form "+formData.getHeader()+". Model object cannot be null.", new IllegalArgumentException("Parameter cannot be null")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return;
}
this.model = xmo.getModel();
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -75,9 +75,9 @@
ValueHelper valueHelper = new ValueHelper();
WtpKbConnector wtpKbConnector = valueHelper.getPageConnector();
if(wtpKbConnector == null) return;
- Node node = (Node)context.get("node");
- String tagName = "" + context.getProperty("nodeName");
- String attributeName = "" + context.getProperty("attributeName");
+ Node node = (Node)context.get("node"); //$NON-NLS-1$
+ String tagName = "" + context.getProperty("nodeName"); //$NON-NLS-1$ //$NON-NLS-2$
+ String attributeName = "" + context.getProperty("attributeName"); //$NON-NLS-1$ //$NON-NLS-2$
String currentValue = text;
String strippedValue = null;
String matchString = null;
@@ -85,7 +85,7 @@
matchString = currentValue.substring(0, offset);
strippedValue = currentValue;
- String elProposalPrefix = "";
+ String elProposalPrefix = ""; //$NON-NLS-1$
ELParser p = ELParserUtil.getJbossFactory().createParser();
ELModel model = p.parse(matchString);
@@ -144,13 +144,13 @@
}
if(is1 == null || is1.getCloseInstanceToken() == null) {
- replacementString += "}";
+ replacementString += "}"; //$NON-NLS-1$
}
int cursorPosition = kbProposal.getPosition() + cursorPositionDelta;
String displayString = elProposalPrefix == null || elProposalPrefix.length() == 0 ?
kbProposal.getReplacementString().substring(2,kbProposal.getReplacementString().length() - 1) :
- elProposalPrefix + kbProposal.getReplacementString().substring(2,kbProposal.getReplacementString().length() - 1) + "}" ;
+ elProposalPrefix + kbProposal.getReplacementString().substring(2,kbProposal.getReplacementString().length() - 1) + "}" ; //$NON-NLS-1$
Image image = kbProposal.hasImage() ?
kbProposal.getImage() :
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CssReferencesComposite.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CssReferencesComposite.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CssReferencesComposite.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -19,7 +19,7 @@
public class CssReferencesComposite extends VpeResourceReferencesComposite {
protected String getEntity() {
- return (file != null) ? "VPECSSReference" : "VPECSSReferenceExt";
+ return (file != null) ? "VPECSSReference" : "VPECSSReferenceExt"; //$NON-NLS-1$ //$NON-NLS-2$
}
protected ResourceReferencesTableProvider createTableProvider(List dataList) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ElVariablesComposite.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ElVariablesComposite.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ElVariablesComposite.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -34,7 +34,7 @@
*/
@Override
protected String getEntity() {
- return "VPEElReference";
+ return "VPEElReference"; //$NON-NLS-1$
}
/**c
15 years, 8 months
JBoss Tools SVN: r15573 - trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-27 19:26:39 -0400 (Wed, 27 May 2009)
New Revision: 15573
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project
Log:
https://jira.jboss.org/jira/browse/JBIDE-4351
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project 2009-05-27 23:24:06 UTC (rev 15572)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project 2009-05-27 23:26:39 UTC (rev 15573)
@@ -3,8 +3,8 @@
<name>Test1-ear</name>
<comment></comment>
<projects>
- <project>seamtestproject-ejb</project>
- <project>seamtestproject</project>
+ <project>Test1-ejb</project>
+ <project>Test1</project>
</projects>
<buildSpec>
<buildCommand>
15 years, 8 months
JBoss Tools SVN: r15572 - in trunk/seam/tests/org.jboss.tools.seam.core.test: projects/Test1 and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-27 19:24:06 -0400 (Wed, 27 May 2009)
New Revision: 15572
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/EarContent/META-INF/application.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.classpath
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1/.project
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringAllTests.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4351
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2009-05-27 23:24:06 UTC (rev 15572)
@@ -35,5 +35,6 @@
org.eclipse.jst.jsf.core,
org.eclipse.wst.validation,
org.eclipse.jdt.launching,
- org.eclipse.jdt.ui
+ org.eclipse.jdt.ui,
+ org.eclipse.jst.j2ee;bundle-version="1.1.300"
Bundle-Localization: plugin
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1/.project 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1/.project 2009-05-27 23:24:06 UTC (rev 15572)
@@ -22,10 +22,10 @@
</buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.jboss.tools.jsf.jsfnature</nature>
<nature>org.jboss.tools.seam.core.seamnature</nature>
</natures>
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project 2009-05-27 23:24:06 UTC (rev 15572)
@@ -3,8 +3,8 @@
<name>Test1-ear</name>
<comment></comment>
<projects>
- <project>Test1-ejb</project>
- <project>Test1</project>
+ <project>seamtestproject-ejb</project>
+ <project>seamtestproject</project>
</projects>
<buildSpec>
<buildCommand>
@@ -12,15 +12,9 @@
<arguments>
</arguments>
</buildCommand>
- <buildCommand>
- <name>org.jboss.ide.eclipse.archives.core.archivesBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
- <nature>org.jboss.ide.eclipse.archives.core.archivesNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
</natures>
-</projectDescription>
+</projectDescription>
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/EarContent/META-INF/application.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/EarContent/META-INF/application.xml 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/EarContent/META-INF/application.xml 2009-05-27 23:24:06 UTC (rev 15572)
@@ -3,54 +3,23 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
version="5">
-
+
<display-name>t2</display-name>
-
+
<module>
<web>
<web-uri>Test1.war</web-uri>
<context-root>/Test1</context-root>
</web>
</module>
-
+
<module>
<ejb>Test1-ejb.jar</ejb>
</module>
-
+
<!-- Seam and EL -->
<module>
<java>jboss-seam.jar</java>
</module>
- <!-- jBPM -->
- <module>
- <java>jbpm-3.1.4.jar</java>
- </module>
-
- <!-- Drools and dependencies -->
- <module>
- <java>drools-core-3.0.5.jar</java>
- </module>
- <module>
- <java>drools-compiler-3.0.5.jar</java>
- </module>
- <module>
- <java>janino-2.4.3.jar</java>
- </module>
- <module>
- <java>antlr-2.7.6.jar</java>
- </module>
- <module>
- <java>antlr-3.0ea8.jar</java>
- </module>
- <module>
- <java>commons-jci-core-1.0-406301.jar</java>
- </module>
- <module>
- <java>commons-jci-janino-2.4.3.jar</java>
- </module>
- <module>
- <java>stringtemplate-2.3b6.jar</java>
- </module>
-
-</application>
+</application>
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.classpath
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.classpath 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.classpath 2009-05-27 23:24:06 UTC (rev 15572)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="ejbModule"/>
- <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 4.2 Runtime"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="build/classes"/>
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project 2009-05-27 23:24:06 UTC (rev 15572)
@@ -16,22 +16,22 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>org.jboss.ide.eclipse.archives.core.archivesBuilder</name>
+ <name>org.jboss.tools.seam.core.seambuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.jboss.tools.seam.core.seambuilder</name>
+ <name>org.hibernate.eclipse.console.hibernateBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
- <nature>org.jboss.ide.eclipse.archives.core.archivesNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.jboss.tools.seam.core.seamnature</nature>
+ <nature>org.hibernate.eclipse.console.hibernateNature</nature>
</natures>
-</projectDescription>
+</projectDescription>
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-27 23:24:06 UTC (rev 15572)
@@ -482,7 +482,7 @@
refreshProject(project);
int number = getMarkersNumber(component12File);
- assertTrue("Problem marker was found in Component12.java", number == 0);
+ assertEquals("Problem marker was found in Component12.java", 0, number);
// Unknown factory name
System.out.println("Test - Unknown factory name");
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-27 23:24:06 UTC (rev 15572)
@@ -9,6 +9,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.seam.core.ISeamComponent;
@@ -27,55 +28,52 @@
static IProject ejbProject;
static ISeamProject seamWarProject;
static ISeamProject seamEjbProject;
-
+
public SeamComponentRefactoringTest(){
super("Seam Component Refactoring Test");
}
-
+
protected void setUp() throws Exception {
- if(warProject==null) {
- warProject = ProjectImportTestSetup.loadProject(warProjectName);
- }
- if(seamWarProject==null) {
- seamWarProject = loadSeamProject(warProject);
- }
-
- if(earProject==null) {
- earProject = ProjectImportTestSetup.loadProject(earProjectName);
- }
-
- if(ejbProject==null) {
- ejbProject = ProjectImportTestSetup.loadProject(ejbProjectName);
- }
- if(seamEjbProject==null) {
- seamEjbProject = loadSeamProject(ejbProject);
- }
+ loadProjects();
+ List<IProject> projectList = new ArrayList<IProject>();
+ projectList.add(ejbProject);
+ projectList.add(warProject);
+ J2EEComponentClasspathUpdater.getInstance().forceUpdate(projectList);
+ loadProjects();
}
-
+
+ private void loadProjects() throws Exception {
+ earProject = ProjectImportTestSetup.loadProject(earProjectName);
+ ejbProject = ProjectImportTestSetup.loadProject(ejbProjectName);
+ warProject = ProjectImportTestSetup.loadProject(warProjectName);
+ seamEjbProject = loadSeamProject(ejbProject);
+ seamWarProject = loadSeamProject(warProject);
+ }
+
private ISeamProject loadSeamProject(IProject project) throws CoreException {
JobUtils.waitForIdle();
System.out.println("Project - "+project);
ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
assertNotNull("Seam project for " + project.getName() + " is null", seamProject);
-
+
return seamProject;
}
-
+
public void testSeamComponentRename() throws CoreException {
ArrayList<TestChangeStructure> list = new ArrayList<TestChangeStructure>();
-
+
TestChangeStructure structure = new TestChangeStructure(ejbProject.getProject(), "/ejbModule/org/domain/"+warProjectName+"/session/TestComponent.java",
89, 6, "\"best\"");
list.add(structure);
-
+
structure = new TestChangeStructure(warProject, "/WebContent/WEB-INF/components.xml",
1106, 4, "best");
list.add(structure);
structure = new TestChangeStructure(warProject, "/WebContent/WEB-INF/components.xml",
1934, 4, "best");
list.add(structure);
-
+
structure = new TestChangeStructure(ejbProject, "/ejbModule/org/domain/"+warProjectName+"/session/TestSeamComponent.java",
420, 11, "@In(\"best\")");
list.add(structure);
@@ -91,26 +89,26 @@
structure = new TestChangeStructure(ejbProject, "/ejbModule/org/domain/"+warProjectName+"/session/TestSeamComponent.java",
589, 4, "best");
list.add(structure);
-
+
structure = new TestChangeStructure(ejbProject, "/ejbModule/seam.properties",
0, 4, "best");
list.add(structure);
-
+
structure = new TestChangeStructure(warProject, "/WebContent/test.xhtml",
1088, 4, "best");
list.add(structure);
-
+
structure = new TestChangeStructure(warProject, "/WebContent/test.jsp",
227, 4, "best");
list.add(structure);
-
+
structure = new TestChangeStructure(warProject, "/WebContent/test.properties",
29, 4, "best");
list.add(structure);
-
+
renameComponent(seamEjbProject, "test", "best", list);
}
-
+
private void renameComponent(ISeamProject seamProject, String componentName, String newName, List<TestChangeStructure> changeList) throws CoreException{
// Test before renaming
ISeamComponent component = seamProject.getComponent(componentName);
@@ -129,10 +127,10 @@
RenameComponentProcessor processor = new RenameComponentProcessor(component);
processor.setNewComponentName(newName);
CompositeChange rootChange = (CompositeChange)processor.createChange(new NullProgressMonitor());
-
+
rootChange.perform(new NullProgressMonitor());
JobUtils.waitForIdle();
-
+
// Test results
assertNull(seamProject.getComponent(componentName));
assertNotNull(seamProject.getComponent(newName));
@@ -144,14 +142,14 @@
assertEquals(changeStructure.getText(), content.substring(changeStructure.getOffset(), changeStructure.getOffset()+changeStructure.getLength()));
}
}
-
+
class TestChangeStructure{
private IProject project;
private String fileName;
private int offset;
private int length;
private String text;
-
+
public TestChangeStructure(IProject project, String fileName, int offset, int length, String text){
this.project = project;
this.fileName = fileName;
@@ -159,25 +157,25 @@
this.length = length;
this.text = text;
}
-
+
public IProject getProject(){
return project;
}
-
+
public String getFileName(){
return fileName;
}
-
+
public int getOffset(){
return offset;
}
-
+
public int getLength(){
return length;
}
-
+
public String getText(){
return text;
}
}
-}
+}
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringAllTests.java 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringAllTests.java 2009-05-27 23:24:06 UTC (rev 15572)
@@ -28,8 +28,8 @@
new String[]{"RefactoringTestProject-war", "RefactoringTestProject-ejb", "RefactoringTestProject-test"}));
suite.addTest(new ProjectImportTestSetup(new TestSuite(SeamComponentRefactoringTest.class),
"org.jboss.tools.seam.core.test",
- new String[]{"projects/Test1","projects/Test1-ear","projects/Test1-ejb"},
- new String[]{"Test1","Test1-ear","Test1-ejb"}));
+ new String[]{"projects/Test1-ear","projects/Test1-ejb","projects/Test1"},
+ new String[]{"Test1-ear","Test1-ejb","Test1"}));
return suite;
}
}
\ No newline at end of file
15 years, 8 months
JBoss Tools SVN: r15571 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-27 19:04:09 -0400 (Wed, 27 May 2009)
New Revision: 15571
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4351
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-05-27 22:40:42 UTC (rev 15570)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-05-27 23:04:09 UTC (rev 15571)
@@ -146,11 +146,11 @@
SeamCorePlugin.getPluginLog().logError(e);
return;
}
- if(ext.equalsIgnoreCase(JAVA_EXT)){
+ if(JAVA_EXT.equalsIgnoreCase(ext)){
scanJava(file, content);
- } else if(ext.equalsIgnoreCase(XML_EXT) || ext.equalsIgnoreCase(XHTML_EXT) || ext.equalsIgnoreCase(JSP_EXT))
+ } else if(XML_EXT.equalsIgnoreCase(ext) || XHTML_EXT.equalsIgnoreCase(ext) || JSP_EXT.equalsIgnoreCase(ext))
scanDOM(file, content);
- else if(ext.equalsIgnoreCase(PROPERTIES_EXT))
+ else if(PROPERTIES_EXT.equalsIgnoreCase(ext))
scanProperties(file, content);
}
15 years, 8 months
JBoss Tools SVN: r15570 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-27 18:40:42 -0400 (Wed, 27 May 2009)
New Revision: 15570
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4351
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java 2009-05-27 21:24:00 UTC (rev 15569)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java 2009-05-27 22:40:42 UTC (rev 15570)
@@ -124,7 +124,7 @@
System.out.print("Reloaded " + components + " components in " + time + " ms");
float timePerComponent = 1f * time / components;
- assertTrue("Loading time per component is too large: " + timePerComponent + " ms.", timePerComponent < 10.0f);
+ assertTrue("Loading time per component is too large: " + timePerComponent + " ms.", timePerComponent < 20.0f);
}
15 years, 8 months
JBoss Tools SVN: r15569 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: src/org/jboss/tools/flow/jpdl4/editor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-05-27 17:24:00 -0400 (Wed, 27 May 2009)
New Revision: 15569
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventEndsSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventStateSection.java
Removed:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
Log:
support end event attributes (GPD-326)
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-27 18:02:25 UTC (rev 15568)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-27 21:24:00 UTC (rev 15569)
@@ -391,24 +391,38 @@
<propertySection
afterSection="org.jboss.tools.jpdl4.name"
class="org.jboss.tools.flow.jpdl4.properties.ExclusiveGatewayLanguageSection"
- id="org.jboss.tools.jpdl4.exclusivegateway.language"
+ id="org.jboss.tools.jpdl4.exclusiveGateway.language"
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.ExclusiveGateway"/>
</propertySection>
<propertySection
- afterSection="org.jboss.tools.jpdl4.exclusivegateway.language"
+ afterSection="org.jboss.tools.jpdl4.exclusiveGateway.language"
class="org.jboss.tools.flow.jpdl4.properties.ExclusiveGatewayExpressionSection"
- id="org.jboss.tools.jpdl4.exclusivegateway.expression"
+ id="org.jboss.tools.jpdl4.exclusiveGateway.expression"
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.ExclusiveGateway"/>
</propertySection>
<propertySection
- afterSection="org.jboss.tools.jpdl4.exclusivegateway.expression"
+ afterSection="org.jboss.tools.jpdl4.exclusiveGateway.expression"
class="org.jboss.tools.flow.jpdl4.properties.ExclusiveGatewayClassNameSection"
- id="org.jboss.tools.jpdl4.exclusivegateway.classname"
+ id="org.jboss.tools.jpdl4.exclusiveGateway.classname"
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.ExclusiveGateway"/>
</propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.name"
+ class="org.jboss.tools.flow.jpdl4.properties.EndEventEndsSection"
+ id="org.jboss.tools.jpdl4.endEvent.ends"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.TerminateEndEvent"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.endEvent.ends"
+ class="org.jboss.tools.flow.jpdl4.properties.EndEventStateSection"
+ id="org.jboss.tools.jpdl4.endEvent.state"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.TerminateEndEvent"/>
+ </propertySection>
</propertySections>
</extension>
<extension
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-27 18:02:25 UTC (rev 15568)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-27 21:24:00 UTC (rev 15569)
@@ -26,6 +26,7 @@
import org.jboss.tools.flow.jpdl4.model.Process;
import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
import org.jboss.tools.flow.jpdl4.model.Swimlane;
+import org.jboss.tools.flow.jpdl4.model.TerminateEndEvent;
import org.jboss.tools.flow.jpdl4.model.Timer;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -99,6 +100,16 @@
}
}
+ class TerminateEndEventAttributeHandler extends NodeAttributeHandler {
+ public void deserializeAttributes(Wrapper wrapper, Element element) {
+ super.deserializeAttributes(wrapper, element);
+ if (!(wrapper.getElement() instanceof TerminateEndEvent)) return;
+ TerminateEndEvent terminateEndEvent = (TerminateEndEvent)wrapper.getElement();
+ terminateEndEvent.setEnds(element.getAttribute("ends"));
+ terminateEndEvent.setState(element.getAttribute("state"));
+ }
+ }
+
class HumanTaskAttributeHandler extends NodeAttributeHandler {
AssignmentAttributeHandler assignmentAttributeHandler = new AssignmentAttributeHandler();
public void deserializeAttributes(Wrapper wrapper, Element element) {
@@ -436,6 +447,8 @@
return new SubprocessTaskAttributeHandler();
} else if (element instanceof ExclusiveGateway) {
return new ExclusiveGatewayAttributeHandler();
+ } else if (element instanceof TerminateEndEvent) {
+ return new TerminateEndEventAttributeHandler();
} else {
return new NodeAttributeHandler();
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-27 18:02:25 UTC (rev 15568)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-27 21:24:00 UTC (rev 15569)
@@ -335,14 +335,6 @@
result.add("lang");
return result;
}
- protected String getPropertyName(String attributeName) {
- if ("expr".equals(attributeName)) {
- return ExclusiveGateway.EXPR;
- } else if ("repeat".equals(attributeName)) {
- return ExclusiveGateway.LANG;
- }
- return super.getPropertyName(attributeName);
- }
public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
ExclusiveGateway exclusiveGateway = (ExclusiveGateway)wrapper.getElement();
String handler = exclusiveGateway.getHandler();
@@ -355,6 +347,15 @@
}
}
+ class TerminateEndEventWrapperSerializer extends ProcessNodeWrapperSerializer {
+ protected List<String> getAttributesToSave() {
+ List<String> result = super.getAttributesToSave();
+ result.add("ends");
+ result.add("state");
+ return result;
+ }
+ }
+
class HumanTaskWrapperSerializer extends ProcessNodeWrapperSerializer {
protected List<String> getAttributesToSave() {
List<String> result = super.getAttributesToSave();
@@ -607,7 +608,7 @@
if (element instanceof SequenceFlow) {
new SequenceFlowWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof TerminateEndEvent) {
- new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
+ new TerminateEndEventWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof ErrorEndEvent) {
new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof CancelEndEvent) {
@@ -660,7 +661,7 @@
if (element instanceof SequenceFlow) {
new SequenceFlowWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof TerminateEndEvent) {
- new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ new TerminateEndEventWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof ErrorEndEvent) {
new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof CancelEndEvent) {
Deleted: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java 2009-05-27 18:02:25 UTC (rev 15568)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java 2009-05-27 21:24:00 UTC (rev 15569)
@@ -1,6 +0,0 @@
-package org.jboss.tools.flow.jpdl4.model;
-
-
-public class TerminateEndEvent extends EndEvent {
-
-}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java 2009-05-27 21:24:00 UTC (rev 15569)
@@ -0,0 +1,79 @@
+package org.jboss.tools.flow.jpdl4.model;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+
+
+public class TerminateEndEvent extends EndEvent {
+
+ public final static String ENDS = "ends";
+ public final static String STATE = "state";
+
+ private String ends;
+ private String state;
+
+ public TerminateEndEvent() {
+ setMetaData("propertySource", new PropertySource());
+ }
+
+ public String getEnds() {
+ return ends;
+ }
+
+ public void setEnds(String ends) {
+ this.ends = ends;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ private class PropertySource implements IPropertySource {
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return new IPropertyDescriptor[0];
+ }
+
+ public Object getPropertyValue(Object id) {
+ if (ENDS.equals(id)) {
+ return getEnds();
+ } else if (STATE.equals(id)) {
+ return getState();
+ } else {
+ return null;
+ }
+ }
+
+ public boolean isPropertySet(Object id) {
+ if (ENDS.equals(id)) {
+ return getEnds() != null;
+ } else if (STATE.equals(id)) {
+ return getState() != null;
+ } else {
+ return false;
+ }
+ }
+
+ public void resetPropertyValue(Object id) {
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if (ENDS.equals(id)) {
+ setEnds((String)value);
+ } else if (STATE.equals(id)) {
+ setState((String)value);
+ }
+ }
+
+ public Object getEditableValue() {
+ return null;
+ }
+
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventEndsSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventEndsSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventEndsSection.java 2009-05-27 21:24:00 UTC (rev 15569)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.TerminateEndEvent;
+
+public class EndEventEndsSection extends TextFieldPropertySection {
+
+ public EndEventEndsSection() {
+ super(TerminateEndEvent.ENDS, "Ends");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventEndsSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventStateSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventStateSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventStateSection.java 2009-05-27 21:24:00 UTC (rev 15569)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.TerminateEndEvent;
+
+public class EndEventStateSection extends TextFieldPropertySection {
+
+ public EndEventStateSection() {
+ super(TerminateEndEvent.STATE, "State");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventStateSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 8 months