Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » EmbeddedEditor has missing key bindings(find/replace is not working with the Xtext EmbeddedEditor)
icon5.gif  EmbeddedEditor has missing key bindings [message #1240011] Wed, 05 February 2014 14:19 Go to next message
Joel Thurlby is currently offline Joel ThurlbyFriend
Messages: 1
Registered: February 2014
Junior Member
I'm currently implementing an EditorPart which contains an Xtext EmbeddedEditor instance. Most features found within the standard editor are working, but some key bindings like for find/replace are not working.

The same behavior can be reproduced by creating the MyDsl demo project as well as a simple EditorPart for the mydsl file extension, which includes an EmbeddedEditor instance.

What could be the cause of the missing key bindings?

Re: EmbeddedEditor has missing key bindings [message #1240138 is a reply to message #1240011] Wed, 05 February 2014 19:48 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13709
Registered: July 2009
Senior Member
Hi what about filing an enhancement request. never the less ...

import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchCommandConstants;
import org.eclipse.ui.texteditor.FindReplaceAction;
import org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorActions;
import org.eclipse.xtext.ui.editor.embedded.EmbeddedEditorMessages;


public class MyDslEmbeddedEditorActions extends EmbeddedEditorActions {
public static class Factory extends EmbeddedEditorActions.Factory {
		protected IWorkbench workbench;
		protected EmbeddedEditorActions createActions(ISourceViewer viewer) {
			return new MyDslEmbeddedEditorActions(viewer, workbench);

	public MyDslEmbeddedEditorActions(ISourceViewer viewer, IWorkbench workbench) {
		super(viewer, workbench);
	protected void createActions() {
		FindReplaceAction action= new FindReplaceAction(EmbeddedEditorMessages.getBundleForConstructedKeys(), "DontCare.", workbench.getActiveWorkbenchWindow().getShell(), viewer.getFindReplaceTarget()); //$NON-NLS-1$
		setAction(IWorkbenchCommandConstants.EDIT_FIND_AND_REPLACE, action);


// In the UI Module ...
public Class<? extends EmbeddedEditorActions.Factory> bindEmbeddedEditorActions$Factory() {
			return MyDslEmbeddedEditorActions.Factory.class;

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :

[Updated on: Wed, 05 February 2014 19:52]

Report message to a moderator

Previous Topic:maven build fails for to long names
Next Topic:Adding another file into the generated src-gen folder with Xtext-xtend compiler
Goto Forum:

Current Time: Mon Jan 18 11:47:14 GMT 2021

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

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

Back to the top