Bug 73011 [wizards] The Code Template inserted into the wrong place [code manipulation]
In my preference, I have change my Code Template - Code - New Java File to be as follows: ${typecomment} /* * Created on ${date} */ ${package_declaration} ${type_declaration} ----------------- However, when I create a new java class that extends or implement something, the result java file inserted the package declaration in the middle of my type comment. This result in a class that has compilation error. Something Like this : //**************************************************************** // xxxxx import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.model.IDebugElement; import org.eclipse.debug.core.model.IDebugTarget; // xxxxxxxxx // ssssssss //**************************************************************** /** * @author jcyfung */ /* * Created on Aug 31, 2004 */
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewTypeWizardPage.java
* @return Returns the simple type name that can be used in the code or the
		 * fully qualified type name if an import conflict prevented the import.
		 */				
		public String addImport(String qualifiedTypeName) {
			fAddedTypes.add(qualifiedTypeName);
			return fImportsStructure.addImport(qualifiedTypeName);
		}
				
		/**
		 * Adds a new import declaration that is sorted in the existing imports.
		 * If an import already exists or the import would conflict with an import
		 * of an other type with the same simple name, the import is not added.
		 * 
		 * @param typeBinding the binding of the type to import
		 * 
		 * @return Returns the simple type name that can be used in the code or the
		 * fully qualified type name if an import conflict prevented the import.
		 */				
		public String addImport(ITypeBinding typeBinding) {
			
			return fImportsStructure.addImport(typeBinding);
		}
				
		 void create(boolean needsSave, SubProgressMonitor monitor) throws CoreException {
			fImportsStructure.create(needsSave, monitor);
		}
		
		 void removeImport(String qualifiedName) {
			if (fAddedTypes.contains(qualifiedName)) {
				fImportsStructure.removeImport(qualifiedName);