diff --git a/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/LibrariesValidationComponentImpl.java b/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/LibrariesValidationComponentImpl.java index afcfb0a6931b..ff18622753e6 100644 --- a/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/LibrariesValidationComponentImpl.java +++ b/java/idea-ui/src/com/intellij/facet/impl/ui/libraries/LibrariesValidationComponentImpl.java @@ -17,8 +17,8 @@ package com.intellij.facet.impl.ui.libraries; import com.intellij.facet.impl.ui.FacetErrorPanel; -import com.intellij.facet.ui.libraries.LibrariesValidationComponent; import com.intellij.facet.ui.libraries.FacetLibrariesValidatorDescription; +import com.intellij.facet.ui.libraries.LibrariesValidationComponent; import com.intellij.facet.ui.libraries.LibraryInfo; import com.intellij.openapi.module.Module; import com.intellij.util.EventDispatcher; @@ -41,7 +41,7 @@ public class LibrariesValidationComponentImpl implements LibrariesValidationComp myLibrariesValidator = new FacetLibrariesValidatorImpl(requiredLibraries, description, new LibrariesValidatorContextImpl(myModule), myErrorPanel.getValidatorsManager()); myErrorPanel.getValidatorsManager().registerValidator(myLibrariesValidator); - myErrorPanel.addListener(() -> myDispatcher.getMulticaster().valididyChanged(myErrorPanel.isOk())); + myErrorPanel.addListener(() -> myDispatcher.getMulticaster().validityChanged(myErrorPanel.isOk())); } public JComponent getComponent() { diff --git a/java/idea-ui/src/com/intellij/util/descriptors/impl/ConfigFileFactoryImpl.java b/java/idea-ui/src/com/intellij/util/descriptors/impl/ConfigFileFactoryImpl.java index ac1a599304e9..f9c66f11f331 100644 --- a/java/idea-ui/src/com/intellij/util/descriptors/impl/ConfigFileFactoryImpl.java +++ b/java/idea-ui/src/com/intellij/util/descriptors/impl/ConfigFileFactoryImpl.java @@ -41,8 +41,8 @@ public class ConfigFileFactoryImpl extends ConfigFileFactory { private static final Logger LOG = Logger.getInstance("#com.intellij.util.descriptors.impl.ConfigFileFactoryImpl"); @Override - public ConfigFileMetaDataProvider createMetaDataProvider(final ConfigFileMetaData... metaDatas) { - return new ConfigFileMetaDataRegistryImpl(metaDatas); + public ConfigFileMetaDataProvider createMetaDataProvider(final ConfigFileMetaData... metaData) { + return new ConfigFileMetaDataRegistryImpl(metaData); } @Override diff --git a/java/java-impl/src/com/intellij/refactoring/openapi/impl/JavaRefactoringFactoryImpl.java b/java/java-impl/src/com/intellij/refactoring/openapi/impl/JavaRefactoringFactoryImpl.java index 92c8dc2b054d..945f7b141086 100644 --- a/java/java-impl/src/com/intellij/refactoring/openapi/impl/JavaRefactoringFactoryImpl.java +++ b/java/java-impl/src/com/intellij/refactoring/openapi/impl/JavaRefactoringFactoryImpl.java @@ -138,8 +138,8 @@ public class JavaRefactoringFactoryImpl extends JavaRefactoringFactory { PsiMethod methodToSearchFor, String parameterName, PsiExpression parameterInitializer, PsiExpression expressionToSearchFor, - boolean declareFinal, final boolean replaceAllOccurences) { + boolean declareFinal, final boolean replaceAllOccurrences) { return new IntroduceParameterRefactoringImpl(myProject, methodToReplaceIn, methodToSearchFor, parameterName, parameterInitializer, - expressionToSearchFor, declareFinal, replaceAllOccurences); + expressionToSearchFor, declareFinal, replaceAllOccurrences); } } diff --git a/java/openapi/src/com/intellij/facet/ui/libraries/LibrariesValidationComponent.java b/java/openapi/src/com/intellij/facet/ui/libraries/LibrariesValidationComponent.java index 6dfa6a51b4ee..26930f6af2b5 100644 --- a/java/openapi/src/com/intellij/facet/ui/libraries/LibrariesValidationComponent.java +++ b/java/openapi/src/com/intellij/facet/ui/libraries/LibrariesValidationComponent.java @@ -37,6 +37,6 @@ public interface LibrariesValidationComponent { void removeValidityListener(ValidityListener listener); interface ValidityListener extends EventListener { - void valididyChanged(boolean isValid); + void validityChanged(boolean isValid); } } diff --git a/java/openapi/src/com/intellij/ide/util/projectWizard/ProjectWizardStepFactory.java b/java/openapi/src/com/intellij/ide/util/projectWizard/ProjectWizardStepFactory.java index 254ca1b41e10..96e929755be2 100644 --- a/java/openapi/src/com/intellij/ide/util/projectWizard/ProjectWizardStepFactory.java +++ b/java/openapi/src/com/intellij/ide/util/projectWizard/ProjectWizardStepFactory.java @@ -38,7 +38,7 @@ public abstract class ProjectWizardStepFactory { public abstract ModuleWizardStep createSourcePathsStep(WizardContext context, SourcePathsBuilder builder, Icon icon, @NonNls String helpId); - public abstract ModuleWizardStep createProjectJdkStep(WizardContext context, SdkType type, JavaModuleBuilder builder, Computable isVisibile, Icon icon, @NonNls String helpId); + public abstract ModuleWizardStep createProjectJdkStep(WizardContext context, SdkType type, JavaModuleBuilder builder, Computable isVisible, Icon icon, @NonNls String helpId); public abstract ModuleWizardStep createProjectJdkStep(final WizardContext wizardContext); diff --git a/java/openapi/src/com/intellij/psi/statistics/JavaStatisticsManager.java b/java/openapi/src/com/intellij/psi/statistics/JavaStatisticsManager.java index 5aa528da6428..15c7520b83df 100644 --- a/java/openapi/src/com/intellij/psi/statistics/JavaStatisticsManager.java +++ b/java/openapi/src/com/intellij/psi/statistics/JavaStatisticsManager.java @@ -107,9 +107,9 @@ public abstract class JavaStatisticsManager { @NonNls StringBuilder buffer = new StringBuilder(); buffer.append("method#"); buffer.append(method.getName()); - for (PsiParameter parm : method.getParameterList().getParameters()) { + for (PsiParameter param : method.getParameterList().getParameters()) { buffer.append("#"); - buffer.append(parm.getType().getPresentableText()); + buffer.append(param.getType().getPresentableText()); } return buffer.toString(); } diff --git a/java/openapi/src/com/intellij/refactoring/JavaRefactoringFactory.java b/java/openapi/src/com/intellij/refactoring/JavaRefactoringFactory.java index c8796e5d2c9d..82d0a8726369 100644 --- a/java/openapi/src/com/intellij/refactoring/JavaRefactoringFactory.java +++ b/java/openapi/src/com/intellij/refactoring/JavaRefactoringFactory.java @@ -30,7 +30,7 @@ public abstract class JavaRefactoringFactory extends RefactoringFactory { public abstract MoveDestination createSourceFolderPreservingMoveDestination(@NotNull String targetPackageQualifiedName); /** - * Creates move destination for a specified package that moves all items to a specifed source folder + * Creates move destination for a specified package that moves all items to a specified source folder */ public abstract MoveDestination createSourceRootMoveDestination(@NotNull String targetPackageQualifiedName, @NotNull VirtualFile sourceRoot); @@ -104,7 +104,7 @@ public abstract class JavaRefactoringFactory extends RefactoringFactory { * @param parameterInitializer Initializer to use in method calls. * @param expressionToSearchFor expression that should be replaced with parameters * @param declareFinal should created parameter be declared {@code final} - * @param replaceAllOccurences should all occurences of expression be replaced + * @param replaceAllOccurrences should all occurrences of expression be replaced */ public abstract IntroduceParameterRefactoring createIntroduceParameterRefactoring(PsiMethod methodToReplaceIn, PsiMethod methodToSearchFor, @@ -112,5 +112,5 @@ public abstract class JavaRefactoringFactory extends RefactoringFactory { PsiExpression parameterInitializer, PsiExpression expressionToSearchFor, boolean declareFinal, - final boolean replaceAllOccurences); + final boolean replaceAllOccurrences); } diff --git a/java/openapi/src/com/intellij/util/descriptors/ConfigFileFactory.java b/java/openapi/src/com/intellij/util/descriptors/ConfigFileFactory.java index e1ceedfb3c06..29384d3cc5e6 100644 --- a/java/openapi/src/com/intellij/util/descriptors/ConfigFileFactory.java +++ b/java/openapi/src/com/intellij/util/descriptors/ConfigFileFactory.java @@ -29,7 +29,7 @@ public abstract class ConfigFileFactory { return ServiceManager.getService(ConfigFileFactory.class); } - public abstract ConfigFileMetaDataProvider createMetaDataProvider(ConfigFileMetaData... metaDatas); + public abstract ConfigFileMetaDataProvider createMetaDataProvider(ConfigFileMetaData... metaData); public abstract ConfigFileInfoSet createConfigFileInfoSet(ConfigFileMetaDataProvider metaDataProvider); diff --git a/platform/lang-api/src/com/intellij/codeInsight/completion/InsertionContext.java b/platform/lang-api/src/com/intellij/codeInsight/completion/InsertionContext.java index 41296771d831..7278b366c26e 100644 --- a/platform/lang-api/src/com/intellij/codeInsight/completion/InsertionContext.java +++ b/platform/lang-api/src/com/intellij/codeInsight/completion/InsertionContext.java @@ -89,8 +89,8 @@ public class InsertionContext { return myOffsetMap; } - public OffsetKey trackOffset(int offset, boolean moveableToRight) { - final OffsetKey key = OffsetKey.create("tracked", moveableToRight); + public OffsetKey trackOffset(int offset, boolean movableToRight) { + final OffsetKey key = OffsetKey.create("tracked", movableToRight); getOffsetMap().addOffset(key, offset); return key; } diff --git a/platform/lang-api/src/com/intellij/codeInsight/completion/NextPrevParameterAction.java b/platform/lang-api/src/com/intellij/codeInsight/completion/NextPrevParameterAction.java index 0b5fb6119b20..21b290990123 100644 --- a/platform/lang-api/src/com/intellij/codeInsight/completion/NextPrevParameterAction.java +++ b/platform/lang-api/src/com/intellij/codeInsight/completion/NextPrevParameterAction.java @@ -25,7 +25,6 @@ import com.intellij.codeInsight.actions.CodeInsightAction; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.extensions.Extensions; import com.intellij.openapi.project.Project; -import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.PsiFile; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -45,10 +44,10 @@ public abstract class NextPrevParameterAction extends CodeInsightAction { @Override protected boolean isValidForFile(@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { - return hasSutablePolicy(editor, file); + return hasSuitablePolicy(editor, file); } - public static boolean hasSutablePolicy(Editor editor, PsiFile file) { + public static boolean hasSuitablePolicy(Editor editor, PsiFile file) { return findSuitableTraversalPolicy(editor, file) != null; } diff --git a/platform/lang-api/src/com/intellij/codeInsight/completion/OffsetKey.java b/platform/lang-api/src/com/intellij/codeInsight/completion/OffsetKey.java index e4dc0dfeac4e..8d81c9a0ebde 100644 --- a/platform/lang-api/src/com/intellij/codeInsight/completion/OffsetKey.java +++ b/platform/lang-api/src/com/intellij/codeInsight/completion/OffsetKey.java @@ -22,26 +22,26 @@ import org.jetbrains.annotations.NonNls; */ public class OffsetKey { private final String myName; // for debug purposes only - private final boolean myMoveableToRight; + private final boolean myMovableToRight; - private OffsetKey(@NonNls String name, final boolean moveableToRight) { + private OffsetKey(@NonNls String name, final boolean movableToRight) { myName = name; - myMoveableToRight = moveableToRight; + myMovableToRight = movableToRight; } public String toString() { return myName; } - public boolean isMoveableToRight() { - return myMoveableToRight; + public boolean isMovableToRight() { + return myMovableToRight; } public static OffsetKey create(@NonNls String name) { return create(name, true); } - public static OffsetKey create(@NonNls String name, final boolean moveableToRight) { - return new OffsetKey(name, moveableToRight); + public static OffsetKey create(@NonNls String name, final boolean movableToRight) { + return new OffsetKey(name, movableToRight); } } diff --git a/platform/lang-api/src/com/intellij/codeInsight/completion/OffsetMap.java b/platform/lang-api/src/com/intellij/codeInsight/completion/OffsetMap.java index 36294635f289..54825409b04f 100644 --- a/platform/lang-api/src/com/intellij/codeInsight/completion/OffsetMap.java +++ b/platform/lang-api/src/com/intellij/codeInsight/completion/OffsetMap.java @@ -95,7 +95,7 @@ public class OffsetMap implements Disposable { RangeMarker old = myMap.get(key); if (old != null) old.dispose(); final RangeMarker marker = myDocument.createRangeMarker(offset, offset); - marker.setGreedyToRight(key.isMoveableToRight()); + marker.setGreedyToRight(key.isMovableToRight()); myMap.put(key, marker); } diff --git a/platform/lang-impl/src/com/intellij/openapi/editor/actions/LangIndentSelectionAction.java b/platform/lang-impl/src/com/intellij/openapi/editor/actions/LangIndentSelectionAction.java index c2149ccc9cf7..aaf5e5c3a55c 100644 --- a/platform/lang-impl/src/com/intellij/openapi/editor/actions/LangIndentSelectionAction.java +++ b/platform/lang-impl/src/com/intellij/openapi/editor/actions/LangIndentSelectionAction.java @@ -33,7 +33,7 @@ public class LangIndentSelectionAction extends IndentSelectionAction { if (LookupManager.getActiveLookup(editor) != null) return false; PsiFile psiFile = CommonDataKeys.PSI_FILE.getData(dataContext); - if (psiFile != null && NextPrevParameterAction.hasSutablePolicy(editor, psiFile)) return false; + if (psiFile != null && NextPrevParameterAction.hasSuitablePolicy(editor, psiFile)) return false; return true; } diff --git a/platform/platform-api/src/com/intellij/ExtensionPoints.java b/platform/platform-api/src/com/intellij/ExtensionPoints.java index f1b0e60c795e..38c57e2b5987 100644 --- a/platform/platform-api/src/com/intellij/ExtensionPoints.java +++ b/platform/platform-api/src/com/intellij/ExtensionPoints.java @@ -29,7 +29,7 @@ public interface ExtensionPoints extends ToolExtensionPoints { *
    * <extensions xmlns="com.intellij">
    *   <component area="IDEA_PROJECT">
-   *     <implementation>my.plugin.pagckage.MyProjectComponent</implementation>
+   *     <implementation>my.plugin.package.MyProjectComponent</implementation>
    *   </component>
    * </extensions>
    * 
diff --git a/platform/platform-api/src/com/intellij/featureStatistics/FeatureDescriptor.java b/platform/platform-api/src/com/intellij/featureStatistics/FeatureDescriptor.java index de48341e6442..f6539526b3f2 100644 --- a/platform/platform-api/src/com/intellij/featureStatistics/FeatureDescriptor.java +++ b/platform/platform-api/src/com/intellij/featureStatistics/FeatureDescriptor.java @@ -31,7 +31,7 @@ public class FeatureDescriptor{ @NotNull private String myTipFileName; @NotNull private String myDisplayName; private int myDaysBeforeFirstShowUp; - private int myDaysBetweenSuccesiveShowUps; + private int myDaysBetweenSuccessiveShowUps; private Set myDependencies; private int myMinUsageCount; @@ -79,7 +79,7 @@ public class FeatureDescriptor{ myTipFileName = tipFileName; myDisplayName = displayName; myDaysBeforeFirstShowUp = daysBeforeFirstShowUp; - myDaysBetweenSuccesiveShowUps = daysBetweenSuccessiveShowUps; + myDaysBetweenSuccessiveShowUps = daysBetweenSuccessiveShowUps; myDependencies = dependencies; myMinUsageCount = minUsageCount; myProvider = provider; @@ -90,7 +90,7 @@ public class FeatureDescriptor{ myTipFileName = element.getAttributeValue(ATTRIBUTE_TIP_FILE); myDisplayName = FeatureStatisticsBundle.message(myId); myDaysBeforeFirstShowUp = StringUtil.parseInt(element.getAttributeValue(ATTRIBUTE_FIRST_SHOW), 1); - myDaysBetweenSuccesiveShowUps = StringUtil.parseInt(element.getAttributeValue(ATTRIBUTE_SUCCESSIVE_SHOW), 3); + myDaysBetweenSuccessiveShowUps = StringUtil.parseInt(element.getAttributeValue(ATTRIBUTE_SUCCESSIVE_SHOW), 3); String minUsageCount = element.getAttributeValue(ATTRIBUTE_MIN_USAGE_COUNT); myMinUsageCount = minUsageCount == null ? 1 : Integer.parseInt(minUsageCount); List dependencies = element.getChildren(ELEMENT_DEPENDENCY); @@ -164,8 +164,8 @@ public class FeatureDescriptor{ return myDaysBeforeFirstShowUp; } - public int getDaysBetweenSuccesiveShowUps() { - return myDaysBetweenSuccesiveShowUps; + public int getDaysBetweenSuccessiveShowUps() { + return myDaysBetweenSuccessiveShowUps; } public int getMinUsageCount() { diff --git a/platform/platform-api/src/com/intellij/ide/DefaultTreeExpander.java b/platform/platform-api/src/com/intellij/ide/DefaultTreeExpander.java index ec08c45a198b..b53c8ac77083 100644 --- a/platform/platform-api/src/com/intellij/ide/DefaultTreeExpander.java +++ b/platform/platform-api/src/com/intellij/ide/DefaultTreeExpander.java @@ -46,9 +46,9 @@ public class DefaultTreeExpander implements TreeExpander { } private void showSelectionCentered() { - final int[] rowz = myTree.getSelectionRows(); - if (rowz != null && rowz.length > 0) { - TreeUtil.showRowCentered(myTree, rowz[0], false); + int[] rows = myTree.getSelectionRows(); + if (rows != null && rows.length > 0) { + TreeUtil.showRowCentered(myTree, rows[0], false); } } diff --git a/platform/platform-api/src/com/intellij/ide/GeneralSettings.java b/platform/platform-api/src/com/intellij/ide/GeneralSettings.java index 7293b9c58106..3503f6bb676c 100644 --- a/platform/platform-api/src/com/intellij/ide/GeneralSettings.java +++ b/platform/platform-api/src/com/intellij/ide/GeneralSettings.java @@ -35,14 +35,14 @@ public class GeneralSettings implements PersistentStateComponent extends DialogWrapper { } protected final void updateStep(JBCardLayout.SwipeDirection direction) { - //it would be better to pass 'direction' to 'updateStep' as a parameter, but since that method is used and overriden in plugins + //it would be better to pass 'direction' to 'updateStep' as a parameter, but since that method is used and overridden in plugins // we cannot do it without breaking compatibility try { myTransitionDirection = direction; diff --git a/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionPlaces.java b/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionPlaces.java index 04f2399b0d1d..c5b9a3388807 100644 --- a/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionPlaces.java +++ b/platform/platform-api/src/com/intellij/openapi/actionSystem/ActionPlaces.java @@ -87,7 +87,7 @@ public abstract class ActionPlaces { public static final String ANT_EXPLORER_TOOLBAR = "AntExplorerToolbar"; public static final String JS_BUILD_TOOL_POPUP = "JavaScriptBuildTool"; - //todo: probably these context should be splitted into several contexts + //todo: probably these context should be split into several contexts public static final String CODE_INSPECTION = "CodeInspection"; public static final String JAVADOC_TOOLBAR = "JavadocToolbar"; public static final String JAVADOC_INPLACE_SETTINGS = "JavadocInplaceSettings"; diff --git a/platform/platform-api/src/com/intellij/openapi/diff/DiffContent.java b/platform/platform-api/src/com/intellij/openapi/diff/DiffContent.java index e7b4e486c69a..30e13df183d4 100644 --- a/platform/platform-api/src/com/intellij/openapi/diff/DiffContent.java +++ b/platform/platform-api/src/com/intellij/openapi/diff/DiffContent.java @@ -85,7 +85,7 @@ public abstract class DiffContent { public abstract FileType getContentType(); /** - * @return Binary represntation of content. + * @return Binary representation of content. * Should not be null if {@link #getFile()} returns existing not directory file * @throws java.io.IOException */ diff --git a/platform/platform-api/src/com/intellij/openapi/diff/DiffTool.java b/platform/platform-api/src/com/intellij/openapi/diff/DiffTool.java index bc5647d97c12..cf59f736ba8c 100644 --- a/platform/platform-api/src/com/intellij/openapi/diff/DiffTool.java +++ b/platform/platform-api/src/com/intellij/openapi/diff/DiffTool.java @@ -57,7 +57,7 @@ public interface DiffTool { void show(DiffRequest request); /** - * @return true if this tool can comare given contents + * @return true if this tool can compare given contents */ boolean canShow(DiffRequest request); diff --git a/platform/platform-api/src/com/intellij/openapi/diff/SimpleContent.java b/platform/platform-api/src/com/intellij/openapi/diff/SimpleContent.java index 7cda601ba410..abeb2eee8ca8 100644 --- a/platform/platform-api/src/com/intellij/openapi/diff/SimpleContent.java +++ b/platform/platform-api/src/com/intellij/openapi/diff/SimpleContent.java @@ -152,7 +152,7 @@ public class SimpleContent extends DiffContent { } /** - * @param bytes binary text representaion + * @param bytes binary text representation * @param charset name of charset. If null IDE default charset will be used * @param fileType content type. If null file name will be used to select file type * @return content representing bytes as text diff --git a/platform/platform-api/src/com/intellij/openapi/editor/highlighter/FragmentedEditorHighlighter.java b/platform/platform-api/src/com/intellij/openapi/editor/highlighter/FragmentedEditorHighlighter.java index c6d8abdcbf73..bddaa9613631 100644 --- a/platform/platform-api/src/com/intellij/openapi/editor/highlighter/FragmentedEditorHighlighter.java +++ b/platform/platform-api/src/com/intellij/openapi/editor/highlighter/FragmentedEditorHighlighter.java @@ -75,7 +75,7 @@ public class FragmentedEditorHighlighter implements EditorHighlighter { } if (range.getEndOffset() < iterator.getEnd()) { - offset += range.getLength() + 1 + myAdditionalOffset; // myAdditionalOffset because of extra line - for shoene separators + offset += range.getLength() + 1 + myAdditionalOffset; // myAdditionalOffset because of extra line - for shown separators int lastEnd = myPieces.isEmpty() ? -1 : myPieces.get(myPieces.size() - 1).getEnd(); addElement(new Element(Math.max(offset - 1 - myAdditionalOffset, lastEnd), offset, null, TextAttributes.ERASE_MARKER)); index++; diff --git a/platform/platform-api/src/com/intellij/openapi/fileEditor/FileEditorPolicy.java b/platform/platform-api/src/com/intellij/openapi/fileEditor/FileEditorPolicy.java index e78e5955b55c..bd622f65b1b0 100644 --- a/platform/platform-api/src/com/intellij/openapi/fileEditor/FileEditorPolicy.java +++ b/platform/platform-api/src/com/intellij/openapi/fileEditor/FileEditorPolicy.java @@ -37,7 +37,7 @@ public enum FileEditorPolicy { HIDE_DEFAULT_EDITOR, /** - * Place created editor after the default EDEA'a editor (if any) + * Place created editor after the default IDEA'a editor (if any) * * */ diff --git a/platform/platform-api/src/com/intellij/openapi/keymap/KeymapUtil.java b/platform/platform-api/src/com/intellij/openapi/keymap/KeymapUtil.java index 5a4b1603fac9..240193abaf2f 100644 --- a/platform/platform-api/src/com/intellij/openapi/keymap/KeymapUtil.java +++ b/platform/platform-api/src/com/intellij/openapi/keymap/KeymapUtil.java @@ -304,7 +304,7 @@ public class KeymapUtil { button = Integer.parseInt(token.substring(6)); } catch (NumberFormatException e) { - throw new InvalidDataException("unparseable token: " + token); + throw new InvalidDataException("unparsable token: " + token); } } else if (DOUBLE_CLICK.equals(token)) { diff --git a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java index 2aa827abd750..59d57a00ee9a 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/DialogWrapper.java @@ -1408,14 +1408,17 @@ public abstract class DialogWrapper { } } + @Deprecated protected boolean isNorthStrictedToPreferredSize() { return true; } + @Deprecated protected boolean isCenterStrictedToPreferredSize() { return false; } + @Deprecated protected boolean isSouthStrictedToPreferredSize() { return true; } diff --git a/platform/platform-api/src/com/intellij/openapi/ui/InputValidator.java b/platform/platform-api/src/com/intellij/openapi/ui/InputValidator.java index 6b2f340c2d16..552617f3e87d 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/InputValidator.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/InputValidator.java @@ -38,7 +38,7 @@ public interface InputValidator { * If {@code false} is returned then then the message dialog will not be closed. * * @param inputString the input to check - * @return true if the dialog could be closed, false otherwhise. + * @return true if the dialog could be closed, false otherwise. */ boolean canClose(String inputString); } diff --git a/platform/platform-api/src/com/intellij/openapi/ui/ThreeComponentsSplitter.java b/platform/platform-api/src/com/intellij/openapi/ui/ThreeComponentsSplitter.java index 6295ed6c2c7a..55ff680af966 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/ThreeComponentsSplitter.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/ThreeComponentsSplitter.java @@ -254,12 +254,12 @@ public class ThreeComponentsSplitter extends JPanel implements Disposable { return new Dimension(width, height); } else { - int heigth = Math.max(firstSize.height, Math.max(lastSize.height, innerSize.height)); + int height = Math.max(firstSize.height, Math.max(lastSize.height, innerSize.height)); int width = visibleDividersCount() * dividerWidth; width += firstSize.width; width += lastSize.width; width += innerSize.width; - return new Dimension(width, heigth); + return new Dimension(width, height); } } return super.getMinimumSize(); @@ -278,25 +278,25 @@ public class ThreeComponentsSplitter extends JPanel implements Disposable { int dividerWidth = getDividerWidth(); int dividersCount = visibleDividersCount(); - int firstCompontSize; + int firstComponentSize; int lastComponentSize; int innerComponentSize; if(componentSize <= dividersCount * dividerWidth) { - firstCompontSize = 0; + firstComponentSize = 0; lastComponentSize = 0; innerComponentSize = 0; dividerWidth = componentSize; } else { - firstCompontSize = getFirstSize(); + firstComponentSize = getFirstSize(); lastComponentSize = getLastSize(); - int sizeLack = firstCompontSize + lastComponentSize - (componentSize - dividersCount * dividerWidth - myMinSize); + int sizeLack = firstComponentSize + lastComponentSize - (componentSize - dividersCount * dividerWidth - myMinSize); if (sizeLack > 0) { // Lacking size. Reduce first & last component's size, inner -> MIN_SIZE - double firstSizeRatio = (double)firstCompontSize / (firstCompontSize + lastComponentSize); - if (firstCompontSize > 0) { - firstCompontSize -= sizeLack * firstSizeRatio; - firstCompontSize = Math.max(myMinSize, firstCompontSize); + double firstSizeRatio = (double)firstComponentSize / (firstComponentSize + lastComponentSize); + if (firstComponentSize > 0) { + firstComponentSize -= sizeLack * firstSizeRatio; + firstComponentSize = Math.max(myMinSize, firstComponentSize); } if (lastComponentSize > 0) { lastComponentSize -= sizeLack * (1 - firstSizeRatio); @@ -312,14 +312,14 @@ public class ThreeComponentsSplitter extends JPanel implements Disposable { lastComponentSize += innerComponentSize; innerComponentSize = 0; if (!lastVisible()) { - firstCompontSize = componentSize; + firstComponentSize = componentSize; } } } if (getOrientation()) { - int space = firstCompontSize; - firstRect.setBounds(0, 0, width, firstCompontSize); + int space = firstComponentSize; + firstRect.setBounds(0, 0, width, firstComponentSize); if (firstDividerVisible()) { firstDividerRect.setBounds(0, space, width, dividerWidth); space += dividerWidth; @@ -336,8 +336,8 @@ public class ThreeComponentsSplitter extends JPanel implements Disposable { lastRect.setBounds(0, space, width, lastComponentSize); } else { - int space = firstCompontSize; - firstRect.setBounds(0, 0, firstCompontSize, height); + int space = firstComponentSize; + firstRect.setBounds(0, 0, firstComponentSize, height); if (firstDividerVisible()) { firstDividerRect.setBounds(space, 0, dividerWidth, height); @@ -419,8 +419,8 @@ public class ThreeComponentsSplitter extends JPanel implements Disposable { } /** - * Sets component which is located as the "first" splitted area. The method doesn't validate and - * repaint the splitter. If there is already + * Sets component which is located as the "first" split area. The method doesn't validate and + * repaint the splitter if there is one already. * */ public void setFirstComponent(@Nullable JComponent component) { diff --git a/platform/platform-api/src/com/intellij/openapi/ui/popup/IPopupChooserBuilder.java b/platform/platform-api/src/com/intellij/openapi/ui/popup/IPopupChooserBuilder.java index e72ccb61b7cf..8c6fdd003ce8 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/popup/IPopupChooserBuilder.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/popup/IPopupChooserBuilder.java @@ -70,7 +70,7 @@ public interface IPopupChooserBuilder { IPopupChooserBuilder addListener(JBPopupListener listener); - IPopupChooserBuilder setSettingButton(Component abutton); + IPopupChooserBuilder setSettingButton(Component button); IPopupChooserBuilder setMayBeParent(boolean mayBeParent); diff --git a/platform/platform-api/src/com/intellij/openapi/ui/popup/PopupChooserBuilder.java b/platform/platform-api/src/com/intellij/openapi/ui/popup/PopupChooserBuilder.java index d4d04b27ffb3..c25f12f2f7ea 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/popup/PopupChooserBuilder.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/popup/PopupChooserBuilder.java @@ -481,8 +481,8 @@ public class PopupChooserBuilder implements IPopupChooserBuilder { } @Override - public PopupChooserBuilder setSettingButton(Component abutton) { - mySettingsButtons = abutton; + public PopupChooserBuilder setSettingButton(Component button) { + mySettingsButtons = button; return this; } diff --git a/platform/platform-impl/src/com/intellij/featureStatistics/FeatureUsageTrackerImpl.java b/platform/platform-impl/src/com/intellij/featureStatistics/FeatureUsageTrackerImpl.java index e676eea2d28b..15f66f63af54 100644 --- a/platform/platform-impl/src/com/intellij/featureStatistics/FeatureUsageTrackerImpl.java +++ b/platform/platform-impl/src/com/intellij/featureStatistics/FeatureUsageTrackerImpl.java @@ -72,7 +72,7 @@ public class FeatureUsageTrackerImpl extends FeatureUsageTracker implements Pers } long current = System.currentTimeMillis(); - long succesive_interval = descriptor.getDaysBetweenSuccesiveShowUps() * timeUnit + descriptor.getShownCount() * 2; + long succesive_interval = descriptor.getDaysBetweenSuccessiveShowUps() * timeUnit + descriptor.getShownCount() * 2; long firstShowUpInterval = descriptor.getDaysBeforeFirstShowUp() * timeUnit; long lastTimeUsed = descriptor.getLastTimeUsed(); long lastTimeShown = descriptor.getLastTimeShown(); diff --git a/platform/platform-impl/src/com/intellij/ide/GeneralSettingsConfigurable.java b/platform/platform-impl/src/com/intellij/ide/GeneralSettingsConfigurable.java index 0a8537a5290f..49e62b8d06ca 100644 --- a/platform/platform-impl/src/com/intellij/ide/GeneralSettingsConfigurable.java +++ b/platform/platform-impl/src/com/intellij/ide/GeneralSettingsConfigurable.java @@ -155,7 +155,7 @@ public class GeneralSettingsConfigurable extends CompositeConfigurable { @Override public int compare(final String o1, final String o2) { - final int revertor = myAscending ? 1 : -1; - return (o1.length() == o2.length()) ? 0 : (revertor * ((o1.length() < o2.length()) ? -1 : 1)); + int k = myAscending ? 1 : -1; + return (o1.length() == o2.length()) ? 0 : (k * ((o1.length() < o2.length()) ? -1 : 1)); } } diff --git a/platform/util/src/com/intellij/util/concurrency/AppDelayQueue.java b/platform/util/src/com/intellij/util/concurrency/AppDelayQueue.java index c8605a7a0ba5..feafac64e205 100644 --- a/platform/util/src/com/intellij/util/concurrency/AppDelayQueue.java +++ b/platform/util/src/com/intellij/util/concurrency/AppDelayQueue.java @@ -30,12 +30,12 @@ import java.util.concurrent.atomic.AtomicBoolean; */ class AppDelayQueue extends DelayQueue { private static final Logger LOG = Logger.getInstance("#com.intellij.util.concurrency.AppDelayQueue"); - private final Thread scheduledToPooledTransferer; + private final Thread scheduledToPooledTransferrer; private final AtomicBoolean shutdown = new AtomicBoolean(); AppDelayQueue() { /* this thread takes the ready-to-execute scheduled tasks off the queue and passes them for immediate execution to {@link SchedulingWrapper#backendExecutorService} */ - scheduledToPooledTransferer = new Thread(new Runnable() { + scheduledToPooledTransferrer = new Thread(new Runnable() { @Override public void run() { while (!shutdown.get()) { @@ -65,21 +65,21 @@ class AppDelayQueue extends DelayQueue } } } - LOG.debug("scheduledToPooledTransferer Stopped"); + LOG.debug("scheduledToPooledTransferrer Stopped"); } }, "Periodic tasks thread"); - scheduledToPooledTransferer.setDaemon(true); // mark as daemon to not prevent JVM to exit (needed for Kotlin CLI compiler) - scheduledToPooledTransferer.start(); + scheduledToPooledTransferrer.setDaemon(true); // mark as daemon to not prevent JVM to exit (needed for Kotlin CLI compiler) + scheduledToPooledTransferrer.start(); } void shutdown() { if (shutdown.getAndSet(true)) { throw new IllegalStateException("Already shutdown"); } - scheduledToPooledTransferer.interrupt(); + scheduledToPooledTransferrer.interrupt(); try { - scheduledToPooledTransferer.join(); + scheduledToPooledTransferrer.join(); } catch (Exception e) { throw new RuntimeException(e); @@ -88,6 +88,6 @@ class AppDelayQueue extends DelayQueue @NotNull Thread getThread() { - return scheduledToPooledTransferer; + return scheduledToPooledTransferrer; } } diff --git a/platform/util/src/com/intellij/util/containers/ByteTrie.java b/platform/util/src/com/intellij/util/containers/ByteTrie.java index cc301cc66211..660791c7af84 100644 --- a/platform/util/src/com/intellij/util/containers/ByteTrie.java +++ b/platform/util/src/com/intellij/util/containers/ByteTrie.java @@ -50,7 +50,7 @@ public class ByteTrie { /** * Returns unique hash code for a string. * - * @return negative - an error occured, 0 - no such string in trie, positive - actual hashcode + * @return negative - an error occurred, 0 - no such string in trie, positive - actual hashcode */ public int getHashCode(String s) { return getHashCode(s.getBytes(CharsetToolkit.UTF8_CHARSET)); diff --git a/platform/util/src/com/intellij/util/io/AntivirusDetector.java b/platform/util/src/com/intellij/util/io/AntivirusDetector.java index 061e55372117..e6a1d48284b2 100644 --- a/platform/util/src/com/intellij/util/io/AntivirusDetector.java +++ b/platform/util/src/com/intellij/util/io/AntivirusDetector.java @@ -22,7 +22,7 @@ package com.intellij.util.io; import org.jetbrains.annotations.NotNull; public class AntivirusDetector { - private static final int THRESHOULD = 500; + private static final int THRESHOLD = 500; private boolean myEnabled = false; private Runnable myCallback; private static final AntivirusDetector ourInstance = new AntivirusDetector(); @@ -52,7 +52,7 @@ public class AntivirusDetector { r.run(); long delta = System.currentTimeMillis() - now; - if (delta > THRESHOULD) { + if (delta > THRESHOLD) { disable(); myCallback.run(); } diff --git a/platform/util/src/com/intellij/util/io/Page.java b/platform/util/src/com/intellij/util/io/Page.java index 926d10007f27..a4a3d37c11d7 100644 --- a/platform/util/src/com/intellij/util/io/Page.java +++ b/platform/util/src/com/intellij/util/io/Page.java @@ -102,7 +102,7 @@ public class Page { private final Range myContinuousRange = new Range(); @Nullable - private Range calcContinousRange(final BitSet mask) { + private Range calcContinuousRange(final BitSet mask) { int lowestByte = mask.nextSetBit(0); int highestByte; if (lowestByte >= 0) { @@ -136,9 +136,9 @@ public class Page { int start = 0; int end = PAGE_SIZE; if (myWriteMask != null) { - Range range = calcContinousRange(myWriteMask); + Range range = calcContinuousRange(myWriteMask); if (range == null) { - // System.out.println("Discountinous write of: " + myWriteMask.cardinality() + " bytes. Performing ensure read before flush."); + // System.out.println("Discontinuous write of: " + myWriteMask.cardinality() + " bytes. Performing ensure read before flush."); ensureRead(); } else { diff --git a/platform/util/src/com/intellij/util/io/PersistentEnumerator.java b/platform/util/src/com/intellij/util/io/PersistentEnumerator.java index 1fddc7dc5f4c..a6c2086105d0 100644 --- a/platform/util/src/com/intellij/util/io/PersistentEnumerator.java +++ b/platform/util/src/com/intellij/util/io/PersistentEnumerator.java @@ -76,7 +76,7 @@ public class PersistentEnumerator extends PersistentEnumeratorBase { for (int slotIdx = 0; slotIdx < slotsCount; slotIdx++) { final int vector = myStorage.getInt(vectorStart + slotIdx * 4); if (vector < 0) { - for (int record = -vector; record != 0; record = nextCanditate(record)) { + for (int record = -vector; record != 0; record = nextCandidate(record)) { if (!p.process(record)) return false; } } @@ -141,7 +141,7 @@ public class PersistentEnumerator extends PersistentEnumeratorBase { return collision; } - collision = nextCanditate(collision); + collision = nextCandidate(collision); } while (collision != 0); @@ -211,7 +211,7 @@ public class PersistentEnumerator extends PersistentEnumeratorBase { return pos; } - private int nextCanditate(final int idx) throws IOException { + private int nextCandidate(final int idx) throws IOException { return -myStorage.getInt(idx); } diff --git a/platform/util/src/com/intellij/util/io/storage/DataTable.java b/platform/util/src/com/intellij/util/io/storage/DataTable.java index 41598c2c0514..907957c0bd6a 100644 --- a/platform/util/src/com/intellij/util/io/storage/DataTable.java +++ b/platform/util/src/com/intellij/util/io/storage/DataTable.java @@ -83,11 +83,11 @@ class DataTable implements Disposable, Forceable { final long result = Math.max(myFile.length(), HEADER_SIZE); // Fill them in so we won't give out wrong address from allocateSpace() next time if they still not finished writing to allocated page - long newLenght = result + len; - writeBytes(newLenght - 1, new byte[]{0}); - long actualLenght = myFile.length(); - if (actualLenght != newLenght) { - LOG.error("Failed to resize the storage at: " + myFile.getFile() + ". Required: " + newLenght + ", actual: " + actualLenght); + long newLength = result + len; + writeBytes(newLength - 1, new byte[]{0}); + long actualLength = myFile.length(); + if (actualLength != newLength) { + LOG.error("Failed to resize the storage at: " + myFile.getFile() + ". Required: " + newLength + ", actual: " + actualLength); } return result; } diff --git a/platform/util/src/com/intellij/util/io/zip/ZipLong.java b/platform/util/src/com/intellij/util/io/zip/ZipLong.java index 1bc4f9c7c52b..9ee9cfbab92f 100644 --- a/platform/util/src/com/intellij/util/io/zip/ZipLong.java +++ b/platform/util/src/com/intellij/util/io/zip/ZipLong.java @@ -114,7 +114,7 @@ public final class ZipLong implements Cloneable { * * @param bytes the array of bytes * @param offset the offset to start - * @return the correspondanding Java long value + * @return the corresponding Java long value */ public static long getValue(byte[] bytes, int offset) { long value = (bytes[offset + BYTE_3] << BYTE_3_SHIFT) & BYTE_3_MASK; @@ -128,7 +128,7 @@ public final class ZipLong implements Cloneable { * Helper method to get the value as a Java long from a four-byte array * * @param bytes the array of bytes - * @return the correspondanding Java long value + * @return the corresponding Java long value */ public static long getValue(byte[] bytes) { return getValue(bytes, 0); diff --git a/platform/util/src/com/intellij/util/text/StringSearcher.java b/platform/util/src/com/intellij/util/text/StringSearcher.java index 9c90be3aebbc..de520c19e109 100644 --- a/platform/util/src/com/intellij/util/text/StringSearcher.java +++ b/platform/util/src/com/intellij/util/text/StringSearcher.java @@ -32,7 +32,7 @@ public class StringSearcher { private final int myPatternLength; private final int[] mySearchTable = new int[128]; private final boolean myCaseSensitive; - private final boolean myLowecaseTransform; + private final boolean myLowercaseTransform; private final boolean myForwardDirection; private final boolean myJavaIdentifier; private final boolean myHandleEscapeSequences; @@ -61,10 +61,10 @@ public class StringSearcher { myForwardDirection = forwardDirection; char[] chars = myCaseSensitive ? myPattern.toCharArray() : myPattern.toLowerCase(Locale.US).toCharArray(); if (chars.length != myPattern.length()) { - myLowecaseTransform = false; + myLowercaseTransform = false; chars = myPattern.toUpperCase(Locale.US).toCharArray(); } else { - myLowecaseTransform = true; + myLowercaseTransform = true; } myPatternArray = chars; myPatternLength = myPatternArray.length; @@ -203,7 +203,7 @@ public class StringSearcher { if (myCaseSensitive) { return lastChar; } - return myLowecaseTransform ? StringUtil.toLowerCase(lastChar) : StringUtil.toUpperCase(lastChar); + return myLowercaseTransform ? StringUtil.toLowerCase(lastChar) : StringUtil.toUpperCase(lastChar); } private boolean isSameChar(char charInPattern, char charInText) { @@ -227,7 +227,7 @@ public class StringSearcher { StringSearcher searcher = (StringSearcher)o; if (myCaseSensitive != searcher.myCaseSensitive) return false; - if (myLowecaseTransform != searcher.myLowecaseTransform) return false; + if (myLowercaseTransform != searcher.myLowercaseTransform) return false; if (myForwardDirection != searcher.myForwardDirection) return false; if (myJavaIdentifier != searcher.myJavaIdentifier) return false; if (myHandleEscapeSequences != searcher.myHandleEscapeSequences) return false; @@ -238,7 +238,7 @@ public class StringSearcher { public int hashCode() { int result = myPattern.hashCode(); result = 31 * result + (myCaseSensitive ? 1 : 0); - result = 31 * result + (myLowecaseTransform ? 1 : 0); + result = 31 * result + (myLowercaseTransform ? 1 : 0); result = 31 * result + (myForwardDirection ? 1 : 0); result = 31 * result + (myJavaIdentifier ? 1 : 0); result = 31 * result + (myHandleEscapeSequences ? 1 : 0); diff --git a/platform/util/src/com/intellij/util/ui/CenteredIcon.java b/platform/util/src/com/intellij/util/ui/CenteredIcon.java index 34a1a96ec7b1..1f69e491de24 100644 --- a/platform/util/src/com/intellij/util/ui/CenteredIcon.java +++ b/platform/util/src/com/intellij/util/ui/CenteredIcon.java @@ -23,7 +23,7 @@ public class CenteredIcon implements Icon { private final Icon myIcon; private final int myWidth; - private final int myHight; + private final int myHeight; private final boolean myCenteredInComponent; @@ -38,7 +38,7 @@ public class CenteredIcon implements Icon { public CenteredIcon(Icon icon, int width, int height, boolean centeredInComponent) { myIcon = icon; myWidth = width; - myHight = height; + myHeight = height; myCenteredInComponent = centeredInComponent; } @@ -54,7 +54,7 @@ public class CenteredIcon implements Icon { } else { offsetX = (myWidth - myIcon.getIconWidth()) / 2; - offsetY = (myHight - myIcon.getIconHeight()) / 2; + offsetY = (myHeight - myIcon.getIconHeight()) / 2; } myIcon.paintIcon(c, g, x + offsetX, y + offsetY); @@ -67,6 +67,6 @@ public class CenteredIcon implements Icon { @Override public int getIconHeight() { - return myHight; + return myHeight; } } diff --git a/platform/util/src/com/intellij/util/ui/GeometryUtil.java b/platform/util/src/com/intellij/util/ui/GeometryUtil.java index 94af78ad8e98..084b80699c4b 100644 --- a/platform/util/src/com/intellij/util/ui/GeometryUtil.java +++ b/platform/util/src/com/intellij/util/ui/GeometryUtil.java @@ -242,11 +242,11 @@ public class GeometryUtil implements SwingConstants { } } - public static int getClosestToLineRectangleCorner(Rectangle aRectange, Line2D aSegment) { - Point northWest = new OrientedPoint(aRectange.getX(), aRectange.getY(), NORTH_WEST); - Point northEast = new OrientedPoint(aRectange.getMaxX(), aRectange.getY(), NORTH_EAST); - Point southEast = new OrientedPoint(aRectange.getMaxX(), aRectange.getMaxY(), SOUTH_EAST); - Point southWest = new OrientedPoint(aRectange.getX(), aRectange.getMaxY(), SOUTH_WEST); + public static int getClosestToLineRectangleCorner(Rectangle aRectangle, Line2D aSegment) { + Point northWest = new OrientedPoint(aRectangle.getX(), aRectangle.getY(), NORTH_WEST); + Point northEast = new OrientedPoint(aRectangle.getMaxX(), aRectangle.getY(), NORTH_EAST); + Point southEast = new OrientedPoint(aRectangle.getMaxX(), aRectangle.getMaxY(), SOUTH_EAST); + Point southWest = new OrientedPoint(aRectangle.getX(), aRectangle.getMaxY(), SOUTH_WEST); TreeMap sorter = new TreeMap(); @@ -260,10 +260,10 @@ public class GeometryUtil implements SwingConstants { } private static Double getDistance(Line2D aSegment, Point aPoint) { - double lenght1 = getLineLength(aSegment.getX1(), aSegment.getY1(), aPoint.getX(), aPoint.getY()); - double lenght2 = getLineLength(aSegment.getX2(), aSegment.getY2(), aPoint.getX(), aPoint.getY()); + double length1 = getLineLength(aSegment.getX1(), aSegment.getY1(), aPoint.getX(), aPoint.getY()); + double length2 = getLineLength(aSegment.getX2(), aSegment.getY2(), aPoint.getX(), aPoint.getY()); - return new Double(lenght1 + lenght2); + return new Double(length1 + length2); } public static double getLineLength(double aX1, double aY1, double aX2, double aY2) { diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/StartedActivated.java b/platform/vcs-api/src/com/intellij/openapi/vcs/StartedActivated.java index 71d3ca50446c..e1420e9364c6 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/StartedActivated.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/StartedActivated.java @@ -25,7 +25,7 @@ import java.util.ArrayList; import java.util.List; /** - * By the nature of the process, we do not expect here situations where one thread activates/starts and another simultaneosly + * By the nature of the process, we do not expect here situations where one thread activates/starts and another simultaneously * tries to deactivate/shutdown. It that situations, it would be very hard to decide what should be done=) * * So, synchronization here should only be used as a barrier to do not allow repeated activation etc. diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/BinaryContentRevision.java b/platform/vcs-api/src/com/intellij/openapi/vcs/changes/BinaryContentRevision.java index 2bc9ddb64994..be8bc9fa09ba 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/changes/BinaryContentRevision.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/changes/BinaryContentRevision.java @@ -26,7 +26,7 @@ public interface BinaryContentRevision extends ByteBackedContentRevision { /** * Content of the revision. Implementers are encouraged to lazy implement this especially when it requires connection to the * version control server or something. - * Might return null in case if file path denotes a directory or content is impossible to retreive. + * Might return null in case if file path denotes a directory or content is impossible to retrieve. * * @return content of the revision * @throws com.intellij.openapi.vcs.VcsException in case when content retrieval fails diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/diff/ItemLatestState.java b/platform/vcs-api/src/com/intellij/openapi/vcs/diff/ItemLatestState.java index 3aeab1daf1a9..7f8aafef5b98 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/diff/ItemLatestState.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/diff/ItemLatestState.java @@ -24,14 +24,14 @@ public class ItemLatestState { private final boolean myDefaultHead; /** version number */ private final VcsRevisionNumber myNumber; - /** true if the item still exists in the remote reposistory */ + /** true if the item still exists in the remote repository */ private final boolean myItemExists; /** * A constructor * * @param number version number - * @param itemExists true if the item still exists in the remote reposistory + * @param itemExists true if the item still exists in the remote repository * @param defaultHead */ @@ -49,7 +49,7 @@ public class ItemLatestState { } /** - * @return true if the item exists in the remote reposistory + * @return true if the item exists in the remote repository */ public boolean isItemExists() { return myItemExists; diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/ui/ReplaceFileConfirmationDialog.java b/platform/vcs-api/src/com/intellij/openapi/vcs/ui/ReplaceFileConfirmationDialog.java index ea9777042d9d..e5051a71badc 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/ui/ReplaceFileConfirmationDialog.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/ui/ReplaceFileConfirmationDialog.java @@ -59,8 +59,8 @@ public class ReplaceFileConfirmationDialog { if (modifiedFiles.isEmpty()) return true; return Messages.showOkCancelDialog(createMessage(modifiedFiles), myActionName, - createOwerriteButtonName(modifiedFiles), getCancelButtonText(), - Messages.getWarningIcon()) == + createOverwriteButtonName(modifiedFiles), getCancelButtonText(), + Messages.getWarningIcon()) == Messages.OK; } @@ -69,8 +69,7 @@ public class ReplaceFileConfirmationDialog { return CommonBundle.getCancelButtonText(); } - private String createOwerriteButtonName(Collection modifiedFiles) { - + private String createOverwriteButtonName(Collection modifiedFiles) { return modifiedFiles.size() > 1 ? getOkButtonTextForFiles() : getOkButtonTextForOneFile(); } diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/update/UpdateEnvironment.java b/platform/vcs-api/src/com/intellij/openapi/vcs/update/UpdateEnvironment.java index ef384e5c635d..cca5c0560b7f 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/update/UpdateEnvironment.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/update/UpdateEnvironment.java @@ -64,7 +64,7 @@ public interface UpdateEnvironment extends VcsProviderMarker { /** * Allows to show a settings dialog for the operation. * - * @param files the content roots for which update/integrate/status will be perfromed. + * @param files the content roots for which update/integrate/status will be performed. * @return the settings dialog instance, or null if the VCS doesn't provide a settings dialog for this operation. */ @Nullable diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/update/UpdatedFilesReverseSide.java b/platform/vcs-api/src/com/intellij/openapi/vcs/update/UpdatedFilesReverseSide.java index 7bbb3cf9809e..621698099e5c 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/update/UpdatedFilesReverseSide.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/update/UpdatedFilesReverseSide.java @@ -137,11 +137,11 @@ public class UpdatedFilesReverseSide { public static Set getPathsFromUpdatedFiles(final UpdatedFiles from) { UpdatedFilesReverseSide helper = new UpdatedFilesReverseSide(UpdatedFiles.create()); - helper.accomulateFiles(from, DuplicateLevel.DUPLICATE_ERRORS); + helper.accumulateFiles(from, DuplicateLevel.DUPLICATE_ERRORS); return helper.myFileIdx.keySet(); } - public void accomulateFiles(final UpdatedFiles from, final DuplicateLevel duplicateLevel) { + public void accumulateFiles(final UpdatedFiles from, final DuplicateLevel duplicateLevel) { final Parent topLevel = new TopLevelParent(); for (FileGroup fromGroup : from.getTopLevelGroups()) { copyGroup(topLevel, fromGroup, duplicateLevel); diff --git a/platform/vcs-api/src/com/intellij/vcsUtil/VcsUtil.java b/platform/vcs-api/src/com/intellij/vcsUtil/VcsUtil.java index c3faf7a73503..74b1692d36eb 100644 --- a/platform/vcs-api/src/com/intellij/vcsUtil/VcsUtil.java +++ b/platform/vcs-api/src/com/intellij/vcsUtil/VcsUtil.java @@ -294,7 +294,7 @@ public class VcsUtil { * @param change "Change" description. * @return Return true if the "Change" object is created for "Rename" operation: * in this case name of files for "before" and "after" revisions must not - * coniside. + * coincide. */ public static boolean isRenameChange(Change change) { boolean isRenamed = false; @@ -334,7 +334,7 @@ public class VcsUtil { /** * Sort file paths so that paths under the same root are placed from the - * outermost to the innermost (farest from the root). + * outermost to the innermost (farthest from the root). * * @param files An array of file paths to be sorted. Sorting is done over the parameter. * @return Sorted array of the file paths. @@ -351,7 +351,7 @@ public class VcsUtil { /** * @param e ActionEvent object * @return {@code VirtualFile} available in the current context. - * Returns not {@code null} if and only if exectly one file is available. + * Returns not {@code null} if and only if exactly one file is available. */ @Nullable public static VirtualFile getOneVirtualFile(AnActionEvent e) { diff --git a/platform/vcs-api/src/com/intellij/vfs/AsyncVfsEventsListener.java b/platform/vcs-api/src/com/intellij/vfs/AsyncVfsEventsListener.java index b4318dbf68e9..d2eaf0d47412 100644 --- a/platform/vcs-api/src/com/intellij/vfs/AsyncVfsEventsListener.java +++ b/platform/vcs-api/src/com/intellij/vfs/AsyncVfsEventsListener.java @@ -27,7 +27,7 @@ import java.util.List; /** *

Receives notifications about changes in the virtual file system, just as {@link BulkFileListener} and {@link VirtualFileListener}, - * but on a pooled thread, which allows to off-load the EDT, but requires more care in the listener code due to asynchronousness and + * but on a pooled thread, which allows to off-load the EDT, but requires more care in the listener code due to asynchrony and * the absence of read action.

* *

Use the {@link AsyncVfsEventsPostProcessor#addListener(AsyncVfsEventsListener, Disposable)} to subscribe.

diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java index 1cfb976e9948..9ff615b50263 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java @@ -397,8 +397,8 @@ public class CommitChangeListDialog extends DialogWrapper implements CheckinProj public void on(Integer integer) { if (integer == 0) return; myDiffDetails.refresh(false); - mySplitter.skipNextLayouting(); - myDetailsSplitter.getComponent().skipNextLayouting(); + mySplitter.skipNextLayout(); + myDetailsSplitter.getComponent().skipNextLayout(); Dimension dialogSize = getSize(); setSize(dialogSize.width, dialogSize.height + integer); repaint(); @@ -408,8 +408,8 @@ public class CommitChangeListDialog extends DialogWrapper implements CheckinProj public void off(Integer integer) { if (integer == 0) return; myDiffDetails.clear(); // TODO: we may want to keep it in memory - mySplitter.skipNextLayouting(); - myDetailsSplitter.getComponent().skipNextLayouting(); + mySplitter.skipNextLayout(); + myDetailsSplitter.getComponent().skipNextLayout(); Dimension dialogSize = getSize(); setSize(dialogSize.width, dialogSize.height - integer); repaint(); diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dataflow/TooBroadScopeInspectionBase.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dataflow/TooBroadScopeInspectionBase.java index bbcb31633305..39e2bad841f0 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dataflow/TooBroadScopeInspectionBase.java +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dataflow/TooBroadScopeInspectionBase.java @@ -74,7 +74,7 @@ public class TooBroadScopeInspectionBase extends BaseInspection { return InspectionGadgetsBundle.message("too.broad.scope.problem.descriptor"); } - protected boolean isMoveable(PsiExpression expression) { + protected boolean isMovable(PsiExpression expression) { expression = ParenthesesUtils.stripParentheses(expression); if (expression == null) { return true; @@ -85,7 +85,7 @@ public class TooBroadScopeInspectionBase extends BaseInspection { if (expression instanceof PsiArrayInitializerExpression) { final PsiArrayInitializerExpression arrayInitializerExpression = (PsiArrayInitializerExpression)expression; for (PsiExpression initializer : arrayInitializerExpression.getInitializers()) { - if (!isMoveable(initializer)) { + if (!isMovable(initializer)) { return false; } } @@ -96,7 +96,7 @@ public class TooBroadScopeInspectionBase extends BaseInspection { final PsiExpression[] arrayDimensions = newExpression.getArrayDimensions(); if (arrayDimensions.length > 0) { for (PsiExpression arrayDimension : arrayDimensions) { - if (!isMoveable(arrayDimension)) { + if (!isMovable(arrayDimension)) { return false; } } @@ -106,7 +106,7 @@ public class TooBroadScopeInspectionBase extends BaseInspection { if (arrayInitializer != null) { final PsiExpression[] initializers = arrayInitializer.getInitializers(); for (final PsiExpression initializerExpression : initializers) { - if (!isMoveable(initializerExpression)) { + if (!isMovable(initializerExpression)) { return false; } } @@ -127,7 +127,7 @@ public class TooBroadScopeInspectionBase extends BaseInspection { } final PsiExpression[] expressions = argumentList.getExpressions(); for (final PsiExpression argumentExpression : expressions) { - if (!isMoveable(argumentExpression)) { + if (!isMovable(argumentExpression)) { return false; } } @@ -136,7 +136,7 @@ public class TooBroadScopeInspectionBase extends BaseInspection { if (expression instanceof PsiReferenceExpression) { final PsiReferenceExpression referenceExpression = (PsiReferenceExpression)expression; final PsiExpression qualifier = referenceExpression.getQualifierExpression(); - if (!isMoveable(qualifier)) { + if (!isMovable(qualifier)) { return false; } final PsiElement target = referenceExpression.resolve(); @@ -160,7 +160,7 @@ public class TooBroadScopeInspectionBase extends BaseInspection { if (expression instanceof PsiPolyadicExpression) { final PsiPolyadicExpression polyadicExpression = (PsiPolyadicExpression)expression; for (PsiExpression operand : polyadicExpression.getOperands()) { - if (!isMoveable(operand)) { + if (!isMovable(operand)) { return false; } } @@ -177,12 +177,12 @@ public class TooBroadScopeInspectionBase extends BaseInspection { } final PsiReferenceExpression methodExpression = methodCallExpression.getMethodExpression(); final PsiExpression qualifierExpression = methodExpression.getQualifierExpression(); - if (qualifierExpression != null && !isMoveable(qualifierExpression)) { + if (qualifierExpression != null && !isMovable(qualifierExpression)) { return false; } final PsiExpressionList argumentList = methodCallExpression.getArgumentList(); for (PsiExpression argument : argumentList.getExpressions()){ - if (!isMoveable(argument)) { + if (!isMovable(argument)) { return false; } } @@ -248,7 +248,7 @@ public class TooBroadScopeInspectionBase extends BaseInspection { return; } final PsiExpression initializer = variable.getInitializer(); - if (!isMoveable(initializer)) { + if (!isMovable(initializer)) { return; } final List references = findReferences(variable); diff --git a/plugins/InspectionGadgets/src/com/siyeh/ig/dataflow/TooBroadScopeInspection.java b/plugins/InspectionGadgets/src/com/siyeh/ig/dataflow/TooBroadScopeInspection.java index d746fad467ae..022df3c48f01 100644 --- a/plugins/InspectionGadgets/src/com/siyeh/ig/dataflow/TooBroadScopeInspection.java +++ b/plugins/InspectionGadgets/src/com/siyeh/ig/dataflow/TooBroadScopeInspection.java @@ -203,7 +203,7 @@ public class TooBroadScopeInspection extends TooBroadScopeInspectionBase { } assert statementParent != null; final PsiExpression initializer = variable.getInitializer(); - if (isMoveable(initializer) && statement instanceof PsiExpressionStatement) { + if (isMovable(initializer) && statement instanceof PsiExpressionStatement) { final PsiExpressionStatement expressionStatement = (PsiExpressionStatement)statement; final PsiExpression expression = expressionStatement.getExpression(); if (expression instanceof PsiAssignmentExpression) { diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInsight/GroovyLineMarkerProvider.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInsight/GroovyLineMarkerProvider.java index 20b035f48a47..c998a68ff726 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInsight/GroovyLineMarkerProvider.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInsight/GroovyLineMarkerProvider.java @@ -56,11 +56,7 @@ import org.jetbrains.plugins.groovy.lang.psi.util.GrTraitUtil; import org.jetbrains.plugins.groovy.lang.psi.util.GroovyPropertyUtils; import javax.swing.*; -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; -import java.util.Set; +import java.util.*; /** * @author ilyas @@ -243,7 +239,7 @@ public class GroovyLineMarkerProvider extends JavaLineMarkerProvider { PsiElement range = element instanceof GrNamedElement ? ((GrNamedElement)element).getNameIdentifierGroovy() : element; final MarkerType type = element instanceof GrField ? GroovyMarkerTypes.OVERRIDEN_PROPERTY_TYPE - : GroovyMarkerTypes.GR_OVERRIDEN_METHOD; + : GroovyMarkerTypes.GR_OVERRIDDEN_METHOD; LineMarkerInfo info = new LineMarkerInfo<>(range, range.getTextRange(), icon, Pass.LINE_MARKERS, type.getTooltip(), type.getNavigationHandler(), GutterIconRenderer.Alignment.RIGHT); result.add(info); diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInsight/GroovyMarkerTypes.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInsight/GroovyMarkerTypes.java index 97e40bf92552..16eb27646a39 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInsight/GroovyMarkerTypes.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/codeInsight/GroovyMarkerTypes.java @@ -191,8 +191,8 @@ public class GroovyMarkerTypes { } }); - public static final MarkerType GR_OVERRIDEN_METHOD = new MarkerType("GR_OVERRIDEN_METHOD", - (NullableFunction)element -> { + public static final MarkerType GR_OVERRIDDEN_METHOD = new MarkerType("GR_OVERRIDEN_METHOD", + (NullableFunction)element -> { PsiElement parent = element.getParent(); if (!(parent instanceof GrMethod)) return null; GrMethod method = (GrMethod)parent; diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/editor/actions/GroovyStatementMover.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/editor/actions/GroovyStatementMover.java index c7c62f314631..9ab535f34289 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/editor/actions/GroovyStatementMover.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/editor/actions/GroovyStatementMover.java @@ -118,7 +118,7 @@ public class GroovyStatementMover extends StatementUpDownMover { element = PsiTreeUtil.nextVisibleLeaf(element); } - return (GroovyPsiElement)PsiTreeUtil.findFirstParent(element, element11 -> isMoveable(element11)); + return (GroovyPsiElement)PsiTreeUtil.findFirstParent(element, element11 -> isMovable(element11)); } private List allRanges(final GroovyPsiElement scope, final boolean stmtLevel, final boolean topLevel) { @@ -226,7 +226,7 @@ public class GroovyStatementMover extends StatementUpDownMover { } } - private static boolean isMoveable(PsiElement element) { + private static boolean isMovable(PsiElement element) { return isStatement(element) || isMemberDeclaration(element); } diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/SvnIntegrateChangesTask.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/SvnIntegrateChangesTask.java index 850800bc433e..0d64924e6462 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/SvnIntegrateChangesTask.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/SvnIntegrateChangesTask.java @@ -163,7 +163,7 @@ public class SvnIntegrateChangesTask extends Task.Backgroundable { } private void accumulate() { - myAccumulatedFiles.accomulateFiles(myRecentlyUpdatedFiles, UpdatedFilesReverseSide.DuplicateLevel.DUPLICATE_ERRORS); + myAccumulatedFiles.accumulateFiles(myRecentlyUpdatedFiles, UpdatedFilesReverseSide.DuplicateLevel.DUPLICATE_ERRORS); } private void afterExecution(final boolean wasCanceled) {