Code style group help topic (for SQL)

GitOrigin-RevId: 34510e5dadaea646cf955c7eb0b4da3084fd96d3
This commit is contained in:
Rustam Vishnyakov
2019-07-23 17:44:15 +03:00
committed by intellij-monorepo-bot
parent 0d74858a98
commit a537d61c4c
2 changed files with 26 additions and 0 deletions
@@ -3,6 +3,7 @@ package com.intellij.psi.codeStyle;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents a group of code style configurables sharing the same {@code CodeStyleGroup} instance. The group is shown as a separate node
@@ -11,6 +12,7 @@ import org.jetbrains.annotations.NotNull;
public class CodeStyleGroup {
private final String myDisplayName;
private final String myId;
private final String myHelpTopic;
/**
* Constructor.
@@ -19,8 +21,20 @@ public class CodeStyleGroup {
* @param displayName The display name as shown in settings UI.
*/
public CodeStyleGroup(@NotNull String groupId, @NotNull String displayName) {
this(groupId, displayName, null);
}
/**
* Constructor.
*
* @param groupId The unique group ID.
* @param displayName The display name as shown in settings UI.
* @param helpTopic The help topic associated with the group.
*/
public CodeStyleGroup(@NotNull String groupId, @NotNull String displayName, @Nullable String helpTopic) {
myId = groupId;
myDisplayName = displayName;
myHelpTopic = helpTopic;
}
/**
@@ -37,4 +51,9 @@ public class CodeStyleGroup {
public String getId() {
return myId;
}
@Nullable
public String getHelpTopic() {
return myHelpTopic;
}
}
@@ -13,6 +13,7 @@ import com.intellij.psi.codeStyle.CodeStyleSettings;
import com.intellij.psi.codeStyle.CodeStyleSettingsProvider;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.List;
@@ -90,5 +91,11 @@ public class CodeStyleGroupProvider extends CodeStyleSettingsProvider {
public String getId() {
return myGroup.getId();
}
@Nullable
@Override
public String getHelpTopic() {
return myGroup.getHelpTopic();
}
}
}