Package at.bestsolution.efxclipse.text.jface.source

Examples of at.bestsolution.efxclipse.text.jface.source.SourceViewer


//    control.setText(getSample());
   
//    mainPane.setCenter(createSourceViewerPane(new File("/Users/tomschindl/git/e-fx-clipse/at.bestsolution.efxclipse.text.test.app/sample/Grid.java")));
   
    IDocument document = new Document(getFileContent(new File("/Users/tomschindl/git/e-fx-clipse/at.bestsolution.efxclipse.text.test.app/sample/Grid.java")));
    final SourceViewer viewer = new SourceViewer();
    JavaTextTools textTools = new JavaTextTools();
    viewer.configure(new JavaSourceViewerConfiguration(textTools));
   
    textTools.setupJavaDocumentPartitioner(document, IJavaPartitions.JAVA_PARTITIONING);
    viewer.setDocument(document);
    mainPane.setCenter(viewer.getLayoutNode());
   
    Scene s = new Scene(mainPane);
    s.getStylesheets().add(MainApplication.class.getResource("test.css").toExternalForm());
    s.addEventHandler(KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() {

      @Override
      public void handle(KeyEvent event) {
        if( event.isControlDown() && event.getCode() == KeyCode.SPACE ) {
          System.err.println("==============> EXEC");
          viewer.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
        }
      }
    });
    primaryStage.setScene(s);
    primaryStage.setWidth(300);
View Full Code Here

TOP

Related Classes of at.bestsolution.efxclipse.text.jface.source.SourceViewer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.