Search in sources :

Example 1 with OpenOnSelectionHelper

use of org.eclipse.wst.xsd.ui.internal.utils.OpenOnSelectionHelper in project webtools.sourceediting by eclipse.

the class InternalXSDMultiPageEditor method createPages.

/**
 * Creates the pages of the multi-page editor.
 */
protected void createPages() {
    super.createPages();
    // selectionProvider = getSelectionManager();
    // getEditorSite().setSelectionProvider(selectionProvider);
    // 
    // structuredTextEditor = new StructuredTextEditor();
    // model = buildModel((IFileEditorInput) getEditorInput());
    // createGraphPage();
    // createSourcePage();
    openOnSelectionHelper = new OpenOnSelectionHelper(getTextEditor(), getXSDSchema());
    ISelectionProvider provider = getTextEditor().getSelectionProvider();
    fSourceEditorSelectionListener = new SourceEditorSelectionListener();
    if (provider instanceof IPostSelectionProvider) {
        ((IPostSelectionProvider) provider).addPostSelectionChangedListener(fSourceEditorSelectionListener);
    } else {
        provider.addSelectionChangedListener(fSourceEditorSelectionListener);
    }
    fXSDSelectionListener = new XSDSelectionManagerSelectionListener();
    getSelectionManager().addSelectionChangedListener(fXSDSelectionListener);
    xsdPreferenceStoreListener = new XSDPreferenceStoreListener();
    XSDEditorPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(xsdPreferenceStoreListener);
}
Also used : IPostSelectionProvider(org.eclipse.jface.viewers.IPostSelectionProvider) ISelectionProvider(org.eclipse.jface.viewers.ISelectionProvider) OpenOnSelectionHelper(org.eclipse.wst.xsd.ui.internal.utils.OpenOnSelectionHelper)

Aggregations

IPostSelectionProvider (org.eclipse.jface.viewers.IPostSelectionProvider)1 ISelectionProvider (org.eclipse.jface.viewers.ISelectionProvider)1 OpenOnSelectionHelper (org.eclipse.wst.xsd.ui.internal.utils.OpenOnSelectionHelper)1