use of com.cubrid.cubridmanager.ui.spi.model.loader.jobauto.CubridJobAutoFolderLoader in project cubrid-manager by CUBRID.
the class CubridDatabaseLoader method addJobAutoFolder.
/**
* Add job auto folder
*
* @param monitor the IProgressMonitor
* @param database the CubridDatabase
*/
private void addJobAutoFolder(final IProgressMonitor monitor, CubridDatabase database) {
String jobAutoFolderId = database.getId() + NODE_SEPARATOR + JOB_AUTO_FOLDER_ID;
ICubridNode jobAutoFolder = database.getChild(jobAutoFolderId);
if (jobAutoFolder == null) {
jobAutoFolder = new DefaultSchemaNode(jobAutoFolderId, JOB_AUTO_FOLDER_NAME, "icons/navigator/auto_group.png");
jobAutoFolder.setType(CubridNodeType.JOB_FOLDER);
jobAutoFolder.setContainer(true);
ICubridNodeLoader loader = new CubridJobAutoFolderLoader();
loader.setLevel(getLevel());
jobAutoFolder.setLoader(loader);
database.addChild(jobAutoFolder);
if (getLevel() == DEFINITE_LEVEL) {
jobAutoFolder.getChildren(monitor);
}
} else {
if (jobAutoFolder.getLoader() != null && jobAutoFolder.getLoader().isLoaded()) {
jobAutoFolder.getLoader().setLoaded(false);
jobAutoFolder.getChildren(monitor);
}
}
}
Aggregations