Skip to content

Commit

Permalink
dbeaver/pro#3345 vfs refactoring (#2928)
Browse files Browse the repository at this point in the history
* dbeaver/pro#3345 Navigator model refactoring

* dbeaver/pro#3345 Navigator model refactoring

* dbeaver/pro#3345 Get rid of org.eclipse.core.resources

* dbeaver/pro#3345 SQL dialect model refactoring

---------

Co-authored-by: kseniaguzeeva <[email protected]>
  • Loading branch information
serge-rider and kseniaguzeeva authored Sep 24, 2024
1 parent dc5592d commit 4b9e1c8
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 19 deletions.
1 change: 0 additions & 1 deletion server/bundles/io.cloudbeaver.model/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Require-Bundle: org.jkiss.dbeaver.data.gis;visibility:=reexport,
org.jkiss.dbeaver.model;visibility:=reexport,
org.jkiss.dbeaver.model.rcp;visibility:=reexport,
org.jkiss.dbeaver.model.sm;visibility:=reexport,
org.jkiss.dbeaver.model.event;visibility:=reexport,
org.jkiss.dbeaver.model.nio;visibility:=reexport,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ public DBNNode refreshNode(DBRProgressMonitor monitor, Object source) throws DBE
return this;
}

@NotNull
@Nullable
@Override
public DBPProject getOwnerProject() {
public DBPProject getOwnerProjectOrNull() {
List<? extends DBPProject> globalProjects = getModel().getModelProjects();
if (globalProjects != null) {
for (DBPProject modelProject : globalProjects) {
Expand All @@ -132,7 +132,7 @@ public DBPProject getOwnerProject() {
}
}
}
throw new IllegalStateException("Project '" + project.getId() + "' not found in workspace");
return null;
}

@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ public DBPObject getObjectDetails(@NotNull DBRProgressMonitor monitor, @NotNull
return resource;
}

@NotNull
@Nullable
@Override
public DBPProject getOwnerProject() {
return getParentNode().getOwnerProject();
public DBPProject getOwnerProjectOrNull() {
return getParentNode().getOwnerProjectOrNull();
}

public RMResource getResource() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*/
package io.cloudbeaver.server;

import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Plugin;
import org.jkiss.dbeaver.ModelPreferences;
import org.jkiss.dbeaver.model.impl.preferences.BundlePreferenceStore;
Expand Down Expand Up @@ -76,13 +74,6 @@ public DBPPreferenceStore getPreferences() {
return preferences;
}

/**
* Returns the workspace instance.
*/
public static IWorkspace getWorkspace() {
return ResourcesPlugin.getWorkspace();
}

protected void shutdownPlatform() {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
import org.jkiss.dbeaver.model.data.DBDDataFilter;
import org.jkiss.dbeaver.model.data.DBDDataReceiver;
import org.jkiss.dbeaver.model.exec.*;
import org.jkiss.dbeaver.model.impl.sql.SQLQueryTransformerCount;
import org.jkiss.dbeaver.model.sql.SQLQuery;
import org.jkiss.dbeaver.model.sql.SQLScriptContext;
import org.jkiss.dbeaver.model.sql.SQLSyntaxManager;
import org.jkiss.dbeaver.model.sql.data.SQLQueryDataContainer;
import org.jkiss.dbeaver.model.sql.transformers.SQLQueryTransformerCount;
import org.jkiss.dbeaver.model.struct.DBSDataContainer;
import org.jkiss.dbeaver.model.struct.DBSObject;

Expand Down
1 change: 0 additions & 1 deletion server/features/io.cloudbeaver.server.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
</copyright>

<requires>
<import plugin="org.eclipse.core.resources" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.runtime" version="3.7" match="greaterOrEqual"/>
<!-- Equinox -->
<import plugin="org.eclipse.equinox.common" version="0.0.0" match="greaterOrEqual"/>
Expand Down
1 change: 0 additions & 1 deletion server/features/io.cloudbeaver.ws.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
</copyright>

<requires>
<import plugin="org.eclipse.core.resources" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.runtime" version="3.7" match="greaterOrEqual"/>
<!-- Equinox -->
<import plugin="org.jkiss.dbeaver.launcher" version="0.0.0" match="greaterOrEqual"/>
Expand Down

0 comments on commit 4b9e1c8

Please sign in to comment.