Search in sources :

Example 11 with CommitStepException

use of com.intellij.ide.wizard.CommitStepException in project intellij-community by JetBrains.

the class BindToNewBeanStep method _commit.

public void _commit(boolean finishChosen) throws CommitStepException {
    // Stop editing if any
    final TableCellEditor cellEditor = myTable.getCellEditor();
    if (cellEditor != null) {
        cellEditor.stopCellEditing();
    }
    // Check that all included fields are bound to valid bean properties
    final PsiNameHelper nameHelper = PsiNameHelper.getInstance(myData.myProject);
    for (int i = 0; i < myData.myBindings.length; i++) {
        final FormProperty2BeanProperty binding = myData.myBindings[i];
        if (binding.myBeanProperty == null) {
            continue;
        }
        if (!nameHelper.isIdentifier(binding.myBeanProperty.myName)) {
            throw new CommitStepException(UIDesignerBundle.message("error.X.is.not.a.valid.property.name", binding.myBeanProperty.myName));
        }
    }
    myData.myGenerateIsModified = myChkIsModified.isSelected();
}
Also used : PsiNameHelper(com.intellij.psi.PsiNameHelper) CommitStepException(com.intellij.ide.wizard.CommitStepException) TableCellEditor(javax.swing.table.TableCellEditor)

Aggregations

CommitStepException (com.intellij.ide.wizard.CommitStepException)11 File (java.io.File)4 KeyStore (java.security.KeyStore)4 IOException (java.io.IOException)3 PropertiesComponent (com.intellij.ide.util.PropertiesComponent)2 FileInputStream (java.io.FileInputStream)2 PrivateKey (java.security.PrivateKey)2 Certificate (java.security.cert.Certificate)2 X509Certificate (java.security.cert.X509Certificate)2 AndroidFacet (org.jetbrains.android.facet.AndroidFacet)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 PasswordSafe (com.intellij.ide.passwordSafe.PasswordSafe)1 ModuleWizardStep (com.intellij.ide.util.projectWizard.ModuleWizardStep)1 CompileScope (com.intellij.openapi.compiler.CompileScope)1 Logger (com.intellij.openapi.diagnostic.Logger)1 Module (com.intellij.openapi.module.Module)1 Project (com.intellij.openapi.project.Project)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 PsiNameHelper (com.intellij.psi.PsiNameHelper)1 TIntArrayList (gnu.trove.TIntArrayList)1