renamed package-local to package-private

This commit is contained in:
Alexey Kudravtsev
2016-03-14 14:45:59 +03:00
parent 81286d14b6
commit 433591b116
14 changed files with 41 additions and 39 deletions
@@ -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 {
@@ -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 <b><code>Class1.c2</code></b> uses package-local class <b><code>pack1.Class2</code></b>");
doTestConflicts("pack1.Class1", "pack2.A", "Field <b><code>Class1.c2</code></b> uses package-private class <b><code>pack1.Class2</code></b>");
}
public void testMoveIntoPackageLocalClass() throws Exception {
@@ -1423,7 +1423,7 @@ public class Mappings {
final Set<UsageRepr.Usage> usages = new HashSet<UsageRepr.Usage>();
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);
@@ -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
@@ -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() {
@@ -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 <code>#ref</code> #loc
confusing.octal.escape.sequence.problem.descriptor=Octal escape sequence <code>#ref</code> 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 <code>#ref()</code> 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 <code>#ref()</code> 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
@@ -94,7 +94,7 @@ public class PrivateMemberAccessBetweenOuterAndInnerClassInspection
@NotNull
@Override
public String getFamilyName() {
return "Make package-local";
return "Make package-private";
}
@Override
@@ -1,11 +1,11 @@
<html>
<body>
Reports package-local inner classes.
Reports package-private inner classes.
<!-- tooltip end -->
<p>
Use the first checkbox below to ignore package-local inner enums.
Use the first checkbox below to ignore package-private inner enums.
<p>
Use the seconds checkbox below to ignore package-local inner interface.
Use the seconds checkbox below to ignore package-private inner interface.
<p>
</body>
@@ -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.
<p>
Use the checkbox below to ignore returns from <b>protected</b> or package-local methods.
Use the checkbox below to ignore returns from <b>protected</b> or package-private methods.
Returns from <b>private</b> methods are always ignored.
<p>
</body>
@@ -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'
@@ -1,5 +1,5 @@
<html>
<body>
This intention makes a class, method or field package-local.
This intention makes a class, method or field package-private.
</body>
</html>
@@ -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 {}")
@@ -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 <b><code>Class1.c2</code></b> uses a package-local class <b><code>pack1.Class2</code></b>.");
doTestConflicts("pack1.Class1", "pack2.A", "Field <b><code>Class1.c2</code></b> uses a package-private class <b><code>pack1.Class2</code></b>.");
}
public void _testMoveIntoPackageLocalClass() throws Exception {
@@ -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 {