mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 16:55:38 +02:00
file creation should throw and CoreException up
This commit is contained in:
parent
101d8a23ec
commit
397f32d6d2
3 changed files with 3 additions and 9 deletions
|
@ -570,7 +570,7 @@ public abstract class AbstractFileCreationWizardPage extends NewElementWizardPag
|
||||||
* @throws CoreException Thrown when the creation failed.
|
* @throws CoreException Thrown when the creation failed.
|
||||||
* @throws InterruptedException Thrown when the operation was cancelled.
|
* @throws InterruptedException Thrown when the operation was cancelled.
|
||||||
*/
|
*/
|
||||||
public abstract void createFile(IProgressMonitor monitor);
|
public abstract void createFile(IProgressMonitor monitor) throws CoreException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the created file. The method only returns a valid translation unit
|
* Returns the created file. The method only returns a valid translation unit
|
||||||
|
|
|
@ -139,7 +139,7 @@ public class NewHeaderFileCreationWizardPage extends AbstractFileCreationWizardP
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createFile(IProgressMonitor monitor) {
|
public void createFile(IProgressMonitor monitor) throws CoreException {
|
||||||
IPath filePath = getFileFullPath();
|
IPath filePath = getFileFullPath();
|
||||||
if (filePath != null) {
|
if (filePath != null) {
|
||||||
if (monitor == null)
|
if (monitor == null)
|
||||||
|
@ -150,9 +150,6 @@ public class NewHeaderFileCreationWizardPage extends AbstractFileCreationWizardP
|
||||||
if (newFile != null) {
|
if (newFile != null) {
|
||||||
fNewFileTU = (ITranslationUnit) CoreModel.getDefault().create(newFile);
|
fNewFileTU = (ITranslationUnit) CoreModel.getDefault().create(newFile);
|
||||||
}
|
}
|
||||||
} catch (CoreException e) {
|
|
||||||
// TODO Auto-generated catch block
|
|
||||||
e.printStackTrace();
|
|
||||||
} finally {
|
} finally {
|
||||||
monitor.done();
|
monitor.done();
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,7 +138,7 @@ public class NewSourceFileCreationWizardPage extends AbstractFileCreationWizardP
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createFile(IProgressMonitor monitor) {
|
public void createFile(IProgressMonitor monitor) throws CoreException {
|
||||||
IPath filePath = getFileFullPath();
|
IPath filePath = getFileFullPath();
|
||||||
if (filePath != null) {
|
if (filePath != null) {
|
||||||
if (monitor == null)
|
if (monitor == null)
|
||||||
|
@ -149,9 +149,6 @@ public class NewSourceFileCreationWizardPage extends AbstractFileCreationWizardP
|
||||||
if (newFile != null) {
|
if (newFile != null) {
|
||||||
fNewFileTU = (ITranslationUnit) CoreModel.getDefault().create(newFile);
|
fNewFileTU = (ITranslationUnit) CoreModel.getDefault().create(newFile);
|
||||||
}
|
}
|
||||||
} catch (CoreException e) {
|
|
||||||
// TODO Auto-generated catch block
|
|
||||||
e.printStackTrace();
|
|
||||||
} finally {
|
} finally {
|
||||||
monitor.done();
|
monitor.done();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue