Search in sources :

Example 1 with HQLSourceViewer

use of org.hibernate.eclipse.hqleditor.HQLSourceViewer in project jbosstools-hibernate by jbosstools.

the class DynamicSQLPreviewView method createPartControl.

public void createPartControl(Composite parent) {
    textViewer = new HQLSourceViewer(parent, new VerticalRuler(1), null, false, SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL);
    // textViewer.setEditable(false);
    IDocument doc = new Document();
    textViewer.setDocument(doc);
    docSetupParticipant.setup(doc);
    textViewer.getDocument().set(HibernateConsoleMessages.DynamicSQLPreviewView_no_hql_query_editor_selected);
    textViewer.configure(new HQLSourceViewerConfiguration(null));
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    IPartService service = window.getPartService();
    hookIntoEditor(service.getActivePartReference());
}
Also used : VerticalRuler(org.eclipse.jface.text.source.VerticalRuler) IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) HQLSourceViewer(org.hibernate.eclipse.hqleditor.HQLSourceViewer) HQLSourceViewerConfiguration(org.hibernate.eclipse.hqleditor.HQLSourceViewerConfiguration) IPartService(org.eclipse.ui.IPartService) Document(org.eclipse.jface.text.Document) IDocument(org.eclipse.jface.text.IDocument) IDocument(org.eclipse.jface.text.IDocument)

Aggregations

Document (org.eclipse.jface.text.Document)1 IDocument (org.eclipse.jface.text.IDocument)1 VerticalRuler (org.eclipse.jface.text.source.VerticalRuler)1 IPartService (org.eclipse.ui.IPartService)1 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)1 HQLSourceViewer (org.hibernate.eclipse.hqleditor.HQLSourceViewer)1 HQLSourceViewerConfiguration (org.hibernate.eclipse.hqleditor.HQLSourceViewerConfiguration)1