|
Lines 257-270
Link Here
|
| 257 |
InterruptedException |
257 |
InterruptedException |
| 258 |
{ |
258 |
{ |
| 259 |
try { |
259 |
try { |
| 260 |
monitor.beginTask(IDEWorkbenchMessages.getString("WizardNewFileCreationPage.progress"), 2000); //$NON-NLS-1$ |
260 |
createNewFile(containerPath, newFileHandle, initialContents, monitor); |
| 261 |
ContainerGenerator generator = new ContainerGenerator(containerPath); |
|
|
| 262 |
generator.generateContainer(new SubProgressMonitor(monitor, 1000)); |
| 263 |
createFile(newFileHandle,initialContents, new SubProgressMonitor(monitor, 1000)); |
| 264 |
} finally { |
261 |
} finally { |
| 265 |
monitor.done(); |
262 |
monitor.done(); |
| 266 |
} |
263 |
} |
| 267 |
} |
264 |
} |
|
|
265 |
|
| 268 |
}; |
266 |
}; |
| 269 |
|
267 |
|
| 270 |
try { |
268 |
try { |
|
Lines 291-296
Link Here
|
| 291 |
|
289 |
|
| 292 |
return newFile; |
290 |
return newFile; |
| 293 |
} |
291 |
} |
|
|
292 |
|
| 293 |
/** |
| 294 |
* Create the new file with the supplied information within the |
| 295 |
* IProgressMonitor supplied. |
| 296 |
* @param containerPath |
| 297 |
* @param newFileHandle |
| 298 |
* @param initialContents |
| 299 |
* @param monitor |
| 300 |
* @throws CoreException |
| 301 |
*/ |
| 302 |
protected void createNewFile(final IPath containerPath, final IFile newFileHandle, final InputStream initialContents, IProgressMonitor monitor) throws CoreException { |
| 303 |
monitor.beginTask(IDEWorkbenchMessages.getString("WizardNewFileCreationPage.progress"), 2000); //$NON-NLS-1$ |
| 304 |
ContainerGenerator generator = new ContainerGenerator(containerPath); |
| 305 |
generator.generateContainer(new SubProgressMonitor(monitor, 1000)); |
| 306 |
createFile(newFileHandle,initialContents, new SubProgressMonitor(monitor, 1000)); |
| 307 |
} |
| 308 |
|
| 294 |
/** |
309 |
/** |
| 295 |
* Returns the current full path of the containing resource as entered or |
310 |
* Returns the current full path of the containing resource as entered or |
| 296 |
* selected by the user, or its anticipated initial value. |
311 |
* selected by the user, or its anticipated initial value. |