int (@Nullable GrStatement statement) { if (statement instanceof GrBlockStatement) { return BLOCK_STATEMENT; } if (statement instanceof GrBreakStatement) { return BREAK_STATEMENT; } if (statement instanceof GrContinueStatement) { return CONTINUE_STATEMENT; } if (statement instanceof GrVariableDeclaration) { return VAR_STATEMENT; } if (statement instanceof GrApplicationStatement) { return APPLICATION_STATEMENT; } if (statement instanceof GrExpression) { return EXPRESSION_STATEMENT; } if (statement instanceof GrForStatement) { return FOR_STATEMENT; } if (statement instanceof GrIfStatement) { return IF_STATEMENT; } if (statement instanceof GrReturnStatement) { return RETURN_STATEMENT; } if (statement instanceof GrSwitchStatement) { return SWITCH_STATEMENT; } if (statement instanceof GrThrowStatement) { return THROW_STATEMENT; } if (statement instanceof GrTryCatchStatement) { return TRY_STATEMENT; } if (statement instanceof GrWhileStatement) { return WHILE_STATEMENT; } if (statement instanceof GrSynchronizedStatement) { return SYNCHRONIZED_STATEMENT; } if (statement instanceof GrAssertStatement) { return ASSERT_STATEMENT; } return -1; // Type of expression can be defined in third party plugins. See issue #IDEA-59846 }