This commit is contained in:
Alexey Kudravtsev
2016-07-12 12:14:00 +03:00
parent cf212616ff
commit 3cc846a0c7
7 changed files with 69 additions and 46 deletions
@@ -31,13 +31,13 @@ import java.awt.*;
public class JavaFoldingBuilder extends JavaFoldingBuilderBase {
@Override
protected boolean isBelowRightMargin(Project project, int lineLength) {
protected boolean isBelowRightMargin(@NotNull Project project, int lineLength) {
final CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(project);
return lineLength <= settings.getRightMargin(JavaLanguage.INSTANCE);
}
@Override
protected boolean shouldShowExplicitLambdaType(PsiAnonymousClass anonymousClass, PsiNewExpression expression) {
protected boolean shouldShowExplicitLambdaType(@NotNull PsiAnonymousClass anonymousClass, @NotNull PsiNewExpression expression) {
PsiElement parent = expression.getParent();
if (parent instanceof PsiReferenceExpression || parent instanceof PsiAssignmentExpression) {
return true;