intellij-sdk-code-samples/code_samples/conditional_operator_intention
dependabot[bot] f57e22b383
 This is a combination of 14 commits.
 This is the 1st commit message:

Dependencies update

build(deps): bump org.jetbrains.kotlin.jvm in /code_samples/kotlin_demo

Bumps org.jetbrains.kotlin.jvm from 1.6.20 to 1.6.21.

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin.jvm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij in /code_samples/live_templates

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij in /code_samples/project_wizard

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij in /code_samples/settings

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij in /code_samples/action_basics

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij in /code_samples/psi_demo

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij in /code_samples/facet_basics

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij in /code_samples/editor_basics

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij in /code_samples/kotlin_demo

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij in /code_samples/project_model

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij in /code_samples/tool_window

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

build(deps): bump org.jetbrains.intellij in /code_samples/module

Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

---
updated-dependencies:
- dependency-name: org.jetbrains.intellij
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

 The commit message #2 will be skipped:

 build(deps): bump org.jetbrains.intellij

 Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

 ---
 updated-dependencies:
 - dependency-name: org.jetbrains.intellij
   dependency-type: direct:production
   update-type: version-update:semver-patch
 ...

 Signed-off-by: dependabot[bot] <support@github.com>

 The commit message #3 will be skipped:

 build(deps): bump org.jetbrains.intellij in /code_samples/tool_window

 Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

 ---
 updated-dependencies:
 - dependency-name: org.jetbrains.intellij
   dependency-type: direct:production
   update-type: version-update:semver-patch
 ...

 Signed-off-by: dependabot[bot] <support@github.com>

 The commit message #4 will be skipped:

 build(deps): bump org.jetbrains.intellij in /code_samples/project_model

 Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

 ---
 updated-dependencies:
 - dependency-name: org.jetbrains.intellij
   dependency-type: direct:production
   update-type: version-update:semver-patch
 ...

 Signed-off-by: dependabot[bot] <support@github.com>

 The commit message #5 will be skipped:

 build(deps): bump org.jetbrains.intellij

 Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

 ---
 updated-dependencies:
 - dependency-name: org.jetbrains.intellij
   dependency-type: direct:production
   update-type: version-update:semver-patch
 ...

 Signed-off-by: dependabot[bot] <support@github.com>

 The commit message #6 will be skipped:

 build(deps): bump org.jetbrains.intellij in /code_samples/kotlin_demo

 Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

 ---
 updated-dependencies:
 - dependency-name: org.jetbrains.intellij
   dependency-type: direct:production
   update-type: version-update:semver-patch
 ...

 Signed-off-by: dependabot[bot] <support@github.com>

 The commit message #7 will be skipped:

 build(deps): bump org.jetbrains.intellij

 Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

 ---
 updated-dependencies:
 - dependency-name: org.jetbrains.intellij
   dependency-type: direct:production
   update-type: version-update:semver-patch
 ...

 Signed-off-by: dependabot[bot] <support@github.com>

 The commit message #8 will be skipped:

 build(deps): bump org.jetbrains.intellij

 Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

 ---
 updated-dependencies:
 - dependency-name: org.jetbrains.intellij
   dependency-type: direct:production
   update-type: version-update:semver-patch
 ...

 Signed-off-by: dependabot[bot] <support@github.com>

 The commit message #9 will be skipped:

 build(deps): bump org.jetbrains.intellij

 Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

 ---
 updated-dependencies:
 - dependency-name: org.jetbrains.intellij
   dependency-type: direct:production
   update-type: version-update:semver-patch
 ...

 Signed-off-by: dependabot[bot] <support@github.com>

 The commit message #10 will be skipped:

 build(deps): bump org.jetbrains.intellij in /code_samples/editor_basics

 Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

 ---
 updated-dependencies:
 - dependency-name: org.jetbrains.intellij
   dependency-type: direct:production
   update-type: version-update:semver-patch
 ...

 Signed-off-by: dependabot[bot] <support@github.com>

 The commit message #11 will be skipped:

 build(deps): bump org.jetbrains.intellij

 Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

 ---
 updated-dependencies:
 - dependency-name: org.jetbrains.intellij
   dependency-type: direct:production
   update-type: version-update:semver-patch
 ...

 Signed-off-by: dependabot[bot] <support@github.com>

 The commit message #12 will be skipped:

 build(deps): bump org.jetbrains.intellij

 Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

 ---
 updated-dependencies:
 - dependency-name: org.jetbrains.intellij
   dependency-type: direct:production
   update-type: version-update:semver-patch
 ...

 Signed-off-by: dependabot[bot] <support@github.com>

 The commit message #13 will be skipped:

 build(deps): bump org.jetbrains.intellij in /code_samples/facet_basics

 Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

 ---
 updated-dependencies:
 - dependency-name: org.jetbrains.intellij
   dependency-type: direct:production
   update-type: version-update:semver-patch
 ...

 Signed-off-by: dependabot[bot] <support@github.com>

 The commit message #14 will be skipped:

 build(deps): bump org.jetbrains.intellij in /code_samples/psi_demo

 Bumps org.jetbrains.intellij from 1.5.2 to 1.5.3.

 ---
 updated-dependencies:
 - dependency-name: org.jetbrains.intellij
   dependency-type: direct:production
   update-type: version-update:semver-patch
 ...

 Signed-off-by: dependabot[bot] <support@github.com>
2022-05-05 17:42:14 +02:00
..
2022-03-14 10:45:00 +01:00
2022-01-12 12:09:34 +01:00
2022-02-08 17:44:47 +01:00
2020-10-15 17:10:31 +02:00
2021-11-08 17:31:16 +01:00

Conditional Operator Converter JetBrains IntelliJ Platform SDK Docs

Reference: Code Intentions in IntelliJ SDK Docs

Quickstart

Conditional Operator Converter provides an intention for converting the ternary operator into the if statement, i.e.:

public class X {
  void f(boolean isMale) {
    String title = isMale ? "Mr." : "Ms.";
    System.out.println("title = " + title);
 }
}

will become:

public class X {
  void f(boolean isMale) {
    String title;
    if (isMale) {
      title = "Mr.";
    } else {
      title = "Ms.";
    }
    System.out.println("title = " + title);
  }
}

To invoke the intention action, it is necessary to place the caret on the ? character of the ternary operator. The converter in the isAvailable method, has defined the token check to match JavaTokenType.QUEST, which is ? character.

Extension Points

Name Implementation Extension Point Class
com.intellij.intentionAction ConditionalOperatorConverter PsiElementBaseIntentionAction

Reference: Plugin Extension Points in IntelliJ SDK Docs