<MyAddFieldPlugin Project>/src/org/myorg/myaddfieldplugin/AddAtomCountField.java
    @Override
    public void actionPerformed(ActionEvent ev) {
        DFEntity entity = context.getItem();
        
        if (DFEntities.isJChemEntity(entity)) {
            DialogDescriptor.Confirmation dd = new DialogDescriptor.Confirmation(
                    NbBundle.getMessage(AddAtomCountFieldAction.class, "AddAtomCount_Confirm", entity.getName()),
                    NbBundle.getMessage(AddAtomCountFieldAction.class, "TITLE_AddAtomCount_Confirm"),
                    DialogDescriptor.YES_NO_OPTION,
                    DialogDescriptor.QUESTION_MESSAGE);

            Object retCode = DialogDisplayer.getDefault().notify(dd);
            if (retCode == DialogDescriptor.YES_OPTION) {
                NotifyDescriptor nd = new NotifyDescriptor.Message(
                        "Hurray!", NotifyDescriptor.INFORMATION_MESSAGE);
                 DialogDisplayer.getDefault().notify(nd);
             }
            
        } else {
            NotifyDescriptor nd = new NotifyDescriptor.Message(
                    NbBundle.getMessage(AddAtomCountFieldAction.class, "AddAtomCount_Standard_Entity", entity.getName()),
                    NotifyDescriptor.INFORMATION_MESSAGE);

            DialogDisplayer.getDefault().notify(nd);
        }
    }