<commit_before>package com.tagmycode.netbeans.options;

import com.tagmycode.netbeans.TagMyCodeTopComponent;
import com.tagmycode.plugin.gui.form.SettingsForm;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import javax.swing.JComponent;
import javax.swing.JPanel;
import org.netbeans.spi.options.OptionsPanelController;
import org.openide.util.HelpCtx;
import org.openide.util.Lookup;

@OptionsPanelController.SubRegistration(
        displayName = "#AdvancedOption_DisplayName_TagMyCode",
        keywords = "#AdvancedOption_Keywords_TagMyCode",
        keywordsCategory = "Advanced/TagMyCode"
)
@org.openide.util.NbBundle.Messages({"AdvancedOption_DisplayName_TagMyCode=TagMyCode", "AdvancedOption_Keywords_TagMyCode=keywords"})
public final class TagMyCodeOptionsPanelController extends OptionsPanelController {

    private JPanel panel;
    private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
    private boolean changed;

    @Override
    public void update() {
        changed = false;
    }

    @Override
    public void applyChanges() {
        changed = false;
    }

    @Override
    public void cancel() {
        // need not do anything special, if no changes have been persisted yet
    }

    @Override
    public boolean isValid() {
        return true;
    }

    @Override
    public boolean isChanged() {
        return changed;
    }

    @Override
    public HelpCtx getHelpCtx() {
        return null; // new HelpCtx("...ID") if you have a help set
    }

    @Override
    public JComponent getComponent(Lookup masterLookup) {
        return getPanel();
    }

    @Override
    public void addPropertyChangeListener(PropertyChangeListener l) {
        pcs.addPropertyChangeListener(l);
    }

    @Override
    public void removePropertyChangeListener(PropertyChangeListener l) {
        pcs.removePropertyChangeListener(l);
    }

    private JPanel getPanel() {
        if (panel == null) {
            panel = (JPanel) new SettingsForm(TagMyCodeTopComponent.getInstance().getFramework()).getMainComponent();
        }
        return panel;
    }

    void changed() {
        if (!changed) {
            changed = true;
            pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true);
        }
        pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
    }

    }<commit_msg>integrated latest version of Plugin Framework<commit_after>package com.tagmycode.netbeans.options;

import com.tagmycode.netbeans.TagMyCodeTopComponent;
import com.tagmycode.plugin.gui.form.SettingsForm;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import javax.swing.JComponent;
import org.netbeans.spi.options.OptionsPanelController;
import org.openide.util.HelpCtx;
import org.openide.util.Lookup;

@OptionsPanelController.SubRegistration(
        displayName = "#AdvancedOption_DisplayName_TagMyCode",
        keywords = "#AdvancedOption_Keywords_TagMyCode",
        keywordsCategory = "Advanced/TagMyCode"
)
@org.openide.util.NbBundle.Messages({"AdvancedOption_DisplayName_TagMyCode=TagMyCode", "AdvancedOption_Keywords_TagMyCode=keywords"})
public final class TagMyCodeOptionsPanelController extends OptionsPanelController {

    private JComponent panel;
    private final PropertyChangeSupport pcs = new PropertyChangeSupport(this);
    private boolean changed;

    @Override
    public void update() {
        changed = false;
    }

    @Override
    public void applyChanges() {
        changed = false;
    }

    @Override
    public void cancel() {
        // need not do anything special, if no changes have been persisted yet
    }

    @Override
    public boolean isValid() {
        return true;
    }

    @Override
    public boolean isChanged() {
        return changed;
    }

    @Override
    public HelpCtx getHelpCtx() {
        return null; // new HelpCtx("...ID") if you have a help set
    }

    @Override
    public JComponent getComponent(Lookup masterLookup) {
        return getPanel();
    }

    @Override
    public void addPropertyChangeListener(PropertyChangeListener l) {
        pcs.addPropertyChangeListener(l);
    }

    @Override
    public void removePropertyChangeListener(PropertyChangeListener l) {
        pcs.removePropertyChangeListener(l);
    }

    private JComponent getPanel() {
        if (panel == null) {
            panel = new SettingsForm(TagMyCodeTopComponent.getInstance().getFramework()).getMainComponent();
        }
        return panel;
    }

    void changed() {
        if (!changed) {
            changed = true;
            pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true);
        }
        pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null);
    }

    }
{'fraction_non_alphanumeric': 0.08606387391124015, 'fraction_numerical': 0.0, 'mean_word_length': 3.23441615452151, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '18061', 'n_tokens_mistral': 1324, 'n_tokens_neox': 1285, 'n_words': 290}