Skip to content

Commit

Permalink
Merging [MelnormeLang]*
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-medeiros committed Dec 28, 2016
2 parents 78fbff9 + ff3e672 commit c0a831b
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,11 @@ protected void configureCreatedProject(IProgressMonitor monitor)
LangNewProjectWizard.this.configureCreatedProject(this, monitor);
}

public void createFolder(IContainer container, IProgressMonitor monitor) throws CoreException {
/** @return whether the folder was created or not. (it's not created if it exists already. */
public boolean createFolder(IContainer container, IProgressMonitor monitor) throws CoreException {

if(container.exists() || !(container instanceof IFolder)) {
return;
return false;
}

createFolder(container.getParent(), monitor);
Expand All @@ -197,14 +198,17 @@ public void run(IProgressMonitor monitor) throws CoreException {
}
}
});

return true;
}

public void createFile(IFile file, String contents, boolean openEditor, IProgressMonitor monitor)
/** @return whether the file was created or not. (it's not created if it exists already. */
public boolean createFile(IFile file, String contents, boolean openEditor, IProgressMonitor monitor)
throws CoreException {
assertNotNull(contents);

if(file.exists()) {
return;
return false;
}

createFolder(file.getParent(), monitor);
Expand All @@ -229,6 +233,7 @@ public void run(IProgressMonitor monitor) throws CoreException {
if(openEditor) {
finishActions.add(openEditorRunnable);
}
return true;
}

}
Expand Down

0 comments on commit c0a831b

Please sign in to comment.