/*
 *  (c) tolina GmbH, 2015
 */
package de.tolina.sonar.plugins.vft;

import org.sonar.api.server.rule.RulesDefinition;
import org.sonar.api.server.rule.RulesDefinitionAnnotationLoader;

import com.google.common.annotations.VisibleForTesting;

import de.tolina.sonar.plugins.TolinaSonarPlugin;

/**
 * {@link RulesDefinition} for {@link VisibleForTesting}.
 * @see DefaultChecks for contained checks
 * 
 */
public class VisibleForTestingRulesDefinition implements RulesDefinition {


	@Override
	public void define(Context context) {
		final NewRepository repository = context.createRepository(DefaultChecks.REPOSITORY_KEY, TolinaSonarPlugin.JAVA_LANG);
		repository.setName("VisibleForTesting");
		final RulesDefinitionAnnotationLoader annotationLoader = new RulesDefinitionAnnotationLoader();

		final Class<?>[] classArray = DefaultChecks.getChecksAsArray();
		annotationLoader.load(repository, classArray);
		repository.done();
	}



}

@@ -497,16 +497,89 @@
 on %7B%0D%0A%0D%0A
+%09private static final String VISIBLE_FOR_TESTING = %22VisibleForTesting%22;%0D%0A
 %0D%0A%09@Over
@@ -766,35 +766,35 @@
 setName(
-%22VisibleForTesting%22
+VISIBLE_FOR_TESTING
 );%0D%0A%09%09fi

String to constant