[richfaces-svn-commits] JBoss Rich Faces SVN: r14600 - in branches/jsf2.0/cdk/generator: src/main/java/org/ajax4jsf/builder and 13 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Jun 11 20:24:32 EDT 2009


Author: alexsmirnov
Date: 2009-06-11 20:24:32 -0400 (Thu, 11 Jun 2009)
New Revision: 14600

Added:
   branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/
   branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/AptException.java
   branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkCompiler.java
   branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java
   branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualFileManager.java
   branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualJavaFileObject.java
   branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/
   branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/
   branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java
   branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation.java
   branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation2.java
   branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestInterfaceAnnotation.java
   branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestMethodAnnotation.java
   branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileTest.java
   branches/jsf2.0/cdk/generator/src/test/resources/
   branches/jsf2.0/cdk/generator/src/test/resources/org/
   branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/
   branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/
   branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/
   branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestClass.java
   branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestInterface.java
   branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestSubClass.java
   branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/test.html
Removed:
   branches/jsf2.0/cdk/generator/src/main/java/org/ajax4jsf/builder/component/
   branches/jsf2.0/cdk/generator/src/main/java/org/ajax4jsf/templatecompiler/elements/html/
   branches/jsf2.0/cdk/generator/src/test/java/org/ajax4jsf/builder/
   branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/AppTest.java
Modified:
   branches/jsf2.0/cdk/generator/pom.xml
Log:
Import APT classes from research project

Modified: branches/jsf2.0/cdk/generator/pom.xml
===================================================================
--- branches/jsf2.0/cdk/generator/pom.xml	2009-06-11 17:48:45 UTC (rev 14599)
+++ branches/jsf2.0/cdk/generator/pom.xml	2009-06-12 00:24:32 UTC (rev 14600)
@@ -18,8 +18,8 @@
 				<artifactId>maven-compiler-plugin</artifactId>
 				<inherited>true</inherited>
 				<configuration>
-					<source>1.5</source>
-					<target>1.5</target>
+					<source>1.6</source>
+					<target>1.6</target>
 				</configuration>
 			</plugin>
             <plugin>
@@ -85,5 +85,15 @@
 			<artifactId>xercesImpl</artifactId>
 			<version>2.9.1</version>
 		</dependency>
+		<dependency>
+			<groupId>com.google.collections</groupId>
+			<artifactId>google-collections</artifactId>
+			<version>1.0-rc2</version>
+		</dependency>
+		<dependency>
+			<groupId>org.w3c.css</groupId>
+			<artifactId>sac</artifactId>
+			<version>1.3</version>
+		</dependency>
 	</dependencies>
 </project>
\ No newline at end of file

