click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From take...@apache.org
Subject svn commit: r908947 - in /click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse: ClickPlugin.java core/builder/ClickXMLValidator.java ui/editor/forms/ClickServiceEditor.java ui/editor/forms/ClickTreeLabelProvider.java
Date Thu, 11 Feb 2010 12:37:56 GMT
Author: takezoe
Date: Thu Feb 11 12:37:48 2010
New Revision: 908947

URL: http://svn.apache.org/viewvc?rev=908947&view=rev
Log:
Added <resource-service> support to the click.xml editor.

Modified:
    click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.java
    click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/builder/ClickXMLValidator.java
    click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/editor/forms/ClickServiceEditor.java
    click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/editor/forms/ClickTreeLabelProvider.java

Modified: click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.java
URL: http://svn.apache.org/viewvc/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.java?rev=908947&r1=908946&r2=908947&view=diff
==============================================================================
--- click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.java
(original)
+++ click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.java
Thu Feb 11 12:37:48 2010
@@ -75,6 +75,7 @@
 	public static final String TAG_FILE_UPLOAD_SERVICE = "file-upload-service";
 	public static final String TAG_LOG_SERVICE = "log-service";
 	public static final String TAG_TEMPLATE_SERVICE = "template-service";
+	public static final String TAG_RESOURCE_SERVICE = "resource-service";
 	public static final String ATTR_CHARSET = "charset";
 	public static final String ATTR_LOCALE = "locale";
 	public static final String ATTR_CLASSNAME = "classname";

Modified: click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/builder/ClickXMLValidator.java
URL: http://svn.apache.org/viewvc/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/builder/ClickXMLValidator.java?rev=908947&r1=908946&r2=908947&view=diff
==============================================================================
--- click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/builder/ClickXMLValidator.java
(original)
+++ click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/core/builder/ClickXMLValidator.java
Thu Feb 11 12:37:48 2010
@@ -135,11 +135,15 @@
 			return;
 		}
 		
-		// classname of <control>, <page> and <format>
-		if(tagName.equals(ClickPlugin.TAG_CONTROL) || tagName.equals(ClickPlugin.TAG_PAGE) || tagName.equals(ClickPlugin.TAG_FORMAT)){
+		// classname of <control>, <page>, <format> and <xxx-service>
+		if(tagName.equals(ClickPlugin.TAG_CONTROL) || tagName.equals(ClickPlugin.TAG_PAGE) || tagName.equals(ClickPlugin.TAG_FORMAT)
||
+				tagName.equals(ClickPlugin.TAG_LOG_SERVICE) || tagName.equals(ClickPlugin.TAG_TEMPLATE_SERVICE)
|| 
+				tagName.equals(ClickPlugin.TAG_FILE_UPLOAD_SERVICE) || tagName.equals(ClickPlugin.TAG_RESOURCE_SERVICE)){
+			
 			if(tagName.equals(ClickPlugin.TAG_PAGE) && packageName!=null && !packageName.equals("")){
 				attrValue = packageName + "." + attrValue;
 			}
+			
 			if(attrName.equals(ClickPlugin.ATTR_CLASSNAME)){
 				if(!existsJavaClass(file, attrValue)){
 					createWarningMarker(file, "notExist", new String[]{attrValue}, start, length);

Modified: click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/editor/forms/ClickServiceEditor.java
URL: http://svn.apache.org/viewvc/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/editor/forms/ClickServiceEditor.java?rev=908947&r1=908946&r2=908947&view=diff
==============================================================================
--- click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/editor/forms/ClickServiceEditor.java
(original)
+++ click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/editor/forms/ClickServiceEditor.java
Thu Feb 11 12:37:48 2010
@@ -45,16 +45,22 @@
 			if(ClickUtils.getElement(element, ClickPlugin.TAG_TEMPLATE_SERVICE)==null){
 				newMenu.add(new ElementAppendAction(ClickPlugin.TAG_TEMPLATE_SERVICE, element, null,
this));
 			}
+			if(ClickUtils.getElement(element, ClickPlugin.TAG_RESOURCE_SERVICE)==null){
+				newMenu.add(new ElementAppendAction(ClickPlugin.TAG_RESOURCE_SERVICE, element, null,
this));
+			}
 		}
 		if(element.getNodeName().equals(ClickPlugin.TAG_FILE_UPLOAD_SERVICE) ||
 				element.getNodeName().equals(ClickPlugin.TAG_LOG_SERVICE) ||
-				element.getNodeName().equals(ClickPlugin.TAG_TEMPLATE_SERVICE)){
+				element.getNodeName().equals(ClickPlugin.TAG_TEMPLATE_SERVICE) ||
+				element.getNodeName().equals(ClickPlugin.TAG_RESOURCE_SERVICE)){
 			newMenu.add(new ElementAppendAction(ClickPlugin.TAG_PROPERTY, element, null, this));
 		}
 	}
 
 	protected String[] getAcceptElementNames() {
-		return new String[]{ClickPlugin.TAG_FILE_UPLOAD_SERVICE, ClickPlugin.TAG_LOG_SERVICE, ClickPlugin.TAG_TEMPLATE_SERVICE,
ClickPlugin.TAG_PROPERTY};
+		return new String[]{ClickPlugin.TAG_FILE_UPLOAD_SERVICE, ClickPlugin.TAG_LOG_SERVICE, 
+				ClickPlugin.TAG_TEMPLATE_SERVICE, ClickPlugin.TAG_RESOURCE_SERVICE, 
+				ClickPlugin.TAG_PROPERTY};
 	}
 
 	protected IAttributeEditor getAttributeEditor(String elementName) {
@@ -67,6 +73,9 @@
 		if(elementName.equals(ClickPlugin.TAG_TEMPLATE_SERVICE)){
 			return new ServiceClassNameAttributeEditor("org.apache.click.service.TemplateService");
 		}
+		if(elementName.equals(ClickPlugin.TAG_RESOURCE_SERVICE)){
+			return new ServiceClassNameAttributeEditor("org.apache.click.service.ResourceService");
+		}
 		if(elementName.equals(ClickPlugin.TAG_PROPERTY)){
 			return new PropertyAttributeEditor();
 		}

Modified: click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/editor/forms/ClickTreeLabelProvider.java
URL: http://svn.apache.org/viewvc/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/editor/forms/ClickTreeLabelProvider.java?rev=908947&r1=908946&r2=908947&view=diff
==============================================================================
--- click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/editor/forms/ClickTreeLabelProvider.java
(original)
+++ click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/editor/forms/ClickTreeLabelProvider.java
Thu Feb 11 12:37:48 2010
@@ -66,6 +66,8 @@
 				ClickPlugin.getImageDescriptor("icons/class.gif").createImage());
 		images.put(ClickPlugin.TAG_TEMPLATE_SERVICE,
 				ClickPlugin.getImageDescriptor("icons/class.gif").createImage());
+		images.put(ClickPlugin.TAG_RESOURCE_SERVICE,
+				ClickPlugin.getImageDescriptor("icons/class.gif").createImage());
 	}
 
 	public void dispose(){



Mime
View raw message