F class and F.form, F class fields are not bound


I've copied MyUIForm.form from the applicationConfigurable example and I've created a class. I've wired the class in my plugin.xml:

    <extensions defaultExtensionNs="com.intellij">
        <applicationConfigurable instance="org.kostaskougios.idea.preferences.SourceFolderPreferences"/>

my class (a scala class) looks like:

package org.kostaskougios.idea.preferences

import javax.swing._

import com.intellij.ide.ui.UISettings
import com.intellij.openapi.options.Configurable
import com.intellij.util.ui.UIUtil

* @author    kostas.kougios
*            Date: 31/07/14
class SourceFolderPreferences extends Configurable
    private var myComponent: JComponent = _
    private var myFontName: JComboBox[String] = _
    private var myFontSize: JComboBox[String] = _
    private var MyDefaultFontButton: JButton = _
    private var myPanel:JPanel = _

    override def getDisplayName = "Scala Idea Extensions"

    override def getHelpTopic = null

    override def isModified = false

    override def createComponent() = {
        val settings = UISettings.getInstance
        myFontName.setModel(new DefaultComboBoxModel(UIUtil.getValidFontNames(false)))
        myFontSize.setModel(new DefaultComboBoxModel(UIUtil.getStandardFontSizes))

    override def disposeUIResources() {}

    override def apply() {}

    override def reset() {}

When I run my plugin, in the settings page I can see "Scala Idea Extensions" but myFontName and the rest of the fields are null. Any idea how to wire those properly?


Comment actions Permalink

Did you set the "Bind to class" field of the form to the qualified name of your class?


Please sign in to leave a comment.