JBoss Tools SVN: r20119 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test: src/org/jboss/tools/jsf/vpe/jsf/test/jbide and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-02-04 05:50:13 -0500 (Thu, 04 Feb 2010)
New Revision: 20119
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfLocales/WebContent/pages/LSeveral.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5218, JUnit was updated.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfLocales/WebContent/pages/LSeveral.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfLocales/WebContent/pages/LSeveral.jsp 2010-02-04 10:41:31 UTC (rev 20118)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfLocales/WebContent/pages/LSeveral.jsp 2010-02-04 10:50:13 UTC (rev 20119)
@@ -27,7 +27,7 @@
<div id="localeText2">#{Message.hello_message}</div>
</f:view>
-<f:view locale="en">
+<f:view locale="">
<f:loadBundle var="Message" basename="demo.Messages"/>
<h:outputText value="locale=empty"/><br></br>
<div id="localeText3">#{Message.hello_message}</div>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java 2010-02-04 10:41:31 UTC (rev 20118)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/TestFViewLocaleAttribute_JBIDE5218.java 2010-02-04 10:50:13 UTC (rev 20119)
@@ -195,7 +195,7 @@
localeText = doc.getElementById(LOCALE_TEXT1_ID);
localizedText = getLocalizedText(localeText);
- assertTrue("Text is '"+localizedText+"', but should be in 'en_US' locale", HELLO_EN_US.equalsIgnoreCase(localizedText)); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Text is '"+localizedText+"', but should be in 'default' locale", HELLO_EN.equalsIgnoreCase(localizedText)); //$NON-NLS-1$ //$NON-NLS-2$
localeText = doc.getElementById(LOCALE_TEXT2_ID);
localizedText = getLocalizedText(localeText);
@@ -203,7 +203,7 @@
localeText = doc.getElementById(LOCALE_TEXT3_ID);
localizedText = getLocalizedText(localeText);
- assertTrue("Text is '"+localizedText+"', but should be in 'en_US' locale", HELLO_EN_US.equalsIgnoreCase(localizedText)); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Text is '"+localizedText+"', but should be in 'default' locale", HELLO_EN.equalsIgnoreCase(localizedText)); //$NON-NLS-1$ //$NON-NLS-2$
localeText = doc.getElementById(LOCALE_TEXT_ID);
localizedText = getLocalizedText(localeText);
15 years, 8 months
JBoss Tools SVN: r20118 - in trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating: model/xml and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2010-02-04 05:41:31 -0500 (Thu, 04 Feb 2010)
New Revision: 20118
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/ValueMapping.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/UnmappedCollectionNodeException.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java
trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5773
Externalize strings in org.jboss.tools.smooks.templating
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java 2010-02-04 10:36:31 UTC (rev 20117)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelBuilder.java 2010-02-04 10:41:31 UTC (rev 20118)
@@ -179,7 +179,7 @@
public static int getMinOccurs(Element element) {
String minOccurs = element.getAttributeNS(NAMESPACE, "minOccurs"); //$NON-NLS-1$
- if(minOccurs.equals("")) {
+ if(minOccurs.equals(Messages.ModelBuilder_0)) {
return 1;
}
@@ -189,7 +189,7 @@
public static int getMaxOccurs(Element element) {
String maxOccurs = element.getAttributeNS(NAMESPACE, "maxOccurs"); //$NON-NLS-1$
- if(maxOccurs.equals("")) {
+ if(maxOccurs.equals(Messages.ModelBuilder_1)) {
return 1;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java 2010-02-04 10:36:31 UTC (rev 20117)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/ModelNodeResolver.java 2010-02-04 10:41:31 UTC (rev 20118)
@@ -43,7 +43,7 @@
private Map<String, String> prefixMap = new HashMap<String, String>();
public ModelNodeResolver(Document model) {
- buildModelNodeMap(model.getDocumentElement(), "");
+ buildModelNodeMap(model.getDocumentElement(), Messages.ModelNodeResolver_0);
}
public Node resolveNodeMapping(Node node) {
@@ -62,7 +62,7 @@
String nodeNS = node.getNamespaceURI();
if(nodeNS != null && nodeNS.length() > 0) {
if(node.getNodeType() == Node.ATTRIBUTE_NODE) {
- pathBuilder.insert(0, "@" + getPrefix(nodeNS) + ":" + ((Attr)node).getName()); //$NON-NLS-1$
+ pathBuilder.insert(0, "@" + getPrefix(nodeNS) + Messages.ModelNodeResolver_1 + ((Attr)node).getName()); //$NON-NLS-1$
} else {
pathBuilder.insert(0, getPrefix(nodeNS) + ":" + DomUtils.getName((Element) node)); //$NON-NLS-1$
}
@@ -89,7 +89,7 @@
String elNS = element.getNamespaceURI();
if(parentPath.length() > 0) {
- parentPath += "/";
+ parentPath += Messages.ModelNodeResolver_2;
}
if(elNS != null && elNS.length() > 0) {
@@ -107,7 +107,7 @@
if(!ModelBuilder.isInReservedNamespace(attribute)) {
String attrNS = attribute.getNamespaceURI();
if(attrNS != null && attrNS.length() > 0) {
- modelNodeMap.put(elementPath + "/@" + getPrefix(attrNS) + ":" + attribute.getName(), attribute); //$NON-NLS-1$
+ modelNodeMap.put(elementPath + "/@" + getPrefix(attrNS) + Messages.ModelNodeResolver_3 + attribute.getName(), attribute); //$NON-NLS-1$
} else {
modelNodeMap.put(elementPath + "/@" + attribute.getName(), attribute); //$NON-NLS-1$
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java 2010-02-04 10:36:31 UTC (rev 20117)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XMLSampleModelBuilder.java 2010-02-04 10:41:31 UTC (rev 20118)
@@ -61,19 +61,19 @@
try {
docBuilder = docBuilderFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
- throw new RuntimeException("Unexpectd XML exception. Unable to create DocumentBuilder instance.", e);
+ throw new RuntimeException(Messages.XMLSampleModelBuilder_0, e);
}
}
public XMLSampleModelBuilder(URI xmlSampleURI) throws IOException, ModelBuilderException {
- Assert.isNotNull(xmlSampleURI, "Null 'xmlSampleURI' arg in method call.");
+ Assert.isNotNull(xmlSampleURI, Messages.XMLSampleModelBuilder_1);
File xmlSampleFile = new File(xmlSampleURI.toFileString());
if(!xmlSampleFile.exists()) {
- throw new IOException("XML Sample '" + xmlSampleFile.getAbsolutePath() + "' not found."); //$NON-NLS-1$
+ throw new IOException("XML Sample '" + xmlSampleFile.getAbsolutePath() + Messages.XMLSampleModelBuilder_2); //$NON-NLS-1$
} else if(!xmlSampleFile.isFile()) {
- throw new IOException("XML Sample '" + xmlSampleFile.getAbsolutePath() + "' is not a normal file. Might be a directory etc."); //$NON-NLS-1$
+ throw new IOException("XML Sample '" + xmlSampleFile.getAbsolutePath() + Messages.XMLSampleModelBuilder_3); //$NON-NLS-1$
}
try {
@@ -123,7 +123,7 @@
if(child.getNodeType() == Node.ELEMENT_NODE) {
configureModelElementTypes((Element) child);
} else {
- throw new IllegalStateException("The configureModelElementTypes method can only be called after the model has been trimed of non-model Nodes. Call trimNonModelNodes() before calling configureModelElementTypes().");
+ throw new IllegalStateException(Messages.XMLSampleModelBuilder_4);
}
}
} else {
@@ -143,7 +143,7 @@
if(child.getNodeType() == Node.ELEMENT_NODE) {
Element childElement = (Element) child;
- String elementName = DomUtils.getName(childElement) + ":" + childElement.getNamespaceURI(); // Yes, namespace can be null, but that's OK.
+ String elementName = DomUtils.getName(childElement) + Messages.XMLSampleModelBuilder_5 + childElement.getNamespaceURI(); // Yes, namespace can be null, but that's OK.
Element earlierOccurance = childElementByNames.get(elementName);
// Mark every element as being optional and possibly being multiple...
@@ -164,7 +164,7 @@
configureModelElementCardinality(childElement);
} else {
- throw new IllegalStateException("The configureModelElementTypes method can only be called after the model has been trimed of non-model Nodes. Call trimNonModelNodes() before calling configureModelElementTypes().");
+ throw new IllegalStateException(Messages.XMLSampleModelBuilder_6);
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java 2010-02-04 10:36:31 UTC (rev 20117)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/model/xml/XSDModelBuilder.java 2010-02-04 10:41:31 UTC (rev 20118)
@@ -85,7 +85,7 @@
XSDElementDeclaration rootElement = elements.get(rootElementName);
if(rootElement == null) {
- throw new IllegalArgumentException("Unknown root element '" + rootElementName + "'."); //$NON-NLS-1$
+ throw new IllegalArgumentException("Unknown root element '" + rootElementName + Messages.XSDModelBuilder_0); //$NON-NLS-1$
}
Document model = createModelInstance();
@@ -108,7 +108,7 @@
File schemaFile = new File(schemaPath);
if(!schemaFile.exists()) {
- throw new IOException("XSD '" + schemaFile.getAbsolutePath() + "' not found."); //$NON-NLS-1$
+ throw new IOException("XSD '" + schemaFile.getAbsolutePath() + Messages.XSDModelBuilder_1); //$NON-NLS-1$
}
xsdSources[i] = new StreamSource(new FileInputStream(schemaFile));
i++;
@@ -134,7 +134,7 @@
ResourceSet resourceSet = new ResourceSetImpl();
Resource resource;
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xsd", new XSDResourceFactoryImpl());
+ resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Messages.XSDModelBuilder_2, new XSDResourceFactoryImpl());
resource = resourceSet.getResource(schemaURI, true);
Map<String, Object> options = new HashMap<String, Object>();
@@ -143,7 +143,7 @@
resource.load(options);
if(resource.getContents().isEmpty()) {
- throw new ModelBuilderException("Failed to load schema '" + schemaURI + "'."); //$NON-NLS-1$
+ throw new ModelBuilderException("Failed to load schema '" + schemaURI + Messages.XSDModelBuilder_3); //$NON-NLS-1$
}
XSDSchema schema = (XSDSchema) resource.getContents().get(0);
@@ -230,7 +230,7 @@
private String getPrefix(String elementNS) {
String nsPrefix = nsPrefixes.getProperty(elementNS);
if(nsPrefix == null) {
- nsPrefix = "ns" + nsPrefixes.size();
+ nsPrefix = Messages.XSDModelBuilder_4 + nsPrefixes.size();
nsPrefixes.setProperty(elementNS, nsPrefix);
}
return nsPrefix;
@@ -296,13 +296,13 @@
XSDSimpleTypeDefinition typeDef = attributeDecl.getTypeDefinition();
String name = attributeDecl.getName();
String attributeNS = attributeDecl.getTargetNamespace();
- String value = "";
+ String value = Messages.XSDModelBuilder_5;
XSDAttributeUseCategory use = attributeUse.getUse();
if(use == XSDAttributeUseCategory.REQUIRED_LITERAL) {
value = REQUIRED;
} else if(attributeUse.getValue() != null) {
- value = OPTIONAL + "=" + attributeUse.getValue().toString();
+ value = OPTIONAL + Messages.XSDModelBuilder_6 + attributeUse.getValue().toString();
} else {
value = OPTIONAL;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java 2010-02-04 10:36:31 UTC (rev 20117)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/TemplateBuilder.java 2010-02-04 10:41:31 UTC (rev 20118)
@@ -266,11 +266,11 @@
}
if (ModelBuilder.NAMESPACE.equals(mappingNode.getNamespaceURI())) {
throw new InvalidMappingException(
- "Unsupported XML target node mapping. Cannot map to a reserved model node from the '" + ModelBuilder.NAMESPACE + "' namespace."); //$NON-NLS-1$
+ "Unsupported XML target node mapping. Cannot map to a reserved model node from the '" + ModelBuilder.NAMESPACE + Messages.TemplateBuilder_0); //$NON-NLS-1$
}
if (ModelBuilder.isHidden(mappingNode)) {
throw new InvalidMappingException(
- "Illegal XML target node mapping for node '" + mappingNode + "'. This node (or one of it's ancestors) is hidden."); //$NON-NLS-1$
+ "Illegal XML target node mapping for node '" + mappingNode + Messages.TemplateBuilder_1); //$NON-NLS-1$
}
}
@@ -414,7 +414,7 @@
}
throw new TemplateBuilderException(
- "Unexpected Exception. Invalid <smk:list> collection node. Has no child elements!");
+ Messages.TemplateBuilder_2);
}
protected void addValueMapping(Node modelNode, ModelNodeResolver modelNodeResolver, String dollarVariable) throws TemplateBuilderException, InvalidMappingException {
@@ -435,7 +435,7 @@
}
public static void writeListStart(StringWriter writer, String srcPath, String collectionItemName) {
- writer.write("<smk:list smk:srcPath=\"" + srcPath + "\" smk:collectionItemName=\"" + collectionItemName + "\" xmlns:smk=\"" + ModelBuilder.NAMESPACE + "\">"); //$NON-NLS-1$
+ writer.write("<smk:list smk:srcPath=\"" + srcPath + Messages.TemplateBuilder_3 + collectionItemName + Messages.TemplateBuilder_4 + ModelBuilder.NAMESPACE + Messages.TemplateBuilder_5); //$NON-NLS-1$
}
public static void writeListEnd(StringWriter writer) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/ValueMapping.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/ValueMapping.java 2010-02-04 10:36:31 UTC (rev 20117)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/ValueMapping.java 2010-02-04 10:41:31 UTC (rev 20118)
@@ -30,7 +30,7 @@
*/
public class ValueMapping extends Mapping {
- public static final String RAW_FORMATING_KEY = ValueMapping.class.getName() + "#RAW_FORMATING_KEY";
+ public static final String RAW_FORMATING_KEY = ValueMapping.class.getName() + Messages.ValueMapping_0;
private Class<?> valueType;
private Properties encodeProperties;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java 2010-02-04 10:36:31 UTC (rev 20117)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/csv/CSVFreeMarkerTemplateBuilder.java 2010-02-04 10:41:31 UTC (rev 20118)
@@ -104,10 +104,10 @@
}
private TemplateElement findListNode(TemplateElement templateNode) throws TemplateBuilderException {
- if(templateNode.getNodeName().equals("IteratorBlock")) {
+ if(templateNode.getNodeName().equals(Messages.CSVFreeMarkerTemplateBuilder_0)) {
String description = templateNode.getDescription();
if(!description.startsWith("list")) { //$NON-NLS-1$
- throw new TemplateBuilderException ("Unsupported CSV template IteratorBlock type '" + description + "'. Currently only support 'list' IteratorBlock nodes."); //$NON-NLS-1$
+ throw new TemplateBuilderException ("Unsupported CSV template IteratorBlock type '" + description + Messages.CSVFreeMarkerTemplateBuilder_1); //$NON-NLS-1$
}
return templateNode;
} else {
@@ -196,7 +196,7 @@
template.append('\n');
}
- template.append("<#list " + collectionMapping.getSrcPath() + " as " + collectionMapping.getCollectionItemName() + ">\n"); //$NON-NLS-1$
+ template.append("<#list " + collectionMapping.getSrcPath() + Messages.CSVFreeMarkerTemplateBuilder_2 + collectionMapping.getCollectionItemName() + Messages.CSVFreeMarkerTemplateBuilder_3); //$NON-NLS-1$
int fieldIndex = 0;
for(int i = 0; i < nodeList.getLength(); i++) {
Node node = nodeList.item(i);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/UnmappedCollectionNodeException.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/UnmappedCollectionNodeException.java 2010-02-04 10:36:31 UTC (rev 20117)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/exception/UnmappedCollectionNodeException.java 2010-02-04 10:41:31 UTC (rev 20118)
@@ -31,7 +31,7 @@
private Element unmappedCollectionNode;
public UnmappedCollectionNodeException(Element unmappedCollectionNode) {
- super("Unmapped collection node '" + DomUtils.getName(unmappedCollectionNode) + "'."); //$NON-NLS-1$
+ super("Unmapped collection node '" + DomUtils.getName(unmappedCollectionNode) + Messages.UnmappedCollectionNodeException_0); //$NON-NLS-1$
this.unmappedCollectionNode = unmappedCollectionNode;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java 2010-02-04 10:36:31 UTC (rev 20117)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/util/FreeMarkerUtil.java 2010-02-04 10:41:31 UTC (rev 20118)
@@ -61,14 +61,14 @@
splitTokens[0] = splitTokens[0].substring(0, splitTokens[0].length() - 1);
}
} else {
- throw new TemplateBuilderException("Unsupported FreeMarker variable syntax '" + dollarVariable + "'."); //$NON-NLS-1$
+ throw new TemplateBuilderException("Unsupported FreeMarker variable syntax '" + dollarVariable + Messages.FreeMarkerUtil_0); //$NON-NLS-1$
}
return splitTokens;
}
public static boolean isDollarVariable(String variable) {
- return (variable.startsWith("${") && variable.endsWith("}")); //$NON-NLS-1$
+ return (variable.startsWith("${") && variable.endsWith(Messages.FreeMarkerUtil_1)); //$NON-NLS-1$
}
public static String toFreeMarkerVariable(ValueMapping mapping) {
@@ -80,12 +80,12 @@
encodeProperties = new Properties();
}
- builder.append("${" + mapping.getSrcPath() + "!?");
+ builder.append(Messages.FreeMarkerUtil_2 + mapping.getSrcPath() + Messages.FreeMarkerUtil_3);
rawFormatting = encodeProperties.getProperty(ValueMapping.RAW_FORMATING_KEY);
if(rawFormatting != null) {
builder.append(rawFormatting);
- builder.append("}");
+ builder.append(Messages.FreeMarkerUtil_4);
} else {
Class<?> valueType = mapping.getValueType();
if(valueType != null) {
@@ -93,19 +93,19 @@
if(valueType == java.util.Date.class) {
String format = encodeProperties.getProperty(DateDecoder.FORMAT);
if(format != null) {
- builder.append("string('" + format + "')}");
+ builder.append(Messages.FreeMarkerUtil_5 + format + Messages.FreeMarkerUtil_6);
} else {
- builder.append("string.medium}");
+ builder.append(Messages.FreeMarkerUtil_7);
}
} else if(Number.class.isAssignableFrom(valueType)) {
- builder.append("c}");
+ builder.append(Messages.FreeMarkerUtil_8);
} else if(valueType == Double.TYPE || valueType == Float.TYPE || valueType == Integer.TYPE || valueType == Long.TYPE || valueType == Short.TYPE) {
- builder.append("c}");
+ builder.append(Messages.FreeMarkerUtil_9);
} else {
- builder.append("string}");
+ builder.append(Messages.FreeMarkerUtil_10);
}
} else {
- builder.append("string}");
+ builder.append(Messages.FreeMarkerUtil_11);
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java 2010-02-04 10:36:31 UTC (rev 20117)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.templating/src/org/jboss/tools/smooks/templating/template/xml/XMLFreeMarkerTemplateBuilder.java 2010-02-04 10:41:31 UTC (rev 20118)
@@ -138,7 +138,7 @@
if(mapping instanceof CollectionMapping) {
collectionMapping = (CollectionMapping) mapping;
TemplateBuilder.writeIndent(indent, templateWriter);
- templateWriter.write("<#list " + collectionMapping.getSrcPath() + " as " + collectionMapping.getCollectionItemName() + ">\n"); //$NON-NLS-1$
+ templateWriter.write("<#list " + collectionMapping.getSrcPath() + Messages.XMLFreeMarkerTemplateBuilder_0 + collectionMapping.getCollectionItemName() + Messages.XMLFreeMarkerTemplateBuilder_1); //$NON-NLS-1$
}
TemplateBuilder.writeIndent(indent, templateWriter);
@@ -334,11 +334,11 @@
// We need to rewrite the FreeMarker template so as to get rid of the FreeMarker constructs,
// such as <#list> etc. We convert these to XML elements in the ModelBuilder.NAMESPACE namespace.
- if(element.getNodeName().equals("IteratorBlock")) {
+ if(element.getNodeName().equals(Messages.XMLFreeMarkerTemplateBuilder_2)) {
String description = element.getDescription();
if(!description.startsWith("list")) { //$NON-NLS-1$
- throw new TemplateBuilderException ("Unsupported XML template IteratorBlock type '" + description + "'. Currently only support 'list' IteratorBlock nodes."); //$NON-NLS-1$
+ throw new TemplateBuilderException ("Unsupported XML template IteratorBlock type '" + description + Messages.XMLFreeMarkerTemplateBuilder_3); //$NON-NLS-1$
}
String[] tokens = description.split(" +?"); //$NON-NLS-1$
@@ -358,7 +358,7 @@
rewriteTemplateElement(children.nextElement(), templateRewriteBuffer);
}
} else {
- if(element.getClass().getSimpleName().equals("DollarVariable")) {
+ if(element.getClass().getSimpleName().equals(Messages.XMLFreeMarkerTemplateBuilder_4)) {
templateRewriteBuffer.append(element.toString());
} else {
templateRewriteBuffer.append(element.getCanonicalForm());
15 years, 8 months
JBoss Tools SVN: r20117 - trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-02-04 05:36:31 -0500 (Thu, 04 Feb 2010)
New Revision: 20117
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/FolderReferenceComposite.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5763 :
"The scope of Actual Run-Time Folders is not saved"
- VPE saves the scope now
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/FolderReferenceComposite.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/FolderReferenceComposite.java 2010-02-04 08:23:09 UTC (rev 20116)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/FolderReferenceComposite.java 2010-02-04 10:36:31 UTC (rev 20117)
@@ -17,14 +17,15 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.DirectoryDialog;
@@ -145,19 +146,26 @@
/*
* Create scope combobox.
*/
- CCombo combobox = new CCombo(groupControl, SWT.BORDER);
+ final Combo scopeCombo
+ = new Combo(groupControl, SWT.BORDER | SWT.READ_ONLY);
String[] items = { Messages.SCOPE_PAGE_SHORT,
Messages.SCOPE_FOLDER_SHORT, Messages.SCOPE_PROJECT_SHORT };
- combobox.setItems(items);
- combobox.setText(Messages.SCOPE_PAGE_SHORT);
+ scopeCombo.setItems(items);
+ scopeCombo.select(current.getScope());
gd = new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1);
- combobox.setLayoutData(gd);
+ scopeCombo.setLayoutData(gd);
+
+ scopeCombo.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ current.setScope(scopeCombo.getSelectionIndex());
+ }
+ });
return groupControl;
}
public void commit() {
- current.setScope(getNewScope());
List l = new ArrayList();
for (int i = rs.length - 2; i >= 0; i--) {
if(rs[i].getLocation().equals(current.getLocation())) {
@@ -178,10 +186,6 @@
}
}
}
-
- int getNewScope() {
- return ResourceReference.FILE_SCOPE;
- }
public void setFileLocation(Object fileLocation) {
this.fileLocation = fileLocation;
15 years, 8 months
JBoss Tools SVN: r20116 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui: src/org/jboss/tools/smooks/configuration/editors/javabean12 and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2010-02-04 03:23:09 -0500 (Thu, 04 Feb 2010)
New Revision: 20116
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSection.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSectionFilter.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavaBean12PropertyUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/Javabean12ExpressionUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavabeanValueBinding12UICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavabeanWiringBiding12UICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/Messages.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/messages.properties
Log:
JBIDE-5726
done
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml 2010-02-03 22:55:08 UTC (rev 20115)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml 2010-02-04 08:23:09 UTC (rev 20116)
@@ -139,6 +139,12 @@
id="org.jboss.tools.smooks.ui.propertySection.csvrecord"
tab="org.jboss.tools.smooks.ui.propertySection.csvrecordTab">
</propertySection>
+ <propertySection
+ class="org.jboss.tools.smooks.editor.propertySections.JavaMappingPathSection"
+ filter="org.jboss.tools.smooks.editor.propertySections.JavaMappingPathSectionFilter"
+ id="org.jboss.tools.smooks.ui.propertySection.mappingPath"
+ tab="org.jboss.tools.smooks.ui.propertySection.mappingPathTab">
+ </propertySection>
</propertySections>
</extension>
<extension
@@ -173,6 +179,12 @@
id="org.jboss.tools.smooks.ui.propertySection.csvrecordTab"
label="CSV Record Properties">
</propertyTab>
+ <propertyTab
+ afterTab="org.jboss.tools.smooks.ui.propertySection.decodeParamTab"
+ category="properties"
+ id="org.jboss.tools.smooks.ui.propertySection.mappingPathTab"
+ label="Mapping Path">
+ </propertyTab>
</propertyTabs>
</extension>
<extension
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavaBean12PropertyUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavaBean12PropertyUICreator.java 2010-02-03 22:55:08 UTC (rev 20115)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavaBean12PropertyUICreator.java 2010-02-04 08:23:09 UTC (rev 20116)
@@ -121,9 +121,7 @@
@Override
public List<AttributeFieldEditPart> createExtendUIOnTop(AdapterFactoryEditingDomain editingdomain,
FormToolkit toolkit, Composite parent, Object model, ISmooksModelProvider formEditor, IEditorPart part) {
- return createElementSelectionSection(Messages.JavaBean12PropertyUICreator_CreateOnElementGroupText, editingdomain, toolkit, parent, model, formEditor,
- part, Javabean12Package.Literals.BEAN_TYPE__CREATE_ON_ELEMENT,
- Javabean12Package.Literals.BEAN_TYPE__CREATE_ON_ELEMENT_NS);
+ return super.createExtendUIOnTop(editingdomain, toolkit, parent, model, formEditor, part);
}
/*
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/Javabean12ExpressionUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/Javabean12ExpressionUICreator.java 2010-02-03 22:55:08 UTC (rev 20115)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/Javabean12ExpressionUICreator.java 2010-02-04 08:23:09 UTC (rev 20116)
@@ -94,9 +94,9 @@
editingdomain, Javabean12Package.Literals.EXPRESSION_TYPE__SETTER_METHOD, model), model);
list.add(pEditPart);
list.add(mEditPart);
- list.addAll(createElementSelectionSection(Messages.Javabean12ExpressionUICreator_ExecuteOnGroupText, editingdomain, toolkit, parent, model,
- formEditor, part,Javabean12Package.Literals.EXPRESSION_TYPE__EXEC_ON_ELEMENT,
- Javabean12Package.Literals.EXPRESSION_TYPE__EXEC_ON_ELEMENT_NS));
+// list.addAll(createElementSelectionSection(Messages.Javabean12ExpressionUICreator_ExecuteOnGroupText, editingdomain, toolkit, parent, model,
+// formEditor, part,Javabean12Package.Literals.EXPRESSION_TYPE__EXEC_ON_ELEMENT,
+// Javabean12Package.Literals.EXPRESSION_TYPE__EXEC_ON_ELEMENT_NS));
return list;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavabeanValueBinding12UICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavabeanValueBinding12UICreator.java 2010-02-03 22:55:08 UTC (rev 20115)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavabeanValueBinding12UICreator.java 2010-02-04 08:23:09 UTC (rev 20116)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.javabean12;
-import java.util.Iterator;
import java.util.List;
import org.eclipse.emf.ecore.EAttribute;
@@ -22,7 +21,6 @@
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
import org.jboss.tools.smooks.configuration.editors.javabean.PropertiesAndSetterMethodSearchFieldEditorCreator;
-import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.editor.ISmooksModelProvider;
import org.jboss.tools.smooks.model.javabean12.BeanType;
import org.jboss.tools.smooks.model.javabean12.Javabean12Package;
@@ -81,23 +79,24 @@
@Override
public List<AttributeFieldEditPart> createExtendUIOnBottom(AdapterFactoryEditingDomain editingdomain,
FormToolkit toolkit, Composite parent, Object model, ISmooksModelProvider formEditor, IEditorPart part) {
- List<AttributeFieldEditPart> list = createElementSelectionSection(Messages.JavabeanValueBinding12UICreator_DataGroupText, editingdomain, toolkit, parent,
- model, formEditor, part, Javabean12Package.eINSTANCE.getValueType_Data(), Javabean12Package.eINSTANCE
- .getValueType_DataNS());
- Composite groupParent = parent;
- for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
- AttributeFieldEditPart attributeFieldEditPart = (AttributeFieldEditPart) iterator.next();
- if (attributeFieldEditPart.getAttribute() == null) {
- groupParent = (Composite) attributeFieldEditPart.getContentControl();
- break;
- }
- }
- list.add(SmooksUIUtils.createStringFieldEditor(groupParent, toolkit, getPropertyDescriptor(editingdomain,
- Javabean12Package.Literals.VALUE_TYPE__DEFAULT, model), model, false, false, null));
-
+// List<AttributeFieldEditPart> list = createElementSelectionSection(Messages.JavabeanValueBinding12UICreator_DataGroupText, editingdomain, toolkit, parent,
+// model, formEditor, part, Javabean12Package.eINSTANCE.getValueType_Data(), Javabean12Package.eINSTANCE
+// .getValueType_DataNS());
+// Composite groupParent = parent;
+// for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
+// AttributeFieldEditPart attributeFieldEditPart = (AttributeFieldEditPart) iterator.next();
+// if (attributeFieldEditPart.getAttribute() == null) {
+// groupParent = (Composite) attributeFieldEditPart.getContentControl();
+// break;
+// }
+// }
// list.add(SmooksUIUtils.createStringFieldEditor(groupParent, toolkit, getPropertyDescriptor(editingdomain,
-// Javabean12Package.Literals.VALUE_TYPE__DECODER, model), model, false, false, null));
- return list;
+// Javabean12Package.Literals.VALUE_TYPE__DEFAULT, model), model, false, false, null));
+//
+//// list.add(SmooksUIUtils.createStringFieldEditor(groupParent, toolkit, getPropertyDescriptor(editingdomain,
+//// Javabean12Package.Literals.VALUE_TYPE__DECODER, model), model, false, false, null));
+// return list;
+ return super.createExtendUIOnBottom(editingdomain, toolkit, parent, model, formEditor, part);
}
/*
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavabeanWiringBiding12UICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavabeanWiringBiding12UICreator.java 2010-02-03 22:55:08 UTC (rev 20115)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean12/JavabeanWiringBiding12UICreator.java 2010-02-04 08:23:09 UTC (rev 20116)
@@ -111,9 +111,9 @@
editingdomain, Javabean12Package.eINSTANCE.getWiringType_SetterMethod(), model), model);
list.add(pEditPart);
list.add(mEditPart);
- list.addAll(createElementSelectionSection(Messages.JavabeanWiringBiding12UICreator_WiringOnGroupText, editingdomain, toolkit, parent, model, formEditor,
- part, Javabean12Package.eINSTANCE.getWiringType_WireOnElement(),
- Javabean12Package.Literals.WIRING_TYPE__WIRE_ON_ELEMENT_NS));
+// list.addAll(createElementSelectionSection(Messages.JavabeanWiringBiding12UICreator_WiringOnGroupText, editingdomain, toolkit, parent, model, formEditor,
+// part, Javabean12Package.eINSTANCE.getWiringType_WireOnElement(),
+// Javabean12Package.Literals.WIRING_TYPE__WIRE_ON_ELEMENT_NS));
return list;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2010-02-03 22:55:08 UTC (rev 20115)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2010-02-04 08:23:09 UTC (rev 20116)
@@ -3000,13 +3000,58 @@
}
return null;
}
-
+
+ public static EStructuralFeature getSelectorNamespaceFeature(EObject model) {
+ if (model == null)
+ return null;
+ if (model instanceof Counter) {
+ return CalcPackage.Literals.COUNTER__COUNT_ON_ELEMENT_NS;
+ }
+ if (model instanceof Direct) {
+ return DatasourcePackage.Literals.DIRECT__BIND_ON_ELEMENT_NS;
+ }
+ if (model instanceof RouteBean) {
+ return EsbroutingPackage.Literals.ROUTE_BEAN__ROUTE_ON_ELEMENT_NS;
+ }
+ if (model instanceof OutputStream) {
+ return FileRoutingPackage.Literals.OUTPUT_STREAM__OPEN_ON_ELEMENT_NS;
+ }
+ if (model instanceof Freemarker) {
+ return FreemarkerPackage.Literals.FREEMARKER__APPLY_ON_ELEMENT_NS;
+ }
+ if (model instanceof Xsl) {
+ return XslPackage.Literals.XSL__APPLY_ON_ELEMENT_NS;
+ }
+ if (model instanceof GroovyUICreator) {
+ return GroovyPackage.Literals.GROOVY__EXECUTE_ON_ELEMENT_NS;
+ }
+ if (model instanceof JmsRouter) {
+ return JmsroutingPackage.Literals.JMS_ROUTER__ROUTE_ON_ELEMENT_NS;
+ }
+ if (model instanceof ResourceConfigType) {
+ return SmooksPackage.Literals.RESOURCE_CONFIG_TYPE__SELECTOR_NAMESPACE;
+ }
+ if (model instanceof SmooksResourceListType) {
+ return SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_SELECTOR_NAMESPACE;
+ }
+ if (model instanceof BeanType) {
+ return Javabean12Package.Literals.BEAN_TYPE__CREATE_ON_ELEMENT_NS;
+ }
+ if (model instanceof org.jboss.tools.smooks.model.javabean12.WiringType) {
+ return Javabean12Package.Literals.WIRING_TYPE__WIRE_ON_ELEMENT_NS;
+ }
+ if (model instanceof org.jboss.tools.smooks.model.javabean12.ExpressionType) {
+ return Javabean12Package.Literals.EXPRESSION_TYPE__EXEC_ON_ELEMENT_NS;
+ }
+ if (model instanceof org.jboss.tools.smooks.model.javabean12.ValueType) {
+ return Javabean12Package.Literals.VALUE_TYPE__DATA_NS;
+ }
+ return null;
+ }
+
public static EStructuralFeature getSelectorFeature(EObject model) {
if (model == null)
return null;
- // if (model instanceof BindingsType) {
- // return JavabeanPackage.Literals.BINDINGS_TYPE__CREATE_ON_ELEMENT;
- // }
if (model instanceof Counter) {
return CalcPackage.Literals.COUNTER__COUNT_ON_ELEMENT;
}
@@ -3039,17 +3084,6 @@
if (model instanceof SmooksResourceListType) {
return SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_SELECTOR;
}
-
- // if (model instanceof WiringType) {
- // return JavabeanPackage.Literals.WIRING_TYPE__WIRE_ON_ELEMENT;
- // }
- // if (model instanceof ExpressionType) {
- // return JavabeanPackage.Literals.EXPRESSION_TYPE__EXEC_ON_ELEMENT;
- // }
- // if (model instanceof ValueType) {
- // return JavabeanPackage.Literals.VALUE_TYPE__DATA;
- // }
-
if (model instanceof BeanType) {
return Javabean12Package.Literals.BEAN_TYPE__CREATE_ON_ELEMENT;
}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSection.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSection.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSection.java 2010-02-04 08:23:09 UTC (rev 20116)
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.smooks.editor.propertySections;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.IFormColors;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection;
+import org.jboss.tools.smooks.model.javabean12.Javabean12Package;
+import org.jboss.tools.smooks.model.javabean12.ValueType;
+
+/**
+ * @author Dart
+ *
+ */
+public class JavaMappingPathSection extends AbstractSmooksPropertySection {
+
+ private Composite controlComposite;
+ private Text pathText;
+ private Text namespaceText;
+ private Text defaultValueText;
+
+ protected boolean lock = false;
+ private Label defaultValueLabel;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls
+ * (org.eclipse.swt.widgets.Composite,
+ * org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage)
+ */
+ @Override
+ public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ TabbedPropertySheetWidgetFactory factory = aTabbedPropertySheetPage.getWidgetFactory();
+
+ Section section = createRootSection(factory, parent);
+ section.setText(Messages.JavaMappingPathSection_MappingPath);
+
+ controlComposite = factory.createComposite(section, SWT.NONE);
+
+ GridLayout gridLayout = new GridLayout();
+ gridLayout.numColumns = 2;
+
+ controlComposite.setLayout(gridLayout);
+
+ section.setClient(controlComposite);
+
+ createTextContorls(factory);
+
+ hookTextContorls();
+
+ }
+
+ protected void createTextContorls(TabbedPropertySheetWidgetFactory factory) {
+ Label pathLabel = factory.createLabel(controlComposite, Messages.JavaMappingPathSection_PathLabel);
+ pathLabel.setForeground(factory.getColors().getColor(IFormColors.TITLE));
+ pathText = factory.createText(controlComposite, "", SWT.READ_ONLY); //$NON-NLS-1$
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ pathText.setLayoutData(gd);
+
+ Label namespaceLabel = factory.createLabel(controlComposite, Messages.JavaMappingPathSection_NamespaceLabel);
+ namespaceLabel.setForeground(factory.getColors().getColor(IFormColors.TITLE));
+ namespaceText = factory.createText(controlComposite, ""); //$NON-NLS-1$
+ namespaceText.setLayoutData(gd);
+
+ defaultValueLabel = factory.createLabel(controlComposite, Messages.JavaMappingPathSection_DefaultLabel);
+ defaultValueLabel.setForeground(factory.getColors().getColor(IFormColors.TITLE));
+ defaultValueText = factory.createText(controlComposite, ""); //$NON-NLS-1$
+ defaultValueText.setLayoutData(gd);
+ }
+
+ protected void hookTextContorls() {
+
+ namespaceText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ if (lock)
+ return;
+ Object obj = getTargetModel();
+ EditingDomain domain = getSmooksModelProvider().getEditingDomain();
+ if (obj instanceof EObject && domain != null) {
+ EObject model = (EObject) obj;
+ EStructuralFeature feature = SmooksUIUtils.getSelectorNamespaceFeature(model);
+ if (feature != null) {
+ Object v = model.eGet(feature);
+ String newV = ((Text) e.getSource()).getText().trim();
+ if (v != null) {
+ String oldV = v.toString().trim();
+ if (oldV.equals(newV))
+ return;
+ }
+ Command setCommand = SetCommand.create(domain, model, feature, newV);
+ domain.getCommandStack().execute(setCommand);
+ }
+ }
+ }
+ });
+
+ defaultValueText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ if (lock)
+ return;
+ Object obj = getTargetModel();
+ EditingDomain domain = getSmooksModelProvider().getEditingDomain();
+ if (obj instanceof ValueType && domain != null) {
+ ValueType model = (ValueType) obj;
+ Object v = model.getDefault();
+ String newV = ((Text) e.getSource()).getText().trim();
+ if (v != null) {
+ String oldV = v.toString().trim();
+ if (oldV.equals(newV))
+ return;
+ }
+ Command setCommand = SetCommand.create(domain, model, Javabean12Package.Literals.VALUE_TYPE__DEFAULT, newV);
+ domain.getCommandStack().execute(setCommand);
+ }
+ }
+ });
+ }
+
+ protected void refreshTextControls() {
+ lock = true;
+ pathText.setText(""); //$NON-NLS-1$
+ namespaceText.setText(""); //$NON-NLS-1$
+ defaultValueText.setText(""); //$NON-NLS-1$
+
+ defaultValueLabel.setVisible(false);
+ defaultValueText.setVisible(false);
+ Object obj = getTargetModel();
+ if (obj instanceof EObject) {
+ EObject model = (EObject) obj;
+ EStructuralFeature feature = SmooksUIUtils.getSelectorFeature(model);
+ if (feature != null) {
+ Object v = model.eGet(feature);
+ if (v != null) {
+ pathText.setText(v.toString().trim());
+ }
+ }
+ feature = SmooksUIUtils.getSelectorNamespaceFeature(model);
+ if (feature != null) {
+ Object v = model.eGet(feature);
+ if (v != null) {
+ namespaceText.setText(v.toString().trim());
+ }
+ }
+ if (model instanceof ValueType) {
+ defaultValueLabel.setVisible(true);
+ defaultValueText.setVisible(true);
+ Object v = ((ValueType) model).getDefault();// .eGet(feature);
+ if (v != null) {
+ defaultValueText.setText(v.toString().trim());
+ }
+ }
+ }
+ lock = false;
+
+ }
+
+ protected Object getTargetModel() {
+ TreeNodeConnection lineModel = (TreeNodeConnection) getPresentSelectedGraphModel();
+ Object model = lineModel.getTargetNode().getData();
+ model = AdapterFactoryEditingDomain.unwrap(model);
+ return model;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.editor.propertySections.AbstractSmooksPropertySection
+ * #refresh()
+ */
+ @Override
+ public void refresh() {
+ super.refresh();
+ refreshTextControls();
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSectionFilter.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSectionFilter.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSectionFilter.java 2010-02-04 08:23:09 UTC (rev 20116)
@@ -0,0 +1,72 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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.smooks.editor.propertySections;
+
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.gef.DefaultEditDomain;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.jface.viewers.IFilter;
+import org.eclipse.ui.IEditorPart;
+import org.jboss.tools.smooks.gef.tree.editparts.TreeNodeConnectionEditPart;
+import org.jboss.tools.smooks.gef.tree.model.BeanReferenceConnection;
+import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection;
+import org.jboss.tools.smooks.graphical.editors.IGraphicalEditorPart;
+import org.jboss.tools.smooks.graphical.editors.editparts.javamapping.JavaBeanChildNodeEditPart;
+import org.jboss.tools.smooks.graphical.editors.template.SmooksFreemarkerTemplateGraphicalEditor;
+import org.jboss.tools.smooks.model.javabean12.BeanType;
+import org.jboss.tools.smooks.model.javabean12.ExpressionType;
+import org.jboss.tools.smooks.model.javabean12.ValueType;
+import org.jboss.tools.smooks.model.javabean12.WiringType;
+
+/**
+ * @author Dart
+ *
+ */
+public class JavaMappingPathSectionFilter implements IFilter {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object)
+ */
+ public boolean select(Object toTest) {
+ if (toTest == null)
+ return false;
+ if (toTest instanceof TreeNodeConnectionEditPart) {
+ GraphicalViewer viewer = (GraphicalViewer) ((TreeNodeConnectionEditPart) toTest).getViewer();
+ ((DefaultEditDomain) viewer.getEditDomain()).getEditorPart();
+ IEditorPart editorPart = ((DefaultEditDomain) viewer.getEditDomain()).getEditorPart();
+ if (toTest instanceof JavaBeanChildNodeEditPart && editorPart instanceof IGraphicalEditorPart) {
+ if (SmooksFreemarkerTemplateGraphicalEditor.ID.equals(((IGraphicalEditorPart) editorPart).getID())) {
+ return false;
+ }
+ }
+ TreeNodeConnection connection = (TreeNodeConnection) ((TreeNodeConnectionEditPart) toTest).getModel();
+ if(connection instanceof BeanReferenceConnection) return false;
+ Object data = connection.getTargetNode().getData();
+ data = AdapterFactoryEditingDomain.unwrap(data);
+ if (data instanceof ValueType) {
+ return true;
+ }
+ if (data instanceof WiringType) {
+ return true;
+ }
+ if (data instanceof ExpressionType) {
+ return true;
+ }
+ if (data instanceof BeanType) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/JavaMappingPathSectionFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/Messages.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/Messages.java 2010-02-03 22:55:08 UTC (rev 20115)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/Messages.java 2010-02-04 08:23:09 UTC (rev 20116)
@@ -7,6 +7,10 @@
public static String CSVRecordSection_Label_Quote;
public static String CSVRecordSection_Label_Separator;
public static String CSVRecordSection_Section_Title;
+ public static String JavaMappingPathSection_DefaultLabel;
+ public static String JavaMappingPathSection_MappingPath;
+ public static String JavaMappingPathSection_NamespaceLabel;
+ public static String JavaMappingPathSection_PathLabel;
public static String RuleBaseSection_Action_Test;
public static String RuleBaseSection_Button_Add;
public static String RuleBaseSection_Button_Delete;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/messages.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/messages.properties 2010-02-03 22:55:08 UTC (rev 20115)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/propertySections/messages.properties 2010-02-04 08:23:09 UTC (rev 20116)
@@ -1,6 +1,10 @@
CSVRecordSection_Label_Quote=Quote Character :
CSVRecordSection_Label_Separator=Separator Character :
CSVRecordSection_Section_Title=CSV Properties
+JavaMappingPathSection_DefaultLabel=Default Value :
+JavaMappingPathSection_MappingPath=Mapping Path
+JavaMappingPathSection_NamespaceLabel=NameSpace :
+JavaMappingPathSection_PathLabel=Path :
RuleBaseSection_Action_Test=Test
RuleBaseSection_Button_Add=Add
RuleBaseSection_Button_Delete=Delete
15 years, 8 months
JBoss Tools SVN: r20115 - workspace/examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-02-03 17:55:08 -0500 (Wed, 03 Feb 2010)
New Revision: 20115
Modified:
workspace/examples/project-examples-3.0.xml
workspace/examples/project-examples-3.1.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-1070 Clean up project examples locations
Modified: workspace/examples/project-examples-3.0.xml
===================================================================
--- workspace/examples/project-examples-3.0.xml 2010-02-03 22:29:46 UTC (rev 20114)
+++ workspace/examples/project-examples-3.0.xml 2010-02-03 22:55:08 UTC (rev 20115)
@@ -438,23 +438,6 @@
http://anonsvn.jboss.org/repos/jbosstools/workspace/dgolovin/examples/rf/...
</url>
</project>
-
- <project>
- <category>RESTEasy</category>
- <name>simple</name>
- <included-projects>
- simple
- </included-projects>
- <shortDescription>RESTEasy Simple Example</shortDescription>
- <description>This project is a simple example showing usage of @Path, @GET, PUT, POST, and @PathParam. It uses pure streaming output and includes the 'simple' project.
-Requires m2eclipse >= 0.9.7.20081001-2217. You can install it using the following update site: http://m2eclipse.sonatype.org/update-dev/
- </description>
- <size>16939</size>
- <url>
- http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/resteasy-examp...
- </url>
- </project>
-
</projects>
Modified: workspace/examples/project-examples-3.1.xml
===================================================================
--- workspace/examples/project-examples-3.1.xml 2010-02-03 22:29:46 UTC (rev 20114)
+++ workspace/examples/project-examples-3.1.xml 2010-02-03 22:55:08 UTC (rev 20115)
@@ -174,4 +174,21 @@
http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/seam-examples/...
</url>
</project>
+
+ <project>
+ <category>RESTEasy</category>
+ <name>simple</name>
+ <included-projects>
+ simple
+ </included-projects>
+
+ <shortDescription>RESTEasy Simple Example</shortDescription>
+ <description>This project is a simple example showing usage of @Path, @GET, PUT, POST, and @PathParam. It uses pure streaming output and includes the 'simple' project.
+Requires m2eclipse >= 0.9.7.20081001-2217. You can install it using the following update site: http://m2eclipse.sonatype.org/update-dev/
+ </description>
+ <size>16939</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/resteasy-examp...
+ </url>
+ </project>
</projects>
15 years, 8 months
JBoss Tools SVN: r20114 - trunk/examples/features/org.jboss.tools.project.examples.feature.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-02-03 17:29:46 -0500 (Wed, 03 Feb 2010)
New Revision: 20114
Modified:
trunk/examples/features/org.jboss.tools.project.examples.feature/feature.properties
Log:
https://jira.jboss.org/jira/browse/JBDS-1070 Clean up project examples locations
Modified: trunk/examples/features/org.jboss.tools.project.examples.feature/feature.properties
===================================================================
--- trunk/examples/features/org.jboss.tools.project.examples.feature/feature.properties 2010-02-03 22:29:35 UTC (rev 20113)
+++ trunk/examples/features/org.jboss.tools.project.examples.feature/feature.properties 2010-02-03 22:29:46 UTC (rev 20114)
@@ -27,9 +27,7 @@
description=Project Examples
# "copyright" property - text of the "Feature Update Copyright"
-copyright=\
-Copyright (c) 2008-2009 JBoss by Red Hat and others.\n\
-All rights reserved. This program and the accompanying materials\n\
+copyright=Copyright (c) 2008-2009 JBoss by Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n
are made available under the terms of the Eclipse Public License v1.0\n\
which accompanies this distribution, and is available at\n\
http\://www.eclipse.org/legal/epl-v10.html\n\
15 years, 8 months
JBoss Tools SVN: r20113 - in trunk/examples: plugins/org.jboss.tools.community.project.examples and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-02-03 17:29:35 -0500 (Wed, 03 Feb 2010)
New Revision: 20113
Added:
trunk/examples/features/org.jboss.tools.community.project.examples.feature/.project
trunk/examples/features/org.jboss.tools.community.project.examples.feature/build.properties
trunk/examples/features/org.jboss.tools.community.project.examples.feature/feature.properties
trunk/examples/features/org.jboss.tools.community.project.examples.feature/feature.xml
trunk/examples/features/org.jboss.tools.community.project.examples.feature/license.html
trunk/examples/plugins/org.jboss.tools.community.project.examples/.project
trunk/examples/plugins/org.jboss.tools.community.project.examples/META-INF/
trunk/examples/plugins/org.jboss.tools.community.project.examples/META-INF/MANIFEST.MF
trunk/examples/plugins/org.jboss.tools.community.project.examples/about.html
trunk/examples/plugins/org.jboss.tools.community.project.examples/about.ini
trunk/examples/plugins/org.jboss.tools.community.project.examples/about.mappings
trunk/examples/plugins/org.jboss.tools.community.project.examples/about.properties
trunk/examples/plugins/org.jboss.tools.community.project.examples/build.properties
trunk/examples/plugins/org.jboss.tools.community.project.examples/jboss_about.png
trunk/examples/plugins/org.jboss.tools.community.project.examples/plugin.properties
trunk/examples/plugins/org.jboss.tools.community.project.examples/plugin.xml
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF
trunk/examples/plugins/org.jboss.tools.project.examples/about.html
trunk/examples/plugins/org.jboss.tools.project.examples/plugin.properties
trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-1070 Clean up project examples locations
Added: trunk/examples/features/org.jboss.tools.community.project.examples.feature/.project
===================================================================
--- trunk/examples/features/org.jboss.tools.community.project.examples.feature/.project (rev 0)
+++ trunk/examples/features/org.jboss.tools.community.project.examples.feature/.project 2010-02-03 22:29:35 UTC (rev 20113)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.community.project.examples.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/examples/features/org.jboss.tools.community.project.examples.feature/build.properties
===================================================================
--- trunk/examples/features/org.jboss.tools.community.project.examples.feature/build.properties (rev 0)
+++ trunk/examples/features/org.jboss.tools.community.project.examples.feature/build.properties 2010-02-03 22:29:35 UTC (rev 20113)
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+ license.html,\
+ feature.properties
Added: trunk/examples/features/org.jboss.tools.community.project.examples.feature/feature.properties
===================================================================
--- trunk/examples/features/org.jboss.tools.community.project.examples.feature/feature.properties (rev 0)
+++ trunk/examples/features/org.jboss.tools.community.project.examples.feature/feature.properties 2010-02-03 22:29:35 UTC (rev 20113)
@@ -0,0 +1,54 @@
+###############################################################################
+# Copyright (c) 2008-2009 JBoss by Red Hat and others.
+# All rights reserved. This program and the accompanying materials
+# are 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:
+# JBoss by Red Hat - Initial implementation.
+##############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=JBoss Tools Community Project Examples
+
+# "providerName" property - name of the company that provides the feature
+providerName=JBoss by Red Hat
+
+# "updateSiteName" property - label for the update site
+updateSiteName=JBossTools Update Site
+
+# "description" property - description of the feature
+description=JBoss Tools Community Project Examples
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=Copyright (c) 2008-2009 JBoss by Red Hat and others.\nAll rights reserved. This program and the accompanying materials\n
+are made available under the terms of the Eclipse Public License v1.0\n\
+which accompanies this distribution, and is available at\n\
+http\://www.eclipse.org/legal/epl-v10.html\n\
+\n\
+Contributors\:\n\
+JBoss by Red Hat - Initial implementation.\n
+ ############### end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# START NON-TRANSLATABLE
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
+Raleigh NC 27606 USA.
+# END NON-TRANSLATABLE
+########### end of license property ##########################################
Added: trunk/examples/features/org.jboss.tools.community.project.examples.feature/feature.xml
===================================================================
--- trunk/examples/features/org.jboss.tools.community.project.examples.feature/feature.xml (rev 0)
+++ trunk/examples/features/org.jboss.tools.community.project.examples.feature/feature.xml 2010-02-03 22:29:35 UTC (rev 20113)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.jboss.tools.community.project.examples.feature"
+ label="JBoss Tools Community Project Examples"
+ version="1.0.0"
+ provider-name="%providerName"
+ plugin="org.jboss.tools.community.project.examples">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="%updateSiteName" url="http://download.jboss.org/jbosstools/updates/stable"/>
+ </url>
+
+ <plugin
+ id="org.jboss.tools.community.project.examples"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+</feature>
Added: trunk/examples/features/org.jboss.tools.community.project.examples.feature/license.html
===================================================================
--- trunk/examples/features/org.jboss.tools.community.project.examples.feature/license.html (rev 0)
+++ trunk/examples/features/org.jboss.tools.community.project.examples.feature/license.html 2010-02-03 22:29:35 UTC (rev 20113)
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+
+<body>
+<p>Red Hat, Inc. licenses these features and plugins to you under
+certain open source licenses (or aggregations of such licenses), which
+in a particular case may include the Eclipse Public License, the GNU
+Lesser General Public License, and/or certain other open source
+licenses. For precise licensing details, consult the corresponding
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+Raleigh NC 27606 USA.
+</p>
+</body>
+</html>
\ No newline at end of file
Added: trunk/examples/plugins/org.jboss.tools.community.project.examples/.project
===================================================================
--- trunk/examples/plugins/org.jboss.tools.community.project.examples/.project (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.community.project.examples/.project 2010-02-03 22:29:35 UTC (rev 20113)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.community.project.examples</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/examples/plugins/org.jboss.tools.community.project.examples/META-INF/MANIFEST.MF
===================================================================
--- trunk/examples/plugins/org.jboss.tools.community.project.examples/META-INF/MANIFEST.MF (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.community.project.examples/META-INF/MANIFEST.MF 2010-02-03 22:29:35 UTC (rev 20113)
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %BundleName
+Bundle-SymbolicName: org.jboss.tools.community.project.examples;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Vendor: %BundleVendor
+Bundle-Localization: plugin
+Require-Bundle: org.jboss.tools.project.examples
Added: trunk/examples/plugins/org.jboss.tools.community.project.examples/about.html
===================================================================
--- trunk/examples/plugins/org.jboss.tools.community.project.examples/about.html (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.community.project.examples/about.html 2010-02-03 22:29:35 UTC (rev 20113)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Project Examples</title>
+<style type="text/css" media="screen">
+<!--
+ body {
+ font-family: Sans-serif, Arial, Helvetica;
+ }
+
+-->
+</style>
+</head>
+<body>
+<h1>JBoss Tools Community Project Examples</h1>
+
+<p>
+This plugin is part of the JBoss Tools developed by the <a href="http://www.jboss.com">JBoss Inc.</a>
+</p>
+
+<p>Information about this plugin is available at <a href="http://www.jboss.org/tools">JBoss Tools project page</a></p>
+
+<p>
+This software is distributed under the terms of the Eclipse Public License - v 1.0
+(see <a href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License - Version 1.0</a>).
+</p>
+</body>
+</html>
\ No newline at end of file
Added: trunk/examples/plugins/org.jboss.tools.community.project.examples/about.ini
===================================================================
--- trunk/examples/plugins/org.jboss.tools.community.project.examples/about.ini (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.community.project.examples/about.ini 2010-02-03 22:29:35 UTC (rev 20113)
@@ -0,0 +1,27 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+# test
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=jboss_about.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (not translated)
+# needed for primary features only
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+
+
Added: trunk/examples/plugins/org.jboss.tools.community.project.examples/about.mappings
===================================================================
--- trunk/examples/plugins/org.jboss.tools.community.project.examples/about.mappings (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.community.project.examples/about.mappings 2010-02-03 22:29:35 UTC (rev 20113)
@@ -0,0 +1,5 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+
Added: trunk/examples/plugins/org.jboss.tools.community.project.examples/about.properties
===================================================================
--- trunk/examples/plugins/org.jboss.tools.community.project.examples/about.properties (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.community.project.examples/about.properties 2010-02-03 22:29:35 UTC (rev 20113)
@@ -0,0 +1,2 @@
+blurb=JBoss Tools Community Project Examples\n\nVersion\: {featureVersion}\n\n(c) Copyright JBoss by Red Hat, contributors and others 2004 - 2010. All rights reserved.\nVisit http\://jboss.org/tools
+
Added: trunk/examples/plugins/org.jboss.tools.community.project.examples/build.properties
===================================================================
--- trunk/examples/plugins/org.jboss.tools.community.project.examples/build.properties (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.community.project.examples/build.properties 2010-02-03 22:29:35 UTC (rev 20113)
@@ -0,0 +1,8 @@
+bin.includes = META-INF/,\
+ plugin.properties,\
+ plugin.xml,\
+ about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ jboss_about.png
Added: trunk/examples/plugins/org.jboss.tools.community.project.examples/jboss_about.png
===================================================================
(Binary files differ)
Property changes on: trunk/examples/plugins/org.jboss.tools.community.project.examples/jboss_about.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/plugins/org.jboss.tools.community.project.examples/plugin.properties
===================================================================
--- trunk/examples/plugins/org.jboss.tools.community.project.examples/plugin.properties (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.community.project.examples/plugin.properties 2010-02-03 22:29:35 UTC (rev 20113)
@@ -0,0 +1,3 @@
+BundleVendor = JBoss by Red Hat
+BundleName = JBoss Tools Community Project Examples
+JBoss_Tools_Community_Examples = JBoss Tools Community Examples
\ No newline at end of file
Added: trunk/examples/plugins/org.jboss.tools.community.project.examples/plugin.xml
===================================================================
--- trunk/examples/plugins/org.jboss.tools.community.project.examples/plugin.xml (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.community.project.examples/plugin.xml 2010-02-03 22:29:35 UTC (rev 20113)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+ <extension
+ point="org.jboss.tools.project.examples.projectExamplesXml"
+ name="%JBoss_Tools_Community_Examples">
+ <url>http://anonsvn.jboss.org/repos/jbosstools/workspace/examples/project-exam... </url>
+ <experimental>false</experimental>
+ </extension>
+</plugin>
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF 2010-02-03 22:25:19 UTC (rev 20112)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/META-INF/MANIFEST.MF 2010-02-03 22:29:35 UTC (rev 20113)
@@ -4,7 +4,7 @@
Bundle-SymbolicName: org.jboss.tools.project.examples;singleton:=true
Bundle-Version: 1.0.1
Bundle-Activator: org.jboss.tools.project.examples.ProjectExamplesActivator
-Bundle-Vendor: %BunldeVendor
+Bundle-Vendor: %BundleVendor
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/about.html
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/about.html 2010-02-03 22:25:19 UTC (rev 20112)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/about.html 2010-02-03 22:29:35 UTC (rev 20113)
@@ -14,7 +14,7 @@
</style>
</head>
<body>
-<h1>JBoss Portlet</h1>
+<h1>JBoss Project Examples</h1>
<p>
This plugin is part of the JBoss Tools developed by the <a href="http://www.jboss.com">JBoss Inc.</a>
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/plugin.properties
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/plugin.properties 2010-02-03 22:25:19 UTC (rev 20112)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/plugin.properties 2010-02-03 22:29:35 UTC (rev 20113)
@@ -1,12 +1,8 @@
#Properties file for org.jboss.tools.project.examples
-BunldeVendor = JBoss by Red Hat
+BundleVendor = JBoss by Red Hat
BundleName = Project Examples
JBoss_Tools_category = JBoss Tools
Project_Examples_wizard = Project Examples
Project_Examples_command =Project Examples...
ProjectExamples=Project Examples file
-JBoss_Developer_Studio_Examples = JBoss Developer Studio Examples
-JBoss_Developer_Studio30_Examples = JBoss Developer Studio 3.0 Examples
-JBoss_Tools_Community_Examples = JBoss Tools Community Examples
-JBoss_Tools_Community_Examples_3.1M4 = JBoss Tools Community Examples(for 3.1M3 or higher)
Project_Examples = Project Examples
\ No newline at end of file
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml 2010-02-03 22:25:19 UTC (rev 20112)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml 2010-02-03 22:29:35 UTC (rev 20113)
@@ -53,26 +53,6 @@
</menuContribution>
</extension>
- <extension
- point="org.jboss.tools.project.examples.projectExamplesXml"
- name="%JBoss_Developer_Studio_Examples">
- <url>http://download.jboss.org/jbosstools/examples/project-examples-3.0.xml</url>
- <experimental>false</experimental>
- </extension>
-
- <extension
- point="org.jboss.tools.project.examples.projectExamplesXml"
- name="%JBoss_Developer_Studio30_Examples">
- <url>http://download.jboss.org/jbosstools/examples/project-examples-jbds30.xml</url>
- <experimental>false</experimental>
- </extension>
-
- <extension
- point="org.jboss.tools.project.examples.projectExamplesXml"
- name="%JBoss_Tools_Community_Examples">
- <url>http://anonsvn.jboss.org/repos/jbosstools/workspace/examples/project-exam... </url>
- <experimental>false</experimental>
- </extension>
<extension
point="org.eclipse.ui.preferencePages">
15 years, 8 months
JBoss Tools SVN: r20112 - trunk/examples/features.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-02-03 17:25:19 -0500 (Wed, 03 Feb 2010)
New Revision: 20112
Added:
trunk/examples/features/org.jboss.tools.community.project.examples.feature/
Log:
Initial import.
15 years, 8 months
JBoss Tools SVN: r20111 - trunk/examples/plugins.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-02-03 17:22:04 -0500 (Wed, 03 Feb 2010)
New Revision: 20111
Added:
trunk/examples/plugins/org.jboss.tools.community.project.examples/
Log:
Initial import.
15 years, 8 months
JBoss Tools SVN: r20110 - trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-02-03 13:58:46 -0500 (Wed, 03 Feb 2010)
New Revision: 20110
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5786 revert changes to fix buid compilation errors. bug is reopened
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java 2010-02-03 15:59:35 UTC (rev 20109)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/editor/form/SeamComponentsFileFormLayoutData.java 2010-02-03 18:58:46 UTC (rev 20110)
@@ -10,43 +10,27 @@
******************************************************************************/
package org.jboss.tools.seam.xml.ui.editor.form;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.tools.common.meta.XChild;
-import org.jboss.tools.common.meta.XModelEntity;
-import org.jboss.tools.common.meta.XModelMetaData;
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.ui.forms.*;
import org.jboss.tools.seam.xml.components.model.SeamComponentConstants;
public class SeamComponentsFileFormLayoutData implements SeamComponentConstants {
- static IFormData createSeamComponentListDefinition(String parentEntity) {
- XModelMetaData meta = PreferenceModelUtilities.getPreferenceModel().getMetaData();
- XModelEntity entity = meta.getEntity(parentEntity);
- List<String> childEntities = new ArrayList<String>();
- if(entity != null) {
- XChild[] cs = entity.getChildren();
- for (XChild c: cs) {
- XModelEntity e = meta.getEntity(c.getName());
- if(e != null && e.getAttribute(ATTR_NAME) != null && e.getAttribute(ATTR_CLASS) != null) {
- childEntities.add(c.getName());
- System.out.println(parentEntity + " " + c.getName());
- }
- }
- }
+ static IFormData SEAM_COMPONENT_LIST_DEFINITION = new FormData(
+ "Components", //$NON-NLS-1$
+ SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 40), new FormAttributeData("class", 60)}, //$NON-NLS-1$
+ new String[]{ENT_SEAM_COMPONENT},
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddComponent") //$NON-NLS-1$
+ );
+
+ static IFormData SEAM_COMPONENT_20_LIST_DEFINITION = new FormData(
+ "Components", //$NON-NLS-1$
+ SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
+ new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 40), new FormAttributeData("class", 60)}, //$NON-NLS-1$
+ new String[]{ENT_SEAM_COMPONENT_20},
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddComponent") //$NON-NLS-1$
+ );
- IFormData result = new FormData(
- "Components", //$NON-NLS-1$
- SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
- new FormAttributeData[]{new FormAttributeData(ATTR_NAME, 40), new FormAttributeData(ATTR_CLASS, 60)}, //$NON-NLS-1$
- childEntities.toArray(new String[0]),
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddComponent") //$NON-NLS-1$
- );
- return result;
- }
-
static IFormData getFactoryList(String entity) {
return new FormData(
"Factories", //$NON-NLS-1$
@@ -81,7 +65,7 @@
SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENTS_11)
),
- createSeamComponentListDefinition(ENT_SEAM_COMPONENTS_11),
+ SEAM_COMPONENT_LIST_DEFINITION,
getFactoryList(ENT_SEAM_FACTORY),
getEventList(ENT_SEAM_EVENT)
};
@@ -92,7 +76,7 @@
SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENTS_12)
),
- createSeamComponentListDefinition(ENT_SEAM_COMPONENTS_12),
+ SEAM_COMPONENT_LIST_DEFINITION,
getFactoryList(ENT_SEAM_FACTORY),
getEventList(ENT_SEAM_EVENT)
};
@@ -103,7 +87,7 @@
SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENTS_20)
),
- createSeamComponentListDefinition(ENT_SEAM_COMPONENTS_20),
+ SEAM_COMPONENT_20_LIST_DEFINITION,
getFactoryList(ENT_SEAM_FACTORY_20),
getEventList(ENT_SEAM_EVENT_20),
SEAM_IMPORT_LIST_DEFINITION
@@ -115,7 +99,7 @@
SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENTS_21)
),
- createSeamComponentListDefinition(ENT_SEAM_COMPONENTS_21),
+ SEAM_COMPONENT_20_LIST_DEFINITION,
getFactoryList(ENT_SEAM_FACTORY_20),
getEventList(ENT_SEAM_EVENT_20),
SEAM_IMPORT_LIST_DEFINITION
@@ -127,7 +111,7 @@
SeamXMLFormLayoutData.EMPTY_DESCRIPTION,
FormLayoutDataUtil.createGeneralFormAttributeData(ENT_SEAM_COMPONENTS_22)
),
- createSeamComponentListDefinition(ENT_SEAM_COMPONENTS_22),
+ SEAM_COMPONENT_20_LIST_DEFINITION,
getFactoryList(ENT_SEAM_FACTORY_20),
getEventList(ENT_SEAM_EVENT_20),
SEAM_IMPORT_LIST_DEFINITION
15 years, 8 months