/*
 * Copyright 2013-2014 must-be.org
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.mustbe.consulo.csharp.ide.copyright;

import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiFile;
import com.maddyhome.idea.copyright.CopyrightProfile;
import com.maddyhome.idea.copyright.psi.UpdateCopyright;
import com.maddyhome.idea.copyright.psi.UpdateCopyrightsProvider;
import com.maddyhome.idea.copyright.psi.UpdatePsiFileCopyright;

/**
 * @author VISTALL
 * @since 15.03.14
 */
public class CSharpUpdateCopyrightsProvider extends UpdateCopyrightsProvider
{
	@Override
	public UpdateCopyright createInstance(Project project, Module module, VirtualFile virtualFile, FileType fileType,
			CopyrightProfile copyrightProfile)
	{
		return new UpdatePsiFileCopyright(project, module, virtualFile, copyrightProfile)
		{
			@Override
			protected void scanFile()
			{
				PsiFile file = getFile();

				checkComments(file.getFirstChild(), null, true);
			}
		};
	}
}

@@ -651,90 +651,105 @@
 ort 
-com.intellij.openapi.fileTypes.FileType;%0Aimport com.intellij.openapi.module.Module
+org.jetbrains.annotations.NotNull;%0Aimport org.mustbe.consulo.copyright.config.CopyrightFileConfig
 ;%0Aim
@@ -778,23 +778,26 @@
 api.
-project.Project
+fileTypes.FileType
 ;%0Aim
@@ -826,23 +826,23 @@
 api.
-vfs.VirtualFile
+project.Project
 ;%0Aim
@@ -930,65 +930,8 @@
 le;%0A
-import com.maddyhome.idea.copyright.psi.UpdateCopyright;%0A
 impo
@@ -1055,16 +1055,77 @@
 pyright;
+%0Aimport com.maddyhome.idea.copyright.ui.TemplateCommentPanel;
 %0A%0A/**%0A *
@@ -1244,10 +1244,41 @@
 ider
-%0A%7B
+%3CCopyrightFileConfig%3E%0A%7B%0A%09@NotNull
 %0A%09@O
@@ -1295,24 +1295,31 @@
 ublic Update
+PsiFile
 Copyright cr
@@ -1319,103 +1319,83 @@
 ight
- createInstance(Project project, Module module, VirtualFile virtualFile, FileType fileType,%0A%09%09%09
+%3CCopyrightFileConfig%3E createInstance(@NotNull final PsiFile file, @NotNull 
 Copy
@@ -1467,34 +1467,31 @@
 ight
-(project, module, virtualF
+%3CCopyrightFileConfig%3E(f
 ile,
@@ -1564,39 +1564,8 @@
 %09%09%7B%0A
-%09%09%09%09PsiFile file = getFile();%0A%0A
 %09%09%09%09
@@ -1625,11 +1625,364 @@
 %0A%09%09%7D;%0A%09%7D
+%0A%0A%09@NotNull%0A%09@Override%0A%09public CopyrightFileConfig createDefaultOptions()%0A%09%7B%0A%09%09return new CopyrightFileConfig();%0A%09%7D%0A%0A%09@NotNull%0A%09@Override%0A%09public TemplateCommentPanel createConfigurable(@NotNull Project project, @NotNull TemplateCommentPanel parentPane, @NotNull FileType fileType)%0A%09%7B%0A%09%09return new TemplateCommentPanel(fileType, parentPane, project);%0A%09%7D
 %0A%7D%0A

update copyright support