Skip to content

Commit 49144d7

Browse files
committed
[EVAN-9676] Examples for customising colours based on visibility.
1 parent e4cb00f commit 49144d7

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

java-samples/src/main/java/com/jetbrains/editing/CustomisingColours.java

+24
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,35 @@
55
@SuppressWarnings("unused")
66
public class CustomisingColours {
77
private static final int FACTOR = 2;
8+
private int privateField = 0;
9+
protected int protectedField = 0;
810

911
private void staticImportedConstantsCanLookDifferentToClassConstants() {
1012
// see Editor>Colors & Fonts>Java>Class Fields and see two types of constants
1113
double x = PI * FACTOR;
1214
}
1315

16+
public void membersCanBeColouredAccordingToVisibility() {
17+
// change settings in Preferences/Settings | Editor | Color Scheme by unfolding the Visibility node.
18+
publicMethod();
19+
protectedMethod();
20+
protectedField++;
21+
packagePrivateMethod();
22+
privateMethod();
23+
privateField++;
24+
}
25+
26+
27+
public void publicMethod() {
28+
}
29+
30+
protected void protectedMethod() {
31+
}
32+
33+
void packagePrivateMethod() {
34+
}
35+
36+
private void privateMethod() {
37+
}
1438

1539
}

0 commit comments

Comments
 (0)