Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[e4-dev] [Compatitbilty] Selection from Editor is not recognised

HI again,

trying to fix last things for a true production relase on e4 :)

I have some editors that use a copy&paste SelectionProviderAdapter to
set a fixed IStructuredSelection to the workbench when they are
active.
However when I activate the editor, the selection doesn't change. Is
this a bug or a feature :) ?

public void init(IEditorSite site, IEditorInput input) throws
PartInitException {
		super.init(site, input);
		setSite(site);
		setInput(input);
		getSite().setSelectionProvider(selectionAdapter);
		Book b = (Book) input.getAdapter(Book.class);
		selectionAdapter.setSelection(new
StructuredSelection(EntityReferenceFactory.getNonPersistedReference(b)));
	

Happy holidays,

Thomas


Back to the top