mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
duplicated class removed
This commit is contained in:
@@ -27,6 +27,10 @@ public class OrderRoot {
|
||||
private final OrderRootType myType;
|
||||
private final boolean myJarDirectory;
|
||||
|
||||
public OrderRoot(@NotNull VirtualFile file, @NotNull OrderRootType type) {
|
||||
this(file, type, false);
|
||||
}
|
||||
|
||||
public OrderRoot(@NotNull VirtualFile file, @NotNull OrderRootType type, boolean jarDirectory) {
|
||||
myFile = file;
|
||||
myType = type;
|
||||
|
||||
@@ -21,11 +21,11 @@ import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.projectRoots.SdkModel;
|
||||
import com.intellij.openapi.projectRoots.SdkModificator;
|
||||
import com.intellij.openapi.roots.OrderRootType;
|
||||
import com.intellij.openapi.roots.libraries.ui.OrderRoot;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.containers.HashMap;
|
||||
import org.jetbrains.android.util.OrderRoot;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.intellij.openapi.roots.JavadocOrderRootType;
|
||||
import com.intellij.openapi.roots.ModifiableRootModel;
|
||||
import com.intellij.openapi.roots.ModuleRootManager;
|
||||
import com.intellij.openapi.roots.OrderRootType;
|
||||
import com.intellij.openapi.roots.libraries.ui.OrderRoot;
|
||||
import com.intellij.openapi.roots.ui.configuration.ProjectSettingsService;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.vfs.JarFileSystem;
|
||||
@@ -35,7 +36,6 @@ import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.util.containers.HashSet;
|
||||
import org.jetbrains.android.util.AndroidUtils;
|
||||
import org.jetbrains.android.util.OrderRoot;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -91,13 +91,17 @@ public class AndroidSdkUtils {
|
||||
VirtualFile androidJar = platformDir.findChild(SdkConstants.FN_FRAMEWORK_LIBRARY);
|
||||
if (androidJar == null) return result;
|
||||
VirtualFile androidJarRoot = JarFileSystem.getInstance().findFileByPath(androidJar.getPath() + JarFileSystem.JAR_SEPARATOR);
|
||||
result.add(new OrderRoot(OrderRootType.CLASSES, androidJarRoot));
|
||||
if (androidJarRoot != null) {
|
||||
result.add(new OrderRoot(androidJarRoot, OrderRootType.CLASSES));
|
||||
}
|
||||
|
||||
IAndroidTarget.IOptionalLibrary[] libs = target.getOptionalLibraries();
|
||||
if (libs != null) {
|
||||
for (IAndroidTarget.IOptionalLibrary lib : libs) {
|
||||
VirtualFile libRoot = JarFileSystem.getInstance().findFileByPath(lib.getJarPath() + JarFileSystem.JAR_SEPARATOR);
|
||||
result.add(new OrderRoot(OrderRootType.CLASSES, libRoot));
|
||||
if (libRoot != null) {
|
||||
result.add(new OrderRoot(libRoot, OrderRootType.CLASSES));
|
||||
}
|
||||
}
|
||||
}
|
||||
VirtualFile targetDir = platformDir;
|
||||
@@ -130,12 +134,12 @@ public class AndroidSdkUtils {
|
||||
private static void addJavaDocAndSources(@NotNull List<OrderRoot> list, @NotNull VirtualFile dir) {
|
||||
VirtualFile javadocDir = findJavadocDir(dir);
|
||||
if (javadocDir != null) {
|
||||
list.add(new OrderRoot(JavadocOrderRootType.getInstance(), javadocDir));
|
||||
list.add(new OrderRoot(javadocDir, JavadocOrderRootType.getInstance()));
|
||||
}
|
||||
|
||||
VirtualFile sourcesDir = dir.findChild(SdkConstants.FD_SOURCES);
|
||||
if (sourcesDir != null) {
|
||||
list.add(new OrderRoot(OrderRootType.SOURCES, sourcesDir));
|
||||
list.add(new OrderRoot(sourcesDir, OrderRootType.SOURCES));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,45 +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.util;
|
||||
|
||||
import com.intellij.openapi.roots.OrderRootType;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: Eugene.Kudelevsky
|
||||
* Date: Aug 17, 2009
|
||||
* Time: 10:44:08 PM
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
public class OrderRoot {
|
||||
private final OrderRootType myType;
|
||||
private final VirtualFile myFile;
|
||||
|
||||
public OrderRoot(OrderRootType type, VirtualFile file) {
|
||||
myType = type;
|
||||
myFile = file;
|
||||
}
|
||||
|
||||
public OrderRootType getType() {
|
||||
return myType;
|
||||
}
|
||||
|
||||
public VirtualFile getFile() {
|
||||
return myFile;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user