Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Open editor from custom view
Open editor from custom view [message #1600705] Wed, 04 February 2015 12:25 Go to next message
Fon Vitale is currently offline Fon VitaleFriend
Messages: 14
Registered: November 2011
Junior Member
Hi,

I have a custom view that displays a custom marker type. That view extends MarkerSupportView which provides all the features I need, but one (I guess Rolling Eyes ).

It is known that MarkerSupportView, as extension of ExtendedMarkersView, provides the code needed to open an editor based on the resource of the selected marker: double-click on the marker in the view and the editor is opened.

So, how can I open a certain editor which is not the usual editor? The methods of that behaviour are private methods in ExtendedMarkersView, so I cannot overwrite from my custom view.

I think it seems a trivial problem and I'm missing something. Maybe some extension-point that redefines the relation between resource and editors... Maybe I have to create my custom view from scratch - I wouldn't like to copy-paste code Sad

Any help will be welcome. Thank you so much in advance.

[Updated on: Wed, 04 February 2015 15:42]

Report message to a moderator

Re: Open editor from custom view [message #1600770 is a reply to message #1600705] Wed, 04 February 2015 13:25 Go to previous message
Fon Vitale is currently offline Fon VitaleFriend
Messages: 14
Registered: November 2011
Junior Member
Hi,

Quote:
How do I change the editor that is being opened when a marker has been opened?
You can associate the string ID of your editor onto your marker with IMarker's setAttribute(String, Object) method by using the EDITOR_ID_ATTR string constant defined in the IDE class as the attribute name.

marker.setAttribute(IDE.EDITOR_ID_ATTR, "com.example.xyz.editorID");


But I need to do some previous configurations, because the editor which I want to open does not match the resource of the marker.

[Updated on: Wed, 04 February 2015 13:40]

Report message to a moderator

Previous Topic:How long does eclipse platform be tested?
Next Topic:Where is the missing WorkbenchContentProvider???
Goto Forum:
  


Current Time: Fri Jan 24 05:52:27 GMT 2025

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

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

Back to the top