From 433591b1169d6bed975ddffa0fffc90d8365d600 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 14 Mar 2016 14:19:34 +0300 Subject: [PATCH] renamed package-local to package-private --- .../rt/execution/CommandLineWrapper.java | 9 +++++--- .../refactoring/MoveClassToInnerTest.java | 4 ++-- .../java/dependencyView/Mappings.java | 4 ++-- .../src/messages/RefactoringBundle.properties | 2 +- .../StructuralSearchTest.java | 2 +- .../siyeh/InspectionGadgetsBundle.properties | 8 +++---- ...ssBetweenOuterAndInnerClassInspection.java | 2 +- .../PackageVisibleInnerClass.html | 6 ++--- .../ReturnOfInnerClass.html | 2 +- .../siyeh/IntentionPowerPackBundle.properties | 4 ++-- .../description.html | 2 +- .../groovy/compiler/GroovyCompilerTest.groovy | 22 +++++++++---------- .../move/GroovyMoveClassToInnerTest.groovy | 9 ++++---- .../uiDesigner/snapShooter/SnapShooter.java | 4 ++-- 14 files changed, 41 insertions(+), 39 deletions(-) diff --git a/java/java-runtime/src/com/intellij/rt/execution/CommandLineWrapper.java b/java/java-runtime/src/com/intellij/rt/execution/CommandLineWrapper.java index 8026ef8e1400..35a317b494e7 100644 --- a/java/java-runtime/src/com/intellij/rt/execution/CommandLineWrapper.java +++ b/java/java-runtime/src/com/intellij/rt/execution/CommandLineWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -15,7 +15,10 @@ */ package com.intellij.rt.execution; -import java.io.*; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileReader; import java.lang.reflect.Method; import java.net.MalformedURLException; import java.net.URL; @@ -109,7 +112,7 @@ public class CommandLineWrapper { } private static void ensureAccess(Object reflectionObject) { - // need to call setAccessible here in order to be able to launch package-local classes + // need to call setAccessible here in order to be able to launch package-private classes // calling setAccessible() via reflection because the method is missing from java version 1.1.x final Class aClass = reflectionObject.getClass(); try { diff --git a/java/java-tests/testSrc/com/intellij/refactoring/MoveClassToInnerTest.java b/java/java-tests/testSrc/com/intellij/refactoring/MoveClassToInnerTest.java index 078fd8974294..9244124d67bc 100644 --- a/java/java-tests/testSrc/com/intellij/refactoring/MoveClassToInnerTest.java +++ b/java/java-tests/testSrc/com/intellij/refactoring/MoveClassToInnerTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -102,7 +102,7 @@ public class MoveClassToInnerTest extends RefactoringTestCase { } public void testPackageLocalClass() throws Exception { - doTestConflicts("pack1.Class1", "pack2.A", "Field Class1.c2 uses package-local class pack1.Class2"); + doTestConflicts("pack1.Class1", "pack2.A", "Field Class1.c2 uses package-private class pack1.Class2"); } public void testMoveIntoPackageLocalClass() throws Exception { diff --git a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/Mappings.java b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/Mappings.java index e825ce83fa0a..f86ef5c2128f 100644 --- a/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/Mappings.java +++ b/jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/Mappings.java @@ -1423,7 +1423,7 @@ public class Mappings { final Set usages = new HashSet(); if (d.packageLocalOn()) { - debug("Method became package-local, affecting method usages outside the package"); + debug("Method became package-private, affecting method usages outside the package"); myFuture.affectMethodUsages(m, propagated, m.createUsage(myContext, it.name), usages, state.myDependants); for (final UsageRepr.Usage usage : usages) { @@ -1483,7 +1483,7 @@ public class Mappings { if ((d.addedModifiers() & Opcodes.ACC_PROTECTED) > 0 && !((d.removedModifiers() & Opcodes.ACC_PRIVATE) > 0)) { if (!constrained) { - debug("Added public or package-local method became protected --- affect method usages with protected constraint"); + debug("Added public or package-private method became protected --- affect method usages with protected constraint"); if (!affected) { myFuture.affectMethodUsages(m, propagated, m.createUsage(myContext, it.name), usages, state.myDependants); state.myAffectedUsages.addAll(usages); diff --git a/platform/platform-resources-en/src/messages/RefactoringBundle.properties b/platform/platform-resources-en/src/messages/RefactoringBundle.properties index 4627a99e4e55..1fa4ebe54978 100644 --- a/platform/platform-resources-en/src/messages/RefactoringBundle.properties +++ b/platform/platform-resources-en/src/messages/RefactoringBundle.properties @@ -546,7 +546,7 @@ do.you.wish.to.continue=Do you wish to continue? all.these.directories.will.be.moved.and.all.references.to.0.will.be.changed=All these directories will be moved, and all references to {0} \nwill be changed. select.source.root.chooser.title=Select Source Root moving.directories.command=Moving directories -0.uses.a.package.local.1={0} uses package-local {1} +0.uses.a.package.local.1={0} uses package-private {1} a.package.local.class.0.will.no.longer.be.accessible.from.1=Package-local class {0} will no longer be accessible from {1} element.will.no.longer.be.accessible={0} will no longer be accessible from {1} move.instance.method.command=Move Instance method diff --git a/platform/structuralsearch/testSource/com/intellij/structuralsearch/StructuralSearchTest.java b/platform/structuralsearch/testSource/com/intellij/structuralsearch/StructuralSearchTest.java index 74c99ef65de0..173ba71d8d66 100644 --- a/platform/structuralsearch/testSource/com/intellij/structuralsearch/StructuralSearchTest.java +++ b/platform/structuralsearch/testSource/com/intellij/structuralsearch/StructuralSearchTest.java @@ -2755,7 +2755,7 @@ public class StructuralSearchTest extends StructuralSearchTestCase { String template = "transient @Modifier(\"packageLocal\") '_Type '_Variable = '_Value?;"; - assertEquals("Finding package-local transient fields", 1, findMatchesCount(source, template)); + assertEquals("Finding package-private transient fields", 1, findMatchesCount(source, template)); } public void test() { diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/InspectionGadgetsBundle.properties b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/InspectionGadgetsBundle.properties index 552c3d0d2b41..c432dd0f0876 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/InspectionGadgetsBundle.properties +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/InspectionGadgetsBundle.properties @@ -459,8 +459,8 @@ large.initializer.primitive.type.array.problem.descriptor=Primitive array initia large.initializer.primitive.type.array.maximum.number.of.elements.option=Maximum number of elements: private.member.access.between.outer.and.inner.classes.display.name=Private member access between outer and inner classes private.member.access.between.outer.and.inner.classes.problem.descriptor=Access to private member of class ''{0}'' #loc -private.member.access.between.outer.and.inner.classes.make.local.quickfix=Make ''{0}'' package-local -private.member.access.between.outer.and.inner.classes.make.constructor.package.local.quickfix=Make ''{0}'' constructor package-local +private.member.access.between.outer.and.inner.classes.make.local.quickfix=Make ''{0}'' package-private +private.member.access.between.outer.and.inner.classes.make.constructor.package.local.quickfix=Make ''{0}'' constructor package-private recordstore.opened.not.safely.closed.display.name=RecordStore opened but not safely closed overly.complex.anonymous.inner.class.display.name=Overly complex anonymous class cyclomatic.complexity.limit.option=Cyclomatic complexity limit: @@ -1401,8 +1401,8 @@ cached.number.constructor.call.ignore.string.arguments.option=Ignore new number chained.equality.comparisons.problem.descriptor=Chained equality comparison #ref #loc confusing.octal.escape.sequence.problem.descriptor=Octal escape sequence #ref immediately followed by digit #loc field.accessed.synchronized.and.unsynchronized.option=Simple getters and setters are considered field accesses too -method.overrides.package.local.method.display.name=Method overrides package-local method of superclass located in other package -method.overrides.package.local.method.problem.descriptor=Method #ref() overrides a package-local method of a superclass located in another package #loc +method.overrides.package.local.method.display.name=Method overrides package-private method of superclass located in other package +method.overrides.package.local.method.problem.descriptor=Method #ref() overrides a package-private method of a superclass located in another package #loc suspicious.to.array.call.display.name=Suspicious 'Collection.toArray()' call suspicious.to.array.call.problem.descriptor=Array of type ''{0}[]'' expected #loc suspicious.system.arraycopy.display.name=Suspicious 'System.arraycopy()' call diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/j2me/PrivateMemberAccessBetweenOuterAndInnerClassInspection.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/j2me/PrivateMemberAccessBetweenOuterAndInnerClassInspection.java index f124e4f6cb12..78bca3be7685 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/j2me/PrivateMemberAccessBetweenOuterAndInnerClassInspection.java +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/j2me/PrivateMemberAccessBetweenOuterAndInnerClassInspection.java @@ -94,7 +94,7 @@ public class PrivateMemberAccessBetweenOuterAndInnerClassInspection @NotNull @Override public String getFamilyName() { - return "Make package-local"; + return "Make package-private"; } @Override diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/PackageVisibleInnerClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/PackageVisibleInnerClass.html index 7bcb911aaedd..686ef2a433b9 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/PackageVisibleInnerClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/PackageVisibleInnerClass.html @@ -1,11 +1,11 @@ -Reports package-local inner classes. +Reports package-private inner classes.

-Use the first checkbox below to ignore package-local inner enums. +Use the first checkbox below to ignore package-private inner enums.

-Use the seconds checkbox below to ignore package-local inner interface. +Use the seconds checkbox below to ignore package-private inner interface.

diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnOfInnerClass.html b/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnOfInnerClass.html index 5c815d551fe3..f247895830a1 100644 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnOfInnerClass.html +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/ReturnOfInnerClass.html @@ -5,7 +5,7 @@ Such instances keep an implicit reference to the outer instance. Which means the instance can prevent the outer instance from being garbage collected. Any caller of a method which returns such an instance might cause a memory leak by holding on to the instance returned.

-Use the checkbox below to ignore returns from protected or package-local methods. +Use the checkbox below to ignore returns from protected or package-private methods. Returns from private methods are always ignored.

diff --git a/plugins/IntentionPowerPak/src/com/siyeh/IntentionPowerPackBundle.properties b/plugins/IntentionPowerPak/src/com/siyeh/IntentionPowerPackBundle.properties index 29100ec8cb0f..a2ff01779108 100644 --- a/plugins/IntentionPowerPak/src/com/siyeh/IntentionPowerPackBundle.properties +++ b/plugins/IntentionPowerPak/src/com/siyeh/IntentionPowerPackBundle.properties @@ -174,8 +174,8 @@ infer.lambda.parameter.type.intention.family.name=Infer lambda parameter type expand.one.line.lambda2.code.block.intention.family.name=Expand lambda expression body to code block make.public.intention.name=Make 'public' make.public.intention.family.name=Make Public -make.package.private.intention.name=Make package-local -make.package.private.intention.family.name=Make Package-Local +make.package.private.intention.name=Make package-private +make.package.private.intention.family.name=Make Package-Private make.protected.intention.name=Make 'protected' make.protected.intention.family.name=Make Protected make.private.intention.name=Make 'private' diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/MakePackagePrivateIntention/description.html b/plugins/IntentionPowerPak/src/intentionDescriptions/MakePackagePrivateIntention/description.html index b039dfa0ea43..39743860a8f4 100644 --- a/plugins/IntentionPowerPak/src/intentionDescriptions/MakePackagePrivateIntention/description.html +++ b/plugins/IntentionPowerPak/src/intentionDescriptions/MakePackagePrivateIntention/description.html @@ -1,5 +1,5 @@ -This intention makes a class, method or field package-local. +This intention makes a class, method or field package-private. \ No newline at end of file diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyCompilerTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyCompilerTest.groovy index edc39e0d8d59..0c4e689dcb80 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyCompilerTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyCompilerTest.groovy @@ -1,17 +1,17 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 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. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.jetbrains.plugins.groovy.compiler @@ -617,7 +617,7 @@ class Main { assertEmpty make() } - public void "test extend package-local class from another module"() { + public void "test extend package-private class from another module"() { addGroovyLibrary(addDependentModule()) myFixture.addClass("package foo; class Foo {}") diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassToInnerTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassToInnerTest.groovy index 4c2139533ba5..9ad4b78c15b0 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassToInnerTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/move/GroovyMoveClassToInnerTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -13,8 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jetbrains.plugins.groovy.refactoring.move; - +package org.jetbrains.plugins.groovy.refactoring.move import com.intellij.openapi.fileEditor.FileDocumentManager import com.intellij.openapi.vfs.VirtualFile @@ -22,8 +21,8 @@ import com.intellij.psi.PsiClass import com.intellij.psi.PsiDocumentManager import com.intellij.psi.codeStyle.CodeStyleSettingsManager import com.intellij.refactoring.move.moveClassesOrPackages.MoveClassToInnerProcessor -import org.jetbrains.plugins.groovy.util.TestUtils import org.jetbrains.plugins.groovy.codeStyle.GroovyCodeStyleSettings +import org.jetbrains.plugins.groovy.util.TestUtils /** * @author Max Medvedev @@ -105,7 +104,7 @@ public class GroovyMoveClassToInnerTest extends GroovyMoveTestBase { } public void _testPackageLocalClass() throws Exception { - doTestConflicts("pack1.Class1", "pack2.A", "Field Class1.c2 uses a package-local class pack1.Class2."); + doTestConflicts("pack1.Class1", "pack2.A", "Field Class1.c2 uses a package-private class pack1.Class2."); } public void _testMoveIntoPackageLocalClass() throws Exception { diff --git a/plugins/ui-designer/src/com/intellij/uiDesigner/snapShooter/SnapShooter.java b/plugins/ui-designer/src/com/intellij/uiDesigner/snapShooter/SnapShooter.java index 9e72896ba88c..d1775dcc9e09 100644 --- a/plugins/ui-designer/src/com/intellij/uiDesigner/snapShooter/SnapShooter.java +++ b/plugins/ui-designer/src/com/intellij/uiDesigner/snapShooter/SnapShooter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -63,7 +63,7 @@ public class SnapShooter { } private static void ensureAccess(Object reflectionObject) { - // need to call setAccessible here in order to be able to launch package-local classes + // need to call setAccessible here in order to be able to launch package-private classes // calling setAccessible() via reflection because the method is missing from java version 1.1.x final Class aClass = reflectionObject.getClass(); try {