Search in sources :

Example 1 with ColorManager

use of org.eclipse.titan.designer.editors.ColorManager in project titan.EclipsePlug-ins by eclipse.

the class TTCN3Editor method initializeEditor.

/**
 * Initialize the editor
 * <p>
 * This function is called by the constructor TTCN3Editor() before its first line of its body!
 */
@Override
protected void initializeEditor() {
    super.initializeEditor();
    IPreferenceStore[] stores = { getPreferenceStore(), Activator.getDefault().getPreferenceStore() };
    setPreferenceStore(new ChainedPreferenceStore(stores));
    colorManager = new ColorManager();
    configuration = new Configuration(colorManager, this);
    setSourceViewerConfiguration(configuration);
    ForwardingDocumentProvider forwardingProvider = new ForwardingDocumentProvider(PartitionScanner.TTCN3_PARTITIONING, new DocumentSetupParticipant(this), new TextFileDocumentProvider());
    setDocumentProvider(forwardingProvider);
    setEditorContextMenuId(EDITOR_CONTEXT);
    HeadlessStorage.setTabWidth(configuration.getTabWidth(getSourceViewer()));
}
Also used : SourceViewerConfiguration(org.eclipse.jface.text.source.SourceViewerConfiguration) ForwardingDocumentProvider(org.eclipse.ui.editors.text.ForwardingDocumentProvider) ChainedPreferenceStore(org.eclipse.ui.texteditor.ChainedPreferenceStore) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) ColorManager(org.eclipse.titan.designer.editors.ColorManager) TextFileDocumentProvider(org.eclipse.ui.editors.text.TextFileDocumentProvider)

Example 2 with ColorManager

use of org.eclipse.titan.designer.editors.ColorManager in project titan.EclipsePlug-ins by eclipse.

the class TTCNPPEditor method initializeEditor.

@Override
protected void initializeEditor() {
    super.initializeEditor();
    IPreferenceStore[] stores = { getPreferenceStore(), Activator.getDefault().getPreferenceStore() };
    setPreferenceStore(new ChainedPreferenceStore(stores));
    colorManager = new ColorManager();
    configuration = new Configuration(colorManager, this);
    setSourceViewerConfiguration(configuration);
    DocumentSetupParticipant participant = new DocumentSetupParticipant(this);
    ForwardingDocumentProvider forwardingProvider = new ForwardingDocumentProvider(PartitionScanner.TTCNPP_PARTITIONING, participant, new TextFileDocumentProvider());
    setDocumentProvider(forwardingProvider);
    setEditorContextMenuId(EDITOR_CONTEXT);
}
Also used : SourceViewerConfiguration(org.eclipse.jface.text.source.SourceViewerConfiguration) ForwardingDocumentProvider(org.eclipse.ui.editors.text.ForwardingDocumentProvider) ChainedPreferenceStore(org.eclipse.ui.texteditor.ChainedPreferenceStore) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) ColorManager(org.eclipse.titan.designer.editors.ColorManager) TextFileDocumentProvider(org.eclipse.ui.editors.text.TextFileDocumentProvider)

Example 3 with ColorManager

use of org.eclipse.titan.designer.editors.ColorManager in project titan.EclipsePlug-ins by eclipse.

the class ConfigTextEditor method initializeEditor.

@Override
protected void initializeEditor() {
    super.initializeEditor();
    IPreferenceStore[] stores = { getPreferenceStore(), Activator.getDefault().getPreferenceStore() };
    setPreferenceStore(new ChainedPreferenceStore(stores));
    colorManager = new ColorManager();
    configuration = new Configuration(colorManager, this);
    setSourceViewerConfiguration(configuration);
    DocumentSetupParticipant participant = new DocumentSetupParticipant();
    ForwardingDocumentProvider forwardingProvider = new ForwardingDocumentProvider(PartitionScanner.CONFIG_PARTITIONING, participant, new TextFileDocumentProvider());
    setDocumentProvider(forwardingProvider);
    setEditorContextMenuId(EDITOR_CONTEXT);
}
Also used : SourceViewerConfiguration(org.eclipse.jface.text.source.SourceViewerConfiguration) ForwardingDocumentProvider(org.eclipse.ui.editors.text.ForwardingDocumentProvider) ChainedPreferenceStore(org.eclipse.ui.texteditor.ChainedPreferenceStore) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) ColorManager(org.eclipse.titan.designer.editors.ColorManager) TextFileDocumentProvider(org.eclipse.ui.editors.text.TextFileDocumentProvider)

Example 4 with ColorManager

use of org.eclipse.titan.designer.editors.ColorManager in project titan.EclipsePlug-ins by eclipse.

the class ASN1Editor method initializeEditor.

@Override
protected void initializeEditor() {
    super.initializeEditor();
    IPreferenceStore[] stores = { getPreferenceStore(), Activator.getDefault().getPreferenceStore() };
    setPreferenceStore(new ChainedPreferenceStore(stores));
    colorManager = new ColorManager();
    configuration = new Configuration(colorManager, this);
    setSourceViewerConfiguration(configuration);
    DocumentSetupParticipant participant = new DocumentSetupParticipant(this);
    ForwardingDocumentProvider forwardingProvider = new ForwardingDocumentProvider(PartitionScanner.ASN1_PARTITIONING, participant, new TextFileDocumentProvider());
    setDocumentProvider(forwardingProvider);
    setEditorContextMenuId(EDITOR_CONTEXT);
}
Also used : SourceViewerConfiguration(org.eclipse.jface.text.source.SourceViewerConfiguration) ForwardingDocumentProvider(org.eclipse.ui.editors.text.ForwardingDocumentProvider) ChainedPreferenceStore(org.eclipse.ui.texteditor.ChainedPreferenceStore) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) ColorManager(org.eclipse.titan.designer.editors.ColorManager) TextFileDocumentProvider(org.eclipse.ui.editors.text.TextFileDocumentProvider)

Aggregations

IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)4 SourceViewerConfiguration (org.eclipse.jface.text.source.SourceViewerConfiguration)4 ColorManager (org.eclipse.titan.designer.editors.ColorManager)4 ForwardingDocumentProvider (org.eclipse.ui.editors.text.ForwardingDocumentProvider)4 TextFileDocumentProvider (org.eclipse.ui.editors.text.TextFileDocumentProvider)4 ChainedPreferenceStore (org.eclipse.ui.texteditor.ChainedPreferenceStore)4