use of com.cubrid.common.ui.spi.model.loader.sp.CubridSPFolderLoader in project cubrid-manager by CUBRID.
the class CubridDatabaseLoader method addProcedureFolder.
/**
* Add procedure folder
*
* @param monitor the IProgressMonitor
* @param database the CubridDatabase
*/
private void addProcedureFolder(final IProgressMonitor monitor, CubridDatabase database) {
String spFolderId = database.getId() + NODE_SEPARATOR + CubridSPFolderLoader.SP_FOLDER_ID;
ICubridNode spFolder = database.getChild(spFolderId);
if (spFolder == null) {
spFolder = new DefaultSchemaNode(spFolderId, SP_FOLDER_NAME, "icons/navigator/procedure_group.png");
spFolder.setType(NodeType.STORED_PROCEDURE_FOLDER);
spFolder.setContainer(true);
ICubridNodeLoader loader = new CubridSPFolderLoader();
loader.setLevel(getLevel());
spFolder.setLoader(loader);
database.addChild(spFolder);
if (getLevel() == DEFINITE_LEVEL) {
spFolder.getChildren(monitor);
}
} else {
if (spFolder.getLoader() != null && spFolder.getLoader().isLoaded()) {
spFolder.getLoader().setLoaded(false);
spFolder.getChildren(monitor);
}
}
}
use of com.cubrid.common.ui.spi.model.loader.sp.CubridSPFolderLoader in project cubrid-manager by CUBRID.
the class CQBDbConnectionLoader method addProcedureFolder.
/**
* Add procedure folder
*
* @param monitor the IProgressMonitor
* @param database the CubridDatabase
*/
private void addProcedureFolder(final IProgressMonitor monitor, CubridDatabase database) {
String spFolderId = database.getId() + NODE_SEPARATOR + SP_FOLDER_ID;
ICubridNode spFolder = database.getChild(spFolderId);
if (spFolder == null) {
spFolder = new DefaultSchemaNode(spFolderId, SP_FOLDER_NAME, "icons/navigator/procedure_group.png");
spFolder.setType(NodeType.STORED_PROCEDURE_FOLDER);
spFolder.setContainer(true);
ICubridNodeLoader loader = new CubridSPFolderLoader();
loader.setLevel(getLevel());
spFolder.setLoader(loader);
database.addChild(spFolder);
if (getLevel() == DEFINITE_LEVEL) {
spFolder.getChildren(monitor);
}
} else {
if (spFolder.getLoader() != null && spFolder.getLoader().isLoaded()) {
spFolder.getLoader().setLoaded(false);
spFolder.getChildren(monitor);
}
}
}
Aggregations