Commit [8d17fe] Maximize Restore History

changed it so that its not a plug-in anymore

nikolaymetchev <> 2004-06-27

1 2 > >> (Page 1 of 2)
removed TestCheckstylePlugin/src/TestCheckStylePlugin
removed TestCheckstylePlugin/src/com
removed TestCheckstylePlugin/src/com/atlassw
removed TestCheckstylePlugin/src/com/atlassw/tools
removed TestCheckstylePlugin/src/com/atlassw/tools/eclipse
removed TestCheckstylePlugin/src/com/atlassw/tools/eclipse/checkstyle
removed TestCheckstylePlugin/src/com/atlassw/tools/eclipse/checkstyle/config
removed TestCheckstylePlugin/src/com/atlassw/tools/eclipse/checkstyle/config/TestCheckConfigurationFactory.java
removed TestCheckstylePlugin/.cvsignore
removed TestCheckstylePlugin/build.properties
changed TestCheckstylePlugin/.classpath
changed TestCheckstylePlugin/.project
copied TestCheckstylePlugin/launchConfigurations/TestCheckstylePlugin.launch -> TestCheckstylePlugin/launchConfigurations/TestCheckStylePlugin.launch
copied TestCheckstylePlugin/src/TestCheckStylePlugin/TestCheckStylePluginPlugin.java -> TestCheckstylePlugin/src/Java/com/atlassw/tools/eclipse/checkstyle/config/TestCheckConfigurationFactory.java
copied TestCheckstylePlugin/src/com/atlassw/tools/eclipse/checkstyle/config/TestMetadataFactory.java -> TestCheckstylePlugin/src/Java/com/atlassw/tools/eclipse/checkstyle/config/TestMetadataFactory.java
TestCheckstylePlugin/src/com
File was removed.
TestCheckstylePlugin/.classpath Diff Switch to side-by-side view
Loading...
TestCheckstylePlugin/.project Diff Switch to side-by-side view
Loading...
TestCheckstylePlugin/launchConfigurations/TestCheckstylePlugin.launch to TestCheckstylePlugin/launchConfigurations/TestCheckStylePlugin.launch
--- a/TestCheckstylePlugin/launchConfigurations/TestCheckstylePlugin.launch
+++ b/TestCheckstylePlugin/launchConfigurations/TestCheckStylePlugin.launch
@@ -1,23 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
-<booleanAttribute key="tracing" value="false"/>
-<stringAttribute key="vmargs" value=""/>
-<booleanAttribute key="default" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="TestCheckstylePlugin"/>
 <listAttribute key="org.eclipse.debug.ui.favoriteGroups">
 <listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
 <listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
 </listAttribute>
 <stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=TestCheckstylePlugin"/>
 <booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="progargs" value="-os win32 -ws win32 -arch x86 -nl en_GB"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="TestCheckstylePlugin"/>
-<booleanAttribute key="askclear" value="true"/>
-<booleanAttribute key="maximized" value="false"/>
-<stringAttribute key="location0" value="D:\Program Files\eclipse\junit-workbench-workspace"/>
-<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
 </launchConfiguration>
TestCheckstylePlugin/src/TestCheckStylePlugin/TestCheckStylePluginPlugin.java to TestCheckstylePlugin/src/Java/com/atlassw/tools/eclipse/checkstyle/config/TestCheckConfigurationFactory.java
--- a/TestCheckstylePlugin/src/TestCheckStylePlugin/TestCheckStylePluginPlugin.java
+++ b/TestCheckstylePlugin/src/Java/com/atlassw/tools/eclipse/checkstyle/config/TestCheckConfigurationFactory.java
@@ -1,66 +1,41 @@
-package TestCheckStylePlugin;
+//
+// Created      : 22-Nov-2003, 16:05:09
+// Description  : 
+// Author       : NIKOLAY
+// Copyright    : (c) Teamphone.com Ltd. 2003 - All Rights Reserved
+//
+package com.atlassw.tools.eclipse.checkstyle.config;
 
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Iterator;
+import java.util.Properties;
 
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPluginDescriptor;
-import org.eclipse.core.runtime.Plugin;
+import junit.framework.TestCase;
 
 /**
- * The main plugin class to be used in the desktop.
+ * @author NIKOLAY
  */
