Don't store library version in bundled runtime

This commit is contained in:
Nikolay Krasko
2013-03-05 13:13:32 +04:00
parent 70aeea0c8b
commit d5195382fa
2 changed files with 2 additions and 9 deletions
@@ -69,8 +69,6 @@ public class JSLibraryDescription extends CustomLibraryDescription {
return null; return null;
} }
String libraryName = LIBRARY_NAME;
String copyIntoPath = dialog.getCopyIntoPath(); String copyIntoPath = dialog.getCopyIntoPath();
if (copyIntoPath != null) { if (copyIntoPath != null) {
List<File> copyFiles = new ArrayList<File>(); List<File> copyFiles = new ArrayList<File>();
@@ -86,12 +84,11 @@ public class JSLibraryDescription extends CustomLibraryDescription {
if (dialog.isCopyLibraryFiles()) { if (dialog.isCopyLibraryFiles()) {
libraryFile = copiedFiles.get(libraryFile); libraryFile = copiedFiles.get(libraryFile);
libraryName = LIBRARY_NAME + "-" + JetPluginUtil.getPluginVersion();
} }
} }
final String libraryFileUrl = VfsUtil.getUrlForLibraryRoot(libraryFile); final String libraryFileUrl = VfsUtil.getUrlForLibraryRoot(libraryFile);
return new NewLibraryConfiguration(libraryName, getDownloadableLibraryType(), new LibraryVersionProperties()) { return new NewLibraryConfiguration(LIBRARY_NAME, getDownloadableLibraryType(), new LibraryVersionProperties()) {
@Override @Override
public void addRoots(@NotNull LibraryEditor editor) { public void addRoots(@NotNull LibraryEditor editor) {
editor.addRoot(libraryFileUrl, OrderRootType.CLASSES); editor.addRoot(libraryFileUrl, OrderRootType.CLASSES);
@@ -68,20 +68,16 @@ public class JavaRuntimeLibraryDescription extends CustomLibraryDescription {
return null; return null;
} }
String libraryName = LIBRARY_NAME;
String copyIntoPath = dialog.getCopyIntoPath(); String copyIntoPath = dialog.getCopyIntoPath();
if (copyIntoPath != null) { if (copyIntoPath != null) {
libraryFile = FileUIUtils.copyWithOverwriteDialog(parentComponent, JAVA_RUNTIME_LIBRARY_CREATION, copyIntoPath, libraryFile); libraryFile = FileUIUtils.copyWithOverwriteDialog(parentComponent, JAVA_RUNTIME_LIBRARY_CREATION, copyIntoPath, libraryFile);
if (libraryFile == null) { if (libraryFile == null) {
return null; return null;
} }
libraryName = LIBRARY_NAME + "-" + JetPluginUtil.getPluginVersion();
} }
final String libraryFileUrl = VfsUtil.getUrlForLibraryRoot(libraryFile); final String libraryFileUrl = VfsUtil.getUrlForLibraryRoot(libraryFile);
return new NewLibraryConfiguration(libraryName, getDownloadableLibraryType(), new LibraryVersionProperties()) { return new NewLibraryConfiguration(LIBRARY_NAME, getDownloadableLibraryType(), new LibraryVersionProperties()) {
@Override @Override
public void addRoots(@NotNull LibraryEditor editor) { public void addRoots(@NotNull LibraryEditor editor) {
editor.addRoot(libraryFileUrl, OrderRootType.CLASSES); editor.addRoot(libraryFileUrl, OrderRootType.CLASSES);