Search in sources :

Example 1 with CompositeRuler

use of org.eclipse.jface.text.source.CompositeRuler in project cubrid-manager by CUBRID.

the class SQLEditorComposite method createSQLEditor.

/**
	 * Create the SQL editor
	 */
private void createSQLEditor() {
    final Composite composite = new Composite(this, SWT.NONE);
    composite.setLayout(new FillLayout());
    composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    CompositeRuler ruler = new CompositeRuler();
    LineNumberRulerColumn lineCol = new LineNumberRulerColumn();
    lineCol.setBackground(ResourceManager.getColor(new RGB(236, 233, 216)));
    ruler.addDecorator(0, lineCol);
    sqlTextViewer = new SQLTextViewer(composite, ruler, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER, queryEditor);
    viewerConfig = new SQLViewerConfiguration(queryEditor);
    sqlTextViewer.configure(viewerConfig);
    document = new SQLDocument();
    IDocumentPartitioner partitioner = new FastPartitioner(new SQLPartitionScanner(), SQLPartitionScanner.getAllTypes());
    document.setDocumentPartitioner(ISQLPartitions.SQL_PARTITIONING, partitioner);
    partitioner.connect(document);
    sqlTextViewer.setDocument(document);
    findReplaceDocAdapter = new FindReplaceDocumentAdapter(document);
    undoManager = new TextViewerUndoManager(50);
    undoManager.connect(sqlTextViewer);
    contentAssistant = viewerConfig.getContentAssistant(sqlTextViewer);
    contentAssistant.install(sqlTextViewer);
    recentlyUsedSQLcontentAssistant = viewerConfig.getRecentlyUsedContentAssistant(sqlTextViewer);
    recentlyUsedSQLcontentAssistant.install(sqlTextViewer);
    formatHandler = new TextViewerOperationHandler(sqlTextViewer, ISourceViewer.FORMAT);
    contentAssistHandler = new TextViewerOperationHandler(sqlTextViewer, ISourceViewer.CONTENTASSIST_PROPOSALS);
    text = (StyledText) sqlTextViewer.getTextWidget();
    text.setIndent(1);
    text.setData(SQL_EDITOR_FLAG, sqlTextViewer);
    createContextMenu();
    addListener();
}
Also used : LineNumberRulerColumn(org.eclipse.jface.text.source.LineNumberRulerColumn) SQLDocument(com.cubrid.common.ui.query.editor.SQLDocument) Composite(org.eclipse.swt.widgets.Composite) CompositeRuler(org.eclipse.jface.text.source.CompositeRuler) FillLayout(org.eclipse.swt.layout.FillLayout) SQLTextViewer(com.cubrid.common.ui.query.editor.SQLTextViewer) RGB(org.eclipse.swt.graphics.RGB) SQLViewerConfiguration(com.cubrid.common.ui.query.editor.SQLViewerConfiguration) TextViewerUndoManager(org.eclipse.jface.text.TextViewerUndoManager) IDocumentPartitioner(org.eclipse.jface.text.IDocumentPartitioner) FastPartitioner(org.eclipse.jface.text.rules.FastPartitioner) GridData(org.eclipse.swt.layout.GridData) SQLPartitionScanner(com.cubrid.common.ui.query.editor.SQLPartitionScanner) FindReplaceDocumentAdapter(org.eclipse.jface.text.FindReplaceDocumentAdapter)

Example 2 with CompositeRuler

use of org.eclipse.jface.text.source.CompositeRuler in project cubrid-manager by CUBRID.

the class QueryRecordListComparator method createQueryTunerTab.

private void createQueryTunerTab(CTabFolder tabFolder) {
    CTabItem item = new CTabItem(tabFolder, SWT.None | SWT.MULTI | SWT.V_SCROLL);
    item.setText(Messages.tabItemQueryTuner);
    tabFolder.setSelection(item);
    SashForm form = new SashForm(tabFolder, SWT.HORIZONTAL);
    item.setControl(form);
    form.setLayout(new FillLayout());
    /*Left composite*/
    Composite leftComposite = new Composite(form, SWT.BORDER);
    leftComposite.setLayout(new GridLayout());
    /*Right composite*/
    queryPlanContainer = new Composite(form, SWT.BORDER);
    queryPlanContainer.setLayout(new FillLayout());
    form.setWeights(new int[] { 40, 60 });
    ToolBar toolBar = new ToolBar(leftComposite, SWT.None);
    runItem = new ToolItem(toolBar, SWT.None);
    runItem.setImage(CommonUIPlugin.getImage("icons/queryeditor/query_run.png"));
    runItem.setDisabledImage(CommonUIPlugin.getImage("icons/queryeditor/query_run_disabled.png"));
    runItem.setToolTipText(Messages.run);
    runItem.setEnabled(false);
    runItem.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent event) {
            runQuery();
        }
    });
    runPlanItem = new ToolItem(toolBar, SWT.None);
    runPlanItem.setImage(CommonUIPlugin.getImage("icons/queryeditor/query_execution_plan.png"));
    runPlanItem.setToolTipText(Messages.queryPlanTip);
    runPlanItem.setEnabled(false);
    runPlanItem.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent event) {
            runQueryPlan();
        }
    });
    saveQueryItem = new ToolItem(toolBar, SWT.None);
    saveQueryItem.setImage(CommonUIPlugin.getImage("icons/queryeditor/file_save.png"));
    saveQueryItem.setToolTipText(Messages.ttSaveQueryTuning);
    saveQueryItem.setEnabled(false);
    saveQueryItem.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent event) {
            saveQueryRecord();
        }
    });
    SashForm sashForm = new SashForm(leftComposite, SWT.VERTICAL);
    sashForm.setBackground(SASH_COLOR);
    sashForm.setLayout(new FillLayout());
    sashForm.setLayoutData(CommonUITool.createGridData(GridData.FILL_BOTH, 1, 1, -1, -1));
    CompositeRuler ruler = new CompositeRuler();
    LineNumberRulerColumn lineCol = new LineNumberRulerColumn();
    lineCol.setBackground(ResourceManager.getColor(new RGB(236, 233, 216)));
    ruler.addDecorator(0, lineCol);
    sqlTextViewer = new SQLTextViewer(sashForm, ruler, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER, this);
    viewerConfig = new SQLViewerConfiguration(this);
    sqlTextViewer.configure(viewerConfig);
    SQLDocument document = new SQLDocument();
    IDocumentPartitioner partitioner = new FastPartitioner(new SQLPartitionScanner(), SQLPartitionScanner.getAllTypes());
    document.setDocumentPartitioner(ISQLPartitions.SQL_PARTITIONING, partitioner);
    partitioner.connect(document);
    sqlTextViewer.setDocument(document);
    undoManager = new TextViewerUndoManager(50);
    undoManager.connect(sqlTextViewer);
    contentAssistant = viewerConfig.getContentAssistant(sqlTextViewer);
    contentAssistant.install(sqlTextViewer);
    recentlyUsedSQLcontentAssistant = viewerConfig.getRecentlyUsedContentAssistant(sqlTextViewer);
    recentlyUsedSQLcontentAssistant.install(sqlTextViewer);
    formatHandler = new TextViewerOperationHandler(sqlTextViewer, ISourceViewer.FORMAT);
    contentAssistHandler = new TextViewerOperationHandler(sqlTextViewer, ISourceViewer.CONTENTASSIST_PROPOSALS);
    StyledText text = (StyledText) sqlTextViewer.getTextWidget();
    text.setIndent(1);
    text.setData(SQL_EDITOR_FLAG, sqlTextViewer);
    addTextViewerListener(text);
    queryResultContainer = new Composite(sashForm, SWT.None);
    queryResultContainer.setLayout(new FillLayout());
    displayQuery(null);
    displayQueryPlan(null);
}
Also used : LineNumberRulerColumn(org.eclipse.jface.text.source.LineNumberRulerColumn) SQLDocument(com.cubrid.common.ui.query.editor.SQLDocument) StyledText(org.eclipse.swt.custom.StyledText) Composite(org.eclipse.swt.widgets.Composite) QueryPlanComposite(com.cubrid.common.ui.query.control.queryplan.QueryPlanComposite) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) CompositeRuler(org.eclipse.jface.text.source.CompositeRuler) FillLayout(org.eclipse.swt.layout.FillLayout) SQLTextViewer(com.cubrid.common.ui.query.editor.SQLTextViewer) RGB(org.eclipse.swt.graphics.RGB) CTabItem(org.eclipse.swt.custom.CTabItem) SQLViewerConfiguration(com.cubrid.common.ui.query.editor.SQLViewerConfiguration) SashForm(org.eclipse.swt.custom.SashForm) TextViewerUndoManager(org.eclipse.jface.text.TextViewerUndoManager) GridLayout(org.eclipse.swt.layout.GridLayout) IDocumentPartitioner(org.eclipse.jface.text.IDocumentPartitioner) FastPartitioner(org.eclipse.jface.text.rules.FastPartitioner) ToolBar(org.eclipse.swt.widgets.ToolBar) SelectionEvent(org.eclipse.swt.events.SelectionEvent) TextViewerOperationHandler(com.cubrid.common.ui.query.control.TextViewerOperationHandler) SQLPartitionScanner(com.cubrid.common.ui.query.editor.SQLPartitionScanner) ToolItem(org.eclipse.swt.widgets.ToolItem)

Example 3 with CompositeRuler

use of org.eclipse.jface.text.source.CompositeRuler in project cubrid-manager by CUBRID.

the class CUBRIDTextEditor method getRuler.

/**
	 * @return CompositeRuler of SourceViewer.
	 */
protected CompositeRuler getRuler() {
    CompositeRuler ruler = new CompositeRuler();
    LineNumberRulerColumn lineCol = new LineNumberRulerColumn();
    lineCol.setBackground(colorManager.getColor(new RGB(236, 233, 216)));
    ruler.addDecorator(0, lineCol);
    return ruler;
}
Also used : LineNumberRulerColumn(org.eclipse.jface.text.source.LineNumberRulerColumn) CompositeRuler(org.eclipse.jface.text.source.CompositeRuler) RGB(org.eclipse.swt.graphics.RGB)

Example 4 with CompositeRuler

use of org.eclipse.jface.text.source.CompositeRuler in project eclipse.platform.text by eclipse.

the class AbstractTextEditor method createPartControl.

/**
 * The <code>AbstractTextEditor</code> implementation of this
 * <code>IWorkbenchPart</code> method creates the vertical ruler and
 * source viewer.
 * <p>
 * Subclasses may extend this method. Besides extending this method, the
 * behavior of <code>createPartControl</code> may be customized by
 * calling, extending or replacing the following methods: <br>
 * Subclasses may supply customized implementations for some members using
 * the following methods before <code>createPartControl</code> is invoked:
 * <ul>
 * <li>
 * {@linkplain #setSourceViewerConfiguration(SourceViewerConfiguration) setSourceViewerConfiguration}
 * to supply a custom source viewer configuration,</li>
 * <li>{@linkplain #setRangeIndicator(Annotation) setRangeIndicator} to
 * provide a range indicator,</li>
 * <li>{@linkplain #setHelpContextId(String) setHelpContextId} to provide a
 * help context id,</li>
 * <li>{@linkplain #setEditorContextMenuId(String) setEditorContextMenuId}
 * to set a custom context menu id,</li>
 * <li>{@linkplain #setRulerContextMenuId(String) setRulerContextMenuId} to
 * set a custom ruler context menu id.</li>
 * </ul>
 * <br>
 * Subclasses may replace the following methods called from within
 * <code>createPartControl</code>:
 * <ul>
 * <li>{@linkplain #createVerticalRuler() createVerticalRuler} to supply a
 * custom vertical ruler,</li>
 * <li>{@linkplain #createSourceViewer(Composite, IVerticalRuler, int) createSourceViewer}
 * to supply a custom source viewer,</li>
 * <li>{@linkplain #getSelectionProvider() getSelectionProvider} to supply
 * a custom selection provider.</li>
 * </ul>
 * <br>
 * Subclasses may extend the following methods called from within
 * <code>createPartControl</code>:
 * <ul>
 * <li>
 * {@linkplain #initializeViewerColors(ISourceViewer) initializeViewerColors}
 * to customize the viewer color scheme (may also be replaced),</li>
 * <li>
 * {@linkplain #initializeDragAndDrop(ISourceViewer) initializeDragAndDrop}
 * to customize drag and drop (may also be replaced),</li>
 * <li>{@linkplain #createNavigationActions() createNavigationActions} to
 * add navigation actions,</li>
 * <li>{@linkplain #createActions() createActions} to add text editor
 * actions.</li>
 * </ul>
 * </p>
 *
 * @param parent the parent composite
 */
