mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-01 22:51:16 +00:00
eclipse plugin: override the default editorcallback...
...so we have full control of when we add xtext nature
This commit is contained in:
parent
04bd0e1686
commit
b2c221c71b
@ -12,6 +12,7 @@ import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
|
||||
import org.eclipse.jface.viewers.ILabelProvider;
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.eclipse.xtext.resource.ILocationInFileProvider;
|
||||
import org.eclipse.xtext.ui.editor.IXtextEditorCallback;
|
||||
import org.eclipse.xtext.ui.editor.XtextEditor;
|
||||
import org.eclipse.xtext.ui.editor.autoedit.DefaultAutoEditStrategy;
|
||||
import org.eclipse.xtext.ui.editor.bracketmatching.IBracketMatcher;
|
||||
@ -25,6 +26,7 @@ import org.eclipse.xtext.ui.editor.syntaxcoloring.ISemanticHighlightingCalculato
|
||||
import org.eclipse.xtext.ui.editor.syntaxcoloring.antlr.AbstractAntlrTokenToAttributeIdMapper;
|
||||
import org.wesnoth.ui.autoedit.WMLAutoEditStrategy;
|
||||
import org.wesnoth.ui.contentassist.WMLContentAssistContext;
|
||||
import org.wesnoth.ui.editor.WMLAbstractDirtyEditorCallback;
|
||||
import org.wesnoth.ui.editor.WMLEditor;
|
||||
import org.wesnoth.ui.labeling.WMLLabelProvider;
|
||||
import org.wesnoth.ui.navigation.WMLHyperlinkHelper;
|
||||
@ -130,4 +132,10 @@ public class WMLUiModule extends org.wesnoth.ui.AbstractWMLUiModule
|
||||
{
|
||||
return WMLLabelProvider.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends IXtextEditorCallback> bindIXtextEditorCallback()
|
||||
{
|
||||
return WMLAbstractDirtyEditorCallback.class;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2010 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*******************************************************************************/
|
||||
package org.wesnoth.ui.editor;
|
||||
|
||||
import org.eclipse.xtext.ui.editor.AbstractDirtyStateAwareEditorCallback;
|
||||
import org.eclipse.xtext.ui.editor.XtextEditor;
|
||||
|
||||
public class WMLAbstractDirtyEditorCallback extends AbstractDirtyStateAwareEditorCallback
|
||||
{
|
||||
@Override
|
||||
public void afterCreatePartControl(XtextEditor editor)
|
||||
{
|
||||
super.afterCreatePartControl(editor);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user