protected void setCurrentComponent(ViewersMultiSandboxViewComponent newCurrent) { ViewersMultiSandboxViewComponent previous = getCurrentComponent(); if (previous != null) { previous.setBackGround(); } this.currentComponent = newCurrent; newCurrent.setForeground(); // refresh toolbar fillToolBar(newCurrent); }
@Override public void createPartControl(Composite parent) { parent.setLayout(new FillLayout(SWT.HORIZONTAL)); // container = new Composite(parent, SWT.NONE); // container.setLayout(new GridLayout(1, false)); container = new SashForm(parent, SWT.VERTICAL); // initialize the default component defaultComponent = new ViewersMultiSandboxViewComponent(this); defaultComponent.setForeground(); this.currentComponent = defaultComponent; fillToolBar(getCurrentComponent()); getSite().setSelectionProvider(this); getSite().getPage().addSelectionListener(forwardRevealListener); }