mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
Fix for 160278: Tab Conversion in Assembly editor
This commit is contained in:
parent
61b5b5bc26
commit
0e0113adf1
2 changed files with 10 additions and 6 deletions
|
@ -12,6 +12,7 @@
|
|||
package org.eclipse.cdt.internal.ui.editor.asm;
|
||||
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.text.IDocument;
|
||||
import org.eclipse.jface.text.presentation.IPresentationReconciler;
|
||||
import org.eclipse.jface.text.presentation.PresentationReconciler;
|
||||
|
@ -32,8 +33,8 @@ public class AsmSourceViewerConfiguration extends TextSourceViewerConfiguration
|
|||
/**
|
||||
* Constructor for AsmSourceViewerConfiguration
|
||||
*/
|
||||
public AsmSourceViewerConfiguration(AsmTextTools tools) {
|
||||
super();
|
||||
public AsmSourceViewerConfiguration(AsmTextTools tools, IPreferenceStore store) {
|
||||
super(store);
|
||||
fAsmTextTools = tools;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005 IBM Corporation and others.
|
||||
* Copyright (c) 2005, 2007 IBM Corporation and others.
|
||||
* All rights reserved. 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
|
||||
|
@ -12,10 +12,12 @@
|
|||
package org.eclipse.cdt.internal.ui.editor.asm;
|
||||
|
||||
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||
import org.eclipse.ui.editors.text.TextEditor;
|
||||
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
|
||||
|
||||
/**
|
||||
* Assembly text editor
|
||||
|
@ -32,12 +34,13 @@ public class AsmTextEditor extends TextEditor {
|
|||
*/
|
||||
protected void initializeEditor() {
|
||||
AsmTextTools textTools= CUIPlugin.getDefault().getAsmTextTools();
|
||||
setSourceViewerConfiguration(new AsmSourceViewerConfiguration(textTools));
|
||||
IPreferenceStore store= CUIPlugin.getDefault().getCombinedPreferenceStore();
|
||||
setSourceViewerConfiguration(new AsmSourceViewerConfiguration(textTools, store));
|
||||
setDocumentProvider(CUIPlugin.getDefault().getDocumentProvider());
|
||||
// FIXME: Should this editor have a different preference store ?
|
||||
// For now we are sharing with the CEditor and any changes will in the
|
||||
// setting of the CEditor will be reflected in this editor.
|
||||
setPreferenceStore(CUIPlugin.getDefault().getCombinedPreferenceStore());
|
||||
setPreferenceStore(store);
|
||||
setEditorContextMenuId("#ASMEditorContext"); //$NON-NLS-1$
|
||||
setRulerContextMenuId("#ASMEditorRulerContext"); //$NON-NLS-1$
|
||||
//setOutlinerContextMenuId("#ASMEditorOutlinerContext"); //$NON-NLS-1$
|
||||
|
|
Loading…
Add table
Reference in a new issue