use of com.cubrid.common.ui.spi.model.loader.schema.CubridTablesFolderLoader in project cubrid-manager by CUBRID.
the class CubridDatabaseLoader method addTableFolder.
/**
* Add table folder
*
* @param monitor the IProgressMonitor
* @param database the CubridDatabase
*/
private void addTableFolder(final IProgressMonitor monitor, CubridDatabase database) {
String tablesFolderId = database.getId() + NODE_SEPARATOR + CubridTablesFolderLoader.TABLES_FOLDER_ID;
ICubridNode tablesFolder = database.getChild(tablesFolderId);
if (tablesFolder == null) {
tablesFolder = new DefaultSchemaNode(tablesFolderId, TABLES_FOLDER_NAME, "icons/navigator/schema_table.png");
tablesFolder.setType(NodeType.TABLE_FOLDER);
tablesFolder.setContainer(true);
ICubridNodeLoader loader = new CubridTablesFolderLoader();
loader.setLevel(getLevel());
tablesFolder.setLoader(loader);
database.addChild(tablesFolder);
if (getLevel() == DEFINITE_LEVEL) {
tablesFolder.getChildren(monitor);
}
} else {
if (tablesFolder.getLoader() != null && tablesFolder.getLoader().isLoaded()) {
tablesFolder.getLoader().setLoaded(false);
tablesFolder.getChildren(monitor);
}
}
}
use of com.cubrid.common.ui.spi.model.loader.schema.CubridTablesFolderLoader in project cubrid-manager by CUBRID.
the class CQBDbConnectionLoader method addTableFolder.
/**
* Add table folder
*
* @param monitor the IProgressMonitor
* @param database the CubridDatabase
*/
private void addTableFolder(final IProgressMonitor monitor, CubridDatabase database) {
String tablesFolderId = database.getId() + NODE_SEPARATOR + CubridTablesFolderLoader.TABLES_FOLDER_ID;
ICubridNode tablesFolder = database.getChild(tablesFolderId);
if (tablesFolder == null) {
tablesFolder = new DefaultSchemaNode(tablesFolderId, TABLES_FOLDER_NAME, "icons/navigator/schema_table.png");
tablesFolder.setType(NodeType.TABLE_FOLDER);
tablesFolder.setContainer(true);
ICubridNodeLoader loader = new CubridTablesFolderLoader();
loader.setLevel(getLevel());
tablesFolder.setLoader(loader);
database.addChild(tablesFolder);
if (getLevel() == DEFINITE_LEVEL) {
tablesFolder.getChildren(monitor);
}
} else {
if (tablesFolder.getLoader() != null && tablesFolder.getLoader().isLoaded()) {
tablesFolder.getLoader().setLoaded(false);
tablesFolder.getChildren(monitor);
}
}
}
Aggregations