@Override
public void createPartControl(Composite parent) {
    fVerticalRuler = createVerticalRuler();
    int styles = SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION;
    fSourceViewer = createSourceViewer(parent, fVerticalRuler, styles);
    if (fConfiguration == null)
        fConfiguration = new SourceViewerConfiguration();
    fSourceViewer.configure(fConfiguration);
    if (fSourceViewer instanceof ISourceViewerExtension4)
        fKeyBindingSupportForContentAssistant = new KeyBindingSupportForAssistant(((ISourceViewerExtension4) fSourceViewer));
    if (fSourceViewer instanceof ISourceViewerExtension3) {
        IQuickAssistAssistant assistant = ((ISourceViewerExtension3) fSourceViewer).getQuickAssistAssistant();
        if (assistant != null)
            fKeyBindingSupportForQuickAssistant = new KeyBindingSupportForAssistant(assistant);
    }
    if (fRangeIndicator != null)
        fSourceViewer.setRangeIndicator(fRangeIndicator);
    fSourceViewer.addTextListener(fTextListener);
    fSourceViewer.addTextInputListener(fTextListener);
    getSelectionProvider().addSelectionChangedListener(getSelectionChangedListener());
    initializeViewerFont(fSourceViewer);
    initializeViewerColors(fSourceViewer);
    initializeFindScopeColor(fSourceViewer);
    initializeDragAndDrop(fSourceViewer);
    StyledText styledText = fSourceViewer.getTextWidget();
    styledText.addMouseListener(getCursorListener());
    styledText.addKeyListener(getCursorListener());
    // Disable orientation switching until we fully support it.
    styledText.addListener(SWT.OrientationChange, new Listener() {

        @Override
        public void handleEvent(Event event) {
            event.doit = false;
        }
    });
    if (getHelpContextId() != null)
        PlatformUI.getWorkbench().getHelpSystem().setHelp(styledText, getHelpContextId());
    String id = fEditorContextMenuId != null ? fEditorContextMenuId : DEFAULT_EDITOR_CONTEXT_MENU_ID;
    MenuManager manager = new MenuManager(id, id);
    manager.setRemoveAllWhenShown(true);
    manager.addMenuListener(getContextMenuListener());
    fTextContextMenu = manager.createContextMenu(styledText);
    styledText.setMenu(fTextContextMenu);
    if (fEditorContextMenuId != null)
        getEditorSite().registerContextMenu(fEditorContextMenuId, manager, getSelectionProvider(), isEditorInputIncludedInContextMenu());
    else if (fCompatibilityMode)
        getEditorSite().registerContextMenu(DEFAULT_EDITOR_CONTEXT_MENU_ID, manager, getSelectionProvider(), isEditorInputIncludedInContextMenu());
    if ((fEditorContextMenuId != null && fCompatibilityMode) || fEditorContextMenuId == null) {
        String partId = getEditorSite().getId();
        if (partId != null)
            // $NON-NLS-1$
            getEditorSite().registerContextMenu(partId + ".EditorContext", manager, getSelectionProvider(), isEditorInputIncludedInContextMenu());
    }
    getEditorSite().registerContextMenu(COMMON_EDITOR_CONTEXT_MENU_ID, manager, getSelectionProvider(), false);
    if (fEditorContextMenuId == null)
        fEditorContextMenuId = DEFAULT_EDITOR_CONTEXT_MENU_ID;
    id = fRulerContextMenuId != null ? fRulerContextMenuId : DEFAULT_RULER_CONTEXT_MENU_ID;
    manager = new MenuManager(id, id);
    manager.setRemoveAllWhenShown(true);
    manager.addMenuListener(getContextMenuListener());
    Control rulerControl = fVerticalRuler.getControl();
    fRulerContextMenu = manager.createContextMenu(rulerControl);
    rulerControl.setMenu(fRulerContextMenu);
    rulerControl.addMouseListener(getRulerMouseListener());
    if (fRulerContextMenuId != null)
        getEditorSite().registerContextMenu(fRulerContextMenuId, manager, getSelectionProvider(), false);
    else if (fCompatibilityMode)
        getEditorSite().registerContextMenu(DEFAULT_RULER_CONTEXT_MENU_ID, manager, getSelectionProvider(), false);
    if ((fRulerContextMenuId != null && fCompatibilityMode) || fRulerContextMenuId == null) {
        String partId = getSite().getId();
        if (partId != null)
            // $NON-NLS-1$
            getEditorSite().registerContextMenu(partId + ".RulerContext", manager, getSelectionProvider(), false);
    }
    getEditorSite().registerContextMenu(COMMON_RULER_CONTEXT_MENU_ID, manager, getSelectionProvider(), false);
    if (fRulerContextMenuId == null)
        fRulerContextMenuId = DEFAULT_RULER_CONTEXT_MENU_ID;
    initializeZoomGestures(rulerControl, fSourceViewer);
    getSite().setSelectionProvider(getSelectionProvider());
    fSelectionListener = new SelectionListener();
    fSelectionListener.install(getSelectionProvider());
    fSelectionListener.setDocument(getDocumentProvider().getDocument(getEditorInput()));
    initializeActivationCodeTrigger();
    createNavigationActions();
    createAccessibilityActions();
    createActions();
    initializeSourceViewer(getEditorInput());
    /* since 3.2 - undo redo actions should be created after
		 * the source viewer is initialized, so that the undo manager
		 * can obtain its undo context from its document.
		 */
    createUndoRedoActions();
    JFaceResources.getFontRegistry().addListener(fFontPropertyChangeListener);
    IVerticalRuler ruler = getVerticalRuler();
    if (ruler instanceof CompositeRuler)
        updateContributedRulerColumns((CompositeRuler) ruler);
    if (isWordWrapSupported()) {
        setWordWrap(getInitialWordWrapStatus());
    }
}
Also used : StyledText(org.eclipse.swt.custom.StyledText) ITextListener(org.eclipse.jface.text.ITextListener) IPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener) ISaveablesLifecycleListener(org.eclipse.ui.ISaveablesLifecycleListener) IPartListener(org.eclipse.ui.IPartListener) KeyListener(org.eclipse.swt.events.KeyListener) GestureListener(org.eclipse.swt.events.GestureListener) IDocumentListener(org.eclipse.jface.text.IDocumentListener) Listener(org.eclipse.swt.widgets.Listener) ITextInputListener(org.eclipse.jface.text.ITextInputListener) VerifyKeyListener(org.eclipse.swt.custom.VerifyKeyListener) VerifyListener(org.eclipse.swt.events.VerifyListener) MouseListener(org.eclipse.swt.events.MouseListener) IWindowListener(org.eclipse.ui.IWindowListener) IMenuListener(org.eclipse.jface.action.IMenuListener) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) DropTargetListener(org.eclipse.swt.dnd.DropTargetListener) IVerticalRuler(org.eclipse.jface.text.source.IVerticalRuler) CompositeRuler(org.eclipse.jface.text.source.CompositeRuler) ISourceViewerExtension3(org.eclipse.jface.text.source.ISourceViewerExtension3) ISourceViewerExtension4(org.eclipse.jface.text.source.ISourceViewerExtension4) Point(org.eclipse.swt.graphics.Point) SourceViewerConfiguration(org.eclipse.jface.text.source.SourceViewerConfiguration) Control(org.eclipse.swt.widgets.Control) MenuManager(org.eclipse.jface.action.MenuManager) IMenuManager(org.eclipse.jface.action.IMenuManager) DropTargetEvent(org.eclipse.swt.dnd.DropTargetEvent) PropertyChangeEvent(org.eclipse.jface.util.PropertyChangeEvent) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) SaveablesLifecycleEvent(org.eclipse.ui.SaveablesLifecycleEvent) DragSourceEvent(org.eclipse.swt.dnd.DragSourceEvent) TextEvent(org.eclipse.jface.text.TextEvent) KeyEvent(org.eclipse.swt.events.KeyEvent) MouseEvent(org.eclipse.swt.events.MouseEvent) GestureEvent(org.eclipse.swt.events.GestureEvent) DocumentEvent(org.eclipse.jface.text.DocumentEvent) Event(org.eclipse.swt.widgets.Event) VerifyEvent(org.eclipse.swt.events.VerifyEvent) IQuickAssistAssistant(org.eclipse.jface.text.quickassist.IQuickAssistAssistant)

