mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
remove duplicating R file from test data
This commit is contained in:
@@ -147,9 +147,6 @@
|
||||
<completion.contributor language="XML" implementationClass="org.jetbrains.android.AndroidCompletionContributor"
|
||||
id="compositieAttributeValues" order="first"/>
|
||||
|
||||
<!--<codeInsight.lineMarkerProvider language="JAVA" implementationClass="org.jetbrains.android.AndroidResourcesLineMarkerProvider"/>
|
||||
<codeInsight.lineMarkerProvider language="XML" implementationClass="org.jetbrains.android.AndroidResourcesLineMarkerProvider"/>-->
|
||||
|
||||
<renamePsiElementProcessor implementation="org.jetbrains.android.AndroidRenameResourceProcessor" order="first"/>
|
||||
<intentionAction>
|
||||
<className>org.jetbrains.android.intentions.AndroidAddStringResourceAction</className>
|
||||
|
||||
@@ -1,372 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2010 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
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.jetbrains.android;
|
||||
|
||||
import com.android.resources.ResourceType;
|
||||
import com.intellij.codeHighlighting.Pass;
|
||||
import com.intellij.codeInsight.daemon.GutterIconNavigationHandler;
|
||||
import com.intellij.codeInsight.daemon.LineMarkerInfo;
|
||||
import com.intellij.codeInsight.daemon.LineMarkerProvider;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.psi.util.PsiUtilCore;
|
||||
import com.intellij.psi.xml.XmlAttribute;
|
||||
import com.intellij.psi.xml.XmlAttributeValue;
|
||||
import com.intellij.psi.xml.XmlTag;
|
||||
import com.intellij.ui.awt.RelativePoint;
|
||||
import com.intellij.util.ConstantFunction;
|
||||
import com.intellij.util.containers.HashMap;
|
||||
import com.intellij.util.xml.GenericAttributeValue;
|
||||
import org.jetbrains.android.dom.resources.Attr;
|
||||
import org.jetbrains.android.dom.resources.DeclareStyleable;
|
||||
import org.jetbrains.android.dom.resources.ResourceElement;
|
||||
import org.jetbrains.android.dom.resources.Resources;
|
||||
import org.jetbrains.android.facet.AndroidFacet;
|
||||
import org.jetbrains.android.resourceManagers.LocalResourceManager;
|
||||
import org.jetbrains.android.util.AndroidCommonUtils;
|
||||
import org.jetbrains.android.util.AndroidResourceUtil;
|
||||
import org.jetbrains.android.util.AndroidUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author coyote
|
||||
*/
|
||||
public class AndroidResourcesLineMarkerProvider implements LineMarkerProvider {
|
||||
private static final Icon ICON = IconLoader.getIcon("/icons/navigate.png");
|
||||
|
||||
public LineMarkerInfo getLineMarkerInfo(@NotNull PsiElement psiElement) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void collectSlowLineMarkers(@NotNull List<PsiElement> psiElements, @NotNull Collection<LineMarkerInfo> lineMarkerInfos) {
|
||||
//noinspection ForLoopReplaceableByForEach
|
||||
for (int i = 0; i < psiElements.size(); i++) {
|
||||
PsiElement element = psiElements.get(i);
|
||||
addMarkerInfo(element, lineMarkerInfos);
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static String getToolTip(@NotNull PsiElement element) {
|
||||
String s = "Go to ";
|
||||
if (element instanceof PsiField) {
|
||||
PsiField field = (PsiField)element;
|
||||
PsiClass resClass = field.getContainingClass();
|
||||
assert resClass != null;
|
||||
PsiClass rClass = resClass.getContainingClass();
|
||||
assert rClass != null;
|
||||
return s + rClass.getName() + '.' + resClass.getName() + '.' + field.getName();
|
||||
}
|
||||
else {
|
||||
final PsiFile file = AndroidUtils.getContainingFile(element);
|
||||
if (file == null) {
|
||||
return s;
|
||||
}
|
||||
final PsiFile originalFile = file.getOriginalFile();
|
||||
String name = originalFile.getName();
|
||||
PsiDirectory dir = originalFile.getContainingDirectory();
|
||||
if (dir == null) return s + name;
|
||||
return s + dir.getName() + '/' + name;
|
||||
}
|
||||
}
|
||||
|
||||
private static LineMarkerInfo createLineMarkerInfo(@NotNull PsiElement element, @NotNull PsiElement... targets) {
|
||||
final String toolTip = targets.length == 1 ? getToolTip(targets[0]) : "Resource not found";
|
||||
return new LineMarkerInfo<PsiElement>(element,
|
||||
element.getTextOffset(),
|
||||
ICON,
|
||||
Pass.UPDATE_OVERRIDEN_MARKERS,
|
||||
new ConstantFunction<PsiElement, String>(toolTip),
|
||||
new MyNavigationHandler(targets));
|
||||
}
|
||||
|
||||
private static LineMarkerInfo createLazyLineMarkerInfo(@NotNull PsiElement element,
|
||||
@NotNull final Computable<PsiElement[]> targetProvider) {
|
||||
return new LineMarkerInfo<PsiElement>(element,
|
||||
element.getTextOffset(),
|
||||
ICON,
|
||||
Pass.UPDATE_OVERRIDEN_MARKERS,
|
||||
new ConstantFunction<PsiElement, String>("Go to resource"),
|
||||
new MyLazyNavigationHandler(targetProvider));
|
||||
}
|
||||
|
||||
private static void annotateXmlAttributeValue(@NotNull XmlAttributeValue attrValue, @NotNull Collection<LineMarkerInfo> result) {
|
||||
final AndroidFacet facet = AndroidFacet.getInstance(attrValue);
|
||||
if (facet != null) {
|
||||
PsiElement parent = attrValue.getParent();
|
||||
if (!(parent instanceof XmlAttribute)) return;
|
||||
final XmlAttribute attr = (XmlAttribute)parent;
|
||||
if (attr.getLocalName().equals("name")) {
|
||||
final XmlTag tag = PsiTreeUtil.getParentOfType(attr, XmlTag.class);
|
||||
if (tag != null) {
|
||||
String fileResType = facet.getLocalResourceManager().getFileResourceType(tag.getContainingFile());
|
||||
final String resType = "values".equals(fileResType) ? AndroidResourceUtil.getResourceTypeByValueResourceTag(tag) : null;
|
||||
if (resType != null) {
|
||||
result.add(createLazyLineMarkerInfo(tag, new Computable<PsiElement[]>() {
|
||||
@Override
|
||||
public PsiElement[] compute() {
|
||||
String name = tag.getAttributeValue("name");
|
||||
return name != null ? AndroidResourceUtil.findResourceFields(facet, resType, name, false) : PsiElement.EMPTY_ARRAY;
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (AndroidResourceUtil.isIdDeclaration(attrValue)) {
|
||||
result.add(createLazyLineMarkerInfo(attrValue, new Computable<PsiElement[]>() {
|
||||
@Override
|
||||
public PsiElement[] compute() {
|
||||
return AndroidResourceUtil.findIdFields(attr);
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void addMarkerInfo(@NotNull final PsiElement element, @NotNull Collection<LineMarkerInfo> result) {
|
||||
if (element instanceof PsiFile) {
|
||||
PsiField[] fields = AndroidResourceUtil.findResourceFieldsForFileResource((PsiFile)element, false);
|
||||
if (fields.length > 0) result.add(createLineMarkerInfo(element, fields));
|
||||
}
|
||||
else if (element instanceof PsiClass) {
|
||||
PsiClass c = (PsiClass)element;
|
||||
if (AndroidUtils.R_CLASS_NAME.equals(c.getName())) {
|
||||
PsiFile containingFile = element.getContainingFile();
|
||||
AndroidFacet facet = AndroidFacet.getInstance(containingFile);
|
||||
if (facet != null && AndroidResourceUtil.isRJavaFile(facet, containingFile)) {
|
||||
LocalResourceManager manager = facet.getLocalResourceManager();
|
||||
annotateRClass((PsiClass)element, result, manager);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (element instanceof XmlAttributeValue) {
|
||||
annotateXmlAttributeValue((XmlAttributeValue)element, result);
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static Map<MyResourceEntry, List<PsiElement>> buildLocalResourceMap(@NotNull Project project,
|
||||
@NotNull final LocalResourceManager resManager) {
|
||||
final Map<MyResourceEntry, List<PsiElement>> result = new HashMap<MyResourceEntry, List<PsiElement>>();
|
||||
List<Pair<Resources,VirtualFile>> resourceFiles = resManager.getResourceElements();
|
||||
for (Pair<Resources, VirtualFile> pair : resourceFiles) {
|
||||
final Resources res = pair.getFirst();
|
||||
for (ResourceType valueResourceType : AndroidResourceUtil.VALUE_RESOURCE_TYPES) {
|
||||
for (ResourceElement valueResource : AndroidResourceUtil.getValueResourcesFromElement(valueResourceType.getName(), res)) {
|
||||
addResource(valueResourceType.getName(), valueResource, result);
|
||||
}
|
||||
}
|
||||
for (Attr attr : res.getAttrs()) {
|
||||
addResource("attr", attr, result);
|
||||
}
|
||||
for (DeclareStyleable styleable : res.getDeclareStyleables()) {
|
||||
addResource("styleable", styleable, result);
|
||||
for (Attr attr : styleable.getAttrs()) {
|
||||
addResource("attr", attr, result);
|
||||
}
|
||||
}
|
||||
}
|
||||
collectFileResources(project, resManager, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void collectFileResources(Project project,
|
||||
final LocalResourceManager resManager,
|
||||
final Map<MyResourceEntry, List<PsiElement>> result) {
|
||||
final PsiManager psiManager = PsiManager.getInstance(project);
|
||||
ApplicationManager.getApplication().runReadAction(new Runnable() {
|
||||
public void run() {
|
||||
List<VirtualFile> resourceSubdirs = resManager.getResourceSubdirs(null);
|
||||
for (VirtualFile dir : resourceSubdirs) {
|
||||
String resType = AndroidCommonUtils.getResourceTypeByDirName(dir.getName());
|
||||
if (resType != null) {
|
||||
for (VirtualFile resourceFile : dir.getChildren()) {
|
||||
if (!resourceFile.isDirectory()) {
|
||||
PsiFile resourcePsiFile = psiManager.findFile(resourceFile);
|
||||
if (resourcePsiFile != null) {
|
||||
String resName = AndroidCommonUtils.getResourceName(resType, resourceFile.getName());
|
||||
MyResourceEntry key = new MyResourceEntry(resName, resType);
|
||||
List<PsiElement> list = result.get(key);
|
||||
if (list == null) {
|
||||
list = new ArrayList<PsiElement>();
|
||||
result.put(key, list);
|
||||
}
|
||||
list.add(resourcePsiFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static void addResource(String resType, ResourceElement resElement, Map<MyResourceEntry, List<PsiElement>> result) {
|
||||
GenericAttributeValue<String> nameValue = resElement.getName();
|
||||
if (nameValue != null) {
|
||||
String name = nameValue.getValue();
|
||||
if (name != null) {
|
||||
MyResourceEntry key = new MyResourceEntry(name, resType);
|
||||
List<PsiElement> list = result.get(key);
|
||||
if (list == null) {
|
||||
list = new ArrayList<PsiElement>();
|
||||
result.put(key, list);
|
||||
}
|
||||
list.add(nameValue.getXmlAttributeValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void annotateRClass(@NotNull PsiClass rClass,
|
||||
@NotNull Collection<LineMarkerInfo> result,
|
||||
@NotNull LocalResourceManager manager) {
|
||||
Map<MyResourceEntry, List<PsiElement>> resourceMap = buildLocalResourceMap(rClass.getProject(), manager);
|
||||
for (PsiClass c : rClass.getInnerClasses()) {
|
||||
for (PsiField field : c.getFields()) {
|
||||
annotateElementNavToResource(field, field, manager, result, resourceMap, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void annotateElementNavToResource(PsiElement element,
|
||||
final PsiField resField,
|
||||
final LocalResourceManager manager,
|
||||
Collection<LineMarkerInfo> result,
|
||||
@Nullable final Map<MyResourceEntry, List<PsiElement>> resourceMap,
|
||||
boolean lazy) {
|
||||
final String fieldName = resField.getName();
|
||||
if (fieldName != null) {
|
||||
final String resType = AndroidResourceUtil.getResourceClassName(resField);
|
||||
if (resType != null) {
|
||||
Computable<PsiElement[]> targetProvider = new Computable<PsiElement[]>() {
|
||||
@Override
|
||||
public PsiElement[] compute() {
|
||||
final List<PsiElement> targets;
|
||||
if (resourceMap != null) {
|
||||
targets = new ArrayList<PsiElement>();
|
||||
if (resType.equals("id")) {
|
||||
targets.addAll(manager.findIdDeclarations(fieldName));
|
||||
}
|
||||
List<PsiElement> resources = resourceMap.get(new MyResourceEntry(fieldName, resType));
|
||||
if (resources != null) {
|
||||
targets.addAll(resources);
|
||||
}
|
||||
}
|
||||
else {
|
||||
targets = manager.findResourcesByField(resField);
|
||||
}
|
||||
return PsiUtilCore.toPsiElementArray(targets);
|
||||
}
|
||||
};
|
||||
if (lazy) {
|
||||
result.add(createLazyLineMarkerInfo(element, targetProvider));
|
||||
}
|
||||
else {
|
||||
PsiElement[] targets = targetProvider.compute();
|
||||
if (targets != null && targets.length > 0) {
|
||||
result.add(createLineMarkerInfo(element, targets));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static class MyResourceEntry {
|
||||
final String myName;
|
||||
final String myType;
|
||||
|
||||
private MyResourceEntry(@NotNull String name, @NotNull String type) {
|
||||
myName = name;
|
||||
myType = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
MyResourceEntry that = (MyResourceEntry)o;
|
||||
|
||||
if (!AndroidUtils.equal(myName, that.myName, false)) return false;
|
||||
if (!myType.equals(that.myType)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 0;
|
||||
for (int i = 0; i < myName.length(); i++) {
|
||||
char c = myName.charAt(i);
|
||||
if (Character.isLetterOrDigit(c)) {
|
||||
result = 31 * result + (int)c;
|
||||
}
|
||||
}
|
||||
result = 31 * result + myType.hashCode();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public static class MyNavigationHandler implements GutterIconNavigationHandler<PsiElement> {
|
||||
private final PsiElement[] myTargets;
|
||||
|
||||
private MyNavigationHandler(@NotNull PsiElement[] targets) {
|
||||
myTargets = targets;
|
||||
}
|
||||
|
||||
public void navigate(MouseEvent event, PsiElement psiElement) {
|
||||
AndroidUtils.navigateTo(myTargets, event != null ? new RelativePoint(event) : null);
|
||||
}
|
||||
|
||||
public PsiElement[] getTargets() {
|
||||
return myTargets;
|
||||
}
|
||||
}
|
||||
|
||||
public static class MyLazyNavigationHandler implements GutterIconNavigationHandler<PsiElement> {
|
||||
private final Computable<PsiElement[]> myTargetProvider;
|
||||
|
||||
private MyLazyNavigationHandler(Computable<PsiElement[]> targetProvider) {
|
||||
myTargetProvider = targetProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void navigate(MouseEvent event, PsiElement psiElement) {
|
||||
PsiElement[] targets = myTargetProvider.compute();
|
||||
if (targets != null && targets.length > 0) {
|
||||
AndroidUtils.navigateTo(targets, event != null ? new RelativePoint(event) : null);
|
||||
}
|
||||
}
|
||||
|
||||
public Computable<PsiElement[]> getTargetProvider() {
|
||||
return myTargetProvider;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
public static final class layout {
|
||||
public static final int main = 0x7f040000;
|
||||
}
|
||||
|
||||
public static final class string {
|
||||
public static final int myLibResource = 0x7f040001;
|
||||
}
|
||||
|
||||
public static final class id {
|
||||
public static final int myButton = 0x7f090002;
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
public static final class layout {
|
||||
public static final int main = 0x7f040000;
|
||||
}
|
||||
|
||||
public static final class string {
|
||||
public static final int myLibResource = 0x7f040001;
|
||||
}
|
||||
|
||||
public static final class id {
|
||||
public static final int myButton = 0x7f090002;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
public static final class attr {
|
||||
public static final int at<caret>tr = 0x7f040002;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<resources>
|
||||
<string name="<caret>str">some text</string>
|
||||
<string name="str2">some text</string>
|
||||
</resources>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
/* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*
|
||||
* This class was automatically generated by the
|
||||
* aapt tool from the resource data it found. It
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
/* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*
|
||||
* This class was automatically generated by the
|
||||
* aapt tool from the resource data it found. It
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
public static final class array {
|
||||
public static final int co<caret>lors=0x7f070000;
|
||||
public static final int planets=0x7f070001;
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*
|
||||
* This class was automatically generated by the
|
||||
* aapt tool from the resource data it found. It
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
public static final class drawable {
|
||||
public static final int p<caret>ng=0x7f020000;
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*
|
||||
* This class was automatically generated by the
|
||||
* aapt tool from the resource data it found. It
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
public static final class id {
|
||||
public static final int my<caret>Id1=0x7f090006;
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*
|
||||
* This class was automatically generated by the
|
||||
* aapt tool from the resource data it found. It
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
public static final class id {
|
||||
public static final int lunc<caret>h=0x7f090006;
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/* AUTO-GENERATED FILE. DO NOT MODIFY.
|
||||
*
|
||||
* This class was automatically generated by the
|
||||
* aapt tool from the resource data it found. It
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package p1.p2;
|
||||
|
||||
public final class R {
|
||||
public static final class id {
|
||||
public static final int lunccccc<caret>h=0x7f090006;
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ public class AndroidFindUsagesTest extends AndroidTestCase {
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
myFixture.copyFileToProject(BASE_PATH + "picture3.gif", "res/drawable/picture3.gif");
|
||||
myFixture.copyFileToProject(BASE_PATH + "R.java", "gen/p1/p2/R.java");
|
||||
myFixture.copyFileToProject("R.java", "gen/p1/p2/R.java");
|
||||
}
|
||||
|
||||
public List<UsageInfo> findCodeUsages(String path, String pathInProject) throws Throwable {
|
||||
|
||||
@@ -62,10 +62,10 @@ public class AndroidRenameTest extends AndroidTestCase {
|
||||
myFixture.configureFromExistingVirtualFile(file);
|
||||
myFixture.copyFileToProject(BASE_PATH + "pic.png", "res/drawable/pic.png");
|
||||
myFixture.copyFileToProject(BASE_PATH + "styles.xml", "res/values/styles.xml");
|
||||
myFixture.copyFileToProject(BASE_PATH + "R1.java", R_JAVA_PATH);
|
||||
myFixture.copyFileToProject("R.java", R_JAVA_PATH);
|
||||
renameElementWithTextOccurences("pic1.png");
|
||||
myFixture.checkResultByFile(BASE_PATH + "layout_file_after.xml");
|
||||
myFixture.checkResultByFile(R_JAVA_PATH, BASE_PATH + "R_file_after.java", true);
|
||||
myFixture.checkResultByFile(R_JAVA_PATH, "R.java", true);
|
||||
myFixture.checkResultByFile("res/values/styles.xml", BASE_PATH + "styles_after.xml", true);
|
||||
assertNotNull(myFixture.findFileInTempDir("res/drawable/pic1.png"));
|
||||
}
|
||||
@@ -76,10 +76,10 @@ public class AndroidRenameTest extends AndroidTestCase {
|
||||
myFixture.configureFromExistingVirtualFile(file);
|
||||
myFixture.copyFileToProject(BASE_PATH + "pic.png", "res/drawable/pic.9.png");
|
||||
myFixture.copyFileToProject(BASE_PATH + "styles.xml", "res/values/styles.xml");
|
||||
myFixture.copyFileToProject(BASE_PATH + "R1.java", R_JAVA_PATH);
|
||||
myFixture.copyFileToProject("R.java", R_JAVA_PATH);
|
||||
renameElementWithTextOccurences("pic1.9.png");
|
||||
myFixture.checkResultByFile(BASE_PATH + "layout_file_after.xml");
|
||||
myFixture.checkResultByFile(R_JAVA_PATH, BASE_PATH + "R_file_after.java", true);
|
||||
myFixture.checkResultByFile(R_JAVA_PATH, "R.java", true);
|
||||
myFixture.checkResultByFile("res/values/styles.xml", BASE_PATH + "styles_after.xml", true);
|
||||
assertNotNull(myFixture.findFileInTempDir("res/drawable/pic1.9.png"));
|
||||
}
|
||||
@@ -129,10 +129,10 @@ public class AndroidRenameTest extends AndroidTestCase {
|
||||
VirtualFile file = myFixture.copyFileToProject(BASE_PATH + "layout2.xml", "res/layout/layout2.xml");
|
||||
myFixture.configureFromExistingVirtualFile(file);
|
||||
myFixture.copyFileToProject(BASE_PATH + "strings.xml", "res/values/strings.xml");
|
||||
myFixture.copyFileToProject(BASE_PATH + "R2.java", R_JAVA_PATH);
|
||||
myFixture.copyFileToProject("R.java", R_JAVA_PATH);
|
||||
myFixture.renameElementAtCaret("str1");
|
||||
myFixture.checkResultByFile(BASE_PATH + "layout_value_after.xml");
|
||||
myFixture.checkResultByFile(R_JAVA_PATH, BASE_PATH + "R_value_after.java", true);
|
||||
myFixture.checkResultByFile(R_JAVA_PATH, "R.java", true);
|
||||
myFixture.checkResultByFile("res/values/strings.xml", BASE_PATH + "strings_after.xml", true);
|
||||
}
|
||||
|
||||
@@ -158,12 +158,12 @@ public class AndroidRenameTest extends AndroidTestCase {
|
||||
myFixture.configureFromExistingVirtualFile(file);
|
||||
|
||||
myFixture.copyFileToProject(BASE_PATH + "layoutStrUsage.xml", "res/layout/layoutStrUsage.xml");
|
||||
myFixture.copyFileToProject(BASE_PATH + "R2.java", R_JAVA_PATH);
|
||||
myFixture.copyFileToProject("R.java", R_JAVA_PATH);
|
||||
|
||||
findHandlerAndDoRename();
|
||||
|
||||
myFixture.checkResultByFile(BASE_PATH + "strings_after.xml");
|
||||
myFixture.checkResultByFile(R_JAVA_PATH, BASE_PATH + "R_value_after.java", true);
|
||||
myFixture.checkResultByFile(R_JAVA_PATH, "R.java", true);
|
||||
myFixture.checkResultByFile("res/layout/layoutStrUsage.xml", BASE_PATH + "layoutStrUsage_after.xml", true);
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ public class AndroidRenameTest extends AndroidTestCase {
|
||||
createManifest();
|
||||
VirtualFile file = myFixture.copyFileToProject(BASE_PATH + "RefR3.java", "src/p1/p2/RefR3.java");
|
||||
myFixture.configureFromExistingVirtualFile(file);
|
||||
myFixture.copyFileToProject(BASE_PATH + "R.java", R_JAVA_PATH);
|
||||
myFixture.copyFileToProject("R.java", R_JAVA_PATH);
|
||||
myFixture.copyFileToProject(BASE_PATH + "layout3.xml", "res/layout/layout3.xml");
|
||||
myFixture.copyFileToProject(BASE_PATH + "pic.png", "res/drawable/pic.png");
|
||||
myFixture.renameElementAtCaret("pic1");
|
||||
@@ -200,7 +200,7 @@ public class AndroidRenameTest extends AndroidTestCase {
|
||||
createManifest();
|
||||
VirtualFile file = myFixture.copyFileToProject(BASE_PATH + "RefR4.java", "src/p1/p2/RefR4.java");
|
||||
myFixture.configureFromExistingVirtualFile(file);
|
||||
myFixture.copyFileToProject(BASE_PATH + "R.java", R_JAVA_PATH);
|
||||
myFixture.copyFileToProject("R.java", R_JAVA_PATH);
|
||||
myFixture.copyFileToProject(BASE_PATH + "layout4.xml", "res/layout/layout4.xml");
|
||||
myFixture.copyFileToProject(BASE_PATH + "strings.xml", "res/values/strings.xml");
|
||||
myFixture.renameElementAtCaret("str1");
|
||||
@@ -213,26 +213,26 @@ public class AndroidRenameTest extends AndroidTestCase {
|
||||
createManifest();
|
||||
VirtualFile file = myFixture.copyFileToProject(BASE_PATH + "layout5.xml", "res/layout/layout5.xml");
|
||||
myFixture.configureFromExistingVirtualFile(file);
|
||||
myFixture.copyFileToProject(BASE_PATH + "R5.java", R_JAVA_PATH);
|
||||
myFixture.copyFileToProject("R.java", R_JAVA_PATH);
|
||||
myFixture.renameElementAtCaret("@+id/anchor1");
|
||||
myFixture.checkResultByFile(BASE_PATH + "layout_id_after.xml");
|
||||
myFixture.checkResultByFile(R_JAVA_PATH, BASE_PATH + "R_id_after.java", true);
|
||||
myFixture.checkResultByFile(R_JAVA_PATH, "R.java", true);
|
||||
}
|
||||
|
||||
public void testIdDeclaration() throws Throwable {
|
||||
createManifest();
|
||||
VirtualFile file = myFixture.copyFileToProject(BASE_PATH + "layout6.xml", "res/layout/layout6.xml");
|
||||
myFixture.configureFromExistingVirtualFile(file);
|
||||
myFixture.copyFileToProject(BASE_PATH + "R6.java", R_JAVA_PATH);
|
||||
myFixture.copyFileToProject("R.java", R_JAVA_PATH);
|
||||
myFixture.renameElementAtCaret("@+id/anchor1");
|
||||
myFixture.checkResultByFile(BASE_PATH + "layout_id_after.xml");
|
||||
myFixture.checkResultByFile(R_JAVA_PATH, BASE_PATH + "R_id_after.java", true);
|
||||
myFixture.checkResultByFile(R_JAVA_PATH, "R.java", true);
|
||||
}
|
||||
|
||||
public void testJavaReferenceToId() throws Throwable {
|
||||
createManifest();
|
||||
VirtualFile file = myFixture.copyFileToProject(BASE_PATH + "RefR7.java", "src/p1/p2/RefR7.java");
|
||||
myFixture.copyFileToProject(BASE_PATH + "R.java", R_JAVA_PATH);
|
||||
myFixture.copyFileToProject("R.java", R_JAVA_PATH);
|
||||
myFixture.configureFromExistingVirtualFile(file);
|
||||
myFixture.copyFileToProject(BASE_PATH + "layout7.xml", "res/layout/layout7.xml");
|
||||
myFixture.renameElementAtCaret("anchor1");
|
||||
@@ -243,7 +243,7 @@ public class AndroidRenameTest extends AndroidTestCase {
|
||||
public void testStyleable() throws Throwable {
|
||||
createManifest();
|
||||
VirtualFile file = myFixture.copyFileToProject(BASE_PATH + "RefR8.java", "src/p1/p2/RefR8.java");
|
||||
myFixture.copyFileToProject(BASE_PATH + "R.java", R_JAVA_PATH);
|
||||
myFixture.copyFileToProject("R.java", R_JAVA_PATH);
|
||||
myFixture.configureFromExistingVirtualFile(file);
|
||||
myFixture.copyFileToProject(BASE_PATH + "attrs8.xml", "res/values/attrs8.xml");
|
||||
myFixture.renameElementAtCaret("LabelView1");
|
||||
@@ -254,7 +254,7 @@ public class AndroidRenameTest extends AndroidTestCase {
|
||||
public void testAttr() throws Throwable {
|
||||
createManifest();
|
||||
VirtualFile file = myFixture.copyFileToProject(BASE_PATH + "RefR9.java", "src/p1/p2/RefR9.java");
|
||||
myFixture.copyFileToProject(BASE_PATH + "R.java", R_JAVA_PATH);
|
||||
myFixture.copyFileToProject("R.java", R_JAVA_PATH);
|
||||
myFixture.configureFromExistingVirtualFile(file);
|
||||
myFixture.copyFileToProject(BASE_PATH + "attrs9.xml", "res/values/attrs9.xml");
|
||||
myFixture.renameElementAtCaret("attr1");
|
||||
|
||||
@@ -25,83 +25,6 @@ public class AndroidResourcesLineMarkerTest extends AndroidTestCase {
|
||||
myFixture.copyDirectoryToProject(BASE_PATH + "res", "res");
|
||||
}
|
||||
|
||||
/*public void testRJavaFile() throws Exception {
|
||||
List<LineMarkerInfo> markers = collectMarkers("src/p1/p2/R.java");
|
||||
assertEquals(26, markers.size());
|
||||
for (LineMarkerInfo marker : markers) {
|
||||
PsiField field = (PsiField)marker.getElement();
|
||||
GutterIconNavigationHandler handler = marker.getNavigationHandler();
|
||||
assertInstanceOf(handler, AndroidResourcesLineMarkerProvider.MyNavigationHandler.class);
|
||||
PsiElement[] targets = ((AndroidResourcesLineMarkerProvider.MyNavigationHandler)handler).getTargets();
|
||||
checkTargets(field, targets);
|
||||
}
|
||||
}
|
||||
|
||||
public void testValueResourcesFile() throws Exception {
|
||||
copyRJava();
|
||||
List<LineMarkerInfo> markers = collectMarkers("res/values/ids.xml");
|
||||
assertEquals(3, markers.size());
|
||||
for (LineMarkerInfo marker : markers) {
|
||||
GutterIconNavigationHandler handler = marker.getNavigationHandler();
|
||||
assertInstanceOf(handler, AndroidResourcesLineMarkerProvider.MyLazyNavigationHandler.class);
|
||||
Computable<PsiElement[]> targetProvider = ((AndroidResourcesLineMarkerProvider.MyLazyNavigationHandler)handler).getTargetProvider();
|
||||
PsiElement[] targets = targetProvider.compute();
|
||||
assertNotNull(targets);
|
||||
assertEquals(1, targets.length);
|
||||
for (PsiElement target : targets) {
|
||||
assertInstanceOf(target, PsiField.class);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void testLayoutFile() throws Exception {
|
||||
copyRJava();
|
||||
List<LineMarkerInfo> markers = collectMarkers("res/layout/layout1.xml");
|
||||
assertEquals(5, markers.size());
|
||||
|
||||
boolean fileMarker = false;
|
||||
|
||||
for (LineMarkerInfo marker : markers) {
|
||||
GutterIconNavigationHandler handler = marker.getNavigationHandler();
|
||||
PsiElement[] targets;
|
||||
if (marker.getElement() instanceof XmlFile) {
|
||||
fileMarker = true;
|
||||
assertInstanceOf(handler, AndroidResourcesLineMarkerProvider.MyNavigationHandler.class);
|
||||
targets = ((AndroidResourcesLineMarkerProvider.MyNavigationHandler)handler).getTargets();
|
||||
}
|
||||
else {
|
||||
assertInstanceOf(handler, AndroidResourcesLineMarkerProvider.MyLazyNavigationHandler.class);
|
||||
Computable<PsiElement[]> targetProvider = ((AndroidResourcesLineMarkerProvider.MyLazyNavigationHandler)handler).getTargetProvider();
|
||||
targets = targetProvider.compute();
|
||||
}
|
||||
assertNotNull(targets);
|
||||
assertEquals(1, targets.length);
|
||||
for (PsiElement target : targets) {
|
||||
assertInstanceOf(target, PsiField.class);
|
||||
}
|
||||
}
|
||||
|
||||
assertTrue("LineMarker for file not found", fileMarker);
|
||||
}
|
||||
|
||||
public void testJavaFileMarkers() throws Exception {
|
||||
copyRJava();
|
||||
List<LineMarkerInfo> markers = collectMarkers("src/p1/p2/Java.java");
|
||||
|
||||
// do not draw line markers on usages of a resource: AndroidGotoDeclarationHandler provides navigation instead
|
||||
assertEquals(0, markers.size());
|
||||
|
||||
for (LineMarkerInfo marker : markers) {
|
||||
PsiReferenceExpression expression = (PsiReferenceExpression)marker.getElement();
|
||||
PsiField field = (PsiField)expression.resolve();
|
||||
GutterIconNavigationHandler handler = marker.getNavigationHandler();
|
||||
assertInstanceOf(handler, AndroidResourcesLineMarkerProvider.MyLazyNavigationHandler.class);
|
||||
Computable<PsiElement[]> targetProvider = ((AndroidResourcesLineMarkerProvider.MyLazyNavigationHandler)handler).getTargetProvider();
|
||||
PsiElement[] targets = targetProvider.compute();
|
||||
checkTargets(field, targets);
|
||||
}
|
||||
}*/
|
||||
|
||||
public void testJavaFileNavigation1() throws Exception {
|
||||
doJavaFileNavigationTest(1, true);
|
||||
}
|
||||
@@ -130,42 +53,12 @@ public class AndroidResourcesLineMarkerTest extends AndroidTestCase {
|
||||
doJavaFileNavigationTest(1, true);
|
||||
}
|
||||
|
||||
/*public void testRJavaFileNavigation1() throws Exception {
|
||||
doRJavaFileNavigationTest(1);
|
||||
}
|
||||
|
||||
public void testRJavaFileNavigation2() throws Exception {
|
||||
doRJavaFileNavigationTest(2);
|
||||
}
|
||||
|
||||
public void testRJavaFileNavigation3() throws Exception {
|
||||
doRJavaFileNavigationTest(3);
|
||||
}
|
||||
|
||||
public void testRJavaFileNavigation4() throws Exception {
|
||||
doRJavaFileNavigationTest(1);
|
||||
}
|
||||
|
||||
public void testRJavaFileNavigation5() throws Exception {
|
||||
doRJavaFileNavigationTest(0);
|
||||
}*/
|
||||
|
||||
/*public void testValueResourcesNavigation() throws Exception {
|
||||
copyRJava();
|
||||
String fileName = getTestName(false) + ".xml";
|
||||
doJavaFileNavigationTest(fileName, "res/values/" + fileName, 1, true, false);
|
||||
}*/
|
||||
|
||||
private void doJavaFileNavigationTest(int expectedTargets, boolean expectedEnabled) throws IOException {
|
||||
copyRJava();
|
||||
String path = "src/p1/p2/" + getTestName(false) + ".java";
|
||||
doJavaFileNavigationTest(path, path, expectedTargets, expectedEnabled, true);
|
||||
}
|
||||
|
||||
/*private void doRJavaFileNavigationTest(int expectedTargets) throws IOException {
|
||||
doJavaFileNavigationTest("src/p1/p2/" + getTestName(false) + ".java", "src/p1/p2/R.java", expectedTargets, true, false);
|
||||
}*/
|
||||
|
||||
private void doJavaFileNavigationTest(String srcPath, String destPath, int expectedTargets, boolean expectedEnabled,
|
||||
boolean testGotoDeclaration) throws IOException {
|
||||
VirtualFile file = myFixture.copyFileToProject(BASE_PATH + srcPath, destPath);
|
||||
@@ -177,51 +70,9 @@ public class AndroidResourcesLineMarkerTest extends AndroidTestCase {
|
||||
assertNotNull(targets);
|
||||
assertEquals(expectedTargets, targets.length);
|
||||
}
|
||||
|
||||
// test Ctrl+Alt+Shift+R
|
||||
/*GotoResourceAction action = new GotoResourceAction();
|
||||
DataContext dataContext = DataManager.getInstance().getDataContextFromFocus().getResult();
|
||||
AnActionEvent event = new AnActionEvent(null, dataContext, "", action.getTemplatePresentation(), ActionManager.getInstance(), 0);
|
||||
action.update(event);
|
||||
assertEquals(expectedEnabled, event.getPresentation().isEnabled());
|
||||
PsiElement[] targets = GotoResourceAction.findTargets(dataContext);
|
||||
assertEquals(expectedTargets, targets.length);*/
|
||||
}
|
||||
|
||||
/*private List<LineMarkerInfo> collectMarkers(String filePath) throws IOException {
|
||||
return collectMarkers(myFixture, BASE_PATH + filePath, filePath);
|
||||
}
|
||||
|
||||
public static List<LineMarkerInfo> collectMarkers(JavaCodeInsightTestFixture fixture, String fromPath, String filePath) {
|
||||
VirtualFile file = fixture.copyFileToProject(fromPath, filePath);
|
||||
fixture.configureFromExistingVirtualFile(file);
|
||||
fixture.doHighlighting();
|
||||
List<LineMarkerInfo> markers = DaemonCodeAnalyzerImpl.getLineMarkers(fixture.getEditor().getDocument(), fixture.getProject());
|
||||
assertNotNull(markers);
|
||||
return markers;
|
||||
}
|
||||
|
||||
private static void checkTargets(PsiField field, PsiElement[] targets) {
|
||||
assertNotNull(targets);
|
||||
assertTrue(targets.length > 0);
|
||||
int expectedTargetCount = getExpectedTargetCount(field.getName());
|
||||
assertEquals(field.getName(), expectedTargetCount, targets.length);
|
||||
}
|
||||
|
||||
private static int getExpectedTargetCount(String fieldName) {
|
||||
if ("png".equals(fieldName)) {
|
||||
return 2;
|
||||
}
|
||||
if ("str2".equals(fieldName)) {
|
||||
return 3;
|
||||
}
|
||||
if ("myId1".equals(fieldName)) {
|
||||
return 3;
|
||||
}
|
||||
return 1;
|
||||
}*/
|
||||
|
||||
private void copyRJava() throws IOException {
|
||||
myFixture.copyFileToProject(BASE_PATH + "src/p1/p2/R.java", "src/p1/p2/R.java");
|
||||
myFixture.copyFileToProject("R.java", "src/p1/p2/R.java");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ abstract class AndroidDomTest extends AndroidTestCase {
|
||||
@Override
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
myFixture.copyFileToProject("dom/R.java", "gen/p1/p2/R.java");
|
||||
myFixture.copyFileToProject("R.java", "gen/p1/p2/R.java");
|
||||
myFixture.enableInspections(AndroidDomInspection.class,
|
||||
AndroidUnknownAttributeInspection.class,
|
||||
AndroidElementNotAllowedInspection.class);
|
||||
|
||||
@@ -145,7 +145,7 @@ public class AndroidLibraryProjectTest extends UsefulTestCase {
|
||||
|
||||
public void testJavaHighlighting() {
|
||||
createInitialStructure();
|
||||
myFixture.copyFileToProject(BASE_PATH + "FindUsagesR1.java", "lib/src/p1/p2/lib/R.java");
|
||||
myFixture.copyFileToProject(BASE_PATH + "LibR.java", "lib/src/p1/p2/lib/R.java");
|
||||
String to = "lib/src/p1/p2/lib" + getTestName(true) + ".java";
|
||||
VirtualFile file = myFixture.copyFileToProject(BASE_PATH + getTestName(false) + ".java", to);
|
||||
myFixture.configureFromExistingVirtualFile(file);
|
||||
@@ -186,7 +186,7 @@ public class AndroidLibraryProjectTest extends UsefulTestCase {
|
||||
|
||||
public void testJavaNavigation() throws Exception {
|
||||
createInitialStructure();
|
||||
myFixture.copyFileToProject(BASE_PATH + "RJavaFileMarkers.java", "app/src/p1/p2/R.java");
|
||||
myFixture.copyFileToProject("R.java", "app/src/p1/p2/R.java");
|
||||
VirtualFile file = myFixture.copyFileToProject(BASE_PATH + getTestName(false) + ".java", "/app/src/p1/p2/Java.java");
|
||||
myFixture.configureFromExistingVirtualFile(file);
|
||||
|
||||
@@ -242,9 +242,9 @@ public class AndroidLibraryProjectTest extends UsefulTestCase {
|
||||
myFixture.copyFileToProject(BASE_PATH + "FindUsagesStyles.xml", "app/res/values/styles.xml");
|
||||
myFixture.copyFileToProject(BASE_PATH + "FindUsagesStyles.xml", "lib/res/values/styles.xml");
|
||||
myFixture.copyFileToProject(BASE_PATH + "picture1.png", "lib/res/drawable/picture1.png");
|
||||
myFixture.copyFileToProject(BASE_PATH + "FindUsagesR.java", "app/src/p1/p2/R.java");
|
||||
myFixture.copyFileToProject(BASE_PATH + "FindUsagesR1.java", "app/src/p1/p2/lib/R.java");
|
||||
myFixture.copyFileToProject(BASE_PATH + "FindUsagesR1.java", "lib/src/p1/p2/lib/R.java");
|
||||
myFixture.copyFileToProject("R.java", "app/src/p1/p2/R.java");
|
||||
myFixture.copyFileToProject(BASE_PATH + "LibR.java", "app/src/p1/p2/lib/R.java");
|
||||
myFixture.copyFileToProject(BASE_PATH + "LibR.java", "lib/src/p1/p2/lib/R.java");
|
||||
Collection<UsageInfo> references = findCodeUsages(getTestName(false) + "." + extension, dir);
|
||||
assertEquals(6, references.size());
|
||||
}
|
||||
|
||||
+1
-1
@@ -190,7 +190,7 @@ public class AndroidAddStringResourceActionTest extends AndroidTestCase {
|
||||
if (stringsXml != null) {
|
||||
myFixture.copyFileToProject(BASE_PATH + stringsXml, "res/values/strings.xml");
|
||||
}
|
||||
myFixture.copyFileToProject(BASE_PATH + "R.java", "src/p1/p2/R.java");
|
||||
myFixture.copyFileToProject("R.java", "src/p1/p2/R.java");
|
||||
myFixture.configureFromExistingVirtualFile(javaFile);
|
||||
final PsiFile javaPsiFile = myFixture.getFile();
|
||||
assertTrue(new AndroidAddStringResourceAction().isAvailable(myFixture.getProject(), myFixture.getEditor(), javaPsiFile));
|
||||
|
||||
Reference in New Issue
Block a user