click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From take...@apache.org
Subject svn commit: r795876 - in /incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse: ClickPlugin.java ClickUtils.java ColorManager.java ui/wizard/NewClassWizard.java ui/wizard/NewClickPageWizard.java
Date Mon, 20 Jul 2009 15:24:28 GMT
Author: takezoe
Date: Mon Jul 20 15:24:24 2009
New Revision: 795876

URL: http://svn.apache.org/viewvc?rev=795876&view=rev
Log:
Fixed warnings.

Modified:
    incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.java
    incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickUtils.java
    incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ColorManager.java
    incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/NewClassWizard.java
    incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/NewClickPageWizard.java

Modified: incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.java?rev=795876&r1=795875&r2=795876&view=diff
==============================================================================
--- incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.java
(original)
+++ incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickPlugin.java
Mon Jul 20 15:24:24 2009
@@ -54,7 +54,8 @@
 	private ResourceBundle resource;
 	private ColorManager colorManager;
 
-	private List configProviders = new ArrayList();
+	private List<IClickConfigurationProvider> 
+		configProviders = new ArrayList<IClickConfigurationProvider>();
 
 	public static final String CLICK_PAGE_CLASS = "org.apache.click.Page";
 	public static final String CLICK_CONTROL_IF = "org.apache.click.Control";
@@ -112,8 +113,8 @@
 		return this.resource;
 	}
 
-	private static List loadContributedClasses(String extPointId, String elementName){
-		List result = new ArrayList();
+	private static List<IClickConfigurationProvider> loadContributedClasses(String extPointId,
String elementName){
+		List<IClickConfigurationProvider> result = new ArrayList<IClickConfigurationProvider>();
 		try {
 			IExtensionRegistry registry = Platform.getExtensionRegistry();
 			IExtensionPoint point = registry.getExtensionPoint(PLUGIN_ID + "." + extPointId);
@@ -122,7 +123,7 @@
 				IConfigurationElement[] elements = extensions[i].getConfigurationElements();
 				for (int j = 0; j < elements.length; j++) {
 					if (elementName.equals(elements[j].getName())) {
-						result.add(elements[j].createExecutableExtension("class"));
+						result.add((IClickConfigurationProvider) elements[j].createExecutableExtension("class"));
 					}
 				}
 			}

Modified: incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickUtils.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickUtils.java?rev=795876&r1=795875&r2=795876&view=diff
==============================================================================
--- incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickUtils.java
(original)
+++ incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ClickUtils.java
Mon Jul 20 15:24:24 2009
@@ -284,7 +284,9 @@
 		String servletClassName = useSpring ? CLICK_SPRING_SERVLET_CLASS : CLICK_SERVLET_CLASS;
 		
 		Servlet servlet = null;
+		@SuppressWarnings("unchecked")
 		Iterator it = webApp.getServlets().iterator();
+		
 		while (it.hasNext()) {
 			servlet = (Servlet) it.next();
 			if (servlet.getWebType().isServletType()) {
@@ -309,7 +311,9 @@
 	public static void removeURLMappings(WebApp webApp, Servlet servlet) {
 		String servletName = servlet.getServletName();
 		if (servletName != null) {
+			@SuppressWarnings("unchecked")
 			Iterator oldMappings = webApp.getServletMappings().iterator();
+			
 			while (oldMappings.hasNext()) {
 				ServletMapping mapping = (ServletMapping) oldMappings.next();
 				if (mapping.getServlet().getServletName().equals(servletName)) {
@@ -324,6 +328,7 @@
 	 * 
 	 * @param webApp the <code>WebApp</code> object
 	 */
+	@SuppressWarnings("unchecked")
 	public static void createOrUpdateFilelist(WebApp webApp) {
 		WelcomeFileList filelist = webApp.getFileList();
 		
@@ -346,6 +351,7 @@
 	 * @param useSpring If <code>true</code> then use Spring Framework with Click
 	 * @return the <code>Servlet</code> object of the ClickServlet
 	 */
+	@SuppressWarnings("unchecked")
 	public static Servlet createOrUpdateServletRef(WebApp webApp, IDataModel config, 
 			Servlet servlet, boolean useSpring) {
 		//String displayName = config.getStringProperty(CLICK_SERVLET_NAME);
@@ -388,6 +394,7 @@
 		return servlet;
 	}
 	
+	@SuppressWarnings("unchecked")
 	public static void setUpURLMappings(WebApp webApp, String[] urlMappingList, Servlet servlet)
{
 		// Add mappings
 		for (int i=0;i<urlMappingList.length;i++) {
@@ -562,7 +569,7 @@
 		String hifun = path.replaceAll("([a-z])([A-Z])", "$1-$2").toLowerCase();
 		String under = path.replaceAll("([a-z])([A-Z])", "$1_$2").toLowerCase();
 		
-		List list = new ArrayList();
+		List<String> list = new ArrayList<String>();
 		
 		list.add(path + ".htm");
 		list.add(path + "Page.htm");
@@ -573,7 +580,7 @@
 		list.add(under + ".htm");
 		list.add(under + "_page.htm");
 		
-		return (String[])list.toArray(new String[list.size()]);
+		return list.toArray(new String[list.size()]);
 	}
 	
 	/**

Modified: incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ColorManager.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ColorManager.java?rev=795876&r1=795875&r2=795876&view=diff
==============================================================================
--- incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ColorManager.java
(original)
+++ incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ColorManager.java
Mon Jul 20 15:24:24 2009
@@ -37,7 +37,7 @@
 public class ColorManager {
 	
 	private IPreferenceStore store;
-	private Map colors = new HashMap();
+	private Map<String, Color> colors = new HashMap<String, Color>();
 	
 	private IPropertyChangeListener listener = new IPropertyChangeListener(){
 		public void propertyChange(PropertyChangeEvent event) {
@@ -71,8 +71,8 @@
 	}
 	
 	private void disposeColors(){
-		for(Iterator i = colors.values().iterator(); i.hasNext();){
-			Color color = (Color)i.next();
+		for(Iterator<Color> i = colors.values().iterator(); i.hasNext();){
+			Color color = i.next();
 			color.dispose();
 		}
 		colors.clear();

Modified: incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/NewClassWizard.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/NewClassWizard.java?rev=795876&r1=795875&r2=795876&view=diff
==============================================================================
--- incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/NewClassWizard.java
(original)
+++ incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/NewClassWizard.java
Mon Jul 20 15:24:24 2009
@@ -33,7 +33,7 @@
 
 	private String superClass;
 	private String className;
-	private List implement;
+	private List<String> implement;
 	
 	public NewClassWizard() {
 		super();
@@ -49,7 +49,7 @@
 	
 	public void addInterface(String implement){
 		if(this.implement==null){
-			this.implement = new ArrayList();
+			this.implement = new ArrayList<String>();
 		}
 		this.implement.add(implement);
 	}

Modified: incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/NewClickPageWizard.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/NewClickPageWizard.java?rev=795876&r1=795875&r2=795876&view=diff
==============================================================================
--- incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/NewClickPageWizard.java
(original)
+++ incubator/click/trunk/tools/eclipse/org.apache.click.eclipse/src/org/apache/click/eclipse/ui/wizard/NewClickPageWizard.java
Mon Jul 20 15:24:24 2009
@@ -172,7 +172,7 @@
 			String parentFolder, String filename, String sourceFolder, String packageName,
 			String className, String superClass, Template template) throws Exception {
 		
-		List files = new ArrayList();
+		List<IFile> files = new ArrayList<IFile>();
 		int totalTask = 0;
 		if(shouldCreateHTML){
 			totalTask++;



Mime
View raw message