From b3de9ce33f8804ae73b2640a6550734f02812035 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Tue, 5 Jun 2012 15:34:04 +0400 Subject: [PATCH] Cleanup --- .../com/intellij/psi/PsiBinaryExpression.java | 4 +-- .../src/com/intellij/psi/PsiVariable.java | 27 ++++++++++--------- .../intellij/psi/stubs/LightStubBuilder.java | 10 +++---- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/java/java-psi-api/src/com/intellij/psi/PsiBinaryExpression.java b/java/java-psi-api/src/com/intellij/psi/PsiBinaryExpression.java index 438863ae681b..107c02f87b67 100644 --- a/java/java-psi-api/src/com/intellij/psi/PsiBinaryExpression.java +++ b/java/java-psi-api/src/com/intellij/psi/PsiBinaryExpression.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2012 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,7 @@ import com.intellij.psi.tree.IElementType; * Represents a Java binary expression (addition, multiplication and so on). * N.B Please use {@link PsiPolyadicExpression} instead as a more general form of an infix operator-expression. */ -public interface PsiBinaryExpression extends PsiExpression, PsiPolyadicExpression { +public interface PsiBinaryExpression extends PsiPolyadicExpression { /** * Returns the left operand of the expression. * diff --git a/java/java-psi-api/src/com/intellij/psi/PsiVariable.java b/java/java-psi-api/src/com/intellij/psi/PsiVariable.java index 4d6a71ab6d62..7b1a768d1805 100644 --- a/java/java-psi-api/src/com/intellij/psi/PsiVariable.java +++ b/java/java-psi-api/src/com/intellij/psi/PsiVariable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2012 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,8 @@ public interface PsiVariable extends PsiModifierListOwner, PsiNameIdentifierOwne * * @return the variable type. */ - @NotNull PsiType getType(); + @NotNull + PsiType getType(); /** * Returns the type element declaring the type of the variable. @@ -46,15 +47,15 @@ public interface PsiVariable extends PsiModifierListOwner, PsiNameIdentifierOwne * @return the initializer expression, or null if it has no initializer. * @see {@link #hasInitializer()} */ - @Nullable PsiExpression getInitializer(); + @Nullable + PsiExpression getInitializer(); /** - * Checks if the variable has an initializer. + *

Checks if the variable has an initializer.

+ *

Please note that even when {@link #hasInitializer()} returns true, {@link #getInitializer()} still can return null, + * e.g. for implicit initializer in case of enum constant declaration.

* - * @return true if the variable has an initializer, false otherwise - * - * Please note that even when {@link #hasInitializer()} returns true, {@link #getInitializer()} still can return null, - * e.g. for implicit initializer in case of enum constant declaration + * @return true if the variable has an initializer, false otherwise. */ boolean hasInitializer(); @@ -63,7 +64,7 @@ public interface PsiVariable extends PsiModifierListOwner, PsiNameIdentifierOwne * other declarations. Also, if the variable is an array, ensures that the array * brackets are used in Java style (int[] a) * and not in C style ( int a[]). - * + * * @throws IncorrectOperationException if the modification fails for some reason. */ void normalizeDeclaration() throws IncorrectOperationException; // Q: split into normalizeBrackets and splitting declarations? @@ -72,9 +73,10 @@ public interface PsiVariable extends PsiModifierListOwner, PsiNameIdentifierOwne * Calculates and returns the constant value of the variable initializer. * * @return the calculated value, or null if the variable has no initializer or - * the initializer does not evaluate to a constant. + * the initializer does not evaluate to a constant. */ - @Nullable Object computeConstantValue(); + @Nullable + Object computeConstantValue(); /** * Returns the identifier declaring the name of the variable. @@ -82,7 +84,8 @@ public interface PsiVariable extends PsiModifierListOwner, PsiNameIdentifierOwne * @return the variable name identifier. */ @Override - @Nullable PsiIdentifier getNameIdentifier(); + @Nullable + PsiIdentifier getNameIdentifier(); @Override PsiElement setName(@NonNls @NotNull String name) throws IncorrectOperationException; diff --git a/platform/core-api/src/com/intellij/psi/stubs/LightStubBuilder.java b/platform/core-api/src/com/intellij/psi/stubs/LightStubBuilder.java index 0e0adf8bc83e..7d4761cb9b15 100644 --- a/platform/core-api/src/com/intellij/psi/stubs/LightStubBuilder.java +++ b/platform/core-api/src/com/intellij/psi/stubs/LightStubBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2012 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -154,10 +154,10 @@ public class LightStubBuilder implements StubBuilder { return skipChildProcessingWhenBuildingStubs(parent != null ? parent.getElementType() : null, childType); } - public boolean skipChildProcessingWhenBuildingStubs(LightStubBuilder builder, - LighterAST tree, - final LighterASTNode parent, - final LighterASTNode child) { + public boolean skipChildProcessingWhenBuildingStubs(final LightStubBuilder builder, + final LighterAST tree, + final LighterASTNode parent, + final LighterASTNode child) { return false; }