Search in sources :

Example 1 with StackTraceViewer

use of org.talend.designer.runtime.visualization.internal.ui.properties.StackTraceViewer in project tdi-studio-se by Talend.

the class SWTResourcesPage method createSashFormControls.

/*
     * @see AbstractSashForm#createSashFormControls(SashForm, IActionBars)
     */
@Override
protected void createSashFormControls(SashForm sashForm, IActionBars actionBars) {
    resourceFilteredTree = new SWTResourceFilteredTree(sashForm, actionBars);
    TreeViewer resourceViewer = resourceFilteredTree.getViewer();
    resourceViewer.setContentProvider(new SWTResourceContentProvider(resourceViewer));
    resourceViewer.setLabelProvider(new SWTResourceLabelProvider());
    resourceViewer.addSelectionChangedListener(new ISelectionChangedListener() {

        @Override
        public void selectionChanged(SelectionChangedEvent event) {
            ISelection selection = event.getSelection();
            if (selection.isEmpty()) {
                selection = null;
            }
            stackTraceViewer.setInput(selection);
        }
    });
    stackTraceViewer = new StackTraceViewer(sashForm, actionBars);
}
Also used : StackTraceViewer(org.talend.designer.runtime.visualization.internal.ui.properties.StackTraceViewer) TreeViewer(org.eclipse.jface.viewers.TreeViewer) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) ISelection(org.eclipse.jface.viewers.ISelection) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent)

Example 2 with StackTraceViewer

use of org.talend.designer.runtime.visualization.internal.ui.properties.StackTraceViewer in project tdi-studio-se by Talend.

the class ThreadSashForm method createSashFormControls.

/*
     * @see AbstractSashForm#createSashFormControls(SashForm, IActionBars)
     */
@Override
protected void createSashFormControls(SashForm sashForm, IActionBars actionBars) {
    threadViewer = new ThreadFilteredTree(sashForm, actionBars).getViewer();
    threadViewer.setContentProvider(new ThreadContentProvider(threadViewer));
    threadViewer.setLabelProvider(new ThreadLabelProvider(threadViewer));
    threadViewer.addSelectionChangedListener(new ISelectionChangedListener() {

        @Override
        public void selectionChanged(SelectionChangedEvent event) {
            ISelection selection = event.getSelection();
            if (selection.isEmpty()) {
                selection = null;
            }
            stackTraceViewer.setInput(selection);
        }
    });
    stackTraceViewer = new StackTraceViewer(sashForm, actionBars);
}
Also used : StackTraceViewer(org.talend.designer.runtime.visualization.internal.ui.properties.StackTraceViewer) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) ISelection(org.eclipse.jface.viewers.ISelection) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent)

Aggregations

ISelection (org.eclipse.jface.viewers.ISelection)2 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)2 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)2 StackTraceViewer (org.talend.designer.runtime.visualization.internal.ui.properties.StackTraceViewer)2 TreeViewer (org.eclipse.jface.viewers.TreeViewer)1