forked from unshare/hybris-integration-intellij-idea-plugin
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#818 | Added navigation to the
items.xml
Ordering Attribute from th…
…e generated classes
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* This file is part of "SAP Commerce Developers Toolset" plugin for Intellij IDEA. | ||
* Copyright (C) 2019 EPAM Systems <[email protected]> | ||
* Copyright (C) 2019-2023 EPAM Systems <[email protected]> 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 | ||
|
@@ -46,10 +46,28 @@ class ModelItemAttributeFieldLineMarkerProvider : AbstractModelAttributeLineMark | |
|
||
getPsiElementItemLineMarkerInfo(meta, name, nameIdentifier) | ||
?: getPsiElementRelationLineMarkerInfo(name, nameIdentifier) | ||
?: getPsiElementOrderingAttributeRelationLineMarkerInfo(meta, name, nameIdentifier) | ||
} | ||
?.let { listOf(it) } | ||
?: emptyList() | ||
|
||
private fun getPsiElementOrderingAttributeRelationLineMarkerInfo( | ||
meta: TSGlobalMetaItem, | ||
name: String, | ||
nameIdentifier: PsiIdentifier | ||
) = meta.allOrderingAttributes[name] | ||
?.retrieveDom() | ||
?.qualifier | ||
?.xmlAttributeValue | ||
?.let { | ||
NavigationGutterIconBuilder | ||
.create(HybrisIcons.TS_ORDERING_ATTRIBUTE) | ||
.setTargets(it) | ||
.setTooltipText(message("hybris.editor.gutter.ts.model.item.orderingAttribute.tooltip.text")) | ||
.setAlignment(GutterIconRenderer.Alignment.LEFT) | ||
.createLineMarkerInfo(nameIdentifier) | ||
} | ||
|
||
private fun getPsiElementRelationLineMarkerInfo( | ||
name: String, | ||
nameIdentifier: PsiIdentifier | ||
|