public PartBuilderView(
      Composite parent,
      LOTApp app,
      AppWindow appWindow,
      CTPart p,
      CTPartBuilder pb,
      GLSceneView view) {
    super(parent, SWT.NONE);
    this.window = appWindow;
    this.app = app;
    this.builder = pb;
    this.view = view;

    setLayout(new GridLayout(1, false));

    Composite composite = new CTComposite(this, SWT.NONE);
    composite.setLayout(new GridLayout(1, false));
    composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));

    ObjectViewer oview = new ObjectViewer(app, window, composite);
    oview.setObject(builder);
    oview.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    Composite ctools = new CTComposite(composite, SWT.NONE);
    GridLayout ctoolslayout = new GridLayout(1, false);
    ctoolslayout.numColumns = 5;
    ctools.setLayout(ctoolslayout);
    ctools.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));

    CTButton btnSave = new CTButton(ctools, SWT.NONE);
    btnSave.addSelectionListener(
        () -> {
          save();
        });
    btnSave.setText("save");

    CTButton btnRun = new CTButton(ctools, SWT.NONE);
    btnRun.addSelectionListener(
        () -> {
          pb.run(p);
        });

    btnRun.setText("Run");

    scriptview = new ScriptView(this, app, window, builder.getScript());
    scriptview.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
  }
 private void save() {
   scriptview.save();
 }
Exemplo n.º 3
0
  @Override
  public void dispose() {
    frameList.dispose();

    super.dispose();
  }