Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 0 additions & 87 deletions src/java/META-INF/plugin.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,26 @@
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.ConfigurableProvider;
import com.intellij.openapi.options.ConfigurationException;
import com.intellij.openapi.project.Project;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.codehaus.testdox.intellij.IconHelper;
import org.codehaus.testdox.intellij.TemplateNameResolver;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.util.Collections;
import java.util.List;

@State(
name = ConfigurationController.COMPONENT_NAME,
storages = {
@Storage(
id = ConfigurationController.COMPONENT_NAME,
file = "$PROJECT_FILE$"
)}
name = ConfigurationController.COMPONENT_NAME,
storages = {
@Storage(
id = ConfigurationController.COMPONENT_NAME,
file = "$PROJECT_FILE$"
)}
)

public class ConfigurationController implements ProjectComponent, Configurable, PersistentStateComponent<ConfigurationBean> {
Expand Down Expand Up @@ -117,14 +120,14 @@ public Icon getIcon() {

public boolean isModified() {
return bean.isAllowCustomPackages() != panel.getCustomMappingStatus()
|| !equals(bean.getCustomPackages(), panel.getCustomPackageMappings())
|| !bean.getTestNameTemplate().equals(panel.getTestNameTemplate())
|| !bean.getTestMethodIndicator().equals(panel.getTestMethodPrefix())
|| bean.isCreateTestIfMissing() != panel.getCreateTestIfMissing()
|| bean.isUnderscoreMode() != panel.getUseUnderscore()
|| bean.isShowFullyQualifiedClassName() != panel.getShowFullyQualifiedClassName()
|| bean.isAutoApplyChangesToTest() != panel.getAutoApplyChangesToTest()
|| bean.isDeletePackageOccurrences() != panel.getDeletePackageOccurrences();
|| !equals(bean.getCustomPackages(), panel.getCustomPackageMappings())
|| !bean.getTestNameTemplate().equals(panel.getTestNameTemplate())
|| !bean.getTestMethodIndicator().equals(panel.getTestMethodPrefix())
|| bean.isCreateTestIfMissing() != panel.getCreateTestIfMissing()
|| bean.isUnderscoreMode() != panel.getUseUnderscore()
|| bean.isShowFullyQualifiedClassName() != panel.getShowFullyQualifiedClassName()
|| bean.isAutoApplyChangesToTest() != panel.getAutoApplyChangesToTest()
|| bean.isDeletePackageOccurrences() != panel.getDeletePackageOccurrences();
}

private boolean equals(List strings1, List strings2) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.codehaus.testdox.intellij.config;

import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.ConfigurableProvider;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.Nullable;

public class ConfigurationControllerProvider extends ConfigurableProvider {

Project project;

public ConfigurationControllerProvider(Project project) {
this.project = project;
}

@Nullable
@Override
public Configurable createConfigurable() {
return project.getComponent(ConfigurationController.class);
}
}