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