Example 5 with CompositeRuler

use of org.eclipse.jface.text.source.CompositeRuler in project eclipse.platform.text by eclipse.

the class AbstractTextEditor method doSetInput.

/**
 * Called directly from <code>setInput</code> and from within a workspace
 * runnable from <code>init</code>, this method does the actual setting
 * of the editor input. Closes the editor if <code>input</code> is
 * <code>null</code>. Disconnects from any previous editor input and its
 * document provider and connects to the new one.
 * <p>
 * Subclasses may extend.
 * </p>
 *
 * @param input the input to be set
 * @exception CoreException if input cannot be connected to the document
 *            provider
 */
protected void doSetInput(IEditorInput input) throws CoreException {
    ISaveablesLifecycleListener listener = getSite().getService(ISaveablesLifecycleListener.class);
    if (listener == null)
        fSavable = null;
    if (input == null) {
        close(isSaveOnCloseNeeded());
        if (fSavable != null) {
            listener.handleLifecycleEvent(new SaveablesLifecycleEvent(this, SaveablesLifecycleEvent.POST_CLOSE, getSaveables(), false));
            fSavable.disconnectEditor();
            fSavable = null;
        }
    } else {
        boolean mustSendLifeCycleEvent = false;
        if (fSavable != null) {
            listener.handleLifecycleEvent(new SaveablesLifecycleEvent(this, SaveablesLifecycleEvent.POST_CLOSE, getSaveables(), false));
            fSavable.disconnectEditor();
            fSavable = null;
            mustSendLifeCycleEvent = true;
        }
        IEditorInput oldInput = getEditorInput();
        if (oldInput != null)
            getDocumentProvider().disconnect(oldInput);
        super.setInput(input);
        updateDocumentProvider(input);
        IDocumentProvider provider = getDocumentProvider();
        if (provider == null) {
            IStatus s = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.OK, EditorMessages.Editor_error_no_provider, null);
            throw new CoreException(s);
        }
        provider.connect(input);
        initializeTitle(input);
        if (fSourceViewer != null) {
            initializeSourceViewer(input);
            // Reset the undo context for the undo and redo action handlers
            IAction undoAction = getAction(ITextEditorActionConstants.UNDO);
            IAction redoAction = getAction(ITextEditorActionConstants.REDO);
            boolean areOperationActionHandlersInstalled = undoAction instanceof OperationHistoryActionHandler && redoAction instanceof OperationHistoryActionHandler;
            IUndoContext undoContext = getUndoContext();
            if (undoContext != null && areOperationActionHandlersInstalled) {
                ((OperationHistoryActionHandler) undoAction).setContext(undoContext);
                ((OperationHistoryActionHandler) redoAction).setContext(undoContext);
            } else {
                createUndoRedoActions();
            }
        }
        if (fIsOverwriting)
            toggleOverwriteMode();
        setInsertMode(getLegalInsertModes().get(0));
        updateCaret();
        updateStatusField(ITextEditorActionConstants.STATUS_CATEGORY_ELEMENT_STATE);
        if (fSelectionListener != null)
            fSelectionListener.setDocument(getDocumentProvider().getDocument(input));
        IVerticalRuler ruler = getVerticalRuler();
        if (ruler instanceof CompositeRuler)
            updateContributedRulerColumns((CompositeRuler) ruler);
        // Send savable life-cycle if needed.
        if (mustSendLifeCycleEvent && listener != null)
            listener.handleLifecycleEvent(new SaveablesLifecycleEvent(this, SaveablesLifecycleEvent.POST_OPEN, getSaveables(), false));
    }
}
Also used : IStatus(org.eclipse.core.runtime.IStatus) Status(org.eclipse.core.runtime.Status) OperationHistoryActionHandler(org.eclipse.ui.operations.OperationHistoryActionHandler) IStatus(org.eclipse.core.runtime.IStatus) IAction(org.eclipse.jface.action.IAction) IVerticalRuler(org.eclipse.jface.text.source.IVerticalRuler) CompositeRuler(org.eclipse.jface.text.source.CompositeRuler) ISaveablesLifecycleListener(org.eclipse.ui.ISaveablesLifecycleListener) IUndoContext(org.eclipse.core.commands.operations.IUndoContext) CoreException(org.eclipse.core.runtime.CoreException) IEditorInput(org.eclipse.ui.IEditorInput) SaveablesLifecycleEvent(org.eclipse.ui.SaveablesLifecycleEvent)

