_hsqlRoot = _wgaData.getFolder(new Path(DBS_FOLDERNAME));
IFolder oldHSQLRoot = _wgaData.getFolder(new Path("dbs"));
if (oldHSQLRoot.exists() && !_hsqlRoot.exists()) {
try {
oldHSQLRoot.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
oldHSQLRoot.move(new Path(DBS_FOLDERNAME), false, new NullProgressMonitor());
} catch (CoreException e) {
WGADesignerPlugin.getDefault().logError("Unable to migrate existing dbs folder.", e);
}
}
try {
if(!_hsqlRoot.exists()){
FileUtils.createFolder(_wgaData, DBS_FOLDERNAME);
}
_hsqlRoot.setDerived(true);
} catch (CoreException e1) {
WGADesignerPlugin.getDefault().logError("Unable to set derived flag on folder '" + _hsqlRoot.getLocation() + "'.", e1);
}
_luceneRoot = _wgaData.getFolder(new Path(LUCENE_FOLDERNAME));
IFolder oldLuceneRoot = _wgaData.getFolder(new Path("lucene"));
if (oldLuceneRoot.exists() && !_luceneRoot.exists()) {
try {
oldLuceneRoot.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
oldLuceneRoot.move(new Path(LUCENE_FOLDERNAME), false, new NullProgressMonitor());
} catch (CoreException e) {
WGADesignerPlugin.getDefault().logError("Unable to migrate existing lucene folder.", e);
}
}
try {
if(!_luceneRoot.exists()){
FileUtils.createFolder(_wgaData, LUCENE_FOLDERNAME);
}
_luceneRoot.setDerived(true);
} catch (CoreException e1) {
WGADesignerPlugin.getDefault().logError("Unable to set derived flag on folder '" + _luceneRoot.getLocation() + "'.", e1);
}
_developerPluginsRoot = _project.getFolder("plugins");
if (!_developerPluginsRoot.exists()) {
try {
_developerPluginsRoot.create(false, true, new NullProgressMonitor());
} catch (CoreException e) {
WGADesignerPlugin.getDefault().logError("Unable to create folder for developer plugins.", e);
}
}