@Override
  public Composite createContents(Composite parent) {
    composite = new Composite(parent, SWT.NONE);
    final GridLayout layout = new GridLayout();
    layout.marginHeight = 10;
    layout.verticalSpacing = 20;
    composite.setLayout(layout);
    composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

    Label label = new Label(composite, SWT.WRAP);
    label.setText("Filter out information displayed in the Requests table within the Proxy.");
    label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));

    Composite treePanel = new Composite(composite, SWT.NONE);
    treePanel.setLayout(new GridLayout(2, false));
    final GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
    treePanel.setLayoutData(gd);

    createTreeViewer(treePanel);
    createTreeViewerButtons(treePanel);

    final IWorkspace workspace = Activator.getDefault().getModel().getCurrentWorkspace();
    if (workspace != null) {
      conditionManager = workspace.getHttpConditionMananger();
      conditionSet = conditionManager.getConditionSetCopy("filter");

    } else {
      conditionManager = null;
      conditionSet = null;
    }
    treeViewer.setInput(conditionSet);
    return composite;
  }
Ejemplo n.º 2
0
  @Override
  public void createPartControl(Composite parent) {
    parentComposite = new SashForm(parent, SWT.VERTICAL);

    createRequestEditor(parentComposite);
    createResponseViewer(parentComposite);

    parentComposite.setWeights(new int[] {50, 50});
    parentComposite.pack();

    final IContentAnalyzerFactory contentAnalyzerFactory =
        Activator.getDefault().getContentAnalyzerFactoryService();
    final IWorkspace workspace = Activator.getDefault().getModel().getCurrentWorkspace();
    if (workspace != null) {
      contentAnalyzer =
          contentAnalyzerFactory.createContentAnalyzer(
              workspace.getScanAlertRepository().getProxyScanInstance());
      contentAnalyzer.setDefaultAddToRequestLog(true);
      contentAnalyzer.setAddLinksToModel(true);
    }
  }