eclipse - Code Highlight and cursor position in a StructuredTextEditor -


my own plugin project has editor(which implements org.eclipse.ui.part.multipageeditorpart) 2 pages:one graphicaleditorwithflyoutpalette(which parse xml files figures) , other 1 structuredtexteditor(which parse figures xml code).so want drawing figures in first editor , source code in other editor , opposite thing well.and believe many gef , plugin/rcp projects may have feature.

now have face fact when try switch between 2 editors,the cursor stay on first line in source editor.what supposed if figure selected in first editor , when switch second editor,some code block should highlight(just outline view in eclipse),or @ least cursor should stay @ line corresponding xml block starts(just xml editor in eclipse)

anybody have helpful advice give? tks lot :-)

in gef editor, can listen selection changes using selectioneditpolicy's showselection method. method called when selection changes. in method can change location cursor shown on second editor (or set kind of shared variable can read editor when gets activated).


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -