Ejemplo n.º 1
0
 @Override
 public void dispose() {
   if (_xqueryContextPart != null) {
     _xqueryContextPart.dispose();
   }
   super.dispose();
 }
Ejemplo n.º 2
0
  @Override
  public void createPartControl(Composite parent) {

    if (!isEditable()) {
      super.createPartControl(parent);
      return;
    }

    Layout defaultLayout = parent.getLayout();

    GridLayout layout = new GridLayout();
    layout.marginWidth = 0;
    layout.marginHeight = 0;
    layout.verticalSpacing = 0;
    layout.horizontalSpacing = 0;
    parent.setLayout(layout);

    GridData gd = new GridData(GridData.FILL_HORIZONTAL);

    Composite toolbar = new Composite(parent, SWT.NONE);
    gd = new GridData(GridData.FILL_HORIZONTAL);
    toolbar.setLayoutData(gd);
    _xqueryContextPart = new XQueryContextPart(this);
    _xqueryContextPart.createToolbarControl(toolbar);

    GridData separatorGd = new GridData(GridData.FILL_HORIZONTAL);
    separatorGd.heightHint = 1;
    Label separator = new Label(parent, SWT.NONE);
    separator.setLayoutData(separatorGd);
    separator.setBackground(separator.getDisplay().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));

    Composite editorContainer = new Composite(parent, SWT.NONE);

    editorContainer.setLayout(defaultLayout);
    gd = new GridData(GridData.FILL_BOTH);
    editorContainer.setLayoutData(gd);

    super.createPartControl(editorContainer);

    setGlobalActionHandlers();
    activateContext();
  }
Ejemplo n.º 3
0
 public void runQuery() {
   _xqueryContextPart.runQuery();
 }
Ejemplo n.º 4
0
 @Override
 public final IConnectionContext getConnectionContext() {
   return _xqueryContextPart.getConnectionContext();
 }
Ejemplo n.º 5
0
 @Override
 public void setConnectionContext(IConnectionContext context) {
   _xqueryContextPart.setConnectionContext(context);
 }