mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJP-1077 Inlay hints: new settings UI
java parameters snippets GitOrigin-RevId: 94470268c299d0245347004104d23a4b655bb732
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1347788cd4
commit
7527c97100
@@ -0,0 +1,10 @@
|
||||
a.printSomething(switch (i) {
|
||||
case 1:
|
||||
yield "Apples";
|
||||
case 2:
|
||||
yield "Bananas";
|
||||
default:
|
||||
yield "Apples and bananas";
|
||||
});
|
||||
|
||||
a.printSomething(Math.random() > 0.5 ? "Apples" : "Bananas");
|
||||
@@ -0,0 +1,7 @@
|
||||
enum Language{
|
||||
ENGLISH("Hi"), SPANISH("Hola"), FINNISH("Hei");
|
||||
String greeting;
|
||||
Language(String greeting){
|
||||
this.greeting = greeting;
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class App {
|
||||
void setName(String name) { }
|
||||
|
||||
void sendMessage(String message) { }
|
||||
|
||||
public static void main(String[] args) {
|
||||
App app = new App();
|
||||
app.setName("My app");
|
||||
app.sendMessage("Hello");
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Printer {
|
||||
void printLines(String intro, String message) {
|
||||
System.out.println(intro);
|
||||
System.out.println(message);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Printer().printLines("Hello", "World"); // literal
|
||||
new Printer().printLines(args[0], args[1]); // non-literal
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
new Duckling("Franklin", Color.YELLOW)
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
class HintsDemo {
|
||||
|
||||
public static void print(String s1, String s2, String s3) {
|
||||
Stream.of(s1, s2, s3)
|
||||
.map(String::toUpperCase)
|
||||
.forEach(System.out::println);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
print("first","second","third");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user