提交 7acbf408 编写于 作者: S Serge Rider

ERD part configration/toolbar

上级 d5baf3f1
......@@ -57,6 +57,7 @@ import org.eclipse.ui.model.WorkbenchAdapter;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.PropertySheetPage;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.core.DBeaverCore;
import org.jkiss.dbeaver.ext.erd.ERDActivator;
......@@ -98,6 +99,7 @@ import java.util.*;
public abstract class ERDEditorPart extends GraphicalEditorWithFlyoutPalette
implements DBPDataSourceUser, ISearchContextProvider, IRefreshablePart
{
@Nullable
protected ProgressControl progressControl;
/**
......@@ -173,13 +175,18 @@ public abstract class ERDEditorPart extends GraphicalEditorWithFlyoutPalette
@Override
public void createPartControl(Composite parent)
{
progressControl = new ProgressControl(parent, SWT.SHEET);
progressControl.setShowDivider(true);
Composite contentContainer = parent;
if (hasProgressControl()) {
progressControl = new ProgressControl(parent, SWT.SHEET);
progressControl.setShowDivider(true);
contentContainer = progressControl.createContentContainer();
}
Composite contentContainer = progressControl.createContentContainer();
super.createPartControl(contentContainer);
progressControl.createProgressPanel();
if (hasProgressControl()) {
progressControl.createProgressPanel();
}
}
/**
......@@ -287,6 +294,10 @@ public abstract class ERDEditorPart extends GraphicalEditorWithFlyoutPalette
public abstract boolean isReadOnly();
protected boolean hasProgressControl() {
return true;
}
/**
* Returns the <code>CommandStack</code> of this editor's
* <code>EditDomain</code>.
......@@ -441,7 +452,9 @@ public abstract class ERDEditorPart extends GraphicalEditorWithFlyoutPalette
} else {
status = String.valueOf(selection.size()) + " objects";
}
progressControl.setInfo(status);
if (progressControl != null) {
progressControl.setInfo(status);
}
updateActions(editPartActionIDs);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册