directories,
final JavaSourceRootType scope
) {
@@ -291,7 +291,7 @@ protected static void addSourceFolderIfNotIgnored(
@NotNull final File testSrcDir,
@NotNull final JpsModuleSourceRootType
rootType,
@NotNull final List dirsToIgnore,
- @NotNull final HybrisApplicationSettings appSettings
+ @NotNull final ApplicationSettings appSettings
) {
addSourceFolderIfNotIgnored(
contentEntry,
@@ -311,7 +311,7 @@ private static void addSourceFolderIfNotIgnored(
@NotNull final JpsModuleSourceRootType
rootType,
@NotNull final P properties,
@NotNull final List dirsToIgnore,
- @NotNull final HybrisApplicationSettings applicationSettings
+ @NotNull final ApplicationSettings applicationSettings
) {
if (dirsToIgnore.stream().noneMatch(it -> FileUtil.isAncestor(it, srcDir, false))) {
final boolean ignoreEmpty = applicationSettings.getIgnoreNonExistingSourceDirectories();
diff --git a/src/com/intellij/idea/plugin/hybris/project/configurators/impl/DefaultGroupModuleConfigurator.java b/src/com/intellij/idea/plugin/hybris/project/configurators/impl/DefaultGroupModuleConfigurator.java
index f5f540ea0..6b05c3660 100644
--- a/src/com/intellij/idea/plugin/hybris/project/configurators/impl/DefaultGroupModuleConfigurator.java
+++ b/src/com/intellij/idea/plugin/hybris/project/configurators/impl/DefaultGroupModuleConfigurator.java
@@ -26,7 +26,7 @@
import com.intellij.idea.plugin.hybris.project.descriptors.YSubModuleDescriptor;
import com.intellij.idea.plugin.hybris.project.descriptors.impl.*;
import com.intellij.idea.plugin.hybris.project.utils.FileUtils;
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent;
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.progress.ProgressIndicator;
import org.apache.commons.lang3.ArrayUtils;
@@ -49,7 +49,7 @@ public void process(
@NotNull final List extends ModuleDescriptor> modulesChosenForImport
) {
indicator.setText2(message("hybris.project.import.module.groups"));
- final var applicationSettings = HybrisApplicationSettingsComponent.getInstance().getState();
+ final var applicationSettings = ApplicationSettingsComponent.getInstance().getState();
if (!applicationSettings.getGroupModules()) {
return;
}
@@ -65,13 +65,13 @@ public void process(
});
final var groups = Map.of(
- "groupCustom", HybrisApplicationSettingsComponent.toIdeaGroup(applicationSettings.getGroupCustom()),
- "groupNonHybris", HybrisApplicationSettingsComponent.toIdeaGroup(applicationSettings.getGroupNonHybris()),
- "groupOtherCustom", HybrisApplicationSettingsComponent.toIdeaGroup(applicationSettings.getGroupOtherCustom()),
- "groupHybris", HybrisApplicationSettingsComponent.toIdeaGroup(applicationSettings.getGroupHybris()),
- "groupOtherHybris", HybrisApplicationSettingsComponent.toIdeaGroup(applicationSettings.getGroupOtherHybris()),
- "groupPlatform", HybrisApplicationSettingsComponent.toIdeaGroup(applicationSettings.getGroupPlatform()),
- "groupCCv2", HybrisApplicationSettingsComponent.toIdeaGroup(applicationSettings.getGroupCCv2())
+ "groupCustom", ApplicationSettingsComponent.toIdeaGroup(applicationSettings.getGroupCustom()),
+ "groupNonHybris", ApplicationSettingsComponent.toIdeaGroup(applicationSettings.getGroupNonHybris()),
+ "groupOtherCustom", ApplicationSettingsComponent.toIdeaGroup(applicationSettings.getGroupOtherCustom()),
+ "groupHybris", ApplicationSettingsComponent.toIdeaGroup(applicationSettings.getGroupHybris()),
+ "groupOtherHybris", ApplicationSettingsComponent.toIdeaGroup(applicationSettings.getGroupOtherHybris()),
+ "groupPlatform", ApplicationSettingsComponent.toIdeaGroup(applicationSettings.getGroupPlatform()),
+ "groupCCv2", ApplicationSettingsComponent.toIdeaGroup(applicationSettings.getGroupCCv2())
);
modulesChosenForImport.forEach(it -> {
final @Nullable String[] groupNames = getGroupName(it, requiredYModuleDescriptorList, groups);
@@ -157,7 +157,7 @@ private String[] getGroupPathOverride(final File groupFile, final ModuleDescript
if (rawGroupText == null) {
rawGroupText = properties.getProperty(moduleName + '.' + GROUP_OVERRIDE_KEY);
}
- return HybrisApplicationSettingsComponent.toIdeaGroup(rawGroupText);
+ return ApplicationSettingsComponent.toIdeaGroup(rawGroupText);
}
private String[] getGroupPath(@NotNull final ModuleDescriptor moduleDescriptor, final Set requiredYModuleDescriptorList, final Map groups) {
diff --git a/src/com/intellij/idea/plugin/hybris/project/configurators/impl/DefaultSearchScopeConfigurator.java b/src/com/intellij/idea/plugin/hybris/project/configurators/impl/DefaultSearchScopeConfigurator.java
index 6bcb4b061..71a765405 100644
--- a/src/com/intellij/idea/plugin/hybris/project/configurators/impl/DefaultSearchScopeConfigurator.java
+++ b/src/com/intellij/idea/plugin/hybris/project/configurators/impl/DefaultSearchScopeConfigurator.java
@@ -24,7 +24,7 @@
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils;
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons;
import com.intellij.idea.plugin.hybris.project.configurators.SearchScopeConfigurator;
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettings;
+import com.intellij.idea.plugin.hybris.settings.ApplicationSettings;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.module.ModifiableModuleModel;
import com.intellij.openapi.progress.ProgressIndicator;
@@ -49,7 +49,7 @@ public class DefaultSearchScopeConfigurator implements SearchScopeConfigurator {
public void configure(
final @NotNull ProgressIndicator indicator,
final @NotNull Project project,
- final @NotNull HybrisApplicationSettings applicationSettings,
+ final @NotNull ApplicationSettings applicationSettings,
final @NotNull ModifiableModuleModel model
) {
indicator.setText(message("hybris.project.import.search.scope"));
@@ -113,7 +113,7 @@ public void configure(
}
@NotNull
- public static PackageSet createCustomTsImpexBeansFilesPattern(final @NotNull HybrisApplicationSettings appSettings) {
+ public static PackageSet createCustomTsImpexBeansFilesPattern(final @NotNull ApplicationSettings appSettings) {
final String customGroupName = appSettings.getGroupCustom();
final FilePatternPackageSet tsFilePatternPackageSet = new FilePatternPackageSet(
customGroupName + '*',
diff --git a/src/com/intellij/idea/plugin/hybris/project/descriptors/DefaultHybrisProjectDescriptor.java b/src/com/intellij/idea/plugin/hybris/project/descriptors/DefaultHybrisProjectDescriptor.java
index 61bb8f7e3..ccff51002 100644
--- a/src/com/intellij/idea/plugin/hybris/project/descriptors/DefaultHybrisProjectDescriptor.java
+++ b/src/com/intellij/idea/plugin/hybris/project/descriptors/DefaultHybrisProjectDescriptor.java
@@ -31,8 +31,8 @@
import com.intellij.idea.plugin.hybris.project.settings.jaxb.localextensions.ScanType;
import com.intellij.idea.plugin.hybris.project.tasks.TaskProgressProcessor;
import com.intellij.idea.plugin.hybris.project.utils.FileUtils;
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent;
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent;
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent;
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.module.Module;
@@ -389,7 +389,7 @@ protected void scanDirectoryForHybrisModules(
this.foundModules.clear();
- final var settings = HybrisApplicationSettingsComponent.getInstance().getState();
+ final var settings = ApplicationSettingsComponent.getInstance().getState();
final Map> moduleRootMap = newModuleRootMap();
final var excludedFromScanning = getExcludedFromScanningDirectories();
@@ -848,11 +848,11 @@ public void setProject(@Nullable final Project project) {
return;
}
// the project may not be hybris based project.
- final HybrisProjectSettingsComponent hybrisProjectSettings = HybrisProjectSettingsComponent.getInstance(project);
- if (hybrisProjectSettings == null) {
+ final ProjectSettingsComponent projectSettingsComponent = ProjectSettingsComponent.getInstance(project);
+ if (projectSettingsComponent == null) {
return;
}
- if (hybrisProjectSettings.isHybrisProject()) {
+ if (projectSettingsComponent.isHybrisProject()) {
setHybrisProject(project);
}
}
diff --git a/src/com/intellij/idea/plugin/hybris/project/descriptors/YModuleLibDescriptorUtil.kt b/src/com/intellij/idea/plugin/hybris/project/descriptors/YModuleLibDescriptorUtil.kt
index 8d18c6be5..b1fe11959 100644
--- a/src/com/intellij/idea/plugin/hybris/project/descriptors/YModuleLibDescriptorUtil.kt
+++ b/src/com/intellij/idea/plugin/hybris/project/descriptors/YModuleLibDescriptorUtil.kt
@@ -21,7 +21,7 @@ package com.intellij.idea.plugin.hybris.project.descriptors
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.common.LibraryDescriptorType
import com.intellij.idea.plugin.hybris.project.descriptors.impl.*
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
import com.intellij.openapi.externalSystem.service.project.IdeModifiableModelsProvider
import com.intellij.openapi.roots.DependencyScope
import com.intellij.openapi.roots.OrderRootType
@@ -398,7 +398,7 @@ object YModuleLibDescriptorUtil {
private fun getDbDriversDirectory(descriptor: PlatformModuleDescriptor) = descriptor.rootProjectDescriptor.externalDbDriversDirectory
?: File(descriptor.moduleRootDirectory, HybrisConstants.PLATFORM_DB_DRIVER)
- private fun getStandardSourceJarDirectory(descriptor: YModuleDescriptor) = if (HybrisApplicationSettingsComponent.getInstance().state.withStandardProvidedSources) {
+ private fun getStandardSourceJarDirectory(descriptor: YModuleDescriptor) = if (ApplicationSettingsComponent.getInstance().state.withStandardProvidedSources) {
val rootDescriptor = if (descriptor is YSubModuleDescriptor) descriptor.owner
else descriptor
diff --git a/src/com/intellij/idea/plugin/hybris/project/indexing/HybrisDirectoryIndexExcludePolicy.kt b/src/com/intellij/idea/plugin/hybris/project/indexing/HybrisDirectoryIndexExcludePolicy.kt
index 59e40279c..2370950df 100644
--- a/src/com/intellij/idea/plugin/hybris/project/indexing/HybrisDirectoryIndexExcludePolicy.kt
+++ b/src/com/intellij/idea/plugin/hybris/project/indexing/HybrisDirectoryIndexExcludePolicy.kt
@@ -18,7 +18,7 @@
package com.intellij.idea.plugin.hybris.project.indexing
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
import com.intellij.openapi.project.Project
import com.intellij.openapi.roots.ModuleRootModel
import com.intellij.openapi.roots.impl.DirectoryIndexExcludePolicy
@@ -49,7 +49,7 @@ class HybrisDirectoryIndexExcludePolicy(val project: Project) : DirectoryIndexEx
}
private fun getExcludedFromIndexList(): List {
- return HybrisApplicationSettingsComponent.getInstance()
+ return ApplicationSettingsComponent.getInstance()
.state
.excludedFromIndexList
}
diff --git a/src/com/intellij/idea/plugin/hybris/project/providers/HybrisWritingAccessProvider.kt b/src/com/intellij/idea/plugin/hybris/project/providers/HybrisWritingAccessProvider.kt
index 375ae6ff5..186686a62 100644
--- a/src/com/intellij/idea/plugin/hybris/project/providers/HybrisWritingAccessProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/project/providers/HybrisWritingAccessProvider.kt
@@ -18,14 +18,14 @@
*/
package com.intellij.idea.plugin.hybris.project.providers
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.project.Project
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.vfs.WritingAccessProvider
class HybrisWritingAccessProvider(myProject: Project) : WritingAccessProvider() {
- private val ootbReadOnlyMode = HybrisProjectSettingsComponent.getInstance(myProject).state.importOotbModulesInReadOnlyMode
+ private val ootbReadOnlyMode = ProjectSettingsComponent.getInstance(myProject).state.importOotbModulesInReadOnlyMode
override fun requestWriting(files: Collection) = files
.filter { isFileReadOnly(it) }
diff --git a/src/com/intellij/idea/plugin/hybris/project/tasks/ImportProjectProgressModalWindow.java b/src/com/intellij/idea/plugin/hybris/project/tasks/ImportProjectProgressModalWindow.java
index 14250ac31..3734c0f27 100644
--- a/src/com/intellij/idea/plugin/hybris/project/tasks/ImportProjectProgressModalWindow.java
+++ b/src/com/intellij/idea/plugin/hybris/project/tasks/ImportProjectProgressModalWindow.java
@@ -40,10 +40,10 @@
import com.intellij.idea.plugin.hybris.project.descriptors.YSubModuleDescriptor;
import com.intellij.idea.plugin.hybris.project.descriptors.impl.*;
import com.intellij.idea.plugin.hybris.project.utils.PluginCommon;
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettings;
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent;
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettings;
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent;
+import com.intellij.idea.plugin.hybris.settings.ApplicationSettings;
+import com.intellij.idea.plugin.hybris.settings.ProjectSettings;
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent;
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent;
import com.intellij.javaee.application.facet.JavaeeApplicationFacet;
import com.intellij.javaee.web.facet.WebFacet;
import com.intellij.lang.Language;
@@ -142,9 +142,9 @@ public synchronized void run(@NotNull final ProgressIndicator indicator) {
.collect(Collectors.toMap(YModuleDescriptor::getName, Function.identity()));
final var allModuleDescriptors = allModules.stream()
.collect(Collectors.toMap(ModuleDescriptor::getName, Function.identity()));
- final var appSettings = HybrisApplicationSettingsComponent.getInstance().getState();
+ final var appSettings = ApplicationSettingsComponent.getInstance().getState();
- final var projectSettingsComponent = HybrisProjectSettingsComponent.getInstance(project);
+ final var projectSettingsComponent = ProjectSettingsComponent.getInstance(project);
final var projectSettings = projectSettingsComponent.getState();
final var modulesFilesDirectory = hybrisProjectDescriptor.getModulesFilesDirectory();
@@ -271,7 +271,7 @@ private void processUltimateEdition(final @NotNull ProgressIndicator indicator)
private Module createJavaModule(final @NotNull ProgressIndicator indicator,
final Map allYModules,
final ModifiableModuleModel rootProjectModifiableModel,
- final ModuleDescriptor moduleDescriptor, final @NotNull HybrisApplicationSettings appSettings
+ final ModuleDescriptor moduleDescriptor, final @NotNull ApplicationSettings appSettings
) {
indicator.setText(message("hybris.project.import.module.import", moduleDescriptor.getName()));
indicator.setText2(message("hybris.project.import.module.settings"));
@@ -398,14 +398,14 @@ private void updateProjectDictionary(
hybrisDictionary.addToDictionary(moduleNames);
}
- private void initializeHybrisProjectSettings(@NotNull final Project project, final @NotNull HybrisProjectSettings hybrisProjectSettings) {
- hybrisProjectSettings.setHybrisProject(true);
+ private void initializeHybrisProjectSettings(@NotNull final Project project, final @NotNull ProjectSettings projectSettings) {
+ projectSettings.setHybrisProject(true);
final IdeaPluginDescriptor plugin = PluginManagerCore.getPlugin(PluginId.getId(HybrisConstants.PLUGIN_ID));
if (plugin == null) return;
final String version = plugin.getVersion();
- hybrisProjectSettings.setImportedByVersion(version);
+ projectSettings.setImportedByVersion(version);
}
private void selectSdk(@NotNull final Project project) {
@@ -427,7 +427,7 @@ private void selectSdk(@NotNull final Project project) {
}
}
- private void saveCustomDirectoryLocation(final Project project, final HybrisProjectSettings hybrisProjectSettings) {
+ private void saveCustomDirectoryLocation(final Project project, final ProjectSettings projectSettings) {
final File customDirectory = hybrisProjectDescriptor.getExternalExtensionsDirectory();
final File hybrisDirectory = hybrisProjectDescriptor.getHybrisDistributionDirectory();
final VirtualFile projectDir = ProjectUtil.guessProjectDir(project);
@@ -438,36 +438,36 @@ private void saveCustomDirectoryLocation(final Project project, final HybrisProj
final Path projectPath = Paths.get(baseDirectory.getAbsolutePath());
final Path hybrisPath = Paths.get(hybrisDirectory.getAbsolutePath());
final Path relativeHybrisPath = projectPath.relativize(hybrisPath);
- hybrisProjectSettings.setHybrisDirectory(relativeHybrisPath.toString());
+ projectSettings.setHybrisDirectory(relativeHybrisPath.toString());
if (customDirectory != null) {
final Path customPath = Paths.get(customDirectory.getAbsolutePath());
final Path relativeCustomPath = hybrisPath.relativize(customPath);
- hybrisProjectSettings.setCustomDirectory(relativeCustomPath.toString());
+ projectSettings.setCustomDirectory(relativeCustomPath.toString());
}
}
- private void saveImportedSettings(@NotNull final HybrisProjectSettings hybrisProjectSettings,
- @NotNull final HybrisApplicationSettings appSettings,
- @NotNull final HybrisProjectSettingsComponent hybrisSettingsComponent) {
- hybrisProjectSettings.setImportOotbModulesInReadOnlyMode(hybrisProjectDescriptor.isImportOotbModulesInReadOnlyMode());
+ private void saveImportedSettings(@NotNull final ProjectSettings projectSettings,
+ @NotNull final ApplicationSettings appSettings,
+ @NotNull final ProjectSettingsComponent hybrisSettingsComponent) {
+ projectSettings.setImportOotbModulesInReadOnlyMode(hybrisProjectDescriptor.isImportOotbModulesInReadOnlyMode());
final File extDir = hybrisProjectDescriptor.getExternalExtensionsDirectory();
if (extDir != null && extDir.isDirectory()) {
- hybrisProjectSettings.setExternalExtensionsDirectory(FileUtil.toSystemIndependentName(extDir.getPath()));
+ projectSettings.setExternalExtensionsDirectory(FileUtil.toSystemIndependentName(extDir.getPath()));
}
File configDir = hybrisProjectDescriptor.getExternalConfigDirectory();
if (configDir != null && configDir.isDirectory()) {
- hybrisProjectSettings.setExternalConfigDirectory(FileUtil.toSystemIndependentName(configDir.getPath()));
+ projectSettings.setExternalConfigDirectory(FileUtil.toSystemIndependentName(configDir.getPath()));
}
final ConfigModuleDescriptor configModule = hybrisProjectDescriptor.getConfigHybrisModuleDescriptor();
if (configModule != null) {
configDir = configModule.getModuleRootDirectory();
if (configDir.isDirectory()) {
- hybrisProjectSettings.setConfigDirectory(FileUtil.toSystemIndependentName(configDir.getPath()));
+ projectSettings.setConfigDirectory(FileUtil.toSystemIndependentName(configDir.getPath()));
}
}
final File dbDriversDir = hybrisProjectDescriptor.getExternalDbDriversDirectory();
if (dbDriversDir != null && dbDriversDir.isDirectory()) {
- hybrisProjectSettings.setExternalDbDriversDirectory(FileUtil.toSystemIndependentName(dbDriversDir.getPath()));
+ projectSettings.setExternalDbDriversDirectory(FileUtil.toSystemIndependentName(dbDriversDir.getPath()));
appSettings.setExternalDbDriversDirectory(FileUtil.toSystemIndependentName(dbDriversDir.getPath()));
} else {
appSettings.setExternalDbDriversDirectory("");
@@ -479,7 +479,7 @@ private void saveImportedSettings(@NotNull final HybrisProjectSettings hybrisPro
final File sourceCodeFile = hybrisProjectDescriptor.getSourceCodeFile();
if (sourceCodeFile != null && sourceCodeFile.exists()) {
- hybrisProjectSettings.setSourceCodeFile(FileUtil.toSystemIndependentName(sourceCodeFile.getPath()));
+ projectSettings.setSourceCodeFile(FileUtil.toSystemIndependentName(sourceCodeFile.getPath()));
final boolean directory = sourceCodeFile.isDirectory();
appSettings.setSourceCodeDirectory(FileUtil.toSystemIndependentName(
directory ? sourceCodeFile.getPath() : sourceCodeFile.getParent()));
@@ -487,12 +487,12 @@ private void saveImportedSettings(@NotNull final HybrisProjectSettings hybrisPro
}
final File modulesFilesDirectory = hybrisProjectDescriptor.getModulesFilesDirectory();
if (modulesFilesDirectory != null && modulesFilesDirectory.isDirectory()) {
- hybrisProjectSettings.setIdeModulesFilesDirectory(FileUtil.toSystemIndependentName(modulesFilesDirectory.getPath()));
+ projectSettings.setIdeModulesFilesDirectory(FileUtil.toSystemIndependentName(modulesFilesDirectory.getPath()));
}
- hybrisProjectSettings.setFollowSymlink(hybrisProjectDescriptor.isFollowSymlink());
- hybrisProjectSettings.setScanThroughExternalModule(hybrisProjectDescriptor.isScanThroughExternalModule());
- hybrisProjectSettings.setModulesOnBlackList(createModulesOnBlackList());
- hybrisProjectSettings.setHybrisVersion(hybrisProjectDescriptor.getHybrisVersion());
+ projectSettings.setFollowSymlink(hybrisProjectDescriptor.isFollowSymlink());
+ projectSettings.setScanThroughExternalModule(hybrisProjectDescriptor.isScanThroughExternalModule());
+ projectSettings.setModulesOnBlackList(createModulesOnBlackList());
+ projectSettings.setHybrisVersion(hybrisProjectDescriptor.getHybrisVersion());
final var sapCLIDirectory = hybrisProjectDescriptor.getSAPCLIDirectory();
@@ -503,7 +503,7 @@ private void saveImportedSettings(@NotNull final HybrisProjectSettings hybrisPro
final var credentialAttributes = new CredentialAttributes(HybrisConstants.SECURE_STORAGE_SERVICE_NAME_SAP_CX_CCV2_TOKEN);
PasswordSafe.getInstance().setPassword(credentialAttributes, hybrisProjectDescriptor.getSAPCLIToken());
- hybrisProjectSettings.setJavadocUrl(hybrisProjectDescriptor.getJavadocUrl());
+ projectSettings.setJavadocUrl(hybrisProjectDescriptor.getJavadocUrl());
final var completeSetOfHybrisModules = hybrisProjectDescriptor.getFoundModules().stream()
.filter(e -> !(e instanceof MavenModuleDescriptor)
&& !(e instanceof EclipseModuleDescriptor)
@@ -516,10 +516,10 @@ private void saveImportedSettings(@NotNull final HybrisProjectSettings hybrisPro
.map(YModuleDescriptor.class::cast)
.collect(Collectors.toSet());
hybrisSettingsComponent.setAvailableExtensions(completeSetOfHybrisModules);
- hybrisProjectSettings.setCompleteSetOfAvailableExtensionsInHybris(completeSetOfHybrisModules.stream()
+ projectSettings.setCompleteSetOfAvailableExtensionsInHybris(completeSetOfHybrisModules.stream()
.map(ModuleDescriptor::getName)
.collect(Collectors.toSet()));
- hybrisProjectSettings.setExcludeTestSources(hybrisProjectDescriptor.isExcludeTestSources());
+ projectSettings.setExcludeTestSources(hybrisProjectDescriptor.isExcludeTestSources());
}
private Set createModulesOnBlackList() {
diff --git a/src/com/intellij/idea/plugin/hybris/project/utils/HybrisRootUtil.java b/src/com/intellij/idea/plugin/hybris/project/utils/HybrisRootUtil.java
index 4d550f296..128258219 100644
--- a/src/com/intellij/idea/plugin/hybris/project/utils/HybrisRootUtil.java
+++ b/src/com/intellij/idea/plugin/hybris/project/utils/HybrisRootUtil.java
@@ -20,7 +20,7 @@
import com.intellij.idea.plugin.hybris.common.HybrisConstants;
import com.intellij.idea.plugin.hybris.project.descriptors.ModuleDescriptorType;
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent;
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleManager;
import com.intellij.openapi.project.Project;
@@ -38,7 +38,7 @@ private HybrisRootUtil() {
@Nullable
public static VirtualFile findPlatformRootDirectory(@NotNull final Project project) {
- final var settingsComponent = HybrisProjectSettingsComponent.getInstance(project);
+ final var settingsComponent = ProjectSettingsComponent.getInstance(project);
final Module platformModule =
Arrays.stream(ModuleManager.getInstance(project).getModules())
.filter(module -> settingsComponent.getModuleSettings(module).getType() == ModuleDescriptorType.PLATFORM)
diff --git a/src/com/intellij/idea/plugin/hybris/project/utils/ModuleUtils.kt b/src/com/intellij/idea/plugin/hybris/project/utils/ModuleUtils.kt
index c6af75afe..154af715d 100644
--- a/src/com/intellij/idea/plugin/hybris/project/utils/ModuleUtils.kt
+++ b/src/com/intellij/idea/plugin/hybris/project/utils/ModuleUtils.kt
@@ -19,7 +19,7 @@
package com.intellij.idea.plugin.hybris.project.utils
import com.intellij.idea.plugin.hybris.project.descriptors.ModuleDescriptorType
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.module.ModuleUtilCore
import com.intellij.psi.PsiElement
@@ -27,7 +27,7 @@ object ModuleUtils {
fun isHybrisModule(psi: PsiElement): Boolean {
val module = ModuleUtilCore.findModuleForPsiElement(psi) ?: return false
- val descriptorType = HybrisProjectSettingsComponent.getInstance(psi.project)
+ val descriptorType = ProjectSettingsComponent.getInstance(psi.project)
.getModuleSettings(module).type
return descriptorType == ModuleDescriptorType.PLATFORM
|| descriptorType == ModuleDescriptorType.EXT
diff --git a/src/com/intellij/idea/plugin/hybris/project/view/ExternalProjectViewNode.kt b/src/com/intellij/idea/plugin/hybris/project/view/ExternalProjectViewNode.kt
index d6c13a683..740a27097 100644
--- a/src/com/intellij/idea/plugin/hybris/project/view/ExternalProjectViewNode.kt
+++ b/src/com/intellij/idea/plugin/hybris/project/view/ExternalProjectViewNode.kt
@@ -22,7 +22,7 @@ import com.intellij.ide.projectView.*
import com.intellij.ide.util.treeView.AbstractTreeNode
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
import com.intellij.openapi.project.Project
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.ui.SimpleTextAttributes
@@ -43,7 +43,7 @@ class ExternalProjectViewNode(
public override fun update(presentation: PresentationData) {
with(presentation) {
setIcon(HybrisIcons.MODULE_EXTERNAL_GROUP)
- val groupNameExternalModules = HybrisApplicationSettingsComponent.getInstance().state.groupNameExternalModules
+ val groupNameExternalModules = ApplicationSettingsComponent.getInstance().state.groupNameExternalModules
.takeIf { it.isNotBlank() }
?: message("hybris.project.view.external.module.directory.name")
addText(groupNameExternalModules, SimpleTextAttributes.REGULAR_ATTRIBUTES)
diff --git a/src/com/intellij/idea/plugin/hybris/project/view/HybrisProjectView.kt b/src/com/intellij/idea/plugin/hybris/project/view/HybrisProjectView.kt
index 3c1124d3f..36057c07b 100644
--- a/src/com/intellij/idea/plugin/hybris/project/view/HybrisProjectView.kt
+++ b/src/com/intellij/idea/plugin/hybris/project/view/HybrisProjectView.kt
@@ -27,8 +27,8 @@ import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
import com.intellij.idea.plugin.hybris.common.yExtensionName
import com.intellij.idea.plugin.hybris.facet.YFacet
import com.intellij.idea.plugin.hybris.project.services.HybrisProjectService
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.project.DumbAware
import com.intellij.openapi.project.Project
@@ -40,16 +40,15 @@ import java.io.File
open class HybrisProjectView(val project: Project) : TreeStructureProvider, DumbAware {
- private val hybrisProjectSettingsComponent = HybrisProjectSettingsComponent.getInstance(project)
- private val hybrisProject = hybrisProjectSettingsComponent.state.hybrisProject
- private val hybrisApplicationSettings = HybrisApplicationSettingsComponent.getInstance().state
- private val commerceGroupName = HybrisApplicationSettingsComponent.toIdeaGroup(hybrisApplicationSettings.groupHybris)
+ private val hybrisProject = ProjectSettingsComponent.getInstance(project).state.hybrisProject
+ private val hybrisApplicationSettings = ApplicationSettingsComponent.getInstance().state
+ private val commerceGroupName = ApplicationSettingsComponent.toIdeaGroup(hybrisApplicationSettings.groupHybris)
?.firstOrNull()
- private val platformGroupName = HybrisApplicationSettingsComponent.toIdeaGroup(hybrisApplicationSettings.groupPlatform)
+ private val platformGroupName = ApplicationSettingsComponent.toIdeaGroup(hybrisApplicationSettings.groupPlatform)
?.firstOrNull()
- private val ccv2GroupName = HybrisApplicationSettingsComponent.toIdeaGroup(hybrisApplicationSettings.groupCCv2)
+ private val ccv2GroupName = ApplicationSettingsComponent.toIdeaGroup(hybrisApplicationSettings.groupCCv2)
?.firstOrNull()
- private val customGroupName = HybrisApplicationSettingsComponent.toIdeaGroup(hybrisApplicationSettings.groupCustom)
+ private val customGroupName = ApplicationSettingsComponent.toIdeaGroup(hybrisApplicationSettings.groupCustom)
?.firstOrNull()
private val groupToIcon = mapOf(
customGroupName to HybrisIcons.MODULE_CUSTOM_GROUP,
@@ -230,7 +229,7 @@ open class HybrisProjectView(val project: Project) : TreeStructureProvider, Dumb
children: Collection>,
settings: ViewSettings?
): Collection> {
- val junkFileNames = HybrisApplicationSettingsComponent.getInstance().state.junkDirectoryList
+ val junkFileNames = ApplicationSettingsComponent.getInstance().state.junkDirectoryList
.takeIf { it.isNotEmpty() }
?: return children
diff --git a/src/com/intellij/idea/plugin/hybris/project/view/HybrisProjectViewNodeDecorator.kt b/src/com/intellij/idea/plugin/hybris/project/view/HybrisProjectViewNodeDecorator.kt
index 466a1929e..2813c5b76 100644
--- a/src/com/intellij/idea/plugin/hybris/project/view/HybrisProjectViewNodeDecorator.kt
+++ b/src/com/intellij/idea/plugin/hybris/project/view/HybrisProjectViewNodeDecorator.kt
@@ -27,7 +27,7 @@ import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
import com.intellij.idea.plugin.hybris.common.yExtensionName
import com.intellij.idea.plugin.hybris.project.descriptors.ModuleDescriptorType
import com.intellij.idea.plugin.hybris.project.utils.PluginCommon
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.roots.ProjectRootManager
class HybrisProjectViewNodeDecorator : ProjectViewNodeDecorator {
@@ -42,7 +42,7 @@ class HybrisProjectViewNodeDecorator : ProjectViewNodeDecorator {
private fun decorateModule(node: PsiDirectoryNode, data: PresentationData) {
val vf = node.virtualFile ?: return
val module = ProjectRootManager.getInstance(node.project).fileIndex.getModuleForFile(vf) ?: return
- val projectSettings = HybrisProjectSettingsComponent.getInstance(module.project)
+ val projectSettings = ProjectSettingsComponent.getInstance(module.project)
if (!projectSettings.state.showFullModuleName) {
data.coloredText
diff --git a/src/com/intellij/idea/plugin/hybris/project/view/impl/HybrisProjectViewDirectoryHelper.kt b/src/com/intellij/idea/plugin/hybris/project/view/impl/HybrisProjectViewDirectoryHelper.kt
index a67273bfc..d584840d3 100644
--- a/src/com/intellij/idea/plugin/hybris/project/view/impl/HybrisProjectViewDirectoryHelper.kt
+++ b/src/com/intellij/idea/plugin/hybris/project/view/impl/HybrisProjectViewDirectoryHelper.kt
@@ -22,7 +22,7 @@ import com.intellij.ide.projectView.impl.JavaProjectViewDirectoryHelper
import com.intellij.ide.projectView.impl.nodes.ProjectViewDirectoryHelper
import com.intellij.ide.projectView.impl.nodes.PsiFileSystemItemFilter
import com.intellij.idea.plugin.hybris.common.HybrisConstants
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.project.Project
import com.intellij.openapi.roots.ProjectFileIndex
import com.intellij.openapi.roots.ProjectRootManager
@@ -69,7 +69,7 @@ class HybrisProjectViewDirectoryHelper(project: Project) : ProjectViewDirectoryH
override fun getTopLevelRoots(): MutableList {
val topLevelContentRoots = super.getTopLevelRoots()
- if (HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()) {
+ if (ProjectSettingsComponent.getInstance(project).isHybrisProject()) {
val prm = ProjectRootManager.getInstance(project)
for (root in prm.contentRoots) {
diff --git a/src/com/intellij/idea/plugin/hybris/project/wizard/OpenSupport.kt b/src/com/intellij/idea/plugin/hybris/project/wizard/OpenSupport.kt
index c339d5f03..2ead83dd1 100644
--- a/src/com/intellij/idea/plugin/hybris/project/wizard/OpenSupport.kt
+++ b/src/com/intellij/idea/plugin/hybris/project/wizard/OpenSupport.kt
@@ -18,10 +18,10 @@
*/
package com.intellij.idea.plugin.hybris.project.wizard
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettings
+import com.intellij.idea.plugin.hybris.settings.ProjectSettings
import com.intellij.openapi.options.ConfigurationException
interface OpenSupport {
@Throws(ConfigurationException::class)
- fun open(settings: HybrisProjectSettings)
+ fun open(settings: ProjectSettings)
}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/project/wizard/ProjectImportWizardRootStep.kt b/src/com/intellij/idea/plugin/hybris/project/wizard/ProjectImportWizardRootStep.kt
index 394e534a2..12681f63f 100644
--- a/src/com/intellij/idea/plugin/hybris/project/wizard/ProjectImportWizardRootStep.kt
+++ b/src/com/intellij/idea/plugin/hybris/project/wizard/ProjectImportWizardRootStep.kt
@@ -24,8 +24,8 @@ import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.messag
import com.intellij.idea.plugin.hybris.project.AbstractHybrisProjectImportBuilder
import com.intellij.idea.plugin.hybris.project.tasks.SearchHybrisDistributionDirectoryTaskModalWindow
import com.intellij.idea.plugin.hybris.project.utils.FileUtils
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettings
+import com.intellij.idea.plugin.hybris.settings.ProjectSettings
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
import com.intellij.idea.plugin.hybris.ui.CRUDListPanel
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory
@@ -331,7 +331,7 @@ class ProjectImportWizardRootStep(context: WizardContext) : ProjectImportWizardS
horizontalScrollBarPolicy = ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER
preferredSize = Dimension(preferredSize.width, JBUIScale.scale(600))
- val appSettings = HybrisApplicationSettingsComponent.getInstance()
+ val appSettings = ApplicationSettingsComponent.getInstance()
sapCLIDirChooser.text = appSettings.state.sapCLIDirectory ?: ""
appSettings.loadSAPCLIToken {
@@ -395,7 +395,7 @@ class ProjectImportWizardRootStep(context: WizardContext) : ProjectImportWizardS
}
override fun updateStep() {
- val appSettings = HybrisApplicationSettingsComponent.getInstance().state
+ val appSettings = ApplicationSettingsComponent.getInstance().state
storeModuleFilesInChooser.text = File(
builder.fileToImport, HybrisConstants.DEFAULT_DIRECTORY_NAME_FOR_IDEA_MODULE_FILES
).absolutePath
@@ -490,12 +490,12 @@ class ProjectImportWizardRootStep(context: WizardContext) : ProjectImportWizardS
}
}
- override fun open(settings: HybrisProjectSettings) {
+ override fun open(settings: ProjectSettings) {
updateStep()
updateDataModel()
}
- override fun refresh(settings: HybrisProjectSettings) {
+ override fun refresh(settings: ProjectSettings) {
val context = context()
context.cleanup()
@@ -519,7 +519,7 @@ class ProjectImportWizardRootStep(context: WizardContext) : ProjectImportWizardS
this.isScanThroughExternalModule = settings.scanThroughExternalModule
this.isUseFakeOutputPathForCustomExtensions = settings.useFakeOutputPathForCustomExtensions
- val appSettings = HybrisApplicationSettingsComponent.getInstance()
+ val appSettings = ApplicationSettingsComponent.getInstance()
val appSettingsState = appSettings.state
this.isIgnoreNonExistingSourceDirectories = appSettingsState.ignoreNonExistingSourceDirectories
this.isWithStandardProvidedSources = appSettingsState.withStandardProvidedSources
diff --git a/src/com/intellij/idea/plugin/hybris/project/wizard/RefreshSupport.kt b/src/com/intellij/idea/plugin/hybris/project/wizard/RefreshSupport.kt
index 2f92ed547..ff1a7f307 100644
--- a/src/com/intellij/idea/plugin/hybris/project/wizard/RefreshSupport.kt
+++ b/src/com/intellij/idea/plugin/hybris/project/wizard/RefreshSupport.kt
@@ -18,10 +18,10 @@
*/
package com.intellij.idea.plugin.hybris.project.wizard
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettings
+import com.intellij.idea.plugin.hybris.settings.ProjectSettings
import com.intellij.openapi.options.ConfigurationException
interface RefreshSupport {
@Throws(ConfigurationException::class)
- fun refresh(settings: HybrisProjectSettings)
+ fun refresh(settings: ProjectSettings)
}
diff --git a/src/com/intellij/idea/plugin/hybris/project/wizard/SelectHybrisModulesToImportStep.kt b/src/com/intellij/idea/plugin/hybris/project/wizard/SelectHybrisModulesToImportStep.kt
index ebfe2177f..5bc5202db 100644
--- a/src/com/intellij/idea/plugin/hybris/project/wizard/SelectHybrisModulesToImportStep.kt
+++ b/src/com/intellij/idea/plugin/hybris/project/wizard/SelectHybrisModulesToImportStep.kt
@@ -26,7 +26,7 @@ import com.intellij.idea.plugin.hybris.project.descriptors.ModuleDescriptorImpor
import com.intellij.idea.plugin.hybris.project.descriptors.YModuleDescriptor
import com.intellij.idea.plugin.hybris.project.descriptors.YSubModuleDescriptor
import com.intellij.idea.plugin.hybris.project.descriptors.impl.*
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettings
+import com.intellij.idea.plugin.hybris.settings.ProjectSettings
import com.intellij.openapi.options.ConfigurationException
import com.intellij.ui.table.JBTable
import org.apache.commons.lang3.BooleanUtils
@@ -121,11 +121,11 @@ class SelectHybrisModulesToImportStep(wizard: WizardContext) : AbstractSelectMod
context.setHybrisModulesToImport(allElements)
}
- override fun open(settings: HybrisProjectSettings) {
+ override fun open(settings: ProjectSettings) {
refresh(settings)
}
- override fun refresh(settings: HybrisProjectSettings) {
+ override fun refresh(settings: ProjectSettings) {
try {
val filteredModuleToImport = context.getBestMatchingExtensionsToImport(settings)
context.setList(filteredModuleToImport)
diff --git a/src/com/intellij/idea/plugin/hybris/psi/util/PsiUtils.java b/src/com/intellij/idea/plugin/hybris/psi/util/PsiUtils.java
index 42d02ce1b..6e65f6ff3 100644
--- a/src/com/intellij/idea/plugin/hybris/psi/util/PsiUtils.java
+++ b/src/com/intellij/idea/plugin/hybris/psi/util/PsiUtils.java
@@ -20,7 +20,7 @@
import com.intellij.idea.plugin.hybris.common.HybrisConstants;
import com.intellij.idea.plugin.hybris.project.descriptors.ModuleDescriptorType;
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent;
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleUtilCore;
import com.intellij.openapi.project.Project;
@@ -59,7 +59,7 @@ public static boolean isCustomExtensionFile(@NotNull final VirtualFile file, @No
if (null == module) {
return false;
}
- final var settingsComponent = HybrisProjectSettingsComponent.getInstance(project);
+ final var settingsComponent = ProjectSettingsComponent.getInstance(project);
final var descriptorType = settingsComponent.getModuleSettings(module).getType();
if (descriptorType == ModuleDescriptorType.NONE) {
@@ -74,7 +74,7 @@ public static boolean isCustomExtensionFile(@NotNull final VirtualFile file, @No
private static boolean shouldCheckFilesWithoutHybrisSettings(@NotNull final Project project) {
// at least it needs to have a hybris flag
- return HybrisProjectSettingsComponent.getInstance(project).isHybrisProject();
+ return ProjectSettingsComponent.getInstance(project).isHybrisProject();
}
private static ModuleDescriptorType estimateIsCustomExtension(@NotNull final VirtualFile file) {
diff --git a/src/com/intellij/idea/plugin/hybris/runConfigurations/HybrisJUnitExtension.kt b/src/com/intellij/idea/plugin/hybris/runConfigurations/HybrisJUnitExtension.kt
index 951ea45a4..3eef9e71d 100644
--- a/src/com/intellij/idea/plugin/hybris/runConfigurations/HybrisJUnitExtension.kt
+++ b/src/com/intellij/idea/plugin/hybris/runConfigurations/HybrisJUnitExtension.kt
@@ -29,7 +29,7 @@ import com.intellij.idea.plugin.hybris.common.HybrisConstants.HYBRIS_DATA_DIRECT
import com.intellij.idea.plugin.hybris.common.HybrisConstants.PROPERTY_STANDALONE_JDKMODULESEXPORTS
import com.intellij.idea.plugin.hybris.project.utils.HybrisRootUtil
import com.intellij.idea.plugin.hybris.properties.PropertyService
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.util.io.FileUtil
import java.io.File
import java.util.*
@@ -40,7 +40,7 @@ private val PATTERN = Pattern.compile("\"")
class HybrisJUnitExtension : RunConfigurationExtension() {
override fun isApplicableFor(configuration: RunConfigurationBase<*>) = if (configuration !is JUnitConfiguration) false
- else HybrisProjectSettingsComponent.getInstance(configuration.getProject()).isHybrisProject()
+ else ProjectSettingsComponent.getInstance(configuration.getProject()).isHybrisProject()
override fun ?> updateJavaParameters(configuration: T & Any, params: JavaParameters, runnerSettings: RunnerSettings?) {
if (runnerSettings != null || !isApplicableFor(configuration)) return
@@ -57,7 +57,7 @@ class HybrisJUnitExtension : RunConfigurationExtension() {
}
if (!params.env.containsKey(ENV_HYBRIS_DATA_DIR)) {
- val settings = HybrisProjectSettingsComponent.getInstance(project).state
+ val settings = ProjectSettingsComponent.getInstance(project).state
val hybrisDataDirPath = FileUtil.toCanonicalPath(
"${project.basePath}/${settings.hybrisDirectory}/$HYBRIS_DATA_DIRECTORY"
)
diff --git a/src/com/intellij/idea/plugin/hybris/runConfigurations/LocalSapCXRunProfileState.kt b/src/com/intellij/idea/plugin/hybris/runConfigurations/LocalSapCXRunProfileState.kt
index 85666a237..b76ff6cd4 100644
--- a/src/com/intellij/idea/plugin/hybris/runConfigurations/LocalSapCXRunProfileState.kt
+++ b/src/com/intellij/idea/plugin/hybris/runConfigurations/LocalSapCXRunProfileState.kt
@@ -27,7 +27,7 @@ import com.intellij.execution.process.ProcessHandlerFactory
import com.intellij.execution.process.ProcessTerminatedListener
import com.intellij.execution.runners.ExecutionEnvironment
import com.intellij.idea.plugin.hybris.common.HybrisConstants
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.project.Project
import org.apache.commons.lang3.SystemUtils
import java.nio.file.Paths
@@ -40,7 +40,7 @@ class LocalSapCXRunProfileState(
private fun getScriptPath(): String {
val basePath = project.basePath ?: ""
- val settings = HybrisProjectSettingsComponent.getInstance(project).state
+ val settings = ProjectSettingsComponent.getInstance(project).state
val hybrisDirectory = settings.hybrisDirectory ?: ""
val script = if (SystemUtils.IS_OS_WINDOWS) HybrisConstants.HYBRIS_SERVER_BASH_SCRIPT_NAME else HybrisConstants.HYBRIS_SERVER_SHELL_SCRIPT_NAME
@@ -49,7 +49,7 @@ class LocalSapCXRunProfileState(
private fun getWorkDirectory(): String {
val basePath = project.basePath ?: ""
- val settings = HybrisProjectSettingsComponent.getInstance(project).state
+ val settings = ProjectSettingsComponent.getInstance(project).state
val hybrisDirectory = settings.hybrisDirectory ?: ""
return Paths.get(basePath, hybrisDirectory, HybrisConstants.PLATFORM_MODULE_PREFIX).toString()
diff --git a/src/com/intellij/idea/plugin/hybris/settings/HybrisApplicationSettings.kt b/src/com/intellij/idea/plugin/hybris/settings/ApplicationSettings.kt
similarity index 92%
rename from src/com/intellij/idea/plugin/hybris/settings/HybrisApplicationSettings.kt
rename to src/com/intellij/idea/plugin/hybris/settings/ApplicationSettings.kt
index d9e3e6537..906d109d4 100644
--- a/src/com/intellij/idea/plugin/hybris/settings/HybrisApplicationSettings.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/ApplicationSettings.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -19,8 +19,10 @@
package com.intellij.idea.plugin.hybris.settings
import com.intellij.idea.plugin.hybris.common.HybrisConstants
+import com.intellij.util.xmlb.annotations.Tag
-data class HybrisApplicationSettings(
+@Tag("HybrisApplicationSettings")
+data class ApplicationSettings(
var groupModules: Boolean = true,
var groupExternalModules: Boolean = true,
diff --git a/src/com/intellij/idea/plugin/hybris/system/bean/settings/BeanSystemSettings.kt b/src/com/intellij/idea/plugin/hybris/settings/BeanSystemSettings.kt
similarity index 82%
rename from src/com/intellij/idea/plugin/hybris/system/bean/settings/BeanSystemSettings.kt
rename to src/com/intellij/idea/plugin/hybris/settings/BeanSystemSettings.kt
index 387dbc87d..d071bfae6 100644
--- a/src/com/intellij/idea/plugin/hybris/system/bean/settings/BeanSystemSettings.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/BeanSystemSettings.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -16,9 +16,7 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.system.bean.settings
-
-import com.intellij.idea.plugin.hybris.settings.FoldingSettings
+package com.intellij.idea.plugin.hybris.settings
data class BeanSystemSettings(
var folding: BeanSystemFoldingSettings = BeanSystemFoldingSettings(),
diff --git a/src/com/intellij/idea/plugin/hybris/system/businessProcess/settings/BpSettings.kt b/src/com/intellij/idea/plugin/hybris/settings/BpSettings.kt
similarity index 82%
rename from src/com/intellij/idea/plugin/hybris/system/businessProcess/settings/BpSettings.kt
rename to src/com/intellij/idea/plugin/hybris/settings/BpSettings.kt
index 65705093a..4b1058fd9 100644
--- a/src/com/intellij/idea/plugin/hybris/system/businessProcess/settings/BpSettings.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/BpSettings.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -16,9 +16,7 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.system.businessProcess.settings
-
-import com.intellij.idea.plugin.hybris.settings.FoldingSettings
+package com.intellij.idea.plugin.hybris.settings
data class BpSettings(
var folding: BpFoldingSettings = BpFoldingSettings(),
diff --git a/src/com/intellij/idea/plugin/hybris/system/cockpitng/settings/CngSettings.kt b/src/com/intellij/idea/plugin/hybris/settings/CngSettings.kt
similarity index 84%
rename from src/com/intellij/idea/plugin/hybris/system/cockpitng/settings/CngSettings.kt
rename to src/com/intellij/idea/plugin/hybris/settings/CngSettings.kt
index db12d50dd..894a6bac9 100644
--- a/src/com/intellij/idea/plugin/hybris/system/cockpitng/settings/CngSettings.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/CngSettings.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -16,9 +16,7 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.system.cockpitng.settings
-
-import com.intellij.idea.plugin.hybris.settings.FoldingSettings
+package com.intellij.idea.plugin.hybris.settings
data class CngSettings(
var folding: CngFoldingSettings = CngFoldingSettings(),
diff --git a/src/com/intellij/idea/plugin/hybris/settings/HybrisDeveloperSpecificProjectSettings.kt b/src/com/intellij/idea/plugin/hybris/settings/DeveloperSettings.kt
similarity index 71%
rename from src/com/intellij/idea/plugin/hybris/settings/HybrisDeveloperSpecificProjectSettings.kt
rename to src/com/intellij/idea/plugin/hybris/settings/DeveloperSettings.kt
index 6ecbb249c..e308b2401 100644
--- a/src/com/intellij/idea/plugin/hybris/settings/HybrisDeveloperSpecificProjectSettings.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/DeveloperSettings.kt
@@ -20,20 +20,17 @@ package com.intellij.idea.plugin.hybris.settings
import com.intellij.idea.plugin.hybris.flexibleSearch.settings.FlexibleSearchSettings
import com.intellij.idea.plugin.hybris.groovy.settings.GroovySettings
-import com.intellij.idea.plugin.hybris.impex.settings.ImpexSettings
import com.intellij.idea.plugin.hybris.polyglotQuery.settings.PolyglotQuerySettings
-import com.intellij.idea.plugin.hybris.system.bean.settings.BeanSystemSettings
-import com.intellij.idea.plugin.hybris.system.businessProcess.settings.BpSettings
-import com.intellij.idea.plugin.hybris.system.cockpitng.settings.CngSettings
-import com.intellij.idea.plugin.hybris.system.type.settings.TSDiagramSettings
-import com.intellij.idea.plugin.hybris.system.type.settings.TypeSystemSettings
import com.intellij.openapi.components.BaseState
+import com.intellij.util.xmlb.annotations.Tag
-class HybrisDeveloperSpecificProjectSettings : BaseState() {
+@Tag("HybrisDeveloperSpecificProjectSettings")
+class DeveloperSettings : BaseState() {
var activeRemoteConnectionID by string(null)
var activeSolrConnectionID by string(null)
- var remoteConnectionSettingsList by list()
- var typeSystemDiagramSettings by property(TSDiagramSettings()) { false }
+ var activeCCv2SubscriptionID by string(null)
+ var remoteConnectionSettingsList by list()
+ var typeSystemDiagramSettings by property(TypeSystemDiagramSettings()) { false }
var beanSystemSettings by property(BeanSystemSettings()) { false }
var typeSystemSettings by property(TypeSystemSettings()) { false }
var cngSettings by property(CngSettings()) { false }
@@ -42,5 +39,4 @@ class HybrisDeveloperSpecificProjectSettings : BaseState() {
var polyglotQuerySettings by property(PolyglotQuerySettings()) { false }
var impexSettings by property(ImpexSettings()) { false }
var groovySettings by property(GroovySettings()) { false }
- var activeCCv2Subscription by string(null)
}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/settings/FoldingSettings.kt b/src/com/intellij/idea/plugin/hybris/settings/FoldingSettings.kt
index 1bf35e8d8..b6964ee25 100644
--- a/src/com/intellij/idea/plugin/hybris/settings/FoldingSettings.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/FoldingSettings.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
diff --git a/src/com/intellij/idea/plugin/hybris/settings/HybrisProjectDiagramTSSettingsConfigurableProvider.kt b/src/com/intellij/idea/plugin/hybris/settings/HybrisProjectDiagramTSSettingsConfigurableProvider.kt
deleted file mode 100644
index ecd197535..000000000
--- a/src/com/intellij/idea/plugin/hybris/settings/HybrisProjectDiagramTSSettingsConfigurableProvider.kt
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- */
-
-package com.intellij.idea.plugin.hybris.settings
-
-import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
-import com.intellij.idea.plugin.hybris.settings.components.TSDiagramSettingsExcludedTypeNameTable
-import com.intellij.openapi.options.BoundSearchableConfigurable
-import com.intellij.openapi.options.ConfigurableProvider
-import com.intellij.openapi.project.Project
-import com.intellij.ui.ToolbarDecorator
-import com.intellij.ui.dsl.builder.Align
-import com.intellij.ui.dsl.builder.bindSelected
-import com.intellij.ui.dsl.builder.panel
-import com.intellij.util.ui.JBUI
-import java.awt.Dimension
-
-class HybrisProjectDiagramTSSettingsConfigurableProvider(val project: Project) : ConfigurableProvider() {
-
- override fun canCreateConfigurable() = HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()
- override fun createConfigurable() = SettingsConfigurable(project)
-
- class SettingsConfigurable(project: Project) : BoundSearchableConfigurable(
- message("hybris.settings.project.diagram.ts.title"), "[y] SAP Commerce plugin Type System Diagram configuration."
- ) {
-
- private val tsSettings = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).state.typeSystemDiagramSettings
-
- private val excludedTypeNamesTable = TSDiagramSettingsExcludedTypeNameTable.getInstance(project)
- private val excludedTypeNamesPane = ToolbarDecorator.createDecorator(excludedTypeNamesTable)
- .disableUpDownActions()
- .setPanelBorder(JBUI.Borders.empty())
- .createPanel()
-
- init {
- excludedTypeNamesPane.minimumSize = Dimension(excludedTypeNamesPane.width, 400)
- }
-
- override fun createPanel() = panel {
- group("Common Settings") {
- row {
- checkBox("Nodes collapsed by default")
- .bindSelected(tsSettings::nodesCollapsedByDefault)
- }
-
- row {
- checkBox("Show OOTB Map nodes")
- .comment("One of the OOTB Map example is `localized:java.lang.String`")
- .bindSelected(tsSettings::showOOTBMapNodes)
- }
-
- row {
- checkBox("Show custom Atomic nodes")
- .bindSelected(tsSettings::showCustomAtomicNodes)
- }
-
- row {
- checkBox("Show custom Collection nodes")
- .bindSelected(tsSettings::showCustomCollectionNodes)
- }
-
- row {
- checkBox("Show custom Enum nodes")
- .bindSelected(tsSettings::showCustomEnumNodes)
- }
-
- row {
- checkBox("Show custom Map nodes")
- .bindSelected(tsSettings::showCustomMapNodes)
- }
-
- row {
- checkBox("Show custom Relation nodes")
- .comment("Relations with Deployment details are not affected by this flag")
- .bindSelected(tsSettings::showCustomRelationNodes)
- }
- }
-
- group("Excluded Type Names", false) {
- row {
- cell(excludedTypeNamesPane)
- .onApply { tsSettings.excludedTypeNames = getNewTypeNames() }
- .onReset { excludedTypeNamesTable.updateModel(tsSettings) }
- .onIsModified { tsSettings.excludedTypeNames != getNewTypeNames() }
- .align(Align.FILL)
- }
- }
- }
-
- private fun getNewTypeNames() = excludedTypeNamesTable.getItems()
- .map { it.typeName }
- .toMutableSet()
- }
-}
diff --git a/src/com/intellij/idea/plugin/hybris/impex/settings/ImpexSettings.kt b/src/com/intellij/idea/plugin/hybris/settings/ImpExSettings.kt
similarity index 90%
rename from src/com/intellij/idea/plugin/hybris/impex/settings/ImpexSettings.kt
rename to src/com/intellij/idea/plugin/hybris/settings/ImpExSettings.kt
index f5e34584b..82c5f858a 100644
--- a/src/com/intellij/idea/plugin/hybris/impex/settings/ImpexSettings.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/ImpExSettings.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2023 EPAM Systems
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -16,7 +16,7 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.impex.settings
+package com.intellij.idea.plugin.hybris.settings
import com.intellij.openapi.components.BaseState
diff --git a/src/com/intellij/idea/plugin/hybris/settings/HybrisProjectSettings.kt b/src/com/intellij/idea/plugin/hybris/settings/ProjectSettings.kt
similarity index 92%
rename from src/com/intellij/idea/plugin/hybris/settings/HybrisProjectSettings.kt
rename to src/com/intellij/idea/plugin/hybris/settings/ProjectSettings.kt
index c5cd055c5..4e111e619 100644
--- a/src/com/intellij/idea/plugin/hybris/settings/HybrisProjectSettings.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/ProjectSettings.kt
@@ -1,5 +1,5 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellire IDEA.
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
* Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
@@ -20,9 +20,11 @@ package com.intellij.idea.plugin.hybris.settings
import com.intellij.idea.plugin.hybris.facet.ExtensionDescriptor
import com.intellij.openapi.components.BaseState
+import com.intellij.util.xmlb.annotations.Tag
import java.util.*
-class HybrisProjectSettings : BaseState() {
+@Tag("HybrisProjectSettings")
+class ProjectSettings : BaseState() {
var customDirectory by string(null)
var hybrisDirectory by string(null)
var configDirectory by string(null)
@@ -49,7 +51,7 @@ class HybrisProjectSettings : BaseState() {
var modulesOnBlackList by stringSet()
var availableExtensions by property(TreeMap { a, b -> a.compareTo(b, true) }) { it.isEmpty() }
var excludedFromScanning by stringSet()
- var remoteConnectionSettingsList by list()
+ var remoteConnectionSettingsList by list()
var useFakeOutputPathForCustomExtensions by property(false)
var activeCCv2Subscription by string(null)
}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/settings/HybrisRemoteConnectionSettings.kt b/src/com/intellij/idea/plugin/hybris/settings/RemoteConnectionSettings.kt
similarity index 90%
rename from src/com/intellij/idea/plugin/hybris/settings/HybrisRemoteConnectionSettings.kt
rename to src/com/intellij/idea/plugin/hybris/settings/RemoteConnectionSettings.kt
index 7a1c87d8c..6a27abb7d 100644
--- a/src/com/intellij/idea/plugin/hybris/settings/HybrisRemoteConnectionSettings.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/RemoteConnectionSettings.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -27,9 +27,11 @@ import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionType
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionUtil
import com.intellij.openapi.components.BaseState
import com.intellij.util.xmlb.Accessor
+import com.intellij.util.xmlb.annotations.Tag
import com.intellij.util.xmlb.annotations.Transient
-class HybrisRemoteConnectionSettings : BaseState(), Comparable {
+@Tag("HybrisRemoteConnectionSettings")
+class RemoteConnectionSettings : BaseState(), Comparable {
var uuid by string(null)
@Transient
@@ -79,13 +81,13 @@ class HybrisRemoteConnectionSettings : BaseState(), Comparable
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
diff --git a/src/com/intellij/idea/plugin/hybris/system/type/settings/TSDiagramSettings.kt b/src/com/intellij/idea/plugin/hybris/settings/TypeSystemSettings.kt
similarity index 65%
rename from src/com/intellij/idea/plugin/hybris/system/type/settings/TSDiagramSettings.kt
rename to src/com/intellij/idea/plugin/hybris/settings/TypeSystemSettings.kt
index 2df1a1962..593127c9c 100644
--- a/src/com/intellij/idea/plugin/hybris/system/type/settings/TSDiagramSettings.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/TypeSystemSettings.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -16,11 +16,28 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.system.type.settings
+package com.intellij.idea.plugin.hybris.settings
import com.intellij.idea.plugin.hybris.common.HybrisConstants
+import com.intellij.util.xmlb.annotations.Tag
-data class TSDiagramSettings(
+data class TypeSystemSettings(
+ var folding: TypeSystemFoldingSettings = TypeSystemFoldingSettings(),
+)
+
+data class TypeSystemFoldingSettings(
+ override var enabled: Boolean = true,
+ var tablifyAtomics: Boolean = true,
+ var tablifyCollections: Boolean = true,
+ var tablifyMaps: Boolean = true,
+ var tablifyRelations: Boolean = true,
+ var tablifyItemAttributes: Boolean = true,
+ var tablifyItemIndexes: Boolean = true,
+ var tablifyItemCustomProperties: Boolean = true,
+): FoldingSettings
+
+@Tag("TSDiagramSettings")
+data class TypeSystemDiagramSettings(
var nodesCollapsedByDefault: Boolean = true,
var showOOTBMapNodes: Boolean = false,
var showCustomAtomicNodes: Boolean = false,
@@ -35,4 +52,4 @@ data class TSDiagramSettings(
HybrisConstants.TS_TYPE_EXTENSIBLE_ITEM,
HybrisConstants.TS_TYPE_CRON_JOB
)
-)
+)
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/settings/HybrisApplicationSettingsComponent.kt b/src/com/intellij/idea/plugin/hybris/settings/components/ApplicationSettingsComponent.kt
similarity index 85%
rename from src/com/intellij/idea/plugin/hybris/settings/HybrisApplicationSettingsComponent.kt
rename to src/com/intellij/idea/plugin/hybris/settings/components/ApplicationSettingsComponent.kt
index 129a464f5..fc43ce365 100644
--- a/src/com/intellij/idea/plugin/hybris/settings/HybrisApplicationSettingsComponent.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/components/ApplicationSettingsComponent.kt
@@ -1,7 +1,7 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
* Copyright (C) 2014-2016 Alexander Bartash
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -16,12 +16,13 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.settings
+package com.intellij.idea.plugin.hybris.settings.components
import com.intellij.credentialStore.CredentialAttributes
import com.intellij.ide.passwordSafe.PasswordSafe
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.common.HybrisConstants.STORAGE_HYBRIS_INTEGRATION_SETTINGS
+import com.intellij.idea.plugin.hybris.settings.ApplicationSettings
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.components.*
import com.intellij.openapi.progress.ProgressIndicator
@@ -36,16 +37,16 @@ import org.apache.commons.lang3.StringUtils
storages = [Storage(value = STORAGE_HYBRIS_INTEGRATION_SETTINGS, roamingType = RoamingType.DISABLED)]
)
@Service
-class HybrisApplicationSettingsComponent : PersistentStateComponent {
+class ApplicationSettingsComponent : PersistentStateComponent {
- private val hybrisApplicationSettings = HybrisApplicationSettings()
+ private val hybrisApplicationSettings = ApplicationSettings()
val ccv2Token: String?
get() = PasswordSafe.instance.get(CredentialAttributes(HybrisConstants.SECURE_STORAGE_SERVICE_NAME_SAP_CX_CCV2_TOKEN))
?.getPasswordAsString()
override fun getState() = this.hybrisApplicationSettings
- override fun loadState(state: HybrisApplicationSettings) {
+ override fun loadState(state: ApplicationSettings) {
XmlSerializerUtil.copyBean(state, this.hybrisApplicationSettings)
}
@@ -74,7 +75,7 @@ class HybrisApplicationSettingsComponent : PersistentStateComponent? {
diff --git a/src/com/intellij/idea/plugin/hybris/settings/HybrisDeveloperSpecificProjectSettingsComponent.kt b/src/com/intellij/idea/plugin/hybris/settings/components/DeveloperSettingsComponent.kt
similarity index 65%
rename from src/com/intellij/idea/plugin/hybris/settings/HybrisDeveloperSpecificProjectSettingsComponent.kt
rename to src/com/intellij/idea/plugin/hybris/settings/components/DeveloperSettingsComponent.kt
index 14df85050..0a99a6849 100644
--- a/src/com/intellij/idea/plugin/hybris/settings/HybrisDeveloperSpecificProjectSettingsComponent.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/components/DeveloperSettingsComponent.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -15,9 +15,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.settings
+package com.intellij.idea.plugin.hybris.settings.components
import com.intellij.idea.plugin.hybris.common.HybrisConstants.STORAGE_HYBRIS_DEVELOPER_SPECIFIC_PROJECT_SETTINGS
+import com.intellij.idea.plugin.hybris.settings.DeveloperSettings
import com.intellij.openapi.components.*
import com.intellij.openapi.project.Project
import com.intellij.util.xmlb.XmlSerializerUtil
@@ -27,18 +28,18 @@ import com.intellij.util.xmlb.XmlSerializerUtil
storages = [Storage(value = STORAGE_HYBRIS_DEVELOPER_SPECIFIC_PROJECT_SETTINGS, roamingType = RoamingType.DISABLED)]
)
@Service(Service.Level.PROJECT)
-class HybrisDeveloperSpecificProjectSettingsComponent(private val project: Project) : PersistentStateComponent {
+class DeveloperSettingsComponent(private val project: Project) : PersistentStateComponent {
- private val state = HybrisDeveloperSpecificProjectSettings()
+ private val state = DeveloperSettings()
override fun getState() = state
- override fun loadState(state: HybrisDeveloperSpecificProjectSettings) = XmlSerializerUtil.copyBean(state, this.state)
+ override fun loadState(state: DeveloperSettings) = XmlSerializerUtil.copyBean(state, this.state)
- fun getActiveCCv2Subscription() = state.activeCCv2Subscription
- ?.let { HybrisApplicationSettingsComponent.getInstance().getCCv2Subscription(it) }
+ fun getActiveCCv2Subscription() = state.activeCCv2SubscriptionID
+ ?.let { ApplicationSettingsComponent.getInstance().getCCv2Subscription(it) }
companion object {
@JvmStatic
- fun getInstance(project: Project): HybrisDeveloperSpecificProjectSettingsComponent = project.getService(HybrisDeveloperSpecificProjectSettingsComponent::class.java)
+ fun getInstance(project: Project): DeveloperSettingsComponent = project.getService(DeveloperSettingsComponent::class.java)
}
}
diff --git a/src/com/intellij/idea/plugin/hybris/settings/HybrisProjectSettingsComponent.kt b/src/com/intellij/idea/plugin/hybris/settings/components/ProjectSettingsComponent.kt
similarity index 84%
rename from src/com/intellij/idea/plugin/hybris/settings/HybrisProjectSettingsComponent.kt
rename to src/com/intellij/idea/plugin/hybris/settings/components/ProjectSettingsComponent.kt
index eb46eb1f5..f8760c96e 100644
--- a/src/com/intellij/idea/plugin/hybris/settings/HybrisProjectSettingsComponent.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/components/ProjectSettingsComponent.kt
@@ -1,7 +1,7 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
* Copyright (C) 2014-2016 Alexander Bartash
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.settings
+package com.intellij.idea.plugin.hybris.settings.components
import com.intellij.ide.plugins.PluginManagerCore
import com.intellij.idea.plugin.hybris.common.HybrisConstants
@@ -26,6 +26,7 @@ import com.intellij.idea.plugin.hybris.facet.ExtensionDescriptor
import com.intellij.idea.plugin.hybris.facet.YFacet
import com.intellij.idea.plugin.hybris.project.descriptors.ModuleDescriptorType
import com.intellij.idea.plugin.hybris.project.descriptors.YModuleDescriptor
+import com.intellij.idea.plugin.hybris.settings.ProjectSettings
import com.intellij.openapi.components.*
import com.intellij.openapi.extensions.PluginId
import com.intellij.openapi.module.Module
@@ -35,11 +36,11 @@ import com.intellij.util.xmlb.XmlSerializerUtil
@State(name = "HybrisProjectSettings", storages = [Storage(STORAGE_HYBRIS_PROJECT_SETTINGS, roamingType = RoamingType.DISABLED)])
@Service(Service.Level.PROJECT)
-class HybrisProjectSettingsComponent : PersistentStateComponent {
- private val hybrisProjectSettings = HybrisProjectSettings()
+class ProjectSettingsComponent : PersistentStateComponent {
+ private val hybrisProjectSettings = ProjectSettings()
override fun getState() = hybrisProjectSettings
- override fun loadState(state: HybrisProjectSettings) = XmlSerializerUtil.copyBean(state, hybrisProjectSettings)
+ override fun loadState(state: ProjectSettings) = XmlSerializerUtil.copyBean(state, hybrisProjectSettings)
// TODO: improve this logic for initially non-hybris projects
fun isHybrisProject() = state.hybrisProject
@@ -83,10 +84,10 @@ class HybrisProjectSettingsComponent : PersistentStateComponent and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -15,9 +15,10 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.settings
+package com.intellij.idea.plugin.hybris.settings.options
import com.intellij.idea.plugin.hybris.common.equalsIgnoreOrder
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
import com.intellij.idea.plugin.hybris.tools.ccv2.strategies.CCv2Strategy
import com.intellij.idea.plugin.hybris.ui.CCv2SubscriptionListPanel
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory
@@ -27,7 +28,7 @@ import com.intellij.ui.components.JBPasswordField
import com.intellij.ui.components.textFieldWithBrowseButton
import com.intellij.ui.dsl.builder.*
-class CCv2SettingsConfigurableProvider : ConfigurableProvider() {
+class ApplicationCCv2SettingsConfigurableProvider : ConfigurableProvider() {
override fun createConfigurable() = SettingsConfigurable()
@@ -35,7 +36,7 @@ class CCv2SettingsConfigurableProvider : ConfigurableProvider() {
"CCv2", "[y] SAP Commerce Cloud CCv2 configuration."
) {
- private val appSettings = HybrisApplicationSettingsComponent.getInstance()
+ private val appSettings = ApplicationSettingsComponent.getInstance()
private val state = appSettings.state
private var originalSAPCLIToken: String? = ""
private var originalCCv2Subscriptions = state.ccv2Subscriptions
diff --git a/src/com/intellij/idea/plugin/hybris/settings/HybrisProjectImportApplicationSettingsConfigurableProvider.kt b/src/com/intellij/idea/plugin/hybris/settings/options/ApplicationProjectImportSettingsConfigurableProvider.kt
similarity index 94%
rename from src/com/intellij/idea/plugin/hybris/settings/HybrisProjectImportApplicationSettingsConfigurableProvider.kt
rename to src/com/intellij/idea/plugin/hybris/settings/options/ApplicationProjectImportSettingsConfigurableProvider.kt
index 8d1abd7dc..1841febd0 100644
--- a/src/com/intellij/idea/plugin/hybris/settings/HybrisProjectImportApplicationSettingsConfigurableProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/options/ApplicationProjectImportSettingsConfigurableProvider.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -15,11 +15,12 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.settings
+package com.intellij.idea.plugin.hybris.settings.options
import com.intellij.idea.plugin.hybris.common.equalsIgnoreOrder
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
import com.intellij.idea.plugin.hybris.ui.CRUDListPanel
import com.intellij.openapi.options.BoundSearchableConfigurable
import com.intellij.openapi.options.ConfigurableProvider
@@ -27,15 +28,15 @@ import com.intellij.ui.dsl.builder.*
import com.intellij.ui.layout.selected
import javax.swing.JCheckBox
-class HybrisProjectImportApplicationSettingsConfigurableProvider : ConfigurableProvider() {
+class ApplicationProjectImportSettingsConfigurableProvider : ConfigurableProvider() {
override fun createConfigurable() = SettingsConfigurable()
class SettingsConfigurable : BoundSearchableConfigurable(
- message("hybris.settings.application.project_import.title"), "[y] SAP Commerce plugin project import configuration."
+ message("hybris.settings.application.project_import.title"), "[y] SAP CX project import configuration."
) {
- private val state = HybrisApplicationSettingsComponent.getInstance().state
+ private val state = ApplicationSettingsComponent.getInstance().state
private lateinit var groupModulesCheckBox: JCheckBox
private lateinit var externalModulesCheckBox: JCheckBox
diff --git a/src/com/intellij/idea/plugin/hybris/settings/HybrisApplicationSettingsConfigurableProvider.kt b/src/com/intellij/idea/plugin/hybris/settings/options/ApplicationSettingsConfigurableProvider.kt
similarity index 87%
rename from src/com/intellij/idea/plugin/hybris/settings/HybrisApplicationSettingsConfigurableProvider.kt
rename to src/com/intellij/idea/plugin/hybris/settings/options/ApplicationSettingsConfigurableProvider.kt
index 33f91c583..bf223bab6 100644
--- a/src/com/intellij/idea/plugin/hybris/settings/HybrisApplicationSettingsConfigurableProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/options/ApplicationSettingsConfigurableProvider.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -15,23 +15,24 @@
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.settings
+package com.intellij.idea.plugin.hybris.settings.options
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
import com.intellij.openapi.options.BoundSearchableConfigurable
import com.intellij.openapi.options.ConfigurableProvider
import com.intellij.ui.dsl.builder.bindSelected
import com.intellij.ui.dsl.builder.panel
-class HybrisApplicationSettingsConfigurableProvider : ConfigurableProvider() {
+class ApplicationSettingsConfigurableProvider : ConfigurableProvider() {
override fun createConfigurable() = SettingsConfigurable()
class SettingsConfigurable : BoundSearchableConfigurable(
- "[y] SAP Commerce", "[y] SAP Commerce plugin configuration."
+ "[y] SAP Commerce", "[y] SAP CX configuration."
) {
- private val state = HybrisApplicationSettingsComponent.getInstance().state
+ private val state = ApplicationSettingsComponent.getInstance().state
override fun createPanel() = panel {
row {
diff --git a/src/com/intellij/idea/plugin/hybris/system/bean/settings/BeanSystemConfigurableProvider.kt b/src/com/intellij/idea/plugin/hybris/settings/options/ProjectBeanSystemConfigurableProvider.kt
similarity index 73%
rename from src/com/intellij/idea/plugin/hybris/system/bean/settings/BeanSystemConfigurableProvider.kt
rename to src/com/intellij/idea/plugin/hybris/settings/options/ProjectBeanSystemConfigurableProvider.kt
index b6dde2fb1..cf219931c 100644
--- a/src/com/intellij/idea/plugin/hybris/system/bean/settings/BeanSystemConfigurableProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/options/ProjectBeanSystemConfigurableProvider.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -16,11 +16,11 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.system.bean.settings
+package com.intellij.idea.plugin.hybris.settings.options
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
-import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettingsComponent
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.DeveloperSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.options.BoundSearchableConfigurable
import com.intellij.openapi.options.ConfigurableProvider
import com.intellij.openapi.project.Project
@@ -29,16 +29,16 @@ import com.intellij.ui.dsl.builder.panel
import com.intellij.ui.layout.selected
import javax.swing.JCheckBox
-class BeanSystemConfigurableProvider(val project: Project) : ConfigurableProvider() {
+class ProjectBeanSystemConfigurableProvider(val project: Project) : ConfigurableProvider() {
- override fun canCreateConfigurable() = HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()
+ override fun canCreateConfigurable() = ProjectSettingsComponent.getInstance(project).isHybrisProject()
override fun createConfigurable() = SettingsConfigurable(project)
class SettingsConfigurable(project: Project) : BoundSearchableConfigurable(
- message("hybris.settings.project.bs.title"), "[y] SAP Commerce plugin Bean System configuration."
+ message("hybris.settings.project.bs.title"), "[y] SAP CX Bean System configuration."
) {
- private val settings = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).state.beanSystemSettings
+ private val settings = DeveloperSettingsComponent.getInstance(project).state.beanSystemSettings
private lateinit var foldingEnableCheckBox: JCheckBox
diff --git a/src/com/intellij/idea/plugin/hybris/system/businessProcess/settings/BpConfigurableProvider.kt b/src/com/intellij/idea/plugin/hybris/settings/options/ProjectBusinessProcessConfigurableProvider.kt
similarity index 76%
rename from src/com/intellij/idea/plugin/hybris/system/businessProcess/settings/BpConfigurableProvider.kt
rename to src/com/intellij/idea/plugin/hybris/settings/options/ProjectBusinessProcessConfigurableProvider.kt
index 24d484892..424acf28d 100644
--- a/src/com/intellij/idea/plugin/hybris/system/businessProcess/settings/BpConfigurableProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/options/ProjectBusinessProcessConfigurableProvider.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -16,11 +16,11 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.system.businessProcess.settings
+package com.intellij.idea.plugin.hybris.settings.options
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
-import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettingsComponent
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.DeveloperSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.options.BoundSearchableConfigurable
import com.intellij.openapi.options.ConfigurableProvider
import com.intellij.openapi.project.Project
@@ -29,16 +29,16 @@ import com.intellij.ui.dsl.builder.panel
import com.intellij.ui.layout.selected
import javax.swing.JCheckBox
-class BpConfigurableProvider(val project: Project) : ConfigurableProvider() {
+class ProjectBusinessProcessConfigurableProvider(val project: Project) : ConfigurableProvider() {
- override fun canCreateConfigurable() = HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()
+ override fun canCreateConfigurable() = ProjectSettingsComponent.getInstance(project).isHybrisProject()
override fun createConfigurable() = SettingsConfigurable(project)
class SettingsConfigurable(project: Project) : BoundSearchableConfigurable(
- message("hybris.settings.project.bp.title"), "[y] SAP Commerce plugin Business Process configuration."
+ message("hybris.settings.project.bp.title"), "[y] SAP CX Business Process configuration."
) {
- private val settings = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).state.bpSettings
+ private val settings = DeveloperSettingsComponent.getInstance(project).state.bpSettings
private lateinit var foldingEnableCheckBox: JCheckBox
diff --git a/src/com/intellij/idea/plugin/hybris/system/cockpitng/settings/CngConfigurableProvider.kt b/src/com/intellij/idea/plugin/hybris/settings/options/ProjectCngSettingsConfigurableProvider.kt
similarity index 81%
rename from src/com/intellij/idea/plugin/hybris/system/cockpitng/settings/CngConfigurableProvider.kt
rename to src/com/intellij/idea/plugin/hybris/settings/options/ProjectCngSettingsConfigurableProvider.kt
index 48b3a18f5..fe20e21ad 100644
--- a/src/com/intellij/idea/plugin/hybris/system/cockpitng/settings/CngConfigurableProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/options/ProjectCngSettingsConfigurableProvider.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -16,11 +16,11 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.system.cockpitng.settings
+package com.intellij.idea.plugin.hybris.settings.options
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
-import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettingsComponent
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.DeveloperSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.options.BoundSearchableConfigurable
import com.intellij.openapi.options.ConfigurableProvider
import com.intellij.openapi.project.Project
@@ -29,16 +29,16 @@ import com.intellij.ui.dsl.builder.panel
import com.intellij.ui.layout.selected
import javax.swing.JCheckBox
-class CngConfigurableProvider(val project: Project) : ConfigurableProvider() {
+class ProjectCngSettingsConfigurableProvider(val project: Project) : ConfigurableProvider() {
- override fun canCreateConfigurable() = HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()
+ override fun canCreateConfigurable() = ProjectSettingsComponent.getInstance(project).isHybrisProject()
override fun createConfigurable() = SettingsConfigurable(project)
class SettingsConfigurable(project: Project) : BoundSearchableConfigurable(
- message("hybris.settings.project.cng.title"), "[y] SAP Commerce plugin Cockpit NG configuration."
+ message("hybris.settings.project.cng.title"), "[y] SAP CX Cockpit NG configuration."
) {
- private val settings = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).state.cngSettings
+ private val settings = DeveloperSettingsComponent.getInstance(project).state.cngSettings
private lateinit var foldingEnableCheckBox: JCheckBox
diff --git a/src/com/intellij/idea/plugin/hybris/impex/settings/ImpexSettingsConfigurableProvider.kt b/src/com/intellij/idea/plugin/hybris/settings/options/ProjectImpExSettingsConfigurableProvider.kt
similarity index 90%
rename from src/com/intellij/idea/plugin/hybris/impex/settings/ImpexSettingsConfigurableProvider.kt
rename to src/com/intellij/idea/plugin/hybris/settings/options/ProjectImpExSettingsConfigurableProvider.kt
index 16475edec..992304db1 100644
--- a/src/com/intellij/idea/plugin/hybris/impex/settings/ImpexSettingsConfigurableProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/options/ProjectImpExSettingsConfigurableProvider.kt
@@ -16,11 +16,11 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.impex.settings
+package com.intellij.idea.plugin.hybris.settings.options
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
-import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettingsComponent
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.DeveloperSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.options.BoundSearchableConfigurable
import com.intellij.openapi.options.ConfigurableProvider
import com.intellij.openapi.project.Project
@@ -29,16 +29,16 @@ import com.intellij.ui.dsl.builder.panel
import com.intellij.ui.layout.selected
import javax.swing.JCheckBox
-class ImpexSettingsConfigurableProvider(val project: Project) : ConfigurableProvider() {
+class ProjectImpExSettingsConfigurableProvider(val project: Project) : ConfigurableProvider() {
- override fun canCreateConfigurable() = HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()
+ override fun canCreateConfigurable() = ProjectSettingsComponent.getInstance(project).isHybrisProject()
override fun createConfigurable() = SettingsConfigurable(project)
class SettingsConfigurable(project: Project) : BoundSearchableConfigurable(
message("hybris.settings.project.impex.title"), "hybris.impex.settings"
) {
- private val projectSettings = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).state.impexSettings
+ private val projectSettings = DeveloperSettingsComponent.getInstance(project).state.impexSettings
private lateinit var foldingEnableCheckBox: JCheckBox
private lateinit var documentationEnableCheckBox: JCheckBox
diff --git a/src/com/intellij/idea/plugin/hybris/settings/HybrisProjectRemoteInstancesSettingsConfigurableProvider.kt b/src/com/intellij/idea/plugin/hybris/settings/options/ProjectRemoteInstancesSettingsConfigurableProvider.kt
similarity index 81%
rename from src/com/intellij/idea/plugin/hybris/settings/HybrisProjectRemoteInstancesSettingsConfigurableProvider.kt
rename to src/com/intellij/idea/plugin/hybris/settings/options/ProjectRemoteInstancesSettingsConfigurableProvider.kt
index 42b1d5ef1..b84dd9d82 100644
--- a/src/com/intellij/idea/plugin/hybris/settings/HybrisProjectRemoteInstancesSettingsConfigurableProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/options/ProjectRemoteInstancesSettingsConfigurableProvider.kt
@@ -1,6 +1,6 @@
/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -16,10 +16,12 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.settings
+package com.intellij.idea.plugin.hybris.settings.options
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
+import com.intellij.idea.plugin.hybris.settings.RemoteConnectionSettings
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionType
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionUtil
import com.intellij.idea.plugin.hybris.ui.RemoteHacInstancesListPanel
@@ -34,9 +36,9 @@ import com.intellij.ui.dsl.builder.RowLayout
import com.intellij.ui.dsl.builder.panel
import javax.swing.DefaultComboBoxModel
-class HybrisProjectRemoteInstancesSettingsConfigurableProvider(val project: Project) : ConfigurableProvider(), Disposable {
+class ProjectRemoteInstancesSettingsConfigurableProvider(val project: Project) : ConfigurableProvider(), Disposable {
- override fun canCreateConfigurable() = HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()
+ override fun canCreateConfigurable() = ProjectSettingsComponent.getInstance(project).isHybrisProject()
override fun createConfigurable() = SettingsConfigurable(project)
class SettingsConfigurable(private val project: Project) : BoundSearchableConfigurable(
@@ -48,14 +50,14 @@ class HybrisProjectRemoteInstancesSettingsConfigurableProvider(val project: Proj
private val currentActiveHybrisConnection = RemoteConnectionUtil.getActiveRemoteConnectionSettings(project, RemoteConnectionType.Hybris)
private val currentActiveSolrConnection = RemoteConnectionUtil.getActiveRemoteConnectionSettings(project, RemoteConnectionType.SOLR)
- private val activeHacServerModel = DefaultComboBoxModel()
- private val activeSolrServerModel = DefaultComboBoxModel()
+ private val activeHacServerModel = DefaultComboBoxModel()
+ private val activeSolrServerModel = DefaultComboBoxModel()
private val hacInstances = RemoteHacInstancesListPanel(project) { _, data ->
- if (!isReset) updateModel(activeHacServerModel, activeHacServerModel.selectedItem as HybrisRemoteConnectionSettings?, data)
+ if (!isReset) updateModel(activeHacServerModel, activeHacServerModel.selectedItem as RemoteConnectionSettings?, data)
}
private val solrInstances = RemoteSolrInstancesListPanel(project) { _, data ->
- if (!isReset) updateModel(activeSolrServerModel, activeSolrServerModel.selectedItem as HybrisRemoteConnectionSettings?, data)
+ if (!isReset) updateModel(activeSolrServerModel, activeSolrServerModel.selectedItem as RemoteConnectionSettings?, data)
}
override fun createPanel() = panel {
@@ -67,11 +69,11 @@ class HybrisProjectRemoteInstancesSettingsConfigurableProvider(val project: Proj
)
.label(message("hybris.settings.project.remote_instances.hac.active.title"))
.onApply {
- (activeHacServerModel.selectedItem as HybrisRemoteConnectionSettings?)
+ (activeHacServerModel.selectedItem as RemoteConnectionSettings?)
?.let { settings -> RemoteConnectionUtil.setActiveRemoteConnectionSettings(project, settings) }
}
.onIsModified {
- (activeHacServerModel.selectedItem as HybrisRemoteConnectionSettings?)
+ (activeHacServerModel.selectedItem as RemoteConnectionSettings?)
?.let { it.uuid != RemoteConnectionUtil.getActiveRemoteConnectionId(project, it.type) }
?: false
}
@@ -86,11 +88,11 @@ class HybrisProjectRemoteInstancesSettingsConfigurableProvider(val project: Proj
)
.label(message("hybris.settings.project.remote_instances.solr.active.title"))
.onApply {
- (activeSolrServerModel.selectedItem as HybrisRemoteConnectionSettings?)
+ (activeSolrServerModel.selectedItem as RemoteConnectionSettings?)
?.let { settings -> RemoteConnectionUtil.setActiveRemoteConnectionSettings(project, settings) }
}
.onIsModified {
- (activeSolrServerModel.selectedItem as HybrisRemoteConnectionSettings?)
+ (activeSolrServerModel.selectedItem as RemoteConnectionSettings?)
?.let { it.uuid != RemoteConnectionUtil.getActiveRemoteConnectionId(project, it.type) }
?: false
}
@@ -125,9 +127,9 @@ class HybrisProjectRemoteInstancesSettingsConfigurableProvider(val project: Proj
}
private fun updateModel(
- model: DefaultComboBoxModel,
- activeConnection: HybrisRemoteConnectionSettings?,
- connectionSettings: Collection
+ model: DefaultComboBoxModel,
+ activeConnection: RemoteConnectionSettings?,
+ connectionSettings: Collection
) {
model.removeAllElements()
model.addAll(connectionSettings)
diff --git a/src/com/intellij/idea/plugin/hybris/settings/HybrisProjectSettingsConfigurableProvider.kt b/src/com/intellij/idea/plugin/hybris/settings/options/ProjectSettingsConfigurableProvider.kt
similarity index 77%
rename from src/com/intellij/idea/plugin/hybris/settings/HybrisProjectSettingsConfigurableProvider.kt
rename to src/com/intellij/idea/plugin/hybris/settings/options/ProjectSettingsConfigurableProvider.kt
index 8daab87e2..56b13cd2b 100644
--- a/src/com/intellij/idea/plugin/hybris/settings/HybrisProjectSettingsConfigurableProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/options/ProjectSettingsConfigurableProvider.kt
@@ -16,10 +16,11 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.settings
+package com.intellij.idea.plugin.hybris.settings.options
import com.intellij.idea.plugin.hybris.common.equalsIgnoreOrder
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.idea.plugin.hybris.ui.CRUDListPanel
import com.intellij.openapi.options.BoundSearchableConfigurable
import com.intellij.openapi.options.ConfigurableProvider
@@ -28,16 +29,16 @@ import com.intellij.ui.dsl.builder.*
import com.intellij.ui.layout.selected
import javax.swing.JCheckBox
-class HybrisProjectSettingsConfigurableProvider(val project: Project) : ConfigurableProvider() {
+class ProjectSettingsConfigurableProvider(val project: Project) : ConfigurableProvider() {
- override fun canCreateConfigurable() = HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()
+ override fun canCreateConfigurable() = ProjectSettingsComponent.getInstance(project).isHybrisProject()
override fun createConfigurable() = SettingsConfigurable(project)
class SettingsConfigurable(project: Project) : BoundSearchableConfigurable(
message("hybris.settings.project.title"), "hybris.project.settings"
) {
- private val state = HybrisProjectSettingsComponent.getInstance(project).state
+ private val projectSettings = ProjectSettingsComponent.getInstance(project).state
private lateinit var generateCodeOnRebuildCheckBox: JCheckBox
private val excludedFromScanning = CRUDListPanel(
@@ -52,19 +53,19 @@ class HybrisProjectSettingsConfigurableProvider(val project: Project) : Configur
row(message("hybris.settings.project.details.platform_version.title")) {
textField()
.enabled(false)
- .text(state.hybrisVersion ?: "")
+ .text(projectSettings.hybrisVersion ?: "")
.align(AlignX.FILL)
}.layout(RowLayout.PARENT_GRID)
row(message("hybris.import.wizard.hybris.distribution.directory.label")) {
textField()
.enabled(false)
- .text(state.hybrisDirectory ?: "")
+ .text(projectSettings.hybrisDirectory ?: "")
.align(AlignX.FILL)
}.layout(RowLayout.PARENT_GRID)
row(message("hybris.import.wizard.javadoc.url.label")) {
textField()
.enabled(false)
- .text(state.javadocUrl ?: "")
+ .text(projectSettings.javadocUrl ?: "")
.align(AlignX.FILL)
}.layout(RowLayout.PARENT_GRID)
}
@@ -80,21 +81,21 @@ class HybrisProjectSettingsConfigurableProvider(val project: Project) : Configur
As a final step, project compilation will continue.
""".trimIndent()
)
- .bindSelected(state::generateCodeOnRebuild)
+ .bindSelected(projectSettings::generateCodeOnRebuild)
.component
}
row("Code generation timeout (in seconds):") {
spinner(1..10000, 1)
- .bindIntValue(state::generateCodeTimeoutSeconds)
+ .bindIntValue(projectSettings::generateCodeTimeoutSeconds)
.enabledIf(generateCodeOnRebuildCheckBox.selected)
}
}
group(message("hybris.settings.project.common.title")) {
row {
- checkBox("Show complete Module name in the Project View")
+ checkBox("Show full Module name in the Project View")
.comment("If checked, complete module name will be represented as [Platform.core]
instead of core
.")
- .bindSelected(state::showFullModuleName)
+ .bindSelected(projectSettings::showFullModuleName)
}
}
@@ -102,33 +103,33 @@ class HybrisProjectSettingsConfigurableProvider(val project: Project) : Configur
row {
checkBox("Remove external modules")
.comment("If checked, non SAP Commerce external modules will be removed during the project refresh.")
- .bindSelected(state::removeExternalModulesOnRefresh)
+ .bindSelected(projectSettings::removeExternalModulesOnRefresh)
}
row {
checkBox("Use fake output path for custom extensions")
.comment("When enabled the ‘eclipsebin’ folder will be used as an output path for both custom and OOTB extensions.")
- .bindSelected(state::useFakeOutputPathForCustomExtensions)
+ .bindSelected(projectSettings::useFakeOutputPathForCustomExtensions)
}
row {
checkBox(message("hybris.import.wizard.import.ootb.modules.read.only.label"))
.comment(message("hybris.import.wizard.import.ootb.modules.read.only.tooltip"))
- .bindSelected(state::importOotbModulesInReadOnlyMode)
+ .bindSelected(projectSettings::importOotbModulesInReadOnlyMode)
}
row {
checkBox(message("hybris.import.wizard.exclude.test.sources.label"))
- .bindSelected(state::excludeTestSources)
+ .bindSelected(projectSettings::excludeTestSources)
}
row {
checkBox(message("hybris.project.import.followSymlink"))
- .bindSelected(state::followSymlink)
+ .bindSelected(projectSettings::followSymlink)
}
row {
checkBox(message("hybris.project.import.scanExternalModules"))
- .bindSelected(state::scanThroughExternalModule)
+ .bindSelected(projectSettings::scanThroughExternalModule)
}
row {
checkBox(message("hybris.project.import.importCustomAntBuildFiles"))
- .bindSelected(state::importCustomAntBuildFiles)
+ .bindSelected(projectSettings::importCustomAntBuildFiles)
}
}
@@ -139,9 +140,9 @@ class HybrisProjectSettingsConfigurableProvider(val project: Project) : Configur
row {
cell(excludedFromScanning)
.align(AlignX.FILL)
- .onApply { state.excludedFromScanning = excludedFromScanning.data.toMutableSet() }
- .onReset { excludedFromScanning.data = state.excludedFromScanning.toList() }
- .onIsModified { excludedFromScanning.data.equalsIgnoreOrder(state.excludedFromScanning.toList()).not() }
+ .onApply { projectSettings.excludedFromScanning = excludedFromScanning.data.toMutableSet() }
+ .onReset { excludedFromScanning.data = projectSettings.excludedFromScanning.toList() }
+ .onIsModified { excludedFromScanning.data.equalsIgnoreOrder(projectSettings.excludedFromScanning.toList()).not() }
}
}
}
diff --git a/src/com/intellij/idea/plugin/hybris/settings/options/ProjectTypeSystemConfigurableProvider.kt b/src/com/intellij/idea/plugin/hybris/settings/options/ProjectTypeSystemConfigurableProvider.kt
new file mode 100644
index 000000000..fc37143f3
--- /dev/null
+++ b/src/com/intellij/idea/plugin/hybris/settings/options/ProjectTypeSystemConfigurableProvider.kt
@@ -0,0 +1,151 @@
+/*
+ * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
+ * Copyright (C) 2019-2024 EPAM Systems and contributors
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */
+
+package com.intellij.idea.plugin.hybris.settings.options
+
+import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
+import com.intellij.idea.plugin.hybris.settings.components.DeveloperSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.ui.TSDiagramSettingsExcludedTypeNameTable
+import com.intellij.openapi.options.BoundSearchableConfigurable
+import com.intellij.openapi.options.ConfigurableProvider
+import com.intellij.openapi.project.Project
+import com.intellij.ui.ToolbarDecorator
+import com.intellij.ui.dsl.builder.Align
+import com.intellij.ui.dsl.builder.bindSelected
+import com.intellij.ui.dsl.builder.panel
+import com.intellij.ui.layout.selected
+import com.intellij.util.ui.JBUI
+import java.awt.Dimension
+import javax.swing.JCheckBox
+
+class ProjectTypeSystemConfigurableProvider(val project: Project) : ConfigurableProvider() {
+
+ override fun canCreateConfigurable() = ProjectSettingsComponent.getInstance(project).isHybrisProject()
+ override fun createConfigurable() = SettingsConfigurable(project)
+
+ class SettingsConfigurable(project: Project) : BoundSearchableConfigurable(
+ message("hybris.settings.project.ts.title"), "[y] SAP CX Type System configuration."
+ ) {
+
+ private val tsSettings = DeveloperSettingsComponent.getInstance(project).state.typeSystemSettings
+ private val tsDiagramSettings = DeveloperSettingsComponent.getInstance(project).state.typeSystemDiagramSettings
+
+ private val excludedTypeNamesTable = TSDiagramSettingsExcludedTypeNameTable.getInstance(project)
+ private val excludedTypeNamesPane = ToolbarDecorator.createDecorator(excludedTypeNamesTable)
+ .disableUpDownActions()
+ .setPanelBorder(JBUI.Borders.empty())
+ .createPanel()
+
+ init {
+ excludedTypeNamesPane.minimumSize = Dimension(excludedTypeNamesPane.width, 400)
+ }
+
+ private lateinit var foldingEnableCheckBox: JCheckBox
+
+ override fun createPanel() = panel {
+ group("Code Folding - items.xml") {
+ row {
+ foldingEnableCheckBox = checkBox("Enable code folding")
+ .bindSelected(tsSettings.folding::enabled)
+ .component
+ }
+ group("Table-Like Folding", true) {
+ row {
+ checkBox("Atomics")
+ .bindSelected(tsSettings.folding::tablifyAtomics)
+ .enabledIf(foldingEnableCheckBox.selected)
+ checkBox("Collections")
+ .bindSelected(tsSettings.folding::tablifyCollections)
+ .enabledIf(foldingEnableCheckBox.selected)
+ checkBox("Maps")
+ .bindSelected(tsSettings.folding::tablifyMaps)
+ .enabledIf(foldingEnableCheckBox.selected)
+ checkBox("Relations")
+ .bindSelected(tsSettings.folding::tablifyRelations)
+ .enabledIf(foldingEnableCheckBox.selected)
+ }
+ row {
+ checkBox("Item attributes")
+ .bindSelected(tsSettings.folding::tablifyItemAttributes)
+ .enabledIf(foldingEnableCheckBox.selected)
+ checkBox("Item indexes")
+ .bindSelected(tsSettings.folding::tablifyItemIndexes)
+ .enabledIf(foldingEnableCheckBox.selected)
+ checkBox("Item custom properties")
+ .bindSelected(tsSettings.folding::tablifyItemCustomProperties)
+ .enabledIf(foldingEnableCheckBox.selected)
+ }
+ }
+ }
+
+ group("Diagram Settings") {
+ row {
+ checkBox("Collapse nodes by default")
+ .bindSelected(tsDiagramSettings::nodesCollapsedByDefault)
+ }
+
+ row {
+ checkBox("Show OOTB Map nodes")
+ .comment("One of the OOTB Map example is `localized:java.lang.String`.")
+ .bindSelected(tsDiagramSettings::showOOTBMapNodes)
+ }
+
+ row {
+ checkBox("Show custom Atomic nodes")
+ .bindSelected(tsDiagramSettings::showCustomAtomicNodes)
+ }
+
+ row {
+ checkBox("Show custom Collection nodes")
+ .bindSelected(tsDiagramSettings::showCustomCollectionNodes)
+ }
+
+ row {
+ checkBox("Show custom Enum nodes")
+ .bindSelected(tsDiagramSettings::showCustomEnumNodes)
+ }
+
+ row {
+ checkBox("Show custom Map nodes")
+ .bindSelected(tsDiagramSettings::showCustomMapNodes)
+ }
+
+ row {
+ checkBox("Show custom Relation nodes")
+ .comment("Relations with set Deployment will be always displayed.")
+ .bindSelected(tsDiagramSettings::showCustomRelationNodes)
+ }
+ }
+
+ group("Diagram - Excluded Type Names", true) {
+ row {
+ cell(excludedTypeNamesPane)
+ .onApply { tsDiagramSettings.excludedTypeNames = getNewTypeNames() }
+ .onReset { excludedTypeNamesTable.updateModel(tsDiagramSettings) }
+ .onIsModified { tsDiagramSettings.excludedTypeNames != getNewTypeNames() }
+ .align(Align.FILL)
+ }
+ }
+ }
+
+ private fun getNewTypeNames() = excludedTypeNamesTable.getItems()
+ .map { it.typeName }
+ .toMutableSet()
+ }
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/settings/components/TSDiagramSettingsExcludedTypeNameTable.kt b/src/com/intellij/idea/plugin/hybris/settings/ui/TSDiagramSettingsExcludedTypeNameTable.kt
similarity index 90%
rename from src/com/intellij/idea/plugin/hybris/settings/components/TSDiagramSettingsExcludedTypeNameTable.kt
rename to src/com/intellij/idea/plugin/hybris/settings/ui/TSDiagramSettingsExcludedTypeNameTable.kt
index 734c48aaa..c83050525 100644
--- a/src/com/intellij/idea/plugin/hybris/settings/components/TSDiagramSettingsExcludedTypeNameTable.kt
+++ b/src/com/intellij/idea/plugin/hybris/settings/ui/TSDiagramSettingsExcludedTypeNameTable.kt
@@ -16,9 +16,9 @@
* along with this program. If not, see .
*/
-package com.intellij.idea.plugin.hybris.settings.components
+package com.intellij.idea.plugin.hybris.settings.ui
-import com.intellij.idea.plugin.hybris.system.type.settings.TSDiagramSettings
+import com.intellij.idea.plugin.hybris.settings.TypeSystemDiagramSettings
import com.intellij.idea.plugin.hybris.toolwindow.components.AbstractTable
import com.intellij.openapi.project.Project
import com.intellij.util.ui.ListTableModel
@@ -26,14 +26,14 @@ import java.io.Serial
private const val COLUMN_NAME = "Name"
-class TSDiagramSettingsExcludedTypeNameTable private constructor(project: Project) : AbstractTable(project) {
+class TSDiagramSettingsExcludedTypeNameTable private constructor(project: Project) : AbstractTable(project) {
override fun getSearchableColumnNames() = listOf(COLUMN_NAME)
override fun select(item: TSTypeNameHolder) {
}
- override fun getItems(owner: TSDiagramSettings) = owner.excludedTypeNames
+ override fun getItems(owner: TypeSystemDiagramSettings) = owner.excludedTypeNames
.map { TSTypeNameHolder(it) }
.sortedBy { it.typeName }
.toMutableList()
diff --git a/src/com/intellij/idea/plugin/hybris/startup/HybrisIntelliLangStartupActivity.kt b/src/com/intellij/idea/plugin/hybris/startup/HybrisIntelliLangStartupActivity.kt
index 32bf8cded..c0e3ae9e7 100644
--- a/src/com/intellij/idea/plugin/hybris/startup/HybrisIntelliLangStartupActivity.kt
+++ b/src/com/intellij/idea/plugin/hybris/startup/HybrisIntelliLangStartupActivity.kt
@@ -20,7 +20,7 @@ package com.intellij.idea.plugin.hybris.startup
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.flexibleSearch.FlexibleSearchLanguage
import com.intellij.idea.plugin.hybris.polyglotQuery.PolyglotQueryLanguage
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.application.ModalityState
import com.intellij.openapi.application.ReadAction
import com.intellij.openapi.project.Project
@@ -41,7 +41,7 @@ import org.intellij.plugins.intelliLang.inject.java.JavaLanguageInjectionSupport
class HybrisIntelliLangStartupActivity : ProjectActivity {
override suspend fun execute(project: Project) {
- if (!HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()) return
+ if (!ProjectSettingsComponent.getInstance(project).isHybrisProject()) return
registerJavaInjections(project)
}
diff --git a/src/com/intellij/idea/plugin/hybris/startup/HybrisProjectImportStartupActivity.kt b/src/com/intellij/idea/plugin/hybris/startup/HybrisProjectImportStartupActivity.kt
index 42ae4ad0f..be0593ca9 100644
--- a/src/com/intellij/idea/plugin/hybris/startup/HybrisProjectImportStartupActivity.kt
+++ b/src/com/intellij/idea/plugin/hybris/startup/HybrisProjectImportStartupActivity.kt
@@ -21,7 +21,7 @@ import com.intellij.ide.util.RunOnceUtil
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.common.services.CommonIdeaService
import com.intellij.idea.plugin.hybris.project.configurators.PostImportConfigurator
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.idea.plugin.hybris.toolwindow.HybrisToolWindowService
import com.intellij.openapi.project.Project
import com.intellij.openapi.startup.ProjectActivity
@@ -30,7 +30,7 @@ import com.intellij.openapi.util.removeUserData
class HybrisProjectImportStartupActivity : ProjectActivity {
override suspend fun execute(project: Project) {
- if (!HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()) return
+ if (!ProjectSettingsComponent.getInstance(project).isHybrisProject()) return
RunOnceUtil.runOnceForProject(project, "afterHybrisProjectImport") {
project.getUserData(HybrisConstants.KEY_FINALIZE_PROJECT_IMPORT)
diff --git a/src/com/intellij/idea/plugin/hybris/startup/HybrisProjectStructureStartupActivity.kt b/src/com/intellij/idea/plugin/hybris/startup/HybrisProjectStructureStartupActivity.kt
index 69a7cf267..7c27327ff 100644
--- a/src/com/intellij/idea/plugin/hybris/startup/HybrisProjectStructureStartupActivity.kt
+++ b/src/com/intellij/idea/plugin/hybris/startup/HybrisProjectStructureStartupActivity.kt
@@ -25,7 +25,7 @@ import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils
import com.intellij.idea.plugin.hybris.notifications.Notifications
import com.intellij.idea.plugin.hybris.project.actions.ProjectRefreshAction
import com.intellij.idea.plugin.hybris.project.configurators.ConfiguratorFactory
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.notification.NotificationType
import com.intellij.openapi.diagnostic.Logger
import com.intellij.openapi.extensions.PluginId
@@ -40,7 +40,7 @@ class HybrisProjectStructureStartupActivity : ProjectActivity {
if (project.isDisposed) return
val commonIdeaService = CommonIdeaService.getInstance()
- val settingsComponent = HybrisProjectSettingsComponent.getInstance(project)
+ val settingsComponent = ProjectSettingsComponent.getInstance(project)
val isHybrisProject = settingsComponent.isHybrisProject()
if (isHybrisProject) {
@@ -76,7 +76,7 @@ class HybrisProjectStructureStartupActivity : ProjectActivity {
}
private fun logVersion(project: Project) {
- val settings = HybrisProjectSettingsComponent.getInstance(project).state
+ val settings = ProjectSettingsComponent.getInstance(project).state
val importedBy = settings.importedByVersion
val hybrisVersion = settings.hybrisVersion
val plugin = PluginManagerCore.getPlugin(PluginId.getId(HybrisConstants.PLUGIN_ID)) ?: return
diff --git a/src/com/intellij/idea/plugin/hybris/startup/ItemsXmlFileOpenStartupActivity.kt b/src/com/intellij/idea/plugin/hybris/startup/ItemsXmlFileOpenStartupActivity.kt
index f509c20a2..819610ea5 100644
--- a/src/com/intellij/idea/plugin/hybris/startup/ItemsXmlFileOpenStartupActivity.kt
+++ b/src/com/intellij/idea/plugin/hybris/startup/ItemsXmlFileOpenStartupActivity.kt
@@ -19,8 +19,8 @@ package com.intellij.idea.plugin.hybris.startup
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
import com.intellij.idea.plugin.hybris.common.utils.HybrisItemsXmlFileType
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.idea.plugin.hybris.system.type.validation.ItemsXmlFileValidation
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.progress.ProgressIndicator
@@ -37,8 +37,8 @@ import com.intellij.psi.search.GlobalSearchScope
class ItemsXmlFileOpenStartupActivity : ProjectActivity {
override suspend fun execute(project: Project) {
- if (!HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()) return
- if (!HybrisApplicationSettingsComponent.getInstance().state.warnIfGeneratedItemsAreOutOfDate) return
+ if (!ProjectSettingsComponent.getInstance(project).isHybrisProject()) return
+ if (!ApplicationSettingsComponent.getInstance().state.warnIfGeneratedItemsAreOutOfDate) return
val task = object : Task.Backgroundable(project, message("hybris.startupActivity.itemsXmlValidation.progress.title")) {
override fun run(indicator: ProgressIndicator) {
diff --git a/src/com/intellij/idea/plugin/hybris/startup/PreLoadSystemsStartupActivity.kt b/src/com/intellij/idea/plugin/hybris/startup/PreLoadSystemsStartupActivity.kt
index c79800465..a8a9081e7 100644
--- a/src/com/intellij/idea/plugin/hybris/startup/PreLoadSystemsStartupActivity.kt
+++ b/src/com/intellij/idea/plugin/hybris/startup/PreLoadSystemsStartupActivity.kt
@@ -18,7 +18,7 @@
package com.intellij.idea.plugin.hybris.startup
import com.intellij.idea.plugin.hybris.properties.PropertyService
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.idea.plugin.hybris.system.bean.meta.BSMetaModelAccess
import com.intellij.idea.plugin.hybris.system.cockpitng.meta.CngMetaModelAccess
import com.intellij.idea.plugin.hybris.system.spring.SimpleSpringService
@@ -31,7 +31,7 @@ import com.intellij.openapi.startup.ProjectActivity
class PreLoadSystemsStartupActivity : ProjectActivity {
override suspend fun execute(project: Project) {
- if (!HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()) return
+ if (!ProjectSettingsComponent.getInstance(project).isHybrisProject()) return
refreshSystem(project) { TSMetaModelAccess.getInstance(project).initMetaModel() }
refreshSystem(project) { BSMetaModelAccess.getInstance(project).initMetaModel() }
diff --git a/src/com/intellij/idea/plugin/hybris/startup/event/HybrisFileEditorManagerListener.kt b/src/com/intellij/idea/plugin/hybris/startup/event/HybrisFileEditorManagerListener.kt
index 752244484..e28fa668d 100644
--- a/src/com/intellij/idea/plugin/hybris/startup/event/HybrisFileEditorManagerListener.kt
+++ b/src/com/intellij/idea/plugin/hybris/startup/event/HybrisFileEditorManagerListener.kt
@@ -24,7 +24,7 @@ import com.intellij.idea.plugin.hybris.impex.file.ImpExFileToolbarInstaller
import com.intellij.idea.plugin.hybris.impex.file.ImpexFileType
import com.intellij.idea.plugin.hybris.polyglotQuery.file.PolyglotQueryFileToolbarInstaller
import com.intellij.idea.plugin.hybris.polyglotQuery.file.PolyglotQueryFileType
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.editor.ex.util.EditorUtil
import com.intellij.openapi.fileEditor.FileEditorManager
import com.intellij.openapi.fileEditor.FileEditorManagerListener
@@ -37,7 +37,7 @@ class HybrisFileEditorManagerListener(private val project: Project) : FileEditor
override fun fileOpened(source: FileEditorManager, file: VirtualFile) {
if (SingleRootFileViewProvider.isTooLargeForIntelligence(file)) return
- val projectSettings = HybrisProjectSettingsComponent.getInstance(project)
+ val projectSettings = ProjectSettingsComponent.getInstance(project)
if (!projectSettings.isHybrisProject()) return
val toolbarInstaller = when (file.fileType) {
diff --git a/src/com/intellij/idea/plugin/hybris/startup/event/ItemsXmlFileEditorManagerListener.kt b/src/com/intellij/idea/plugin/hybris/startup/event/ItemsXmlFileEditorManagerListener.kt
index add1001f3..3c8cf79a1 100644
--- a/src/com/intellij/idea/plugin/hybris/startup/event/ItemsXmlFileEditorManagerListener.kt
+++ b/src/com/intellij/idea/plugin/hybris/startup/event/ItemsXmlFileEditorManagerListener.kt
@@ -19,8 +19,8 @@
package com.intellij.idea.plugin.hybris.startup.event
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.idea.plugin.hybris.system.type.validation.ItemsXmlFileValidation
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.fileEditor.FileEditorManager
@@ -36,8 +36,8 @@ import com.intellij.openapi.vfs.VirtualFile
class ItemsXmlFileEditorManagerListener(private val project: Project) : FileEditorManagerListener {
override fun fileOpened(source: FileEditorManager, file: VirtualFile) {
- if (!HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()) return
- if (!HybrisApplicationSettingsComponent.getInstance().state.warnIfGeneratedItemsAreOutOfDate) return
+ if (!ProjectSettingsComponent.getInstance(project).isHybrisProject()) return
+ if (!ApplicationSettingsComponent.getInstance().state.warnIfGeneratedItemsAreOutOfDate) return
val task = object : Task.Backgroundable(project, HybrisI18NBundleUtils.message("hybris.startupActivity.itemsXmlValidation.progress.title")) {
override fun run(indicator: ProgressIndicator) {
diff --git a/src/com/intellij/idea/plugin/hybris/system/bean/BSDomFileDescription.kt b/src/com/intellij/idea/plugin/hybris/system/bean/BSDomFileDescription.kt
index 79fbfad6f..78364e4d7 100644
--- a/src/com/intellij/idea/plugin/hybris/system/bean/BSDomFileDescription.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/bean/BSDomFileDescription.kt
@@ -19,7 +19,7 @@ package com.intellij.idea.plugin.hybris.system.bean
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.idea.plugin.hybris.system.bean.model.Beans
import com.intellij.openapi.module.Module
import com.intellij.openapi.module.ModuleUtil
@@ -34,7 +34,7 @@ class BSDomFileDescription : DomFileDescription(Beans::class.java, "beans
override fun isMyFile(file: XmlFile, module: Module?) = super.isMyFile(file, module)
&& file.virtualFile != null
&& (module != null || ModuleUtil.projectContainsFile(file.project, file.virtualFile, true))
- && HybrisProjectSettingsComponent.getInstance(file.project).isHybrisProject()
+ && ProjectSettingsComponent.getInstance(file.project).isHybrisProject()
&& file.name.endsWith(HybrisConstants.HYBRIS_BEANS_XML_FILE_ENDING)
&& file.rootTag
?.attributes
diff --git a/src/com/intellij/idea/plugin/hybris/system/bean/codeInsight/hints/BeansXmlInlayHintsProvider.kt b/src/com/intellij/idea/plugin/hybris/system/bean/codeInsight/hints/BeansXmlInlayHintsProvider.kt
index 1edbf4823..5bfad647f 100644
--- a/src/com/intellij/idea/plugin/hybris/system/bean/codeInsight/hints/BeansXmlInlayHintsProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/bean/codeInsight/hints/BeansXmlInlayHintsProvider.kt
@@ -18,7 +18,7 @@
package com.intellij.idea.plugin.hybris.system.bean.codeInsight.hints
import com.intellij.codeInsight.hints.*
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.editor.Editor
import com.intellij.psi.PsiFile
import javax.swing.JPanel
@@ -41,6 +41,6 @@ class BeansXmlInlayHintsProvider : InlayHintsProvider {
override fun getCollectorFor(
file: PsiFile, editor: Editor, settings: NoSettings, sink: InlayHintsSink
- ) = if (file.name.endsWith(name) && HybrisProjectSettingsComponent.getInstance(file.project).isHybrisProject()) BeansXmlInlayHintsCollector(editor)
+ ) = if (file.name.endsWith(name) && ProjectSettingsComponent.getInstance(file.project).isHybrisProject()) BeansXmlInlayHintsCollector(editor)
else null
}
diff --git a/src/com/intellij/idea/plugin/hybris/system/bean/lang/folding/BeansXmlFoldingBuilder.kt b/src/com/intellij/idea/plugin/hybris/system/bean/lang/folding/BeansXmlFoldingBuilder.kt
index 426cc45ad..c2f2bc7da 100644
--- a/src/com/intellij/idea/plugin/hybris/system/bean/lang/folding/BeansXmlFoldingBuilder.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/bean/lang/folding/BeansXmlFoldingBuilder.kt
@@ -19,11 +19,11 @@ package com.intellij.idea.plugin.hybris.system.bean.lang.folding
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.lang.folding.AbstractXmlFoldingBuilderEx
-import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.BeanSystemFoldingSettings
+import com.intellij.idea.plugin.hybris.settings.components.DeveloperSettingsComponent
import com.intellij.idea.plugin.hybris.system.bean.meta.BSMetaHelper
import com.intellij.idea.plugin.hybris.system.bean.model.*
import com.intellij.idea.plugin.hybris.system.bean.model.Enum
-import com.intellij.idea.plugin.hybris.system.bean.settings.BeanSystemFoldingSettings
import com.intellij.lang.ASTNode
import com.intellij.openapi.project.DumbAware
import com.intellij.openapi.project.Project
@@ -60,7 +60,7 @@ class BeansXmlFoldingBuilder : AbstractXmlFoldingBuilderEx(Process::class.java, Hy
override fun isMyFile(file: XmlFile, module: Module?) = super.isMyFile(file, module)
&& (module != null || ModuleUtil.projectContainsFile(file.project, file.virtualFile, true))
- && HybrisProjectSettingsComponent.getInstance(file.project).isHybrisProject()
+ && ProjectSettingsComponent.getInstance(file.project).isHybrisProject()
}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/system/businessProcess/lang/folding/BpXmlFoldingBuilder.kt b/src/com/intellij/idea/plugin/hybris/system/businessProcess/lang/folding/BpXmlFoldingBuilder.kt
index 70d07bcd1..2322d06e2 100644
--- a/src/com/intellij/idea/plugin/hybris/system/businessProcess/lang/folding/BpXmlFoldingBuilder.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/businessProcess/lang/folding/BpXmlFoldingBuilder.kt
@@ -19,9 +19,9 @@
package com.intellij.idea.plugin.hybris.system.businessProcess.lang.folding
import com.intellij.idea.plugin.hybris.lang.folding.AbstractXmlFoldingBuilderEx
-import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.BpFoldingSettings
+import com.intellij.idea.plugin.hybris.settings.components.DeveloperSettingsComponent
import com.intellij.idea.plugin.hybris.system.businessProcess.model.*
-import com.intellij.idea.plugin.hybris.system.businessProcess.settings.BpFoldingSettings
import com.intellij.idea.plugin.hybris.system.businessProcess.util.BpHelper
import com.intellij.lang.ASTNode
import com.intellij.openapi.project.DumbAware
@@ -50,7 +50,7 @@ class BpXmlFoldingBuilder : AbstractXmlFoldingBuilderEx(Config::class.jav
override fun isMyFile(file: XmlFile, module: Module?) = super.isMyFile(file, module)
&& (module != null || ModuleUtil.projectContainsFile(file.project, file.virtualFile, true))
&& hasNamespace(file)
- && HybrisProjectSettingsComponent.getInstance(file.project).isHybrisProject()
+ && ProjectSettingsComponent.getInstance(file.project).isHybrisProject()
private fun hasNamespace(file: XmlFile) = file.rootTag
?.attributes
diff --git a/src/com/intellij/idea/plugin/hybris/system/cockpitng/CngEditorDefinitionDomFileDescription.kt b/src/com/intellij/idea/plugin/hybris/system/cockpitng/CngEditorDefinitionDomFileDescription.kt
index e0cffccd0..a929b3fa5 100644
--- a/src/com/intellij/idea/plugin/hybris/system/cockpitng/CngEditorDefinitionDomFileDescription.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/cockpitng/CngEditorDefinitionDomFileDescription.kt
@@ -20,7 +20,7 @@ package com.intellij.idea.plugin.hybris.system.cockpitng
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.idea.plugin.hybris.system.cockpitng.model.core.EditorDefinition
import com.intellij.openapi.module.Module
import com.intellij.openapi.module.ModuleUtil
@@ -35,6 +35,6 @@ class CngEditorDefinitionDomFileDescription : DomFileDescription(Widgets::class.
override fun isMyFile(file: XmlFile, module: Module?) = super.isMyFile(file, module)
&& (module != null || ModuleUtil.projectContainsFile(file.project, file.virtualFile, true))
&& (hasNamespace(file) || "backoffice-widgets.xml" == file.name)
- && HybrisProjectSettingsComponent.getInstance(file.project).isHybrisProject()
+ && ProjectSettingsComponent.getInstance(file.project).isHybrisProject()
private fun hasNamespace(file: XmlFile) = file.rootTag
?.attributes
diff --git a/src/com/intellij/idea/plugin/hybris/system/cockpitng/lang/folding/CngConfigFoldingBuilder.kt b/src/com/intellij/idea/plugin/hybris/system/cockpitng/lang/folding/CngConfigFoldingBuilder.kt
index 19a642a7c..b50f56ccf 100644
--- a/src/com/intellij/idea/plugin/hybris/system/cockpitng/lang/folding/CngConfigFoldingBuilder.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/cockpitng/lang/folding/CngConfigFoldingBuilder.kt
@@ -18,7 +18,8 @@
package com.intellij.idea.plugin.hybris.system.cockpitng.lang.folding
import com.intellij.idea.plugin.hybris.lang.folding.AbstractXmlFoldingBuilderEx
-import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.CngFoldingSettings
+import com.intellij.idea.plugin.hybris.settings.components.DeveloperSettingsComponent
import com.intellij.idea.plugin.hybris.system.cockpitng.model.advancedSearch.Field
import com.intellij.idea.plugin.hybris.system.cockpitng.model.advancedSearch.FieldList
import com.intellij.idea.plugin.hybris.system.cockpitng.model.config.Config
@@ -34,7 +35,6 @@ import com.intellij.idea.plugin.hybris.system.cockpitng.model.wizardConfig.Addit
import com.intellij.idea.plugin.hybris.system.cockpitng.model.wizardConfig.ComposedHandler
import com.intellij.idea.plugin.hybris.system.cockpitng.model.wizardConfig.Property
import com.intellij.idea.plugin.hybris.system.cockpitng.model.wizardConfig.PropertyList
-import com.intellij.idea.plugin.hybris.system.cockpitng.settings.CngFoldingSettings
import com.intellij.lang.ASTNode
import com.intellij.openapi.project.DumbAware
import com.intellij.openapi.project.Project
@@ -63,7 +63,7 @@ class CngConfigFoldingBuilder : AbstractXmlFoldingBuilderEx(ExtensionInfo::c
&& file.virtualFile != null
&& file.name == HybrisConstants.EXTENSION_INFO_XML
&& (module != null || ModuleUtil.projectContainsFile(file.project, file.virtualFile, true))
- && HybrisProjectSettingsComponent.getInstance(file.project).isHybrisProject()
+ && ProjectSettingsComponent.getInstance(file.project).isHybrisProject()
}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/system/externalDependencies/EDDomFileDescription.kt b/src/com/intellij/idea/plugin/hybris/system/externalDependencies/EDDomFileDescription.kt
index ba614914e..be776ca7d 100644
--- a/src/com/intellij/idea/plugin/hybris/system/externalDependencies/EDDomFileDescription.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/externalDependencies/EDDomFileDescription.kt
@@ -20,7 +20,7 @@ package com.intellij.idea.plugin.hybris.system.externalDependencies
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.module.Module
import com.intellij.openapi.module.ModuleUtil
import com.intellij.psi.xml.XmlFile
@@ -35,6 +35,6 @@ class EDDomFileDescription : MavenDomProjectModelDescription() {
&& file.virtualFile != null
&& file.name == HybrisConstants.EXTERNAL_DEPENDENCIES_XML
&& (module != null || ModuleUtil.projectContainsFile(file.project, file.virtualFile, true))
- && HybrisProjectSettingsComponent.getInstance(file.project).isHybrisProject()
+ && ProjectSettingsComponent.getInstance(file.project).isHybrisProject()
}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/system/localextensions/LeSDomFileDescription.kt b/src/com/intellij/idea/plugin/hybris/system/localextensions/LeSDomFileDescription.kt
index 7a4c4abef..2ab7bd6d0 100644
--- a/src/com/intellij/idea/plugin/hybris/system/localextensions/LeSDomFileDescription.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/localextensions/LeSDomFileDescription.kt
@@ -20,7 +20,7 @@ package com.intellij.idea.plugin.hybris.system.localextensions
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.idea.plugin.hybris.system.localextensions.model.Hybrisconfig
import com.intellij.openapi.module.Module
import com.intellij.openapi.module.ModuleUtil
@@ -36,6 +36,6 @@ class LeSDomFileDescription : DomFileDescription(Hybrisconfig::cla
&& file.virtualFile != null
&& file.name == HybrisConstants.LOCAL_EXTENSIONS_XML
&& (module != null || ModuleUtil.projectContainsFile(file.project, file.virtualFile, true))
- && HybrisProjectSettingsComponent.getInstance(file.project).isHybrisProject()
+ && ProjectSettingsComponent.getInstance(file.project).isHybrisProject()
}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/system/manifest/codeInsight/completion/provider/TemplateExtensionNameCompletionProvider.kt b/src/com/intellij/idea/plugin/hybris/system/manifest/codeInsight/completion/provider/TemplateExtensionNameCompletionProvider.kt
index 2893e1abe..a2c4cb3aa 100644
--- a/src/com/intellij/idea/plugin/hybris/system/manifest/codeInsight/completion/provider/TemplateExtensionNameCompletionProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/manifest/codeInsight/completion/provider/TemplateExtensionNameCompletionProvider.kt
@@ -21,7 +21,7 @@ package com.intellij.idea.plugin.hybris.system.manifest.codeInsight.completion.p
import com.intellij.codeInsight.completion.CompletionParameters
import com.intellij.codeInsight.completion.CompletionProvider
import com.intellij.idea.plugin.hybris.codeInsight.completion.provider.ExtensionNameCompletionProvider
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.components.Service
import com.intellij.openapi.project.Project
@@ -29,7 +29,7 @@ import com.intellij.openapi.project.Project
@Service
class TemplateExtensionNameCompletionProvider : ExtensionNameCompletionProvider() {
- override fun getExtensionDescriptors(parameters: CompletionParameters, project: Project) = HybrisProjectSettingsComponent.getInstance(project)
+ override fun getExtensionDescriptors(parameters: CompletionParameters, project: Project) = ProjectSettingsComponent.getInstance(project)
.getAvailableExtensions()
.values
.filter { it.extGenTemplateExtension }
diff --git a/src/com/intellij/idea/plugin/hybris/system/manifest/jsonSchema/providers/ManifestCommerceJsonSchemaFileProvider.kt b/src/com/intellij/idea/plugin/hybris/system/manifest/jsonSchema/providers/ManifestCommerceJsonSchemaFileProvider.kt
index 63470153c..ceee7029d 100644
--- a/src/com/intellij/idea/plugin/hybris/system/manifest/jsonSchema/providers/ManifestCommerceJsonSchemaFileProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/manifest/jsonSchema/providers/ManifestCommerceJsonSchemaFileProvider.kt
@@ -19,7 +19,7 @@
package com.intellij.idea.plugin.hybris.system.manifest.jsonSchema.providers
import com.intellij.idea.plugin.hybris.common.HybrisConstants
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.components.Service
import com.intellij.openapi.project.Project
import com.intellij.openapi.vfs.VirtualFile
@@ -32,7 +32,7 @@ class ManifestCommerceJsonSchemaFileProvider(val project: Project) : JsonSchemaF
override fun isAvailable(file: VirtualFile) = HybrisConstants.CCV2_MANIFEST_NAME == file.name
&& HybrisConstants.CCV2_CORE_CUSTOMIZE_NAME == file.parent?.name
- && HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()
+ && ProjectSettingsComponent.getInstance(project).isHybrisProject()
override fun getName() = "SAP Commerce Manifest"
override fun getSchemaFile() = JsonSchemaProviderFactory.getResourceFile(javaClass, "/schemas/manifest-commerce.schema.json")
diff --git a/src/com/intellij/idea/plugin/hybris/system/manifest/jsonSchema/providers/ManifestDataHubJsonSchemaFileProvider.kt b/src/com/intellij/idea/plugin/hybris/system/manifest/jsonSchema/providers/ManifestDataHubJsonSchemaFileProvider.kt
index f23c21a0c..08e1cf38d 100644
--- a/src/com/intellij/idea/plugin/hybris/system/manifest/jsonSchema/providers/ManifestDataHubJsonSchemaFileProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/manifest/jsonSchema/providers/ManifestDataHubJsonSchemaFileProvider.kt
@@ -19,7 +19,7 @@
package com.intellij.idea.plugin.hybris.system.manifest.jsonSchema.providers
import com.intellij.idea.plugin.hybris.common.HybrisConstants
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.components.Service
import com.intellij.openapi.project.Project
import com.intellij.openapi.vfs.VirtualFile
@@ -31,7 +31,7 @@ import com.jetbrains.jsonSchema.extension.SchemaType
class ManifestDataHubJsonSchemaFileProvider(val project: Project) : JsonSchemaFileProvider {
override fun isAvailable(file: VirtualFile) = HybrisConstants.CCV2_MANIFEST_NAME == file.name
&& HybrisConstants.CCV2_DATAHUB_NAME == file.parent?.name
- && HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()
+ && ProjectSettingsComponent.getInstance(project).isHybrisProject()
override fun getName() = "SAP DataHub Manifest"
override fun getSchemaFile() = JsonSchemaProviderFactory.getResourceFile(javaClass, "/schemas/manifest-datahub.schema.json")
diff --git a/src/com/intellij/idea/plugin/hybris/system/manifest/jsonSchema/providers/ManifestJavascriptStorefrontJsonSchemaFileProvider.kt b/src/com/intellij/idea/plugin/hybris/system/manifest/jsonSchema/providers/ManifestJavascriptStorefrontJsonSchemaFileProvider.kt
index 8681b786a..258eb0b9a 100644
--- a/src/com/intellij/idea/plugin/hybris/system/manifest/jsonSchema/providers/ManifestJavascriptStorefrontJsonSchemaFileProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/manifest/jsonSchema/providers/ManifestJavascriptStorefrontJsonSchemaFileProvider.kt
@@ -19,7 +19,7 @@
package com.intellij.idea.plugin.hybris.system.manifest.jsonSchema.providers
import com.intellij.idea.plugin.hybris.common.HybrisConstants
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.components.Service
import com.intellij.openapi.project.Project
import com.intellij.openapi.vfs.VirtualFile
@@ -31,7 +31,7 @@ import com.jetbrains.jsonSchema.extension.SchemaType
class ManifestJavascriptStorefrontJsonSchemaFileProvider(val project: Project) : JsonSchemaFileProvider {
override fun isAvailable(file: VirtualFile) = HybrisConstants.CCV2_MANIFEST_NAME == file.name
&& HybrisConstants.CCV2_JS_STOREFRONT_NAME == file.parent?.name
- && HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()
+ && ProjectSettingsComponent.getInstance(project).isHybrisProject()
override fun getName() = "SAP Javascript Storefront Manifest"
override fun getSchemaFile() = JsonSchemaProviderFactory.getResourceFile(javaClass, "/schemas/manifest-js-storefront.schema.json")
diff --git a/src/com/intellij/idea/plugin/hybris/system/type/codeInsight/completion/TSCompletionService.kt b/src/com/intellij/idea/plugin/hybris/system/type/codeInsight/completion/TSCompletionService.kt
index 4dca1e5a9..24d451fd2 100644
--- a/src/com/intellij/idea/plugin/hybris/system/type/codeInsight/completion/TSCompletionService.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/type/codeInsight/completion/TSCompletionService.kt
@@ -27,7 +27,7 @@ import com.intellij.idea.plugin.hybris.common.HybrisConstants.ATTRIBUTE_TARGET
import com.intellij.idea.plugin.hybris.common.HybrisConstants.ATTRIBUTE_VALUE
import com.intellij.idea.plugin.hybris.impex.psi.ImpexParameter
import com.intellij.idea.plugin.hybris.properties.PropertyService
-import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.DeveloperSettingsComponent
import com.intellij.idea.plugin.hybris.system.type.codeInsight.lookup.TSLookupElementFactory
import com.intellij.idea.plugin.hybris.system.type.meta.TSMetaModelAccess
import com.intellij.idea.plugin.hybris.system.type.meta.model.*
@@ -84,7 +84,7 @@ class TSCompletionService(private val project: Project) {
}
fun getImpexInlineTypeCompletions(project: Project, element: ImpexParameter): List {
- val completion = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).state.impexSettings.completion
+ val completion = DeveloperSettingsComponent.getInstance(project).state.impexSettings.completion
if (!completion.showInlineTypes) return emptyList()
val referenceItemTypeName = element.referenceItemTypeName ?: return emptyList()
diff --git a/src/com/intellij/idea/plugin/hybris/system/type/codeInsight/hints/ItemsXmlInlayHintsProvider.kt b/src/com/intellij/idea/plugin/hybris/system/type/codeInsight/hints/ItemsXmlInlayHintsProvider.kt
index 6c8fdd0e5..3843004f6 100644
--- a/src/com/intellij/idea/plugin/hybris/system/type/codeInsight/hints/ItemsXmlInlayHintsProvider.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/type/codeInsight/hints/ItemsXmlInlayHintsProvider.kt
@@ -18,7 +18,7 @@
package com.intellij.idea.plugin.hybris.system.type.codeInsight.hints
import com.intellij.codeInsight.hints.*
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.editor.Editor
import com.intellij.psi.PsiFile
import javax.swing.JPanel
@@ -41,6 +41,6 @@ class ItemsXmlInlayHintsProvider : InlayHintsProvider {
override fun getCollectorFor(
file: PsiFile, editor: Editor, settings: NoSettings, sink: InlayHintsSink
- ) = if (file.name.endsWith(name) && HybrisProjectSettingsComponent.getInstance(file.project).isHybrisProject()) ItemsXmlInlayHintsCollector(editor)
+ ) = if (file.name.endsWith(name) && ProjectSettingsComponent.getInstance(file.project).isHybrisProject()) ItemsXmlInlayHintsCollector(editor)
else null
}
diff --git a/src/com/intellij/idea/plugin/hybris/system/type/file/TSDomFileDescription.kt b/src/com/intellij/idea/plugin/hybris/system/type/file/TSDomFileDescription.kt
index 3a09aedc7..aa684f7fd 100644
--- a/src/com/intellij/idea/plugin/hybris/system/type/file/TSDomFileDescription.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/type/file/TSDomFileDescription.kt
@@ -19,7 +19,7 @@ package com.intellij.idea.plugin.hybris.system.type.file
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.idea.plugin.hybris.system.type.model.Items
import com.intellij.openapi.module.Module
import com.intellij.openapi.module.ModuleUtil
@@ -34,7 +34,7 @@ class TSDomFileDescription : DomFileDescription(Items::class.java, Hybris
file: XmlFile, module: Module?
) = super.isMyFile(file, module)
&& (module != null || ModuleUtil.projectContainsFile(file.project, file.virtualFile, true))
- && HybrisProjectSettingsComponent.getInstance(file.project).isHybrisProject()
+ && ProjectSettingsComponent.getInstance(file.project).isHybrisProject()
&& file.name.endsWith(HybrisConstants.HYBRIS_ITEMS_XML_FILE_ENDING)
&& file.rootTag
?.attributes
diff --git a/src/com/intellij/idea/plugin/hybris/system/type/lang/folding/ItemsXmlFoldingBuilder.kt b/src/com/intellij/idea/plugin/hybris/system/type/lang/folding/ItemsXmlFoldingBuilder.kt
index f50d3843b..f4bafe74a 100644
--- a/src/com/intellij/idea/plugin/hybris/system/type/lang/folding/ItemsXmlFoldingBuilder.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/type/lang/folding/ItemsXmlFoldingBuilder.kt
@@ -19,9 +19,9 @@ package com.intellij.idea.plugin.hybris.system.type.lang.folding
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.lang.folding.AbstractXmlFoldingBuilderEx
-import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.TypeSystemFoldingSettings
+import com.intellij.idea.plugin.hybris.settings.components.DeveloperSettingsComponent
import com.intellij.idea.plugin.hybris.system.type.model.*
-import com.intellij.idea.plugin.hybris.system.type.settings.TypeSystemFoldingSettings
import com.intellij.lang.ASTNode
import com.intellij.openapi.project.DumbAware
import com.intellij.openapi.project.Project
@@ -64,7 +64,7 @@ class ItemsXmlFoldingBuilder : AbstractXmlFoldingBuilderEx and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- */
-
-package com.intellij.idea.plugin.hybris.system.type.settings
-
-import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
-import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettingsComponent
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
-import com.intellij.openapi.options.BoundSearchableConfigurable
-import com.intellij.openapi.options.ConfigurableProvider
-import com.intellij.openapi.project.Project
-import com.intellij.ui.dsl.builder.bindSelected
-import com.intellij.ui.dsl.builder.panel
-import com.intellij.ui.layout.selected
-import javax.swing.JCheckBox
-
-class TypeSystemConfigurableProvider(val project: Project) : ConfigurableProvider() {
-
- override fun canCreateConfigurable() = HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()
- override fun createConfigurable() = SettingsConfigurable(project)
-
- class SettingsConfigurable(project: Project) : BoundSearchableConfigurable(
- message("hybris.settings.project.ts.title"), "[y] SAP Commerce plugin Type System configuration."
- ) {
-
- private val settings = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).state.typeSystemSettings
-
- private lateinit var foldingEnableCheckBox: JCheckBox
-
- override fun createPanel() = panel {
- group("Code Folding") {
- row {
- foldingEnableCheckBox = checkBox("Enable code folding")
- .bindSelected(settings.folding::enabled)
- .component
- }
- group("Table-Like Folding", true) {
- row {
- checkBox("Atomics")
- .bindSelected(settings.folding::tablifyAtomics)
- .enabledIf(foldingEnableCheckBox.selected)
- checkBox("Collections")
- .bindSelected(settings.folding::tablifyCollections)
- .enabledIf(foldingEnableCheckBox.selected)
- checkBox("Maps")
- .bindSelected(settings.folding::tablifyMaps)
- .enabledIf(foldingEnableCheckBox.selected)
- checkBox("Relations")
- .bindSelected(settings.folding::tablifyRelations)
- .enabledIf(foldingEnableCheckBox.selected)
- }
- row {
- checkBox("Item attributes")
- .bindSelected(settings.folding::tablifyItemAttributes)
- .enabledIf(foldingEnableCheckBox.selected)
- checkBox("Item indexes")
- .bindSelected(settings.folding::tablifyItemIndexes)
- .enabledIf(foldingEnableCheckBox.selected)
- checkBox("Item custom properties")
- .bindSelected(settings.folding::tablifyItemCustomProperties)
- .enabledIf(foldingEnableCheckBox.selected)
- }
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/system/type/settings/TypeSystemSettings.kt b/src/com/intellij/idea/plugin/hybris/system/type/settings/TypeSystemSettings.kt
deleted file mode 100644
index 202219ace..000000000
--- a/src/com/intellij/idea/plugin/hybris/system/type/settings/TypeSystemSettings.kt
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA.
- * Copyright (C) 2019-2023 EPAM Systems and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- */
-
-package com.intellij.idea.plugin.hybris.system.type.settings
-
-import com.intellij.idea.plugin.hybris.settings.FoldingSettings
-
-data class TypeSystemSettings(
- var folding: TypeSystemFoldingSettings = TypeSystemFoldingSettings(),
-)
-
-data class TypeSystemFoldingSettings(
- override var enabled: Boolean = true,
- var tablifyAtomics: Boolean = true,
- var tablifyCollections: Boolean = true,
- var tablifyMaps: Boolean = true,
- var tablifyRelations: Boolean = true,
- var tablifyItemAttributes: Boolean = true,
- var tablifyItemIndexes: Boolean = true,
- var tablifyItemCustomProperties: Boolean = true,
-): FoldingSettings
diff --git a/src/com/intellij/idea/plugin/hybris/system/type/validation/impl/ItemsFileValidation.kt b/src/com/intellij/idea/plugin/hybris/system/type/validation/impl/ItemsFileValidation.kt
index 8ed3bae90..df1d0aa1d 100644
--- a/src/com/intellij/idea/plugin/hybris/system/type/validation/impl/ItemsFileValidation.kt
+++ b/src/com/intellij/idea/plugin/hybris/system/type/validation/impl/ItemsFileValidation.kt
@@ -20,7 +20,7 @@ package com.intellij.idea.plugin.hybris.system.type.validation.impl
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
import com.intellij.idea.plugin.hybris.notifications.Notifications
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
import com.intellij.idea.plugin.hybris.system.type.model.ItemType
import com.intellij.idea.plugin.hybris.system.type.model.Items
import com.intellij.idea.plugin.hybris.system.type.validation.ItemsXmlFileValidation
@@ -44,7 +44,7 @@ import org.apache.commons.collections4.map.CaseInsensitiveMap
class ItemsFileValidation(private val project: Project) : ItemsXmlFileValidation {
override fun isFileOutOfDate(file: VirtualFile): Boolean {
- if (!HybrisApplicationSettingsComponent.getInstance().state.warnIfGeneratedItemsAreOutOfDate) return false
+ if (!ApplicationSettingsComponent.getInstance().state.warnIfGeneratedItemsAreOutOfDate) return false
if (!file.name.endsWith(HybrisConstants.HYBRIS_ITEMS_XML_FILE_ENDING)) return false
if (!ModuleUtil.projectContainsFile(project, file, false)) return false
if (DumbService.isDumb(project)) return false
diff --git a/src/com/intellij/idea/plugin/hybris/tools/ccm/SAPCCM.kt b/src/com/intellij/idea/plugin/hybris/tools/ccm/SAPCCM.kt
index d6bb1c6e5..8b2e709ce 100644
--- a/src/com/intellij/idea/plugin/hybris/tools/ccm/SAPCCM.kt
+++ b/src/com/intellij/idea/plugin/hybris/tools/ccm/SAPCCM.kt
@@ -26,8 +26,8 @@ import com.intellij.execution.process.ProcessEvent
import com.intellij.ide.BrowserUtil
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.notifications.Notifications
-import com.intellij.idea.plugin.hybris.settings.CCv2SettingsConfigurableProvider
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.options.ApplicationCCv2SettingsConfigurableProvider
import com.intellij.notification.NotificationType
import com.intellij.openapi.options.ShowSettingsUtil
import com.intellij.openapi.project.Project
@@ -39,7 +39,7 @@ object SAPCCM {
fun execute(
project: Project,
- appSettings: HybrisApplicationSettingsComponent,
+ appSettings: ApplicationSettingsComponent,
vararg parameters: String
): List? {
val cliDirectory = appSettings.state.sapCLIDirectory
@@ -84,7 +84,7 @@ object SAPCCM {
"Exceeded current timeout of $timeout seconds, it can be adjusted within CCv2 settings."
)
.addAction("Open Settings") { _, _ ->
- ShowSettingsUtil.getInstance().showSettingsDialog(project, CCv2SettingsConfigurableProvider.SettingsConfigurable::class.java)
+ ShowSettingsUtil.getInstance().showSettingsDialog(project, ApplicationCCv2SettingsConfigurableProvider.SettingsConfigurable::class.java)
}
.hideAfter(10)
.notify(project)
@@ -103,7 +103,7 @@ object SAPCCM {
if (content.contains("UNAUTHORIZED")) {
notification
.addAction("Open Settings") { _, _ ->
- ShowSettingsUtil.getInstance().showSettingsDialog(project, CCv2SettingsConfigurableProvider.SettingsConfigurable::class.java)
+ ShowSettingsUtil.getInstance().showSettingsDialog(project, ApplicationCCv2SettingsConfigurableProvider.SettingsConfigurable::class.java)
}
.addAction("Generating API Tokens...") { _, _ -> BrowserUtil.browse(HybrisConstants.URL_HELP_GENERATING_API_TOKENS) }
}
diff --git a/src/com/intellij/idea/plugin/hybris/tools/ccm/SAPCCMCommands.kt b/src/com/intellij/idea/plugin/hybris/tools/ccm/SAPCCMCommands.kt
index 7ee182e5a..6342b264a 100644
--- a/src/com/intellij/idea/plugin/hybris/tools/ccm/SAPCCMCommands.kt
+++ b/src/com/intellij/idea/plugin/hybris/tools/ccm/SAPCCMCommands.kt
@@ -19,11 +19,8 @@
package com.intellij.idea.plugin.hybris.tools.ccm
import com.intellij.idea.plugin.hybris.settings.CCv2Subscription
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent
-import com.intellij.idea.plugin.hybris.tools.ccv2.dto.CCv2Build
-import com.intellij.idea.plugin.hybris.tools.ccv2.dto.CCv2DTO
-import com.intellij.idea.plugin.hybris.tools.ccv2.dto.CCv2Environment
-import com.intellij.idea.plugin.hybris.tools.ccv2.dto.CCv2EnvironmentType
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
+import com.intellij.idea.plugin.hybris.tools.ccv2.dto.*
import com.intellij.openapi.progress.ProgressManager
import com.intellij.openapi.project.Project
@@ -34,10 +31,10 @@ open class SAPCCMCommand(
) {
// TODO: use Kotlin coroutines for parallel processing
fun list(
- project: Project,
- appSettings: HybrisApplicationSettingsComponent,
- subscriptions: Collection,
- transform: (String, Map) -> T,
+ project: Project,
+ appSettings: ApplicationSettingsComponent,
+ subscriptions: Collection,
+ transform: (String, Map) -> T,
) = subscriptions
.associateWith { subscription ->
val parameters = arrayOf(command, "list", "--subscription-code=${subscription.id}")
@@ -73,15 +70,15 @@ object SAPCCMEnvironmentCommands {
fun list(
project: Project,
- appSettings: HybrisApplicationSettingsComponent,
+ appSettings: ApplicationSettingsComponent,
subscriptions: Collection
- ) = listCommand.list(project, appSettings, subscriptions) { it, columns ->
+ ) = listCommand.list(project, appSettings, subscriptions) { row, columns ->
CCv2Environment(
- code = it.substring(0..
- ) = listCommand.list(project, appSettings, subscriptions) { it, columns ->
+ ) = listCommand.list(project, appSettings, subscriptions) { row, columns ->
+ val buildVersion = row.substring(columns["BUILD VERSION"]!!).trim()
CCv2Build(
- code = it.substring(0..
- ShowSettingsUtil.getInstance().showSettingsDialog(project, CCv2SettingsConfigurableProvider.SettingsConfigurable::class.java)
+ ShowSettingsUtil.getInstance().showSettingsDialog(project, ApplicationCCv2SettingsConfigurableProvider.SettingsConfigurable::class.java)
}
.addAction("Generating API Tokens...") { _, _ -> BrowserUtil.browse(HybrisConstants.URL_HELP_GENERATING_API_TOKENS) }
.hideAfter(10)
diff --git a/src/com/intellij/idea/plugin/hybris/tools/ccv2/dto/CCv2Build.kt b/src/com/intellij/idea/plugin/hybris/tools/ccv2/dto/CCv2Build.kt
index e4875eb21..fe31084ce 100644
--- a/src/com/intellij/idea/plugin/hybris/tools/ccv2/dto/CCv2Build.kt
+++ b/src/com/intellij/idea/plugin/hybris/tools/ccv2/dto/CCv2Build.kt
@@ -22,11 +22,27 @@ data class CCv2Build(
val code: String,
val name: String,
val branch: String,
- val status: String,
+ val status: CCv2BuildStatus,
val appCode: String,
val appDefVersion: String,
val createdBy: String,
val startTime: String,
val endTime: String,
val buildVersion: String,
-) : CCv2DTO
\ No newline at end of file
+ val version: String,
+) : CCv2DTO
+
+enum class CCv2BuildStatus(val title: String) {
+ UNKNOWN("Unknown"),
+ SCHEDULED("Scheduled"),
+ BUILDING("Building"),
+ SUCCESS("Success"),
+ FAIL("Fail"),
+ DELETED("Deleted");
+
+ companion object {
+ fun tryValueOf(name: String) = CCv2BuildStatus.entries
+ .find { it.name == name }
+ ?: UNKNOWN
+ }
+}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/tools/ccv2/dto/CCv2Environment.kt b/src/com/intellij/idea/plugin/hybris/tools/ccv2/dto/CCv2Environment.kt
index c6f36f5f0..58aa94df5 100644
--- a/src/com/intellij/idea/plugin/hybris/tools/ccv2/dto/CCv2Environment.kt
+++ b/src/com/intellij/idea/plugin/hybris/tools/ccv2/dto/CCv2Environment.kt
@@ -24,4 +24,17 @@ data class CCv2Environment(
val type: CCv2EnvironmentType,
val status: String,
val deploymentStatus: String,
-) : CCv2DTO
\ No newline at end of file
+) : CCv2DTO
+
+enum class CCv2EnvironmentType(val title: String) {
+ DEV("Development"),
+ STG("Staging"),
+ PROD("Production"),
+ UNKNOWN("Unknown");
+
+ companion object {
+ fun tryValueOf(name: String) = entries
+ .find { it.name == name }
+ ?: UNKNOWN
+ }
+}
diff --git a/src/com/intellij/idea/plugin/hybris/tools/ccv2/dto/CCv2EnvironmentType.kt b/src/com/intellij/idea/plugin/hybris/tools/ccv2/dto/CCv2EnvironmentType.kt
deleted file mode 100644
index 31c19844c..000000000
--- a/src/com/intellij/idea/plugin/hybris/tools/ccv2/dto/CCv2EnvironmentType.kt
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
- * Copyright (C) 2019-2024 EPAM Systems and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- */
-
-package com.intellij.idea.plugin.hybris.tools.ccv2.dto
-
-enum class CCv2EnvironmentType(val title: String) {
- DEV("Development"),
- STG("Staging"),
- PROD("Production"),
- UNKNOWN("Unknown");
-
- companion object {
- fun tryValueOf(name: String) = entries
- .find { it.name == name }
- ?: UNKNOWN
- }
-}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/tools/ccv2/strategies/SAPCCMCCv2Strategy.kt b/src/com/intellij/idea/plugin/hybris/tools/ccv2/strategies/SAPCCMCCv2Strategy.kt
index 1321df259..9c84b0d1a 100644
--- a/src/com/intellij/idea/plugin/hybris/tools/ccv2/strategies/SAPCCMCCv2Strategy.kt
+++ b/src/com/intellij/idea/plugin/hybris/tools/ccv2/strategies/SAPCCMCCv2Strategy.kt
@@ -19,7 +19,7 @@
package com.intellij.idea.plugin.hybris.tools.ccv2.strategies
import com.intellij.idea.plugin.hybris.settings.CCv2Subscription
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
import com.intellij.idea.plugin.hybris.tools.ccm.SAPCCM
import com.intellij.idea.plugin.hybris.tools.ccm.SAPCCMBuildCommands
import com.intellij.idea.plugin.hybris.tools.ccm.SAPCCMEnvironmentCommands
@@ -37,14 +37,14 @@ import kotlin.io.path.isExecutable
class SAPCCMCCv2Strategy : CCv2Strategy {
override fun fetchEnvironments(project: Project, ccv2Token: String, subscriptions: Collection): Map> {
- val appSettings = HybrisApplicationSettingsComponent.getInstance()
+ val appSettings = ApplicationSettingsComponent.getInstance()
authCredentials(project, appSettings, ccv2Token) ?: return emptyMap()
return SAPCCMEnvironmentCommands.list(project, appSettings, subscriptions)
}
override fun fetchBuilds(project: Project, ccv2Token: String, subscriptions: Collection): Map> {
- val appSettings = HybrisApplicationSettingsComponent.getInstance()
+ val appSettings = ApplicationSettingsComponent.getInstance()
authCredentials(project, appSettings, ccv2Token) ?: return emptyMap()
return SAPCCMBuildCommands.list(project, appSettings, subscriptions)
@@ -64,7 +64,7 @@ class SAPCCMCCv2Strategy : CCv2Strategy {
private fun authCredentials(
project: Project,
- appSettings: HybrisApplicationSettingsComponent,
+ appSettings: ApplicationSettingsComponent,
ccv2Token: String
): List? {
ProgressManager.getInstance().progressIndicator.text2 = "Authenticating with the provided token..."
diff --git a/src/com/intellij/idea/plugin/hybris/tools/remote/RemoteConnectionUtil.kt b/src/com/intellij/idea/plugin/hybris/tools/remote/RemoteConnectionUtil.kt
index b3ba66a12..f56017346 100644
--- a/src/com/intellij/idea/plugin/hybris/tools/remote/RemoteConnectionUtil.kt
+++ b/src/com/intellij/idea/plugin/hybris/tools/remote/RemoteConnectionUtil.kt
@@ -22,9 +22,9 @@ import ai.grazie.utils.toLinkedSet
import com.intellij.credentialStore.Credentials
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.properties.PropertyService
-import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettingsComponent
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
-import com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings
+import com.intellij.idea.plugin.hybris.settings.RemoteConnectionSettings
+import com.intellij.idea.plugin.hybris.settings.components.DeveloperSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.project.Project
import java.util.*
@@ -56,7 +56,7 @@ object RemoteConnectionUtil {
?: ""
}
- fun getActiveRemoteConnectionSettings(project: Project, type: RemoteConnectionType): HybrisRemoteConnectionSettings {
+ fun getActiveRemoteConnectionSettings(project: Project, type: RemoteConnectionType): RemoteConnectionSettings {
val instances = getRemoteConnections(project, type)
if (instances.isEmpty()) return createDefaultRemoteConnectionSettings(project, type)
@@ -67,7 +67,7 @@ object RemoteConnectionUtil {
?: instances.first()
}
- fun getActiveRemoteConnectionId(project: Project, type: RemoteConnectionType) = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).state
+ fun getActiveRemoteConnectionId(project: Project, type: RemoteConnectionType) = DeveloperSettingsComponent.getInstance(project).state
.let {
when (type) {
RemoteConnectionType.Hybris -> it.activeRemoteConnectionID
@@ -75,7 +75,7 @@ object RemoteConnectionUtil {
}
}
- fun createDefaultRemoteConnectionSettings(project: Project, type: RemoteConnectionType) = HybrisRemoteConnectionSettings()
+ fun createDefaultRemoteConnectionSettings(project: Project, type: RemoteConnectionType) = RemoteConnectionSettings()
.also {
it.type = type
when (type) {
@@ -99,7 +99,7 @@ object RemoteConnectionUtil {
}
}
- fun getRemoteConnections(project: Project, type: RemoteConnectionType): Collection {
+ fun getRemoteConnections(project: Project, type: RemoteConnectionType): Collection {
val projectLevelSettings = getProjectLevelSettings(project, type)
val projectPersonalLevelSettings = getProjectPersonalLevelSettings(project, type)
@@ -107,29 +107,29 @@ object RemoteConnectionUtil {
.toLinkedSet()
}
- fun addRemoteConnection(project: Project, settings: HybrisRemoteConnectionSettings) {
+ fun addRemoteConnection(project: Project, settings: RemoteConnectionSettings) {
if (settings.uuid == null) {
settings.uuid = UUID.randomUUID().toString()
}
when (settings.scope) {
RemoteConnectionScope.PROJECT_PERSONAL -> {
- val state = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).state
+ val state = DeveloperSettingsComponent.getInstance(project).state
state.remoteConnectionSettingsList.add(settings)
}
RemoteConnectionScope.PROJECT -> {
- val state = HybrisProjectSettingsComponent.getInstance(project).state
+ val state = ProjectSettingsComponent.getInstance(project).state
state.remoteConnectionSettingsList.add(settings)
}
}
}
- fun saveRemoteConnections(project: Project, type: RemoteConnectionType, settings: Collection) {
- HybrisProjectSettingsComponent.getInstance(project).state
+ fun saveRemoteConnections(project: Project, type: RemoteConnectionType, settings: Collection) {
+ ProjectSettingsComponent.getInstance(project).state
.remoteConnectionSettingsList
.removeIf { it.type == type }
- HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).state
+ DeveloperSettingsComponent.getInstance(project).state
.remoteConnectionSettingsList
.removeIf { it.type == type }
@@ -137,8 +137,8 @@ object RemoteConnectionUtil {
else settings.forEach { addRemoteConnection(project, it) }
}
- fun setActiveRemoteConnectionSettings(project: Project, settings: HybrisRemoteConnectionSettings) {
- val developerSettings = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).state
+ fun setActiveRemoteConnectionSettings(project: Project, settings: RemoteConnectionSettings) {
+ val developerSettings = DeveloperSettingsComponent.getInstance(project).state
when (settings.type) {
RemoteConnectionType.Hybris -> {
@@ -151,10 +151,10 @@ object RemoteConnectionUtil {
}
}
- fun changeRemoteConnectionScope(project: Project, settings: HybrisRemoteConnectionSettings, originalScope: RemoteConnectionScope) {
+ fun changeRemoteConnectionScope(project: Project, settings: RemoteConnectionSettings, originalScope: RemoteConnectionScope) {
val remoteConnectionSettings = when (originalScope) {
- RemoteConnectionScope.PROJECT_PERSONAL -> HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).state.remoteConnectionSettingsList
- RemoteConnectionScope.PROJECT -> HybrisProjectSettingsComponent.getInstance(project).state.remoteConnectionSettingsList
+ RemoteConnectionScope.PROJECT_PERSONAL -> DeveloperSettingsComponent.getInstance(project).state.remoteConnectionSettingsList
+ RemoteConnectionScope.PROJECT -> ProjectSettingsComponent.getInstance(project).state.remoteConnectionSettingsList
}
remoteConnectionSettings.remove(settings)
addRemoteConnection(project, settings)
@@ -166,7 +166,7 @@ object RemoteConnectionUtil {
) = getRemoteConnectionSettings(
type,
RemoteConnectionScope.PROJECT_PERSONAL,
- HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).state.remoteConnectionSettingsList
+ DeveloperSettingsComponent.getInstance(project).state.remoteConnectionSettingsList
)
private fun getProjectLevelSettings(
@@ -175,13 +175,13 @@ object RemoteConnectionUtil {
) = getRemoteConnectionSettings(
type,
RemoteConnectionScope.PROJECT,
- HybrisProjectSettingsComponent.getInstance(project).state.remoteConnectionSettingsList
+ ProjectSettingsComponent.getInstance(project).state.remoteConnectionSettingsList
)
private fun getRemoteConnectionSettings(
type: RemoteConnectionType,
scope: RemoteConnectionScope,
- settings: MutableList
+ settings: MutableList
) = settings
.filter { it.type == type }
.filter { it.uuid?.isNotBlank() ?: false }
diff --git a/src/com/intellij/idea/plugin/hybris/tools/remote/console/actions/HybrisChooseInstanceAction.kt b/src/com/intellij/idea/plugin/hybris/tools/remote/console/actions/HybrisChooseInstanceAction.kt
index fbc842233..1f12628ac 100644
--- a/src/com/intellij/idea/plugin/hybris/tools/remote/console/actions/HybrisChooseInstanceAction.kt
+++ b/src/com/intellij/idea/plugin/hybris/tools/remote/console/actions/HybrisChooseInstanceAction.kt
@@ -2,7 +2,7 @@ package com.intellij.idea.plugin.hybris.tools.remote.console.actions
import com.intellij.idea.plugin.hybris.common.utils.HybrisI18NBundleUtils.message
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons.Y_REMOTE
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectRemoteInstancesSettingsConfigurableProvider.SettingsConfigurable
+import com.intellij.idea.plugin.hybris.settings.options.ProjectRemoteInstancesSettingsConfigurableProvider.SettingsConfigurable
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
diff --git a/src/com/intellij/idea/plugin/hybris/tools/remote/console/impl/HybrisImpexMonitorConsole.kt b/src/com/intellij/idea/plugin/hybris/tools/remote/console/impl/HybrisImpexMonitorConsole.kt
index b495877cf..ebe5d8ed9 100644
--- a/src/com/intellij/idea/plugin/hybris/tools/remote/console/impl/HybrisImpexMonitorConsole.kt
+++ b/src/com/intellij/idea/plugin/hybris/tools/remote/console/impl/HybrisImpexMonitorConsole.kt
@@ -23,7 +23,7 @@ import com.intellij.execution.console.ConsoleRootType
import com.intellij.idea.plugin.hybris.common.HybrisConstants
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
import com.intellij.idea.plugin.hybris.impex.ImpexLanguage
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.idea.plugin.hybris.tools.remote.console.HybrisConsole
import com.intellij.idea.plugin.hybris.tools.remote.console.TimeOption
import com.intellij.idea.plugin.hybris.tools.remote.http.monitorImpexFiles
@@ -82,7 +82,7 @@ class HybrisImpexMonitorConsole(project: Project) : HybrisConsole(project, Hybri
}
private fun obtainDataFolder(project: Project): String {
- val settings = HybrisProjectSettingsComponent.getInstance(project).state
+ val settings = ProjectSettingsComponent.getInstance(project).state
return FileUtil.toCanonicalPath("${project.basePath}${File.separatorChar}${settings.hybrisDirectory}${File.separatorChar}${HybrisConstants.HYBRIS_DATA_DIRECTORY}")
}
diff --git a/src/com/intellij/idea/plugin/hybris/tools/remote/http/AbstractHybrisHacHttpClient.java b/src/com/intellij/idea/plugin/hybris/tools/remote/http/AbstractHybrisHacHttpClient.java
index 9ac64e8a5..ffca4a51c 100644
--- a/src/com/intellij/idea/plugin/hybris/tools/remote/http/AbstractHybrisHacHttpClient.java
+++ b/src/com/intellij/idea/plugin/hybris/tools/remote/http/AbstractHybrisHacHttpClient.java
@@ -18,7 +18,7 @@
package com.intellij.idea.plugin.hybris.tools.remote.http;
-import com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings;
+import com.intellij.idea.plugin.hybris.settings.RemoteConnectionSettings;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import org.apache.commons.lang3.StringUtils;
@@ -95,9 +95,9 @@ public void checkServerTrusted(@NotNull final X509Certificate[] chain, final Str
}
};
- private final Map> cookiesPerSettings = new WeakHashMap<>();
+ private final Map> cookiesPerSettings = new WeakHashMap<>();
- public String login(@NotNull final Project project, @NotNull final HybrisRemoteConnectionSettings settings) {
+ public String login(@NotNull final Project project, @NotNull final RemoteConnectionSettings settings) {
final var hostHacURL = settings.getGeneratedURL();
retrieveCookies(hostHacURL, project, settings);
final var sessionId = Optional.ofNullable(cookiesPerSettings.get(settings))
@@ -146,7 +146,7 @@ public final HttpResponse post(
@NotNull final List params,
final boolean canReLoginIfNeeded,
final long timeout,
- final HybrisRemoteConnectionSettings settings
+ final RemoteConnectionSettings settings
) {
var cookies = cookiesPerSettings.get(settings);
if (cookies == null || !cookies.containsKey(COOKIE_JSESSIONID)) {
@@ -246,7 +246,7 @@ protected CloseableHttpClient createAllowAllClient(final long timeout) {
protected void retrieveCookies(
final String hacURL,
final @NotNull Project project,
- final @NotNull HybrisRemoteConnectionSettings settings
+ final @NotNull RemoteConnectionSettings settings
) {
final var cookies = cookiesPerSettings.computeIfAbsent(settings, _settings -> new HashMap<>());
cookies.clear();
@@ -260,7 +260,7 @@ protected void retrieveCookies(
protected Response getResponseForUrl(
final String hacURL,
- final @NotNull HybrisRemoteConnectionSettings settings
+ final @NotNull RemoteConnectionSettings settings
) {
try {
final var sslProtocol = settings.getSslProtocol();
@@ -276,7 +276,7 @@ protected Response getResponseForUrl(
protected String getCsrfToken(
final @NotNull String hacURL,
final @NotNull String sessionId,
- final @NotNull HybrisRemoteConnectionSettings settings
+ final @NotNull RemoteConnectionSettings settings
) {
try {
final var sslProtocol = settings.getSslProtocol();
diff --git a/src/com/intellij/idea/plugin/hybris/tools/remote/http/HybrisHacHttpClient.java b/src/com/intellij/idea/plugin/hybris/tools/remote/http/HybrisHacHttpClient.java
index afe0805bc..df7b2e1b7 100644
--- a/src/com/intellij/idea/plugin/hybris/tools/remote/http/HybrisHacHttpClient.java
+++ b/src/com/intellij/idea/plugin/hybris/tools/remote/http/HybrisHacHttpClient.java
@@ -20,7 +20,7 @@
package com.intellij.idea.plugin.hybris.tools.remote.http;
import com.google.gson.Gson;
-import com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings;
+import com.intellij.idea.plugin.hybris.settings.RemoteConnectionSettings;
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionType;
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionUtil;
import com.intellij.idea.plugin.hybris.tools.remote.http.flexibleSearch.TableBuilder;
@@ -103,7 +103,7 @@ private HttpResponse getHttpResponse(
final Project project,
final String urlSuffix,
final Map requestParams,
- final HybrisRemoteConnectionSettings settings
+ final RemoteConnectionSettings settings
) {
final List params = createParamsList(requestParams);
diff --git a/src/com/intellij/idea/plugin/hybris/tools/remote/http/solr/impl/SolrHttpClient.kt b/src/com/intellij/idea/plugin/hybris/tools/remote/http/solr/impl/SolrHttpClient.kt
index 519dfa080..cfbe8d665 100644
--- a/src/com/intellij/idea/plugin/hybris/tools/remote/http/solr/impl/SolrHttpClient.kt
+++ b/src/com/intellij/idea/plugin/hybris/tools/remote/http/solr/impl/SolrHttpClient.kt
@@ -18,7 +18,7 @@
package com.intellij.idea.plugin.hybris.tools.remote.http.solr.impl
-import com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings
+import com.intellij.idea.plugin.hybris.settings.RemoteConnectionSettings
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionType
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionUtil
import com.intellij.idea.plugin.hybris.tools.remote.http.impex.HybrisHttpResult
@@ -44,13 +44,13 @@ class SolrHttpClient {
fun coresData(project: Project): Array = coresData(solrConnectionSettings(project))
- fun listOfCores(solrConnectionSettings: HybrisRemoteConnectionSettings) = coresData(solrConnectionSettings)
+ fun listOfCores(solrConnectionSettings: RemoteConnectionSettings) = coresData(solrConnectionSettings)
.map { it.core }
.toTypedArray()
fun executeSolrQuery(project: Project, queryObject: SolrQueryObject) = executeSolrQuery(solrConnectionSettings(project), queryObject)
- private fun coresData(settings: HybrisRemoteConnectionSettings) = CoreAdminRequest()
+ private fun coresData(settings: RemoteConnectionSettings) = CoreAdminRequest()
.apply {
setAction(CoreAdminParams.CoreAdminAction.STATUS)
setBasicAuthCredentials(settings.username, settings.password)
@@ -78,7 +78,7 @@ class SolrHttpClient {
private fun buildHttpSolrClient(url: String) = HttpSolrClient.Builder(url).build()
private fun executeSolrQuery(
- solrConnectionSettings: HybrisRemoteConnectionSettings,
+ solrConnectionSettings: RemoteConnectionSettings,
queryObject: SolrQueryObject
): HybrisHttpResult = executeSolrRequest(
solrConnectionSettings,
@@ -89,7 +89,7 @@ class SolrHttpClient {
)
)
- private fun executeSolrRequest(solrConnectionSettings: HybrisRemoteConnectionSettings, queryObject: SolrQueryObject, queryRequest: QueryRequest): HybrisHttpResult =
+ private fun executeSolrRequest(solrConnectionSettings: RemoteConnectionSettings, queryObject: SolrQueryObject, queryRequest: QueryRequest): HybrisHttpResult =
buildHttpSolrClient("${solrConnectionSettings.generatedURL}/${queryObject.core}")
.runCatching { request(queryRequest) }
.map { resultBuilder().output(it["response"] as String?).build() }
@@ -97,7 +97,7 @@ class SolrHttpClient {
private fun resultBuilder() = HybrisHttpResult.HybrisHttpResultBuilder.createResult()
- private fun buildQueryRequest(solrQuery: SolrQuery, solrConnectionSettings: HybrisRemoteConnectionSettings) = QueryRequest(solrQuery).apply {
+ private fun buildQueryRequest(solrQuery: SolrQuery, solrConnectionSettings: RemoteConnectionSettings) = QueryRequest(solrQuery).apply {
setBasicAuthCredentials(solrConnectionSettings.username, solrConnectionSettings.password)
method = SolrRequest.METHOD.POST
// https://issues.apache.org/jira/browse/SOLR-5530
diff --git a/src/com/intellij/idea/plugin/hybris/toolwindow/AbstractRemoteConnectionDialog.kt b/src/com/intellij/idea/plugin/hybris/toolwindow/AbstractRemoteConnectionDialog.kt
index b36836b73..d0acbe0c6 100644
--- a/src/com/intellij/idea/plugin/hybris/toolwindow/AbstractRemoteConnectionDialog.kt
+++ b/src/com/intellij/idea/plugin/hybris/toolwindow/AbstractRemoteConnectionDialog.kt
@@ -21,7 +21,7 @@ package com.intellij.idea.plugin.hybris.toolwindow
import com.intellij.credentialStore.CredentialAttributes
import com.intellij.credentialStore.Credentials
import com.intellij.ide.passwordSafe.PasswordSafe
-import com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings
+import com.intellij.idea.plugin.hybris.settings.RemoteConnectionSettings
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionUtil
import com.intellij.openapi.application.ModalityState
import com.intellij.openapi.application.ReadAction
@@ -51,7 +51,7 @@ import javax.swing.JLabel
abstract class AbstractRemoteConnectionDialog(
protected val project: Project,
parentComponent: Component,
- protected val settings: HybrisRemoteConnectionSettings,
+ protected val settings: RemoteConnectionSettings,
dialogTitle: String
) : DialogWrapper(project, parentComponent, false, IdeModalityType.IDE) {
@@ -109,8 +109,8 @@ abstract class AbstractRemoteConnectionDialog(
}
}
- protected abstract fun createTestSettings(): HybrisRemoteConnectionSettings
- protected abstract fun testConnection(testSettings: HybrisRemoteConnectionSettings): String?
+ protected abstract fun createTestSettings(): RemoteConnectionSettings
+ protected abstract fun testConnection(testSettings: RemoteConnectionSettings): String?
protected abstract fun panel(): DialogPanel
init {
diff --git a/src/com/intellij/idea/plugin/hybris/toolwindow/HybrisToolWindowFactory.kt b/src/com/intellij/idea/plugin/hybris/toolwindow/HybrisToolWindowFactory.kt
index 3d2485418..b252ea56e 100644
--- a/src/com/intellij/idea/plugin/hybris/toolwindow/HybrisToolWindowFactory.kt
+++ b/src/com/intellij/idea/plugin/hybris/toolwindow/HybrisToolWindowFactory.kt
@@ -18,7 +18,7 @@
package com.intellij.idea.plugin.hybris.toolwindow
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
-import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.idea.plugin.hybris.tools.remote.console.view.HybrisConsolesView
import com.intellij.idea.plugin.hybris.toolwindow.ccv2.CCv2View
import com.intellij.idea.plugin.hybris.toolwindow.system.bean.view.BSView
@@ -43,8 +43,8 @@ class HybrisToolWindowFactory : ToolWindowFactory, DumbAware {
).forEach { toolWindow.contentManager.addContent(it) }
}
- override suspend fun isApplicableAsync(project: Project) = HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()
- override fun shouldBeAvailable(project: Project) = HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()
+ override suspend fun isApplicableAsync(project: Project) = ProjectSettingsComponent.getInstance(project).isHybrisProject()
+ override fun shouldBeAvailable(project: Project) = ProjectSettingsComponent.getInstance(project).isHybrisProject()
private fun createTSContent(toolWindow: ToolWindow, panel: TSView) = with(toolWindow.contentManager.factory.createContent(panel, TS_ID, true)) {
Disposer.register(toolWindow.disposable, panel)
diff --git a/src/com/intellij/idea/plugin/hybris/toolwindow/RemoteHacConnectionDialog.kt b/src/com/intellij/idea/plugin/hybris/toolwindow/RemoteHacConnectionDialog.kt
index 15c2aff58..2fd9488c5 100644
--- a/src/com/intellij/idea/plugin/hybris/toolwindow/RemoteHacConnectionDialog.kt
+++ b/src/com/intellij/idea/plugin/hybris/toolwindow/RemoteHacConnectionDialog.kt
@@ -20,7 +20,7 @@ package com.intellij.idea.plugin.hybris.toolwindow
import com.intellij.credentialStore.Credentials
import com.intellij.idea.plugin.hybris.common.HybrisConstants
-import com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings
+import com.intellij.idea.plugin.hybris.settings.RemoteConnectionSettings
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionScope
import com.intellij.idea.plugin.hybris.tools.remote.http.HybrisHacHttpClient
import com.intellij.openapi.project.Project
@@ -34,12 +34,12 @@ import java.awt.Component
class RemoteHacConnectionDialog(
project: Project,
parentComponent: Component,
- settings: HybrisRemoteConnectionSettings
+ settings: RemoteConnectionSettings
) : AbstractRemoteConnectionDialog(project, parentComponent, settings, "Remote SAP Commerce Instance") {
private lateinit var sslProtocolComboBox: ComboBox
- override fun createTestSettings() = with(HybrisRemoteConnectionSettings()) {
+ override fun createTestSettings() = with(RemoteConnectionSettings()) {
type = settings.type
hostIP = hostTextField.text
port = portTextField.text
@@ -50,7 +50,7 @@ class RemoteHacConnectionDialog(
this
}
- override fun testConnection(testSettings: HybrisRemoteConnectionSettings): String = HybrisHacHttpClient.getInstance(project)
+ override fun testConnection(testSettings: RemoteConnectionSettings): String = HybrisHacHttpClient.getInstance(project)
.login(project, testSettings)
override fun panel() = panel {
diff --git a/src/com/intellij/idea/plugin/hybris/toolwindow/RemoteSolrConnectionDialog.kt b/src/com/intellij/idea/plugin/hybris/toolwindow/RemoteSolrConnectionDialog.kt
index 977da0ebe..bb95962e8 100644
--- a/src/com/intellij/idea/plugin/hybris/toolwindow/RemoteSolrConnectionDialog.kt
+++ b/src/com/intellij/idea/plugin/hybris/toolwindow/RemoteSolrConnectionDialog.kt
@@ -20,7 +20,7 @@ package com.intellij.idea.plugin.hybris.toolwindow
import com.intellij.credentialStore.Credentials
import com.intellij.idea.plugin.hybris.common.HybrisConstants
-import com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings
+import com.intellij.idea.plugin.hybris.settings.RemoteConnectionSettings
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionScope
import com.intellij.idea.plugin.hybris.tools.remote.http.solr.impl.SolrHttpClient
import com.intellij.openapi.project.Project
@@ -32,7 +32,7 @@ import java.awt.Component
class RemoteSolrConnectionDialog(
project: Project,
parentComponent: Component,
- settings: HybrisRemoteConnectionSettings
+ settings: RemoteConnectionSettings
) : AbstractRemoteConnectionDialog(project, parentComponent, settings, "Remote SOLR Instance") {
override fun panel() = panel {
@@ -137,7 +137,7 @@ class RemoteSolrConnectionDialog(
}
}
- override fun createTestSettings() = with(HybrisRemoteConnectionSettings()) {
+ override fun createTestSettings() = with(RemoteConnectionSettings()) {
type = settings.type
hostIP = hostTextField.text
port = portTextField.text
@@ -147,7 +147,7 @@ class RemoteSolrConnectionDialog(
this
}
- override fun testConnection(testSettings: HybrisRemoteConnectionSettings): String? = try {
+ override fun testConnection(testSettings: RemoteConnectionSettings): String? = try {
SolrHttpClient.getInstance(project).listOfCores(testSettings)
null
diff --git a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/CCv2Actions.kt b/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/CCv2Actions.kt
index 422cd197d..5f8641a19 100644
--- a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/CCv2Actions.kt
+++ b/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/CCv2Actions.kt
@@ -20,8 +20,8 @@ package com.intellij.idea.plugin.hybris.toolwindow.ccv2
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
import com.intellij.idea.plugin.hybris.settings.CCv2Subscription
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent
-import com.intellij.idea.plugin.hybris.settings.HybrisDeveloperSpecificProjectSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.DeveloperSettingsComponent
import com.intellij.idea.plugin.hybris.tools.ccv2.CCv2Service
import com.intellij.idea.plugin.hybris.toolwindow.HybrisToolWindowFactory
import com.intellij.openapi.actionSystem.ActionUpdateThread
@@ -52,9 +52,9 @@ abstract class FetchAction(
val task = object : Task.Backgroundable(project, taskTitle) {
override fun run(indicator: ProgressIndicator) {
fetching = true
- val ccv2Subscriptions = HybrisDeveloperSpecificProjectSettingsComponent.getInstance(project).getActiveCCv2Subscription()
+ val ccv2Subscriptions = DeveloperSettingsComponent.getInstance(project).getActiveCCv2Subscription()
?.let { listOf(it) }
- ?: HybrisApplicationSettingsComponent.getInstance().state.ccv2Subscriptions
+ ?: ApplicationSettingsComponent.getInstance().state.ccv2Subscriptions
.sortedBy { it.toString() }
fetch(project, ccv2Subscriptions)
@@ -66,7 +66,7 @@ abstract class FetchAction(
}
override fun update(e: AnActionEvent) {
- e.presentation.isEnabled = !fetching && HybrisApplicationSettingsComponent.getInstance().state.ccv2Subscriptions.isNotEmpty()
+ e.presentation.isEnabled = !fetching && ApplicationSettingsComponent.getInstance().state.ccv2Subscriptions.isNotEmpty()
e.presentation.isVisible = e.project
?.let { getActiveTab(it) == tab }
?: false
diff --git a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/CCv2Tab.kt b/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/CCv2Tab.kt
index c06d92a51..2b3804a2a 100644
--- a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/CCv2Tab.kt
+++ b/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/CCv2Tab.kt
@@ -19,13 +19,12 @@
package com.intellij.idea.plugin.hybris.toolwindow.ccv2
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
-import com.intellij.idea.plugin.hybris.toolwindow.ccv2.views.*
+import com.intellij.idea.plugin.hybris.toolwindow.ccv2.views.AbstractCCv2DataView
+import com.intellij.idea.plugin.hybris.toolwindow.ccv2.views.CCv2BuildsDataView
+import com.intellij.idea.plugin.hybris.toolwindow.ccv2.views.CCv2EnvironmentsDataView
import javax.swing.Icon
enum class CCv2Tab(val title: String, val icon: Icon, val view: AbstractCCv2DataView<*>) {
ENVIRONMENTS("Environments", HybrisIcons.CCV2_ENVIRONMENTS, CCv2EnvironmentsDataView),
BUILDS("Builds", HybrisIcons.CCV2_BUILDS, CCv2BuildsDataView),
- DEPLOYMENTS("Deployments", HybrisIcons.CCV2_DEPLOYMENTS, CCv2DeploymentsDataView),
- BACKUPS("Backups", HybrisIcons.CCV2_BACKUPS, CCv2BackupsDataView),
- ENDPOINTS("Endpoints", HybrisIcons.CCV2_ENDPOINTS, CCv2EndpointsDataView),
}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/CCv2View.kt b/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/CCv2View.kt
index e2118ef33..bf77ddddd 100644
--- a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/CCv2View.kt
+++ b/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/CCv2View.kt
@@ -19,7 +19,8 @@
package com.intellij.idea.plugin.hybris.toolwindow.ccv2
import com.intellij.idea.plugin.hybris.settings.CCv2Subscription
-import com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.ApplicationSettingsComponent
+import com.intellij.idea.plugin.hybris.settings.components.DeveloperSettingsComponent
import com.intellij.idea.plugin.hybris.tools.ccv2.CCv2BuildsListener
import com.intellij.idea.plugin.hybris.tools.ccv2.CCv2EnvironmentsListener
import com.intellij.idea.plugin.hybris.tools.ccv2.CCv2Service
@@ -51,7 +52,22 @@ class CCv2View(val project: Project) : SimpleToolWindowPanel(false), Disposable
.toMutableMap()
// TODO: add new TOPIC for CCv2Subscriptions
- private val ccv2SubscriptionsModel = DefaultComboBoxModel()
+ private val ccv2SubscriptionsModel = object : DefaultComboBoxModel() {
+ @Serial
+ private val serialVersionUID: Long = -7978280099808704031L
+
+ override fun setSelectedItem(anObject: Any?) {
+ super.setSelectedItem(anObject)
+ if (anObject == null) {
+ DeveloperSettingsComponent.getInstance(project).state.activeCCv2SubscriptionID = null
+ }
+ }
+ }.also {
+ it.addElement(null)
+ it.addAll(ApplicationSettingsComponent.getInstance().state.ccv2Subscriptions)
+ it.selectedItem = DeveloperSettingsComponent.getInstance(project).getActiveCCv2Subscription()
+ }
+
private val tabbedPane = JBTabbedPane().also {
CCv2Tab.entries.forEach { tab ->
it.addTab(tab.title, tab.icon, tab.view.noDataPanel())
@@ -59,10 +75,6 @@ class CCv2View(val project: Project) : SimpleToolWindowPanel(false), Disposable
}
init {
- val ccv2Subscriptions = HybrisApplicationSettingsComponent.getInstance().state.ccv2Subscriptions
- ccv2SubscriptionsModel.addElement(null)
- ccv2SubscriptionsModel.addAll(ccv2Subscriptions)
-
add(rootPanel())
installToolbar()
installListeners()
@@ -79,6 +91,15 @@ class CCv2View(val project: Project) : SimpleToolWindowPanel(false), Disposable
renderer = SimpleListCellRenderer.create("-- all subscriptions --") { it.toString() }
)
.label("Subscription:")
+ .onChanged {
+ val devSettings = DeveloperSettingsComponent.getInstance(project).state
+
+ when (val element = it.selectedItem) {
+ is CCv2Subscription -> devSettings.activeCCv2SubscriptionID = element.id
+ else -> devSettings.activeCCv2SubscriptionID = null
+ }
+ }
+ .component
}
.topGap(TopGap.SMALL)
.bottomGap(BottomGap.SMALL)
diff --git a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/AbstractCCv2DataView.kt b/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/AbstractCCv2DataView.kt
index fcb5c3405..0a7902028 100644
--- a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/AbstractCCv2DataView.kt
+++ b/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/AbstractCCv2DataView.kt
@@ -47,7 +47,7 @@ abstract class AbstractCCv2DataView {
protected fun Panel.noData() {
row {
- label("No ${CCv2EnvironmentsDataView.tab.title} data available. Try re-fetching remote data...")
+ label("No ${tab.title} data available. Try re-fetching remote data...")
.align(Align.CENTER)
.resizableColumn()
}.resizableRow()
diff --git a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/CCv2BackupsDataView.kt b/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/CCv2BackupsDataView.kt
deleted file mode 100644
index 6af89c7b2..000000000
--- a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/CCv2BackupsDataView.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
- * Copyright (C) 2019-2024 EPAM Systems and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- */
-
-package com.intellij.idea.plugin.hybris.toolwindow.ccv2.views
-
-import com.intellij.idea.plugin.hybris.settings.CCv2Subscription
-import com.intellij.idea.plugin.hybris.tools.ccv2.dto.CCv2DTO
-import com.intellij.idea.plugin.hybris.toolwindow.ccv2.CCv2Tab
-import com.intellij.openapi.ui.DialogPanel
-
-object CCv2BackupsDataView : AbstractCCv2DataView() {
-
- override val tab: CCv2Tab
- get() = CCv2Tab.BACKUPS
-
- override fun dataPanel(data: Map>): DialogPanel {
- TODO("Not yet implemented")
- }
-}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/CCv2BuildsDataView.kt b/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/CCv2BuildsDataView.kt
index 13889637d..eb8c3303f 100644
--- a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/CCv2BuildsDataView.kt
+++ b/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/CCv2BuildsDataView.kt
@@ -57,6 +57,13 @@ object CCv2BuildsDataView : AbstractCCv2DataView() {
}
}.gap(RightGap.COLUMNS)
+ panel {
+ row {
+ label(build.version)
+ .comment("Version")
+ }
+ }.gap(RightGap.COLUMNS)
+
panel {
row {
label(build.branch)
@@ -66,7 +73,7 @@ object CCv2BuildsDataView : AbstractCCv2DataView() {
panel {
row {
- label(build.status)
+ label(build.status.title)
.comment("Status")
}
}.gap(RightGap.COLUMNS)
@@ -90,13 +97,6 @@ object CCv2BuildsDataView : AbstractCCv2DataView() {
label(build.endTime)
.comment("End time")
}
- }.gap(RightGap.COLUMNS)
-
- panel {
- row {
- label(build.buildVersion)
- .comment("Build")
- }
}
}.layout(RowLayout.PARENT_GRID)
}
diff --git a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/CCv2DeploymentsDataView.kt b/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/CCv2DeploymentsDataView.kt
deleted file mode 100644
index c106b074e..000000000
--- a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/CCv2DeploymentsDataView.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
- * Copyright (C) 2019-2024 EPAM Systems and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- */
-
-package com.intellij.idea.plugin.hybris.toolwindow.ccv2.views
-
-import com.intellij.idea.plugin.hybris.settings.CCv2Subscription
-import com.intellij.idea.plugin.hybris.tools.ccv2.dto.CCv2DTO
-import com.intellij.idea.plugin.hybris.toolwindow.ccv2.CCv2Tab
-import com.intellij.openapi.ui.DialogPanel
-
-object CCv2DeploymentsDataView : AbstractCCv2DataView() {
-
- override val tab: CCv2Tab
- get() = CCv2Tab.DEPLOYMENTS
-
- override fun dataPanel(data: Map>): DialogPanel {
- TODO("Not yet implemented")
- }
-}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/CCv2EndpointsDataView.kt b/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/CCv2EndpointsDataView.kt
deleted file mode 100644
index e40d06d3c..000000000
--- a/src/com/intellij/idea/plugin/hybris/toolwindow/ccv2/views/CCv2EndpointsDataView.kt
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
- * Copyright (C) 2019-2024 EPAM Systems and contributors
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- */
-
-package com.intellij.idea.plugin.hybris.toolwindow.ccv2.views
-
-import com.intellij.idea.plugin.hybris.settings.CCv2Subscription
-import com.intellij.idea.plugin.hybris.tools.ccv2.dto.CCv2DTO
-import com.intellij.idea.plugin.hybris.toolwindow.ccv2.CCv2Tab
-import com.intellij.openapi.ui.DialogPanel
-
-object CCv2EndpointsDataView : AbstractCCv2DataView() {
-
- override val tab: CCv2Tab
- get() = CCv2Tab.ENDPOINTS
-
- override fun dataPanel(data: Map>): DialogPanel {
- TODO("Not yet implemented")
- }
-}
\ No newline at end of file
diff --git a/src/com/intellij/idea/plugin/hybris/ui/CCv2SubscriptionDialog.kt b/src/com/intellij/idea/plugin/hybris/ui/CCv2SubscriptionDialog.kt
index acad600c6..3adf8c7b6 100644
--- a/src/com/intellij/idea/plugin/hybris/ui/CCv2SubscriptionDialog.kt
+++ b/src/com/intellij/idea/plugin/hybris/ui/CCv2SubscriptionDialog.kt
@@ -41,7 +41,7 @@ class CCv2SubscriptionDialog(
override fun createCenterPanel() = panel {
row {
idTextField = textField()
- .label("ID:")
+ .label("Subscription code:")
.align(AlignX.FILL)
.addValidationRule("ID cannot be blank.") { it.text.isBlank() }
.bindText(subscription::id.toNonNullableProperty(""))
diff --git a/src/com/intellij/idea/plugin/hybris/ui/RemoteHacInstancesListPanel.kt b/src/com/intellij/idea/plugin/hybris/ui/RemoteHacInstancesListPanel.kt
index 5c8fd2160..f3028c31b 100644
--- a/src/com/intellij/idea/plugin/hybris/ui/RemoteHacInstancesListPanel.kt
+++ b/src/com/intellij/idea/plugin/hybris/ui/RemoteHacInstancesListPanel.kt
@@ -18,7 +18,7 @@
package com.intellij.idea.plugin.hybris.ui
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
-import com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings
+import com.intellij.idea.plugin.hybris.settings.RemoteConnectionSettings
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionType
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionUtil
import com.intellij.idea.plugin.hybris.toolwindow.RemoteHacConnectionDialog
@@ -28,7 +28,7 @@ import javax.swing.event.ListDataEvent
class RemoteHacInstancesListPanel(
project: Project,
- private val onDataChanged: (ListDataEvent, Set) -> Unit
+ private val onDataChanged: (ListDataEvent, Set) -> Unit
) : RemoteInstancesListPanel(project, RemoteConnectionType.Hybris, HybrisIcons.Y_REMOTE) {
public override fun addItem() {
@@ -41,10 +41,10 @@ class RemoteHacInstancesListPanel(
override fun onDataChanged(
e: ListDataEvent,
- data: Set
+ data: Set
) = onDataChanged.invoke(e, data)
- override fun editSelectedItem(item: HybrisRemoteConnectionSettings) = if (RemoteHacConnectionDialog(myProject, this, item).showAndGet()) item
+ override fun editSelectedItem(item: RemoteConnectionSettings) = if (RemoteHacConnectionDialog(myProject, this, item).showAndGet()) item
else null
companion object {
diff --git a/src/com/intellij/idea/plugin/hybris/ui/RemoteInstancesListPanel.java b/src/com/intellij/idea/plugin/hybris/ui/RemoteInstancesListPanel.java
index 72c0d51f5..8cf2121b7 100644
--- a/src/com/intellij/idea/plugin/hybris/ui/RemoteInstancesListPanel.java
+++ b/src/com/intellij/idea/plugin/hybris/ui/RemoteInstancesListPanel.java
@@ -18,7 +18,7 @@
package com.intellij.idea.plugin.hybris.ui;
-import com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings;
+import com.intellij.idea.plugin.hybris.settings.RemoteConnectionSettings;
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionType;
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionUtil;
import com.intellij.openapi.project.Project;
@@ -37,7 +37,7 @@
import java.util.LinkedHashSet;
import java.util.Set;
-abstract public class RemoteInstancesListPanel extends AddEditDeleteListPanel {
+abstract public class RemoteInstancesListPanel extends AddEditDeleteListPanel {
@Serial
private static final long serialVersionUID = -1932103943790251488L;
@@ -73,29 +73,29 @@ public void contentsChanged(final ListDataEvent e) {
});
}
- public void setData(final Collection remoteConnectionSettingsList) {
+ public void setData(final Collection remoteConnectionSettingsList) {
myListModel.clear();
myListModel.addAll(remoteConnectionSettingsList);
}
- public Set getData() {
- final var remoteConnectionSettingsList = new LinkedHashSet();
+ public Set getData() {
+ final var remoteConnectionSettingsList = new LinkedHashSet();
for (int index = 0; index < myList.getModel().getSize(); index++) {
remoteConnectionSettingsList.add(myList.getModel().getElementAt(index));
}
return remoteConnectionSettingsList;
}
- abstract protected void onDataChanged(ListDataEvent e, final Set data);
+ abstract protected void onDataChanged(ListDataEvent e, final Set data);
@Nullable
@Override
- protected HybrisRemoteConnectionSettings findItemToAdd() {
+ protected RemoteConnectionSettings findItemToAdd() {
return null;
}
@Override
- protected void addElement(@Nullable final HybrisRemoteConnectionSettings itemToAdd) {
+ protected void addElement(@Nullable final RemoteConnectionSettings itemToAdd) {
super.addElement(itemToAdd);
if (itemToAdd != null) RemoteConnectionUtil.INSTANCE.addRemoteConnection(myProject, itemToAdd);
diff --git a/src/com/intellij/idea/plugin/hybris/ui/RemoteSolrInstancesListPanel.kt b/src/com/intellij/idea/plugin/hybris/ui/RemoteSolrInstancesListPanel.kt
index cfd32c489..cb76a9b80 100644
--- a/src/com/intellij/idea/plugin/hybris/ui/RemoteSolrInstancesListPanel.kt
+++ b/src/com/intellij/idea/plugin/hybris/ui/RemoteSolrInstancesListPanel.kt
@@ -18,7 +18,7 @@
package com.intellij.idea.plugin.hybris.ui
import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
-import com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings
+import com.intellij.idea.plugin.hybris.settings.RemoteConnectionSettings
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionType
import com.intellij.idea.plugin.hybris.tools.remote.RemoteConnectionUtil
import com.intellij.idea.plugin.hybris.toolwindow.RemoteSolrConnectionDialog
@@ -28,10 +28,10 @@ import javax.swing.event.ListDataEvent
class RemoteSolrInstancesListPanel(
project: Project,
- private val onDataChanged: (ListDataEvent, Set) -> Unit = { _, _ -> }
+ private val onDataChanged: (ListDataEvent, Set) -> Unit = { _, _ -> }
) : RemoteInstancesListPanel(project, RemoteConnectionType.SOLR, HybrisIcons.CONSOLE_SOLR) {
- override fun editSelectedItem(item: HybrisRemoteConnectionSettings): HybrisRemoteConnectionSettings? {
+ override fun editSelectedItem(item: RemoteConnectionSettings): RemoteConnectionSettings? {
val ok = RemoteSolrConnectionDialog(myProject, this, item).showAndGet()
return if (ok) item
else null
@@ -47,7 +47,7 @@ class RemoteSolrInstancesListPanel(
override fun onDataChanged(
e: ListDataEvent,
- data: Set
+ data: Set
) = onDataChanged.invoke(e, data)
companion object {