Added: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/AptException.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/AptException.java	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/AptException.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,73 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.cdk.apt;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov at exadel.com
+ *
+ */
+public class AptException extends Exception {
+
+	/**
+	  * <p class="changed_added_4_0"></p>
+	  */
+	private static final long serialVersionUID = 8023042422371321042L;
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 */
+	public AptException() {
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * @param message
+	 */
+	public AptException(String message) {
+		super(message);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * @param cause
+	 */
+	public AptException(Throwable cause) {
+		super(cause);
+		// TODO Auto-generated constructor stub
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * @param message
+	 * @param cause
+	 */
+	public AptException(String message, Throwable cause) {
+		super(message, cause);
+		// TODO Auto-generated constructor stub
+	}
+
+}


Property changes on: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/AptException.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkCompiler.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkCompiler.java	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkCompiler.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,95 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.cdk.apt;
+
+import java.io.File;
+import java.util.Collection;
+
+import javax.tools.JavaCompiler;
+import javax.tools.ToolProvider;
+
+/**
+ * <p class="changed_added_4_0">That class compiles files from sources and process annotations</p>
+ * @author asmirnov at exadel.com
+ *
+ */
+public class CdkCompiler {
+	
+	private File outputDirectory;
+	
+	private Iterable<String> options;
+	
+	private	final JavaCompiler javaCompiler = ToolProvider.getSystemJavaCompiler();
+
+	
+	public void process(Iterable<File> sources) throws AptException {
+		;
+	}
+
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * @return the outputDirectory
+	 */
+	public File getOutputDirectory() {
+		return outputDirectory;
+	}
+
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * @param outputDirectory the outputDirectory to set
+	 */
+	public void setOutputDirectory(File outputDirectory) {
+		this.outputDirectory = outputDirectory;
+	}
+
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * @return the options
+	 */
+	public Iterable<String> getOptions() {
+		return options;
+	}
+
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * @param options the options to set
+	 */
+	public void setOptions(Iterable<String> options) {
+		this.options = options;
+	}
+
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * @return the javaCompiler
+	 */
+	public JavaCompiler getJavaCompiler() {
+		return javaCompiler;
+	}
+
+}


Property changes on: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkCompiler.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,47 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.cdk.apt;
+
+import java.util.Set;
+
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.RoundEnvironment;
+import javax.lang.model.element.TypeElement;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov at exadel.com
+ *
+ */
+public class CdkProcessor extends AbstractProcessor {
+
+	/* (non-Javadoc)
+	 * @see javax.annotation.processing.AbstractProcessor#process(java.util.Set, javax.annotation.processing.RoundEnvironment)
+	 */
+	public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment environment) {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+}


Property changes on: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessor.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualFileManager.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualFileManager.java	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualFileManager.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,233 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.cdk.apt;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.tools.FileObject;
+import javax.tools.ForwardingJavaFileManager;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.StandardLocation;
+import javax.tools.JavaFileManager.Location;
+import javax.tools.JavaFileObject.Kind;
+
+/**
+ * <p class="changed_added_4_0">That class wraps {@link StandardJavaFileManager}
+ * </p>
+ * 
+ * @author asmirnov at exadel.com
+ * 
+ */
+final class VirtualFileManager extends
+		ForwardingJavaFileManager<StandardJavaFileManager> {
+
+	private final List<JavaFileObject> sources;
+
+	private final ClassLoader classPathLoader;
+
+	private File outputDirectory;
+
+	private File javaSourceDirectory;
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * 
+	 * @param fileManager
+	 */
+	public VirtualFileManager(StandardJavaFileManager fileManager,
+			ClassLoader classPathLoader) {
+		super(fileManager);
+		this.classPathLoader = classPathLoader;
+		this.sources = new ArrayList<JavaFileObject>();
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * 
+	 * @param sources
+	 */
+	public void addSources(Iterable<File> sources) {
+		for (File file : sources) {
+			this.getSources().add(new VirtualJavaFileObject(file, Kind.SOURCE));
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * javax.tools.ForwardingJavaFileManager#getJavaFileForInput(javax.tools
+	 * .JavaFileManager.Location, java.lang.String,
+	 * javax.tools.JavaFileObject.Kind)
+	 */
+	@Override
+	public JavaFileObject getJavaFileForInput(Location location,
+			String className, Kind kind) throws IOException {
+		if (StandardLocation.CLASS_PATH.equals(location)) {
+			String fileName = className.replace('.', '/') + kind.extension;
+			URL resource = getClassPathLoader().getResource(fileName);
+			try {
+				return new VirtualJavaFileObject(resource, kind);
+			} catch (URISyntaxException e) {
+				return null;
+			}
+		} else if (StandardLocation.SOURCE_PATH.equals(location)) {
+			String fileName = className.replace('.', '/');
+			for (JavaFileObject source : getSources()) {
+				if (source.isNameCompatible(fileName, kind)) {
+					return source;
+				}
+			}
+		}
+		return super.getJavaFileForInput(location, className, kind);
+	}
+
+	@Override
+	public ClassLoader getClassLoader(Location location) {
+		if (StandardLocation.CLASS_PATH.equals(location)
+				|| StandardLocation.CLASS_OUTPUT.equals(location)) {
+			return getClassPathLoader();
+		} else {
+			return super.getClassLoader(location);
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * javax.tools.ForwardingJavaFileManager#getJavaFileForOutput(javax.tools
+	 * .JavaFileManager.Location, java.lang.String,
+	 * javax.tools.JavaFileObject.Kind, javax.tools.FileObject)
+	 */
+	@Override
+	public JavaFileObject getJavaFileForOutput(Location location,
+			String className, Kind kind, FileObject sibling) throws IOException {
+		JavaFileObject fileForOutput = null;
+		if (StandardLocation.CLASS_OUTPUT.equals(location)
+				&& null != getOutputDirectory()) {
+			String fileName = className.replace('.', '/') + kind.extension;
+			File outputFile = new File(getOutputDirectory(), fileName);
+			fileForOutput = new VirtualJavaFileObject(outputFile, kind);
+		}
+		return fileForOutput;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see
+	 * javax.tools.ForwardingJavaFileManager#hasLocation(javax.tools.JavaFileManager
+	 * .Location)
+	 */
+	@Override
+	public boolean hasLocation(Location location) {
+		boolean hasLocation;
+		if (StandardLocation.SOURCE_PATH.equals(location)) {
+			hasLocation = null != getJavaSourceDirectory() || !getSources().isEmpty();
+		} else if (StandardLocation.CLASS_OUTPUT.equals(location)) {
+			hasLocation = null != getOutputDirectory();
+		} else {
+			hasLocation = super.hasLocation(location);
+		}
+		return hasLocation;
+	}
+
+	@Override
+	public Iterable<JavaFileObject> list(Location location, String packageName,
+			Set<Kind> kinds, boolean recurse) throws IOException {
+		Iterable<JavaFileObject> list = super.list(location, packageName,
+				kinds, recurse);
+		return list;
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * 
+	 * @return the classPathLoader
+	 */
+	private ClassLoader getClassPathLoader() {
+		return classPathLoader;
+	}
+
+	public void addSource(JavaFileObject source) {
+		this.getSources().add(source);
+
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * 
+	 * @return the outputDirectory
+	 */
+	public File getOutputDirectory() {
+		return outputDirectory;
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * 
+	 * @param outputDirectory
+	 *            the outputDirectory to set
+	 */
+	public void setOutputDirectory(File outputDirectory) {
+		this.outputDirectory = outputDirectory;
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * 
+	 * @return the javaSourceDirectory
+	 */
+	public File getJavaSourceDirectory() {
+		return javaSourceDirectory;
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * 
+	 * @param javaSourceDirectory
+	 *            the javaSourceDirectory to set
+	 */
+	public void setJavaSourceDirectory(File javaSourceDirectory) {
+		this.javaSourceDirectory = javaSourceDirectory;
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * @return the sources
+	 */
+	public List<JavaFileObject> getSources() {
+		return sources;
+	}
+
+}
\ No newline at end of file


Property changes on: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualFileManager.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualJavaFileObject.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualJavaFileObject.java	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualJavaFileObject.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,169 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.cdk.apt;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.nio.ByteBuffer;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
+import java.nio.charset.Charset;
+
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+
+/**
+ * <p class="changed_added_4_0">This class represents read-only {@link JavaFileObject} created from {@link File} or {@link URL}</p>
+ * @author asmirnov at exadel.com
+ *
+ */
+public class VirtualJavaFileObject extends SimpleJavaFileObject {
+
+	/**
+	  * <p class="changed_added_4_0">base file object. One of {@link file} or {@link url} fields should be set</p>
+	  */
+	private final File classFile;
+
+	private final URL url;
+
+	private Charset charset = Charset.defaultCharset();
+
+	/**
+	  * <p class="changed_added_4_0">Cached content</p>
+	  */
+	private CharSequence content;
+
+	/**
+	 * <p class="changed_added_4_0">Create source from {@link File}</p>
+	 * @param classFile 
+	 */
+	public VirtualJavaFileObject(File classFile) {
+		this(classFile, Kind.SOURCE);
+	}
+
+	public VirtualJavaFileObject(File classFile, Kind kind) {
+		super(classFile.toURI(), kind);
+		this.classFile = classFile;
+		url = null;
+	}
+
+
+	/**
+	 * <p class="changed_added_4_0">Create file object from URL</p>
+	 * @param url
+	 * @param kind
+	 * @throws URISyntaxException
+	 */
+	public VirtualJavaFileObject(URL url, Kind kind) throws URISyntaxException {
+		super(url.toURI(),kind);
+		classFile = null;
+		this.url = url;
+	}
+	
+	/* (non-Javadoc)
+	 * @see javax.tools.SimpleJavaFileObject#openInputStream()
+	 */
+	@Override
+	public InputStream openInputStream() throws IOException {
+		return null != url ? url.openStream() : new FileInputStream(classFile);
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.tools.SimpleJavaFileObject#getCharContent(boolean)
+	 */
+	@Override
+	public CharSequence getCharContent(boolean ignoreEncodingErrors)
+			throws IOException {
+		if (null == content) {
+			StringBuilder builder = new StringBuilder((int) (4096f * getCharset().newDecoder()
+					.averageCharsPerByte()));
+			InputStream inputStream = openInputStream();
+			if (null != inputStream) {
+				ReadableByteChannel channel = Channels.newChannel(inputStream);
+				for (ByteBuffer buff = ByteBuffer.allocate(4096); channel
+						.read(buff) >= 0; buff.clear()) {
+					buff.flip();
+					builder.append(getCharset().decode(buff));
+				}
+				channel.close();
+				inputStream.close();
+				content = builder.toString();
+			}
+		}
+		return content;
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.tools.SimpleJavaFileObject#openReader(boolean)
+	 */
+	@Override
+	public Reader openReader(boolean ignoreEncodingErrors)
+			throws IOException {
+		return new InputStreamReader(openInputStream(),getCharset());
+	}
+
+	/* (non-Javadoc)
+	 * @see javax.tools.SimpleJavaFileObject#getLastModified()
+	 */
+	@Override
+	public long getLastModified() {
+		if(null != classFile){
+			return classFile.lastModified();
+		} else if (null != url) {
+			try {
+				URLConnection connection = url.openConnection();
+				return connection.getLastModified();
+			} catch (IOException e) {
+				return super.getLastModified();
+			}
+		}
+		return super.getLastModified();
+	}
+	
+	
+	/**
+	 * <p class="changed_added_4_0">Set {@link Charset} for read operations</p>
+	 * @param charset the charset to set
+	 */
+	public void setCharset(Charset charset) {
+		this.charset = charset;
+		// Reset cached content
+		this.content = null;
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * @return the charset
+	 */
+	public Charset getCharset() {
+		return charset;
+	}
+}
\ No newline at end of file


Property changes on: branches/jsf2.0/cdk/generator/src/main/java/org/richfaces/cdk/apt/VirtualJavaFileObject.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Deleted: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/AppTest.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/AppTest.java	2009-06-11 17:48:45 UTC (rev 14599)
+++ branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/AppTest.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -1,59 +0,0 @@
-/**
- * License Agreement.
- *
- * Rich Faces - Natural Ajax for Java Server Faces (JSF)
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
- */
-
-package org.richfaces;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Unit test for simple App.
- */
-public class AppTest 
-    extends TestCase
-{
-    /**
-     * Create the test case
-     *
-     * @param testName name of the test case
-     */
-    public AppTest( String testName )
-    {
-        super( testName );
-    }
-
-    /**
-     * @return the suite of tests being tested
-     */
-    public static Test suite()
-    {
-        return new TestSuite( AppTest.class );
-    }
-
-    /**
-     * Rigourous Test :-)
-     */
-    public void testApp()
-    {
-        assertTrue( true );
-    }
-}

Added: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,173 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.cdk.apt;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.nio.channels.Channels;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.annotation.processing.RoundEnvironment;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+import javax.tools.Diagnostic;
+import javax.tools.DiagnosticListener;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+import javax.tools.JavaCompiler.CompilationTask;
+import javax.tools.JavaFileObject.Kind;
+
+import junit.framework.TestCase;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * 
+ * @author asmirnov at exadel.com
+ * 
+ */
+public class ProcessorTest extends TestCase {
+
+	private static final String INTERFACE_JAVA = "org/richfaces/cdk/apt/TestInterface.java";
+	private static final String SUB_CLASS_JAVA = "org/richfaces/cdk/apt/TestSubClass.java";
+	private static final String CLASS_JAVA = "org/richfaces/cdk/apt/TestClass.java";
+	private static final Set<String> PROCESS_ANNOTATIONS = new HashSet<String>(
+			Arrays.asList(TestAnnotation.class.getName(), TestAnnotation2.class
+					.getName(), TestMethodAnnotation.class.getName(),
+					TestInterfaceAnnotation.class.getName()));
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see junit.framework.TestCase#tearDown()
+	 */
+	protected void tearDown() throws Exception {
+		super.tearDown();
+	}
+
+	/**
+	 * Test method for
+	 * {@link org.richfaces.cdk.apt.CdkProcessor#process(java.util.Set, javax.annotation.processing.RoundEnvironment)}
+	 * .
+	 * 
+	 * @throws Exception
+	 */
+	public void testProcessSetRoundEnvironment() throws Exception {
+		JavaFileObject classFile = getJavaFileObject(CLASS_JAVA);
+		JavaFileObject subClassFile = getJavaFileObject(SUB_CLASS_JAVA);
+		JavaFileObject interfaceFile = getJavaFileObject(INTERFACE_JAVA);
+		JavaCompiler javaCompiler = ToolProvider.getSystemJavaCompiler();
+		StandardJavaFileManager stdFileManager = javaCompiler
+				.getStandardFileManager(null, null, null);
+		VirtualFileManager fileManager = new VirtualFileManager(stdFileManager,this.getClass().getClassLoader());
+		 Iterable<? extends JavaFileObject> compilationUnits =
+		 Arrays.asList(classFile, subClassFile, interfaceFile);
+		 fileManager.addSource(classFile);
+		DiagnosticListener<JavaFileObject> listener = new DiagnosticListener<JavaFileObject>() {
+
+			@Override
+			public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
+				System.out.println("LOG: " + diagnostic.getMessage(null));
+			}
+
+		};
+		ArrayList<String> options = new ArrayList<String>();
+		options.add("-proc:only");
+		options.add("-implicit:none");
+		options.add("-verbose");
+		CompilationTask compilationTask = javaCompiler.getTask(null,
+				fileManager, listener, options, null, compilationUnits);
+		CdkProcessor cdkProcessor = new CdkProcessor() {
+			@Override
+			public boolean process(Set<? extends TypeElement> annotations,
+					RoundEnvironment environment) {
+				if (!environment.processingOver()) {
+					for (TypeElement typeElement : annotations) {
+						System.out.println("Process annotation: "
+								+ typeElement.getQualifiedName());
+						Set<? extends Element> annotatedWith = environment
+								.getElementsAnnotatedWith(typeElement);
+						for (Element element : annotatedWith) {
+							System.out.println("annotated element: "
+									+ element.getSimpleName());
+						}
+					}
+
+				}
+				return super.process(annotations, environment);
+			}
+
+			@Override
+			public Set<String> getSupportedAnnotationTypes() {
+				return PROCESS_ANNOTATIONS;
+			}
+		};
+		compilationTask.setProcessors(Collections.singletonList(cdkProcessor));
+		compilationTask.call();
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * 
+	 * @param name
+	 *            TODO
+	 * @return
+	 * @throws URISyntaxException
+	 */
+	private JavaFileObject getJavaFileObject(String name)
+			throws URISyntaxException {
+		final File classFile = getJavaFile(name);
+		SimpleJavaFileObject fileObject = new VirtualJavaFileObject(classFile);
+		return fileObject;
+	}
+
+	private File getJavaFile(String name) throws URISyntaxException {
+		ClassLoader classLoader = this.getClass().getClassLoader();
+		URL testResource = classLoader.getResource(name);
+		URI testUri = testResource.toURI();
+		final File classFile = new File(testUri);
+		return classFile;
+	}
+
+}


Property changes on: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/ProcessorTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation.java	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,41 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.cdk.apt;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov at exadel.com
+ *
+ */
+ at Inherited
+ at Documented
+ at Target(ElementType.TYPE)
+public @interface TestAnnotation {
+	public String value();
+}


Property changes on: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation2.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation2.java	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation2.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,41 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.cdk.apt;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov at exadel.com
+ *
+ */
+ at Inherited
+ at Documented
+ at Target(ElementType.TYPE)
+public @interface TestAnnotation2 {
+	public String value();
+}


Property changes on: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestAnnotation2.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestInterfaceAnnotation.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestInterfaceAnnotation.java	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestInterfaceAnnotation.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,41 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.cdk.apt;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov at exadel.com
+ *
+ */
+ at Inherited
+ at Documented
+ at Target(ElementType.TYPE)
+public @interface TestInterfaceAnnotation {
+
+}


Property changes on: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestInterfaceAnnotation.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestMethodAnnotation.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestMethodAnnotation.java	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestMethodAnnotation.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,41 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.cdk.apt;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Target;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov at exadel.com
+ *
+ */
+ at Inherited
+ at Documented
+ at Target(ElementType.METHOD)
+public @interface TestMethodAnnotation {
+	public String value();
+}


Property changes on: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/TestMethodAnnotation.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileTest.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileTest.java	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileTest.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,125 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.cdk.apt;
+
+import java.io.File;
+import java.io.InputStream;
+import java.io.Reader;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.nio.charset.Charset;
+
+import javax.tools.JavaFileObject.Kind;
+
+import sun.reflect.ReflectionFactory.GetReflectionFactoryAction;
+
+import junit.framework.TestCase;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov at exadel.com
+ *
+ */
+public class VirtualFileTest extends TestCase {
+	
+	private static final String CONTENT="<html><body>test</body></html>\n";
+
+	/**
+	 * Test method for {@link org.richfaces.cdk.apt.VirtualJavaFileObject#getLastModified()}.
+	 * @throws Exception 
+	 */
+	public void testGetLastModified() throws Exception {
+		URL resource = getTestResource();
+		File testFile = new File(resource.toURI());
+		long lastModified = testFile.lastModified();
+		assertEquals(lastModified, new VirtualJavaFileObject(resource,Kind.HTML).getLastModified());
+		assertEquals(lastModified, new VirtualJavaFileObject(testFile,Kind.HTML).getLastModified());
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * @return
+	 */
+	protected URL getTestResource() {
+		return this.getClass().getResource("test.html");
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.cdk.apt.VirtualJavaFileObject#openInputStream()}.
+	 * @throws Exception 
+	 */
+	public void testOpenInputStream() throws Exception {
+		VirtualJavaFileObject fileObject = createFileObject();
+		InputStream inputStream = fileObject.openInputStream();
+		byte buff[] = new byte[CONTENT.getBytes().length+10];
+		int read = inputStream.read(buff,0,CONTENT.getBytes().length);
+		inputStream.close();
+		String result = new String(buff,0,read);
+		assertEquals(CONTENT, result);
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.cdk.apt.VirtualJavaFileObject#getCharContent(boolean)}.
+	 * @throws Exception 
+	 */
+	public void testGetCharContentBoolean() throws Exception {
+		VirtualJavaFileObject fileObject = createFileObject();
+		CharSequence charContent = fileObject.getCharContent(true);
+		assertEquals(CONTENT, charContent.toString());
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.cdk.apt.VirtualJavaFileObject#openReader(boolean)}.
+	 * @throws Exception 
+	 */
+	public void testOpenReaderBoolean() throws Exception {
+		VirtualJavaFileObject fileObject = createFileObject();
+		Reader reader = fileObject.openReader(true);
+		char buff[] = new char[CONTENT.length()+10];
+		int read = reader.read(buff);
+		reader.close();
+		String result = new String(buff,0,read);
+		assertEquals(CONTENT, result);
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * @return
+	 * @throws URISyntaxException
+	 */
+	protected VirtualJavaFileObject createFileObject()
+			throws URISyntaxException {
+		return new VirtualJavaFileObject(getTestResource(),Kind.HTML);
+	}
+
+	/**
+	 * Test method for {@link org.richfaces.cdk.apt.VirtualJavaFileObject#setCharset(java.nio.charset.Charset)}.
+	 * @throws Exception 
+	 */
+	public void testSetCharset() throws Exception {
+		VirtualJavaFileObject javaFileObject = createFileObject();
+		javaFileObject.setCharset(Charset.forName("UTF-8"));
+	}
+
+}


Property changes on: branches/jsf2.0/cdk/generator/src/test/java/org/richfaces/cdk/apt/VirtualFileTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestClass.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestClass.java	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestClass.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,34 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.cdk.apt;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov at exadel.com
+ *
+ */
+ at TestAnnotation("foo")
+public class TestClass {
+
+}


Property changes on: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestClass.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestInterface.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestInterface.java	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestInterface.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,39 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.cdk.apt;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov at exadel.com
+ *
+ */
+ at TestInterfaceAnnotation
+public interface TestInterface {
+	
+	@TestMethodAnnotation("baz")
+	public String getValue();
+	
+	public void setValue(String value);
+
+}


Property changes on: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestInterface.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestSubClass.java
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestSubClass.java	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestSubClass.java	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1,52 @@
+/*
+ * $Id$
+ *
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
+ */
+
+package org.richfaces.cdk.apt;
+
+/**
+ * <p class="changed_added_4_0"></p>
+ * @author asmirnov at exadel.com
+ *
+ */
+ at TestAnnotation2("subclass")
+public class TestSubClass extends TestClass implements TestInterface {
+
+	private String value;
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * @param value the value to set
+	 */
+	@TestMethodAnnotation("setter")
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+	/**
+	 * <p class="changed_added_4_0"></p>
+	 * @return the value
+	 */
+	public String getValue() {
+		return value;
+	}
+}


Property changes on: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/TestSubClass.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/test.html
===================================================================
--- branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/test.html	                        (rev 0)
+++ branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/test.html	2009-06-12 00:24:32 UTC (rev 14600)
@@ -0,0 +1 @@
+<html><body>test</body></html>


Property changes on: branches/jsf2.0/cdk/generator/src/test/resources/org/richfaces/cdk/apt/test.html
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the richfaces-svn-commits mailing list