Aggregations

CompositeRuler (org.eclipse.jface.text.source.CompositeRuler)16 LineNumberRulerColumn (org.eclipse.jface.text.source.LineNumberRulerColumn)11 Display (org.eclipse.swt.widgets.Display)6 IVerticalRuler (org.eclipse.jface.text.source.IVerticalRuler)5 StyledText (org.eclipse.swt.custom.StyledText)3 RGB (org.eclipse.swt.graphics.RGB)3 FillLayout (org.eclipse.swt.layout.FillLayout)3 Composite (org.eclipse.swt.widgets.Composite)3 SQLDocument (com.cubrid.common.ui.query.editor.SQLDocument)2 SQLPartitionScanner (com.cubrid.common.ui.query.editor.SQLPartitionScanner)2 SQLTextViewer (com.cubrid.common.ui.query.editor.SQLTextViewer)2 SQLViewerConfiguration (com.cubrid.common.ui.query.editor.SQLViewerConfiguration)2 Document (org.eclipse.jface.text.Document)2 DocumentEvent (org.eclipse.jface.text.DocumentEvent)2 IDocument (org.eclipse.jface.text.IDocument)2 IDocumentListener (org.eclipse.jface.text.IDocumentListener)2 IDocumentPartitioner (org.eclipse.jface.text.IDocumentPartitioner)2 TextViewerUndoManager (org.eclipse.jface.text.TextViewerUndoManager)2 FastPartitioner (org.eclipse.jface.text.rules.FastPartitioner)2 AnnotationRulerColumn (org.eclipse.jface.text.source.AnnotationRulerColumn)2