Package org.eclipse.xtext.ui.editor.model

Examples of org.eclipse.xtext.ui.editor.model.XtextDocument.readOnly()


        workbench.getProgressService().run(true, true, new IRunnableWithProgress() {

          @Override
          public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
            XtextDocument doc = ((ModelQueryLanguageView) view).getEmbeddedEditor().getDocument();
            String result = doc.readOnly(new IUnitOfWork<String, XtextResource>() {
              @Override
              public String exec(XtextResource r) throws Exception {
                Model m = (Model) r.getContents().get(0);
                return interpret(m, monitor);
              }
View Full Code Here


        workbench.getProgressService().run(true, true, new IRunnableWithProgress() {

          @Override
          public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
            XtextDocument doc = (XtextDocument) editor.getDocument();
            String result = doc.readOnly(new IUnitOfWork<String, XtextResource>() {
              @Override
              public String exec(XtextResource r) throws Exception {
                Model m = (Model) r.getContents().get(0);
                return interpret(m, monitor);
              }
View Full Code Here

 
  @Override
  protected IRegion findWord(IDocument document, final int offset) {
    XtextDocument xdoc = (XtextDocument) document;

    IRegion result = xdoc.readOnly(new IUnitOfWork<IRegion, XtextResource>() {

      @Override
      public IRegion exec(XtextResource state) throws Exception {
        // resource can be null e.g. read only zip/jar entry
        if (state == null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.