本文整理汇总了Java中com.intellij.util.PathsList.addTail方法的典型用法代码示例。如果您正苦于以下问题:Java PathsList.addTail方法的具体用法?Java PathsList.addTail怎么用?Java PathsList.addTail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.PathsList
的用法示例。
在下文中一共展示了PathsList.addTail方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addRtJar
import com.intellij.util.PathsList; //导入方法依赖的package包/类
public static void addRtJar(PathsList pathsList) {
final String ideaRtJarPath = getIdeaRtJarPath();
if (Boolean.getBoolean(IDEA_PREPEND_RTJAR)) {
pathsList.addFirst(ideaRtJarPath);
}
else {
pathsList.addTail(ideaRtJarPath);
}
}
示例2: addRtJar
import com.intellij.util.PathsList; //导入方法依赖的package包/类
public static void addRtJar(PathsList pathsList)
{
final String javaRtJarPath = getJavaRtJarPath();
if(Boolean.getBoolean(IDEA_PREPEND_RTJAR))
{
pathsList.addFirst(javaRtJarPath);
}
else
{
pathsList.addTail(javaRtJarPath);
}
}
示例3: patchJavaParameters
import com.intellij.util.PathsList; //导入方法依赖的package包/类
@Override
public void patchJavaParameters(@Nullable Module module, JavaParameters javaParameters) {
if (module == null) {
return;
}
AndroidFacet androidFacet = AndroidFacet.getInstance(module);
if (androidFacet == null) {
return;
}
IdeaAndroidProject ideaAndroidProject = androidFacet.getIdeaAndroidProject();
if (ideaAndroidProject == null) {
return;
}
// Modify the class path only if we're dealing with the unit test artifact.
if (!ideaAndroidProject.getSelectedTestArtifactName().equals(AndroidProject.ARTIFACT_UNIT_TEST)) {
return;
}
final PathsList classPath = javaParameters.getClassPath();
final Sdk sdk = ModuleRootManager.getInstance(module).getSdk();
if (sdk == null || !(sdk.getSdkType() instanceof AndroidSdkType)) {
return;
}
final SdkAdditionalData data = sdk.getSdkAdditionalData();
if (!(data instanceof AndroidSdkAdditionalData)) {
return;
}
final AndroidPlatform platform = ((AndroidSdkAdditionalData)data).getAndroidPlatform();
if (platform == null) {
return;
}
classPath.remove(platform.getTarget().getPath(IAndroidTarget.ANDROID_JAR));
// Move the mockable android jar to the end.
String mockableJarPath = null;
for (String path : classPath.getPathList()) {
if (new File(FileUtil.toSystemDependentName(path)).getName().startsWith("mockable-android")) {
// PathsList stores strings - use the one that's actually stored there.
mockableJarPath = path;
break;
}
}
if (mockableJarPath != null) {
classPath.remove(mockableJarPath);
classPath.addTail(mockableJarPath);
}
}