Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » TextEditor and View
TextEditor and View [message #639135] Mon, 15 November 2010 12:04 Go to next message
Svetozarova  is currently offline Svetozarova Friend
Messages: 4
Registered: November 2010
Junior Member
Hello,

I'm new in Eclipse plugin development.So I have some problem(
I develop text editor for dot language and view wich linked with my editor. I linked editor with view, but I can not link my view with editor. I need change HighlightRange when I click in view. I have editor instance in view class, but setHighlightRange doesn't work.
I think that I should add some listeners but I don't know where((
Could anybody help me?
best regards
Lisa
Re: TextEditor and View [message #641029 is a reply to message #639135] Tue, 23 November 2010 23:45 Go to previous messageGo to next message
rody  is currently offline rody Friend
Messages: 1
Registered: November 2010
Junior Member
Hello Lisa,

Actually I am doing something similar to what you are doing. However, I still have problem of how to connect Editor to View. MyView needs a model from MyEditor in order to update the content displays in the view based on any changes done in MyEditor. Could you explain me how the ContentProvider set in View connects to a model in MyEditor and notification changes within Editor to the view ?

Thanks
rody
Re: TextEditor and View [message #644300 is a reply to message #641029] Fri, 10 December 2010 13:10 Go to previous message
Svetozarova  is currently offline Svetozarova Friend
Messages: 4
Registered: November 2010
Junior Member
Hello Rody

MyView implements ISelectionListener and at method
public void createPartControl(Composite parent) I add SelectionListener
getSite().getPage().addSelectionListener(this);
At method public void selectionChanged(IWorkbenchPart part, ISelection selection) {
if (part instanceof DOTEditor)
{//do somthing with view using information from current editor
}
}
I hope its help you)
Previous Topic:[DataBinding] How to bind a FileDialog to a bean property
Next Topic:many images in jface tableviewer
Goto Forum:
  


Current Time: Fri Apr 26 23:54:42 GMT 2024

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

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

Back to the top