Skip to content

Commit

Permalink
#29999 Use a different approach (remove extra node-loading call)
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadelessFox committed May 22, 2024
1 parent b731faf commit 2419731
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public class DBNResource extends DBNNode implements DBNNodeWithResource, DBNStre

private IResource resource;
private DBPResourceHandler handler;
private volatile DBNNode[] children;
private DBNNode[] children;
private DBPImage resourceImage;

public DBNResource(DBNNode parentNode, IResource resource, DBPResourceHandler handler) {
Expand Down Expand Up @@ -216,11 +216,7 @@ public boolean allowsChildren() {
@Override
public DBNNode[] getChildren(DBRProgressMonitor monitor) throws DBException {
if (children == null) {
synchronized (this) {
if (children == null) {
this.children = readChildNodes(monitor);
}
}
this.children = readChildNodes(monitor);
}
return children;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,6 @@ public IDatabaseEditorInput initializeRealInput(@NotNull DBRProgressMonitor moni
project = dataSourceContainer.getRegistry().getProject();
}
final DBNModel navigatorModel = DBWorkbench.getPlatform().getNavigatorModel();
navigatorModel.ensureProjectLoaded(project);
//dataSourceContainer, project, nodePath, nodeName, activePageId, activeFolderId

long connectionTimeout = dataSourceContainer.getPreferenceStore().getInt(ModelPreferences.CONNECTION_VALIDATION_TIMEOUT);
long connectionStart = System.currentTimeMillis();
while (!dataSourceContainer.isConnected()) {
Expand Down

0 comments on commit 2419731

Please sign in to comment.