Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit slow operation on Column Highlighting under the caret #847

Merged
merged 3 commits into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Added shortcut `shift + alt + enter` for execute ImpEx action [#839](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/839)
- Added shortcut `control + alt + V` for Validate ImpEx action [#844](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/844)
- Added shortcut `control + shift + alt + O` for Open ImpEx action [#845](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/845)
- Omit slow operation on Column Highlighting under the caret [#847](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/847)

### Other
- Adjust optional dependency on `AntPlugin` during project refresh [#833](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/833)
Expand Down
9 changes: 0 additions & 9 deletions resources/META-INF/lang/impex-dependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@

<editorFactoryListener implementation="com.intellij.idea.plugin.hybris.impex.assistance.event.ImpexEditorFactoryListener"/>

<postStartupActivity order="after hybrisProjectImport"
implementation="com.intellij.idea.plugin.hybris.startup.ImpexHeaderHighlighterStartupActivity"/>
<psi.treeChangeListener implementation="com.intellij.idea.plugin.hybris.impex.psi.ImpexPsiTreeChangeListener"/>

<codeInsight.declarativeInlayProvider language="ImpEx"
implementationClass="com.intellij.idea.plugin.hybris.impex.codeInsight.hints.ImpExDefaultValueDeclarativeInlayProvider"
isEnabledByDefault="true"
Expand All @@ -95,11 +91,6 @@
bundle="i18n/HybrisBundle"
nameKey="hybris.editor.impex.inlay_provider.default_value.name"
descriptionKey="hybris.editor.impex.inlay_provider.default_value.description"/>

<applicationService serviceInterface="com.intellij.idea.plugin.hybris.impex.assistance.ImpexHeaderNameHighlighterService"
serviceImplementation="com.intellij.idea.plugin.hybris.impex.assistance.DefaultImpexHeaderNameHighlighterService"/>
<applicationService serviceInterface="com.intellij.idea.plugin.hybris.impex.assistance.ImpexColumnHighlighterService"
serviceImplementation="com.intellij.idea.plugin.hybris.impex.assistance.DefaultImpexColumnHighlighterService"/>
</extensions>

<actions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
*/
package com.intellij.idea.plugin.hybris.impex.actions

import com.intellij.idea.plugin.hybris.impex.assistance.ImpexColumnHighlighterService
import com.intellij.idea.plugin.hybris.impex.assistance.ImpexHeaderNameHighlighterService
import com.intellij.idea.plugin.hybris.impex.assistance.event.ImpexHighlightingCaretListener
import com.intellij.idea.plugin.hybris.impex.psi.ImpexFullHeaderParameter
import com.intellij.idea.plugin.hybris.impex.psi.ImpexHeaderLine
import com.intellij.idea.plugin.hybris.impex.psi.ImpexValueGroup
Expand All @@ -39,6 +38,8 @@ abstract class AbstractImpExTableColumnMoveAction(private val direction: ImpExCo
}

private fun move(editor: Editor, headerParameter: ImpexFullHeaderParameter, elementAtCaret: PsiElement, direction: ImpExColumnPosition) {
ImpexHighlightingCaretListener.instance.clearHighlightedArea(editor)

val headerLine = headerParameter.headerLine ?: return
val column = headerParameter.columnNumber

Expand All @@ -53,9 +54,6 @@ abstract class AbstractImpExTableColumnMoveAction(private val direction: ImpExCo

newElementAtCaret
?.let {
ImpexColumnHighlighterService.instance.releaseEditorData(editor)
ImpexHeaderNameHighlighterService.instance.releaseEditorData(editor)

val caretOffsetInText = previousOffset - previousElementStartOffset
editor.caretModel.currentCaret.moveToOffset(it.startOffset + caretOffsetInText)
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading