Skip to content

Commit

Permalink
#1058 | Added possibility to set developer-specific and project-aware…
Browse files Browse the repository at this point in the history
… CCv2 subscription
  • Loading branch information
mlytvyn authored Mar 26, 2024
1 parent 18a176e commit 26b65f9
Show file tree
Hide file tree
Showing 177 changed files with 870 additions and 1,014 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

### `CCv2 CLI` enhancements
- Added possibility to specify directory of the SAP CX CLI [#1048](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/1048)
- Added possibility to save developer-specific SAP CX CLI token in the secure storage [#1049](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/1049)
- Added possibility to save CCv2 subscriptions to be used with SAP CX CLI [#1050](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/1050)
- Added possibility to set developer-specific SAP CX CLI token in the secure storage [#1049](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/1049)
- Added possibility to set developer-specific and project-aware CCv2 subscription [#1058](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/1058)
- Added possibility to set CCv2 subscriptions to be used with SAP CX CLI [#1050](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/1050)
- Show cloud icon for CCv2 subscription [#1051](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/1051)
- Fetch and show CCv2 environments details [#1055](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/1055)
- Fetch and show CCv2 builds details [#1057](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/1057)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<projectConfigurable id="hybris.project.bs.settings" parentId="hybris.project.settings"
nonDefaultProject="true" dynamic="true"
bundle="i18n.HybrisBundle" key="hybris.settings.project.bs.title"
provider="com.intellij.idea.plugin.hybris.system.bean.settings.BeanSystemConfigurableProvider"/>
provider="com.intellij.idea.plugin.hybris.settings.options.ProjectBeanSystemConfigurableProvider"/>

<applicationService serviceImplementation="com.intellij.idea.plugin.hybris.system.bean.codeInsight.completion.provider.BSClassCompletionProvider"/>
</extensions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
<projectConfigurable id="hybris.project.bp.settings" parentId="hybris.project.settings"
nonDefaultProject="true" dynamic="true"
bundle="i18n.HybrisBundle" key="hybris.settings.project.bp.title"
provider="com.intellij.idea.plugin.hybris.system.businessProcess.settings.BpConfigurableProvider"/>
provider="com.intellij.idea.plugin.hybris.settings.options.ProjectBusinessProcessConfigurableProvider"/>
</extensions>
</idea-plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<projectConfigurable id="hybris.project.cng.settings" groupId="hybris.project.settings"
nonDefaultProject="true" dynamic="true"
bundle="i18n.HybrisBundle" key="hybris.settings.project.cng.title"
provider="com.intellij.idea.plugin.hybris.system.cockpitng.settings.CngConfigurableProvider"/>
provider="com.intellij.idea.plugin.hybris.settings.options.ProjectCngSettingsConfigurableProvider"/>

<applicationService serviceImplementation="com.intellij.idea.plugin.hybris.system.cockpitng.codeInsight.completion.provider.CngEditorDefinitionCodeCompletionProvider"/>
<applicationService serviceImplementation="com.intellij.idea.plugin.hybris.system.cockpitng.codeInsight.completion.provider.CngActionDefinitionCompletionProvider"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@

<applicationService serviceImplementation="com.intellij.idea.plugin.hybris.diagram.typeSystem.TSDiagramToolbarActionsProvider"/>

<projectConfigurable id="hybris.project.diagram.ts.settings" parentId="hybris.project.settings" nonDefaultProject="true" dynamic="true"
bundle="i18n.HybrisBundle" key="hybris.settings.project.diagram.ts.title"
provider="com.intellij.idea.plugin.hybris.settings.HybrisProjectDiagramTSSettingsConfigurableProvider"/>

<runLineMarkerContributor language="XML" implementationClass="com.intellij.idea.plugin.hybris.diagram.businessProcess.execution.lineMarker.ShowBPDiagramRunLineMarkerContributor"/>
<runLineMarkerContributor language="XML" implementationClass="com.intellij.idea.plugin.hybris.diagram.typeSystem.execution.lineMarker.ShowTSDiagramRunLineMarkerContributor"/>
<runLineMarkerContributor language="XML" implementationClass="com.intellij.idea.plugin.hybris.diagram.module.execution.lineMarker.ShowModuleDepDiagramRunLineMarkerContributor"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<projectConfigurable id="hybris.project.impex.settings" parentId="hybris.project.settings"
nonDefaultProject="true" dynamic="true"
bundle="i18n.HybrisBundle" key="hybris.settings.project.impex.title"
provider="com.intellij.idea.plugin.hybris.impex.settings.ImpexSettingsConfigurableProvider"/>
provider="com.intellij.idea.plugin.hybris.settings.options.ProjectImpExSettingsConfigurableProvider"/>

<!-- ####################################################################################################### -->
<!-- Impex Completion Providers -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<projectConfigurable id="hybris.project.ts.settings" parentId="hybris.project.settings"
nonDefaultProject="true" dynamic="true"
bundle="i18n.HybrisBundle" key="hybris.settings.project.ts.title"
provider="com.intellij.idea.plugin.hybris.system.type.settings.TypeSystemConfigurableProvider"/>
provider="com.intellij.idea.plugin.hybris.settings.options.ProjectTypeSystemConfigurableProvider"/>

<backgroundPostStartupActivity implementation="com.intellij.idea.plugin.hybris.startup.ItemsXmlFileOpenStartupActivity"/>
</extensions>
Expand Down
10 changes: 5 additions & 5 deletions resources/META-INF/plugin-internal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,22 @@

<applicationConfigurable id="hybris.settings" parentId="root"
displayName="[y] SAP CX"
provider="com.intellij.idea.plugin.hybris.settings.HybrisApplicationSettingsConfigurableProvider"/>
provider="com.intellij.idea.plugin.hybris.settings.options.ApplicationSettingsConfigurableProvider"/>
<applicationConfigurable id="hybris.settings.ccv2" parentId="hybris.settings"
displayName="CCv2"
provider="com.intellij.idea.plugin.hybris.settings.CCv2SettingsConfigurableProvider"/>
provider="com.intellij.idea.plugin.hybris.settings.options.ApplicationCCv2SettingsConfigurableProvider"/>
<applicationConfigurable id="hybris.project.import.settings" parentId="hybris.settings"
key="hybris.settings.application.project_import.title"
provider="com.intellij.idea.plugin.hybris.settings.HybrisProjectImportApplicationSettingsConfigurableProvider"/>
provider="com.intellij.idea.plugin.hybris.settings.options.ApplicationProjectImportSettingsConfigurableProvider"/>

<projectConfigurable id="hybris.project.settings" parentId="hybris.settings" nonDefaultProject="true"
dynamic="true"
key="hybris.settings.project.title"
provider="com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsConfigurableProvider"/>
provider="com.intellij.idea.plugin.hybris.settings.options.ProjectSettingsConfigurableProvider"/>
<projectConfigurable id="hybris.project.remote_instances.settings" parentId="hybris.project.settings"
nonDefaultProject="true" dynamic="true"
key="hybris.settings.project.remote_instances.title"
provider="com.intellij.idea.plugin.hybris.settings.HybrisProjectRemoteInstancesSettingsConfigurableProvider"/>
provider="com.intellij.idea.plugin.hybris.settings.options.ProjectRemoteInstancesSettingsConfigurableProvider"/>

<toolWindow id="SAP CX" icon="/icons/toolWindow.svg" anchor="bottom" doNotActivateOnStart="true"
factoryClass="com.intellij.idea.plugin.hybris.toolwindow.HybrisToolWindowFactory"/>
Expand Down
13 changes: 6 additions & 7 deletions resources/i18n/HybrisBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ hybris.project.view.external.module.tooltip=Group non-hybris modules (gradle, ma

hybris.import.label.select.hybris.project.icon.file=Select Custom Project .svg Icon File (Optional).
hybris.import.label.select.hybris.src.file=Select Source Code Zip File or Directory (Optional).
hybris.import.label.select.hybris.distribution.directory=Select SAP Commerce Installation Directory
hybris.import.label.select.hybris.distribution.directory=Select SAP CX Installation Directory
hybris.import.label.select.custom.extensions.directory=Select Custom Extensions Directory
hybris.import.label.select.config.extensions.directory=Select Config Directory
hybris.import.label.select.dbdriver.extensions.directory=Select DB Drivers Directory
Expand Down Expand Up @@ -154,8 +154,8 @@ hybris.import.wizard.source.code.path.label=SAP Commerce Source Code (Optional)
hybris.import.wizard.source.code.path.tooltip=SAP Commerce source code directory or *.zip file
hybris.import.wizard.project.icon.label=Custom Intellij Project Icon (Optional)
hybris.import.wizard.project.icon.tooltip=Intellij IDEA Project Icon (*.svg file)
hybris.import.wizard.javadoc.url.label=SAP Commerce javadoc url (optional):
hybris.import.wizard.javadoc.url.tooltip=Url of SAP Commerce javadoc (for instance https://help.sap.com/docs/SAP_COMMERCE/c5613bd3cc9942efb74d017b40eb0892/179bbc9b35274d7ca784e46b3beb40b2.html).
hybris.import.wizard.javadoc.url.label=SAP CX javadoc url (optional):
hybris.import.wizard.javadoc.url.tooltip=Url of SAP CX javadoc (for instance https://help.sap.com/docs/SAP_COMMERCE/c5613bd3cc9942efb74d017b40eb0892/179bbc9b35274d7ca784e46b3beb40b2.html).
hybris.import.wizard.project.name.label=Project Name
hybris.import.wizard.store.idea.modules.file.in.label=Store IDEA Module Files In
hybris.import.wizard.store.idea.modules.file.in.tooltip=A directory where all IDEA module files will be stored.
Expand All @@ -170,12 +170,12 @@ hybris.import.wizard.dbdriver.directory.override.filechooser=Overriding DB drive
hybris.import.wizard.dbdriver.directory.override.label=DB driver Directory Override
hybris.import.wizard.dbdriver.directory.override.separator.label=The DB driver directory that contains DB driver jar files (used to execute Integration test from IDE)
hybris.import.wizard.hybris.distribution.directory.and.custom.directory.separator.label=If your custom directory is in bin/ext-* directory or is outside the project root directory you can override it below
hybris.import.wizard.hybris.distribution.directory.label=SAP Commerce installation directory:
hybris.import.wizard.hybris.distribution.directory.label=SAP CX installation directory:
hybris.import.wizard.hybris.distribution.directory.tooltip=It's the root directory where your SAP Commerce is located. By default, the name of the directory is "hybris".
hybris.import.wizard.custom.extensions.directory.label=Custom Extensions Directory
hybris.import.wizard.custom.extensions.directory.tooltip=It's the directory where you keep all you custom directories. By default, it is "bin/custom". This directory can contain subdirectories.
hybris.import.wizard.validation.hybris.distribution.directory.empty="SAP Commerce Installation Directory" parameter can not be empty.
hybris.import.wizard.validation.hybris.distribution.directory.does.not.exist=SAP Commerce installation directory does not exist or is not a directory.
hybris.import.wizard.validation.hybris.distribution.directory.empty="SAP CX Installation Directory" parameter can not be empty.
hybris.import.wizard.validation.hybris.distribution.directory.does.not.exist=SAP CX installation directory does not exist or is not a directory.
hybris.import.wizard.validation.custom.extensions.directory.empty="Custom Extensions Directory" parameter can not be empty.
hybris.import.wizard.validation.custom.extensions.directory.does.not.exist=Custom extensions directory does not exist or is not a directory.
hybris.import.wizard.validation.config.directory.does.not.exist=Config directory does not exist or is not a directory.
Expand Down Expand Up @@ -581,7 +581,6 @@ hybris.settings.project.refresh.title=Project Refresh Settings
hybris.settings.project.details.title=Project Details
hybris.settings.project.details.platform_version.title=Platform version:
hybris.settings.project.diagram.title=Diagram Settings
hybris.settings.project.diagram.ts.title=Type System Diagram
hybris.settings.project.common.title=Common Settings
hybris.settings.project.build.title=Build Settings
hybris.settings.project.bs.title=Bean System
Expand Down
4 changes: 2 additions & 2 deletions src/com/intellij/idea/plugin/hybris/actions/ActionUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

package com.intellij.idea.plugin.hybris.actions

import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.actionSystem.DataContext
Expand All @@ -33,5 +33,5 @@ object ActionUtils {
?.let { isHybrisContext(it) }
?: false

fun isHybrisContext(project: Project) = HybrisProjectSettingsComponent.getInstance(project).isHybrisProject()
fun isHybrisContext(project: Project) = ProjectSettingsComponent.getInstance(project).isHybrisProject()
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
package com.intellij.idea.plugin.hybris.actions

import com.intellij.idea.plugin.hybris.common.utils.HybrisIcons
import com.intellij.idea.plugin.hybris.settings.HybrisProjectRemoteInstancesSettingsConfigurableProvider
import com.intellij.idea.plugin.hybris.settings.HybrisRemoteConnectionSettings
import com.intellij.idea.plugin.hybris.settings.RemoteConnectionSettings
import com.intellij.idea.plugin.hybris.settings.options.ProjectRemoteInstancesSettingsConfigurableProvider
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
Expand Down Expand Up @@ -126,12 +126,12 @@ class HacChooseConnectionAction : ActionGroup() {
override fun getIcon(): Icon = HybrisIcons.SETTINGS
}

open class ConnectionItem(val settings: HybrisRemoteConnectionSettings) : ListItem() {
open class ConnectionItem(val settings: RemoteConnectionSettings) : ListItem() {
override fun getText() = settings.toString()
override fun getIcon(): Icon = HybrisIcons.Y_REMOTE
}

class ActiveConnectionItem(settings: HybrisRemoteConnectionSettings) : ConnectionItem(settings) {
class ActiveConnectionItem(settings: RemoteConnectionSettings) : ConnectionItem(settings) {
override fun getIcon(): Icon = HybrisIcons.Y_REMOTE_GREEN
}

Expand Down Expand Up @@ -159,7 +159,7 @@ class HacChooseConnectionAction : ActionGroup() {
RemoteHacConnectionDialog(project, owner, settings).showAndGet()
}
is ConnectionSettingsItem -> ShowSettingsUtil.getInstance()
.showSettingsDialog(project, HybrisProjectRemoteInstancesSettingsConfigurableProvider.SettingsConfigurable::class.java)
.showSettingsDialog(project, ProjectRemoteInstancesSettingsConfigurableProvider.SettingsConfigurable::class.java)

is ConnectionItem -> RemoteConnectionUtil.setActiveRemoteConnectionSettings(project, selectedValue.settings)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package com.intellij.idea.plugin.hybris.ant.ui

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.lang.ant.config.AntBuildFileBase
import com.intellij.lang.ant.config.AntConfiguration
import com.intellij.lang.ant.config.execution.ExecutionHandler
Expand All @@ -38,7 +38,7 @@ import javax.swing.JComponent
class AntUpdateMavenDependenciesNotificationProvider : EditorNotificationProvider {

override fun collectNotificationData(project: Project, file: VirtualFile): Function<in FileEditor, out JComponent?>? {
val settings = HybrisProjectSettingsComponent.getInstance(project)
val settings = ProjectSettingsComponent.getInstance(project)
if (!settings.isHybrisProject()) return null
if (file.name != HybrisConstants.EXTERNAL_DEPENDENCIES_XML) return null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import com.intellij.codeInsight.completion.CompletionParameters
import com.intellij.codeInsight.completion.CompletionProvider
import com.intellij.codeInsight.completion.CompletionResultSet
import com.intellij.idea.plugin.hybris.facet.ExtensionDescriptor
import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.idea.plugin.hybris.system.extensioninfo.codeInsight.lookup.EiSLookupElementFactory
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.project.Project
Expand All @@ -37,7 +37,7 @@ open class ExtensionNameCompletionProvider : CompletionProvider<CompletionParame
.forEach { result.addElement(it) }
}

open fun getExtensionDescriptors(parameters: CompletionParameters, project: Project): Collection<ExtensionDescriptor> = HybrisProjectSettingsComponent.getInstance(project)
open fun getExtensionDescriptors(parameters: CompletionParameters, project: Project): Collection<ExtensionDescriptor> = ProjectSettingsComponent.getInstance(project)
.getAvailableExtensions()
.values

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package com.intellij.idea.plugin.hybris.codeInsight.completion.provider
import com.intellij.codeInsight.completion.CompletionParameters
import com.intellij.codeInsight.completion.CompletionProvider
import com.intellij.idea.plugin.hybris.facet.ExtensionDescriptor
import com.intellij.idea.plugin.hybris.settings.HybrisProjectSettingsComponent
import com.intellij.idea.plugin.hybris.settings.components.ProjectSettingsComponent
import com.intellij.idea.plugin.hybris.system.extensioninfo.model.ExtensionInfo
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.components.Service
Expand All @@ -45,7 +45,7 @@ class RequiredExtensionsNameCompletionProvider : ExtensionNameCompletionProvider
?.filter { it.isNotBlank() }
?.map { it.lowercase() } ?: emptyList()

return HybrisProjectSettingsComponent.getInstance(project)
return ProjectSettingsComponent.getInstance(project)
.getAvailableExtensions()
.entries
.filterNot { currentNames.contains(it.key) }
Expand Down
Loading

0 comments on commit 26b65f9

Please sign in to comment.