Search in sources :

Example 6 with TextFileDocumentProvider

use of org.eclipse.ui.editors.text.TextFileDocumentProvider 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 7 with TextFileDocumentProvider

use of org.eclipse.ui.editors.text.TextFileDocumentProvider 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 8 with TextFileDocumentProvider

use of org.eclipse.ui.editors.text.TextFileDocumentProvider 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 9 with TextFileDocumentProvider

use of org.eclipse.ui.editors.text.TextFileDocumentProvider 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

TextFileDocumentProvider (org.eclipse.ui.editors.text.TextFileDocumentProvider)9 IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)6 SourceViewerConfiguration (org.eclipse.jface.text.source.SourceViewerConfiguration)4 ColorManager (org.eclipse.titan.designer.editors.ColorManager)4 ForwardingDocumentProvider (org.eclipse.ui.editors.text.ForwardingDocumentProvider)4 ChainedPreferenceStore (org.eclipse.ui.texteditor.ChainedPreferenceStore)4 IFile (org.eclipse.core.resources.IFile)2 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)2 BadLocationException (org.eclipse.jface.text.BadLocationException)2 IDocument (org.eclipse.jface.text.IDocument)2 IDocumentProvider (org.eclipse.ui.texteditor.IDocumentProvider)2 ColorManager (org.erlide.ui.util.ColorManager)2 TestFile (name.graf.emanuel.testfileeditor.model.TestFile)1 Test (name.graf.emanuel.testfileeditor.model.node.Test)1 IMarker (org.eclipse.core.resources.IMarker)1 CoreException (org.eclipse.core.runtime.CoreException)1 IType (org.eclipse.jdt.core.IType)1 JavaModelException (org.eclipse.jdt.core.JavaModelException)1 RefactoringStarter (org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter)1 DocumentChange (org.eclipse.ltk.core.refactoring.DocumentChange)1