-public class TestCheckStylePluginPlugin extends Plugin {
-	//The shared instance.
-	private static TestCheckStylePluginPlugin plugin;
-	//Resource bundle.
-	private ResourceBundle resourceBundle;
-	
-	/**
-	 * The constructor.
-	 */
-	public TestCheckStylePluginPlugin(IPluginDescriptor descriptor) {
-		super(descriptor);
-		plugin = this;
-		try {
-			resourceBundle= ResourceBundle.getBundle("TestCheckStylePlugin.TestCheckStylePluginPluginResources");
-		} catch (MissingResourceException x) {
-			resourceBundle = null;
-		}
-	}
-
-	/**
-	 * Returns the shared instance.
-	 */
-	public static TestCheckStylePluginPlugin getDefault() {
-		return plugin;
-	}
-
-	/**
-	 * Returns the workspace instance.
-	 */
-	public static IWorkspace getWorkspace() {
-		return ResourcesPlugin.getWorkspace();
-	}
-
-	/**
-	 * Returns the string from the plugin's resource bundle,
-	 * or 'key' if not found.
-	 */
-	public static String getResourceString(String key) {
-		ResourceBundle bundle= TestCheckStylePluginPlugin.getDefault().getResourceBundle();
-		try {
-			return (bundle!=null ? bundle.getString(key) : key);
-		} catch (MissingResourceException e) {
-			return key;
-		}
-	}
-
-	/**
-	 * Returns the plugin's resource bundle,
-	 */
-	public ResourceBundle getResourceBundle() {
-		return resourceBundle;
-	}
+public class TestCheckConfigurationFactory extends TestCase
+{
+   public void testUpdateFile() throws IOException
+   {
+      ClassLoader loader = CheckConfigurationFactory.class.getClassLoader();
+      Properties classnameMap = new Properties();
+      InputStream in = loader.getResourceAsStream("com/atlassw/tools/eclipse/checkstyle/config/classnames_v3.2.0_update.properties");
+      classnameMap.load(in);
+      final Iterator it = classnameMap.values().iterator();
+      while (it.hasNext())
+      {
+         String newClassName = (String) it.next();
+         try
+         {
+            Class.forName(newClassName); //this shouldn't throw
+         }
+         catch (ClassNotFoundException e)
+         {
+            fail(newClassName + " check doesn't exist in checkstyle");
+         }
+      }
+   }
 }
TestCheckstylePlugin/src/com/atlassw/tools/eclipse/checkstyle/config/TestMetadataFactory.java to TestCheckstylePlugin/src/Java/com/atlassw/tools/eclipse/checkstyle/config/TestMetadataFactory.java
--- a/TestCheckstylePlugin/src/com/atlassw/tools/eclipse/checkstyle/config/TestMetadataFactory.java
+++ b/TestCheckstylePlugin/src/Java/com/atlassw/tools/eclipse/checkstyle/config/TestMetadataFactory.java
@@ -6,7 +6,6 @@
 //
 package com.atlassw.tools.eclipse.checkstyle.config;
 
-import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.Modifier;
 import java.util.ArrayList;
@@ -32,10 +31,13 @@
                 CHECKSTYLE_CHECKS_PACKAGE + ".javadoc.PackageHtmlCheck",
                 CHECKSTYLE_CHECKS_PACKAGE + ".NewlineAtEndOfFileCheck",
                 CHECKSTYLE_CHECKS_PACKAGE + ".TranslationCheck",
+                CHECKSTYLE_CHECKS_PACKAGE + ".j2ee.AbstractInterfaceCheck",
    });
    
    public void testAllChecksAreIncluded() throws ClassNotFoundException, IOException
    {
+      final String classPath = System.getProperty("java.class.path");
+      final String[] split = classPath.split(";");
       final List includedClasses = new ArrayList();
       final Iterator it = MetadataFactory.getRuleGroupMetadata().iterator();
       while (it.hasNext())
@@ -58,8 +60,8 @@
             
          }
       }
-      final File file = new File(".");
-      final String[] files = file.list();
+
+      final String[] files = split;
       for(int i = 0; i < files.length; i++)
       {
          if(files[i].endsWith(".jar"))
1 2 > >> (Page 1 of 2)