Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
a50feb84
Commit
a50feb84
authored
8 years ago
by
Daniil Ovchinnikov
Browse files
Options
Download
Email Patches
Plain Diff
delegate getData() to appropriate GutterIconRenderer
parent
d3e719b8
Branches unavailable
Tags unavailable
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
platform/editor-ui-api/src/com/intellij/openapi/editor/markup/GutterIconRenderer.java
+6
-1
...om/intellij/openapi/editor/markup/GutterIconRenderer.java
platform/lang-api/src/com/intellij/codeInsight/daemon/LineMarkerInfo.java
+11
-1
...i/src/com/intellij/codeInsight/daemon/LineMarkerInfo.java
platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorGutterComponentImpl.java
+4
-7
...tellij/openapi/editor/impl/EditorGutterComponentImpl.java
with
21 additions
and
9 deletions
+21
-9
platform/editor-ui-api/src/com/intellij/openapi/editor/markup/GutterIconRenderer.java
+
6
-
1
View file @
a50feb84
/*
* Copyright 2000-201
5
JetBrains s.r.o.
* Copyright 2000-201
6
JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -128,6 +128,11 @@ public abstract class GutterIconRenderer implements GutterMark, PossiblyDumbAwar
return
null
;
}
@Nullable
public
Object
getData
(
@NotNull
String
dataId
)
{
return
null
;
}
public
enum
Alignment
{
LEFT
(
1
),
RIGHT
(
3
),
...
...
This diff is collapsed.
Click to expand it.
platform/lang-api/src/com/intellij/codeInsight/daemon/LineMarkerInfo.java
+
11
-
1
View file @
a50feb84
/*
* Copyright 2000-201
5
JetBrains s.r.o.
* Copyright 2000-201
6
JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -17,6 +17,7 @@
package
com.intellij.codeInsight.daemon
;
import
com.intellij.openapi.actionSystem.AnAction
;
import
com.intellij.openapi.actionSystem.CommonDataKeys
;
import
com.intellij.openapi.editor.markup.GutterIconRenderer
;
import
com.intellij.openapi.editor.markup.RangeHighlighter
;
import
com.intellij.openapi.editor.markup.SeparatorPlacement
;
...
...
@@ -169,6 +170,15 @@ public class LineMarkerInfo<T extends PsiElement> {
return
myInfo
.
myIconAlignment
;
}
@Nullable
@Override
public
Object
getData
(
@NotNull
String
dataId
)
{
if
(
CommonDataKeys
.
PSI_ELEMENT
.
is
(
dataId
))
{
return
getLineMarkerInfo
().
getElement
();
}
return
super
.
getData
(
dataId
);
}
protected
boolean
looksTheSameAs
(
@NotNull
LineMarkerGutterIconRenderer
renderer
)
{
return
myInfo
.
getElement
()
!=
null
&&
...
...
This diff is collapsed.
Click to expand it.
platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorGutterComponentImpl.java
+
4
-
7
View file @
a50feb84
...
...
@@ -25,7 +25,6 @@
package
com.intellij.openapi.editor.impl
;
import
com.intellij.codeInsight.daemon.GutterMark
;
import
com.intellij.codeInsight.daemon.LineMarkerInfo
;
import
com.intellij.codeInsight.hint.TooltipController
;
import
com.intellij.codeInsight.hint.TooltipGroup
;
import
com.intellij.ide.IdeEventQueue
;
...
...
@@ -591,12 +590,10 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
else
if
(
CommonDataKeys
.
EDITOR
.
is
(
dataId
))
{
return
myEditor
;
}
else
if
(
CommonDataKeys
.
PSI_ELEMENT
.
is
(
dataId
))
{
if
(
point
!=
null
)
{
GutterMark
renderer
=
getGutterRenderer
(
point
);
if
(
renderer
instanceof
LineMarkerInfo
.
LineMarkerGutterIconRenderer
)
{
return
((
LineMarkerInfo
.
LineMarkerGutterIconRenderer
)
renderer
).
getLineMarkerInfo
().
getElement
();
}
else
if
(
point
!=
null
)
{
GutterMark
renderer
=
getGutterRenderer
(
point
);
if
(
renderer
instanceof
GutterIconRenderer
)
{
return
((
GutterIconRenderer
)
renderer
).
getData
(
dataId
);
}
}
return
null
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help