Lines 111-132
Link Here
|
111 |
|
111 |
|
112 |
for (int i = 0; i < f.length; i++) { |
112 |
for (int i = 0; i < f.length; i++) { |
113 |
try { |
113 |
try { |
|
|
114 |
// bugfix #26573, set display name by filesystem's display name |
115 |
// pending: until issue #18988 will be fixed a display name can include "Invalid" phrase |
116 |
String fileSystemDisplayName; |
114 |
instance[i] = getInstanceCookie().instanceCreate(); |
117 |
instance[i] = getInstanceCookie().instanceCreate(); |
115 |
if (instance[i] instanceof JarFileSystem) { |
118 |
if (instance[i] instanceof JarFileSystem) { |
116 |
((JarFileSystem)instance[i]).setJarFile(f[i]); |
119 |
((JarFileSystem)instance[i]).setJarFile(f[i]); |
|
|
120 |
fileSystemDisplayName = ((JarFileSystem)instance[i]).getDisplayName(); |
117 |
} else { |
121 |
} else { |
118 |
if (instance[i] instanceof LocalFileSystem) { |
122 |
if (instance[i] instanceof LocalFileSystem) { |
119 |
((LocalFileSystem)instance[i]).setRootDirectory(f[i]); |
123 |
((LocalFileSystem)instance[i]).setRootDirectory(f[i]); |
|
|
124 |
fileSystemDisplayName = ((LocalFileSystem)instance[i]).getDisplayName(); |
120 |
} else { |
125 |
} else { |
121 |
throw new IOException(); |
126 |
throw new IOException(); |
122 |
} |
127 |
} |
123 |
} |
128 |
} |
124 |
String newName = org.netbeans.core.AutomountSupport.computeNewName( |
129 |
// issue #21083 is fixed, this call is needless for now |
|
|
130 |
/*String newName = org.netbeans.core.AutomountSupport.computeNewName( |
125 |
f[i].getName(), |
131 |
f[i].getName(), |
126 |
wiz.getTargetFolder()); |
132 |
wiz.getTargetFolder()); |
127 |
result[i] = template.createFromTemplate( |
133 |
result[i] = template.createFromTemplate( |
128 |
wiz.getTargetFolder(), newName == null ? wiz.getTargetName() : newName); |
134 |
wiz.getTargetFolder(), newName == null ? wiz.getTargetName() : newName);*/ |
129 |
|
135 |
result[i] = template.createFromTemplate(wiz.getTargetFolder(), fileSystemDisplayName); |
130 |
} catch (ClassNotFoundException x) { |
136 |
} catch (ClassNotFoundException x) { |
131 |
IOException ioe = new IOException(); |
137 |
IOException ioe = new IOException(); |
132 |
ErrorManager.getDefault().annotate(ioe, x); |
138 |
ErrorManager.getDefault().annotate(ioe, x); |