<groupConfigurable> is not configurable

Answered

I declare a Settings group named '<groupConfigurable>' and a child named '<applicationConfigurable>' for the Settings group, but I find that the Settings group is not configurable. I want to know why.

plugin.xml:

        <groupConfigurable id="JsonAssistant.Configurable.JsonAssistantMainGroupConfigurable"
                           parentId="tools"
                           displayNameKey="plugin.group.configurable.displayName.key"
                           descriptionKey="plugin.group.configurable.description.key"
                           bundle="messages.JsonAssistantBundle"/>
        
        <applicationConfigurable
                groupId="JsonAssistant.Configurable.JsonAssistantMainGroupConfigurable"
                instance="cn.memoryzy.json.extension.EditorOptionsConfigurable"
                id="JsonAssistant.Configurable.EditorOptionsConfigurable"
                displayName="Json Viewer"/>
                
bundle:

plugin.group.configurable.displayName.key=Json Assistant
plugin.group.configurable.description.key=<html><body>12ssssssss</body></html>

 

0
8 comments

Hi,

Your registration looks correct to me.

Is there anything in logs?

What are full implementations of the group, configurable?

What is the IDE context (IDE type and version)?

0

There doesn't seem to be anything special in the logs.

 

idea.log:

2024-09-12 16:26:13,302 [   2094]   WARN - #c.i.n.i.NotificationGroupManagerImpl - Notification group CodeWithMe is already registered (group=com.intellij.notification.NotificationGroup@296bc58). Plugin descriptor: PluginDescriptor(name=Code With Me, id=com.jetbrains.codeWithMe, descriptorPath=plugin.xml, path=D:\CodeSoftWare\GradleRepository4\caches\modules-2\files-2.1\com.jetbrains.intellij.idea\ideaIC\2022.1.4\e3ffd300c9b86b78a24cd23fdc358ac8493afdf5\ideaIC-2022.1.4\plugins\cwm-plugin, version=221.6008.13, package=null, isBundled=true)
2024-09-12 16:26:20,202 [   8994]   WARN - #c.a.t.i.a.AvdManagerConnection - No Android SDK Found
2024-09-12 16:26:27,214 [  16006]   WARN - #c.i.o.a.i.ActionUpdater - 340 ms to grab EDT for CodeWithMeUsersAction#update (com.jetbrains.rd.platform.codeWithMe.toolbar.CodeWithMeUsersAction)
2024-09-12 16:26:28,419 [  17211]   WARN - #c.i.o.o.e.ConfigurableExtensionPointUtil - ignore deprecated groupId: language for id: preferences.language.Kotlin.scripting

 

Full implementation:

    <extensions defaultExtensionNs="com.intellij">


        <groupConfigurable id="JsonAssistant.Configurable.JsonAssistantMainGroupConfigurable"
                           parentId="tools"
                           displayNameKey="plugin.group.configurable.displayName.key"
                           descriptionKey="plugin.group.configurable.description.key"
                           bundle="messages.JsonAssistantBundle"/>
        
        <applicationConfigurable
                groupId="JsonAssistant.Configurable.JsonAssistantMainGroupConfigurable"
                instance="cn.memoryzy.json.extension.EditorOptionsConfigurable"
                id="JsonAssistant.Configurable.EditorOptionsConfigurable"
                displayName="Json Viewer"/>

    </extensions>

 

JsonAssistantBundle.properties:

plugin.group.configurable.displayName.key=Json Assistant
plugin.group.configurable.description.key=<html><body>12ssssssss</body></html>

 

JsonAssistantBundle_zh.properties:

plugin.group.configurable.displayName.key=Json Assistant
plugin.group.configurable.description.key=<html><body>888gggggggg</body></html>

 

IDE info:

IntelliJ IDEA 2023.2.4 (Ultimate Edition)

 

 

0

You most likely forgot to paste the full implementation of your classes.

0

Are you referring to cn.memoryzy.json.extension.EditorOptionsConfigurable?

 

public class EditorOptionsConfigurable implements Configurable {

    private EditorOptionsPersistentState persistentState;
    private EditorOptionsComponentProvider componentProvider;

    public EditorOptionsConfigurable() {
        this.persistentState = EditorOptionsPersistentState.getInstance();
        this.componentProvider = new EditorOptionsComponentProvider();
    }


    @Override
    public String getDisplayName() {
        return "Json Viewer";
    }

    @Override
    public @Nullable JComponent createComponent() {
        if (persistentState == null) persistentState = EditorOptionsPersistentState.getInstance();
        if (componentProvider == null) componentProvider = new EditorOptionsComponentProvider();
        return componentProvider.createRootPanel();
    }

    @Override
    public void reset() {

    }

    @Override
    public boolean isModified() {


        return false;
    }

    @Override
    public void apply() {

    }

    @Override
    public void disposeUIResources() {
        persistentState = null;
        componentProvider = null;
    }
}
0

I made a mistake, the IDE version should be IntelliJ IDEA 2022.1.4 (Community Edition)

0

I still don't know how to fix this.

0

Hi,

It seems like a bug. Please report at https://youtrack.jetbrains.com/issues/IJPL.

Also, consider avoiding creating a custom group, if you don't have many configurable for it. From com.intellij.openapi.options.ex.ConfigurableGroupEP doc:

This extension point is intended to group different configurables in order to simplify finding them in the Settings tree. If a group in the tree is selected, an uneditable page with a brief description is displayed. Therefore, do not use groups to create a hierarchy of configurables, especially if there are very few of them. It is recommended to create a hierarchy using ConfigurableEP.

0

Ok, thank you very much!

0

Please sign in to leave a comment.