Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » SelectionListener registration
SelectionListener registration [message #1060989] Wed, 29 May 2013 12:34 Go to next message
Andrea Sindico is currently offline Andrea SindicoFriend
Messages: 266
Registered: November 2010
Senior Member

I have implemented a view which shall register itself as listner for changes in the XText editor and related outline. To this end I am adding this line

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().addSelectionListener(this);


in the createPartControl method of the view (which implements the ISelectionListener interface). In the selectionChanged method I therefore check whether the selection is a ITextSelection, the case in which it comes from the XTextEditor, or an IStructuredSelection, the case in which it come sfrom the Outline.

The problem is that, doing so, when I start Eclipse the outline is said to be "unavailable". If I click on the outline it is refreshed, the contents are shown and the listening view correctly updated.
What am I doing wrong and what should I do to avoid the initial "unavailability" of the outline?


Follow me on Twitter @andreasindico

[Updated on: Wed, 29 May 2013 12:34]

Report message to a moderator

Re: SelectionListener registration [message #1061296 is a reply to message #1060989] Fri, 31 May 2013 05:06 Go to previous message
Andrea Sindico is currently offline Andrea SindicoFriend
Messages: 266
Registered: November 2010
Senior Member

Any Idea?

Follow me on Twitter @andreasindico

Previous Topic:Xtext Save Action
Next Topic:Defining an external tool for my IDE plug-in
Goto Forum:
  


Current Time: Thu Apr 18 10:59:02 GMT 2024

Powered by FUDForum. Page generated in 0.02112 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top