Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Intellij Community
Commits
1022e90b
Commit
1022e90b
authored
8 years ago
by
Sergey Malenkov
Browse files
Options
Download
Email Patches
Plain Diff
IDEA-159498 add logging for native preferences
parent
d3076678
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
platform/platform-api/src/com/intellij/ui/components/MacScrollBarUI.java
+8
-2
...rm-api/src/com/intellij/ui/components/MacScrollBarUI.java
with
8 additions
and
2 deletions
+8
-2
platform/platform-api/src/com/intellij/ui/components/MacScrollBarUI.java
+
8
-
2
View file @
1022e90b
...
@@ -251,7 +251,9 @@ final class MacScrollBarUI extends DefaultScrollBarUI {
...
@@ -251,7 +251,9 @@ final class MacScrollBarUI extends DefaultScrollBarUI {
ID
defaults
=
invoke
(
"NSUserDefaults"
,
"standardUserDefaults"
);
ID
defaults
=
invoke
(
"NSUserDefaults"
,
"standardUserDefaults"
);
invoke
(
defaults
,
"synchronize"
);
invoke
(
defaults
,
"synchronize"
);
ID
behavior
=
invoke
(
defaults
,
"boolForKey:"
,
nsString
(
"AppleScrollerPagingBehavior"
));
ID
behavior
=
invoke
(
defaults
,
"boolForKey:"
,
nsString
(
"AppleScrollerPagingBehavior"
));
return
1
==
behavior
.
intValue
()
?
JumpToSpot
:
NextPage
;
Behavior
value
=
1
==
behavior
.
intValue
()
?
JumpToSpot
:
NextPage
;
Logger
.
getInstance
(
MacScrollBarUI
.
class
).
debug
(
"scroll bar behavior "
,
value
,
" from "
,
behavior
);
return
value
;
}
}
};
};
private
static
final
Producer
<
ID
>
INIT
=
()
->
invoke
(
invoke
(
"NSDistributedNotificationCenter"
,
"defaultCenter"
),
private
static
final
Producer
<
ID
>
INIT
=
()
->
invoke
(
invoke
(
"NSDistributedNotificationCenter"
,
"defaultCenter"
),
...
@@ -286,7 +288,9 @@ final class MacScrollBarUI extends DefaultScrollBarUI {
...
@@ -286,7 +288,9 @@ final class MacScrollBarUI extends DefaultScrollBarUI {
@Override
@Override
public
Style
produce
()
{
public
Style
produce
()
{
ID
style
=
invoke
(
getObjcClass
(
"NSScroller"
),
"preferredScrollerStyle"
);
ID
style
=
invoke
(
getObjcClass
(
"NSScroller"
),
"preferredScrollerStyle"
);
return
1
==
style
.
intValue
()
?
Overlay
:
Legacy
;
Style
value
=
1
==
style
.
intValue
()
?
Overlay
:
Legacy
;
Logger
.
getInstance
(
MacScrollBarUI
.
class
).
debug
(
"scroll bar style "
,
value
,
" from "
,
style
);
return
value
;
}
}
};
};
private
static
final
Producer
<
ID
>
INIT
=
()
->
invoke
(
invoke
(
"NSNotificationCenter"
,
"defaultCenter"
),
private
static
final
Producer
<
ID
>
INIT
=
()
->
invoke
(
invoke
(
"NSNotificationCenter"
,
"defaultCenter"
),
...
@@ -302,6 +306,7 @@ final class MacScrollBarUI extends DefaultScrollBarUI {
...
@@ -302,6 +306,7 @@ final class MacScrollBarUI extends DefaultScrollBarUI {
private
T
myValue
;
private
T
myValue
;
public
Native
()
{
public
Native
()
{
Logger
.
getInstance
(
MacScrollBarUI
.
class
).
debug
(
"initialize scroll bar"
);
UIUtil
.
invokeLaterIfNeeded
(
this
);
UIUtil
.
invokeLaterIfNeeded
(
this
);
}
}
...
@@ -311,6 +316,7 @@ final class MacScrollBarUI extends DefaultScrollBarUI {
...
@@ -311,6 +316,7 @@ final class MacScrollBarUI extends DefaultScrollBarUI {
@SuppressWarnings
(
"UnusedDeclaration"
)
@SuppressWarnings
(
"UnusedDeclaration"
)
public
void
callback
(
ID
self
,
Pointer
selector
,
ID
event
)
{
public
void
callback
(
ID
self
,
Pointer
selector
,
ID
event
)
{
Logger
.
getInstance
(
MacScrollBarUI
.
class
).
debug
(
"update scroll bar"
);
UIUtil
.
invokeLaterIfNeeded
(
this
);
UIUtil
.
invokeLaterIfNeeded
(
this
);
}
}
...
...
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