Examples of readOnly()


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

  private void insertContent(final XtextEditor editor, final StyledTextAccess styledTextAccess) {
    final AtomicBoolean shouldInsertSemicolon = new AtomicBoolean(true);
    final IXtextDocument document = editor.getDocument();
    final List<Pair<EObject, Long>> commentsToUpdate = Lists.newLinkedList();

    document.readOnly(NULL_UNIT_OF_WORK); // wait for reconciler to finish its work.
    try {
      /*
       * Textual and semantic updates cannot be done in the same IUnitOfWork (throws an
       * IllegalStateException), so index updates (semantic) are done first and tracked in the
       * commentsToUpdate list, then a 2nd IUnitOfWork processes the comment updates (textual).
View Full Code Here

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

  }

  private <T extends EObject> T element(final Issue issue, final Class<T> type) {
    IModificationContext modificationContext = getModificationContextFactory().createModificationContext(issue);
    IXtextDocument xtextDocument = modificationContext.getXtextDocument();
    return xtextDocument.readOnly(new IUnitOfWork<T, XtextResource>() {
      @Override public T exec(XtextResource state) throws Exception {
        EObject e = state.getEObject(issue.getUriToProblem().fragment());
        return (type.isInstance(e)) ? type.cast(e) : null;
      }
    });
View Full Code Here

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

            _xifexpression = _xblockexpression;
          }
          return Boolean.valueOf(_xifexpression);
        }
      };
      _xblockexpression = _document.<Boolean>readOnly(_function_1);
    }
    return _xblockexpression;
  }
 
  public boolean hasError(final XtextEditor tortoiseEditor) {
View Full Code Here

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

              _xblockexpression = new LaunchConfigurationInfo(project, _identifier, _findTask);
            }
            return _xblockexpression;
          }
        };
        final LaunchConfigurationInfo info = _document.<LaunchConfigurationInfo>readOnly(_function);
        this.launch(mode, info);
        return;
      }
    }
    MessageDialog.openError(null, "Wrong editor kind.", "");
View Full Code Here

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

    if (part instanceof XtextEditor) {
      XtextEditor xtextEditor = (XtextEditor) part;
      IXtextDocument xtextDocument = xtextEditor.getDocument();
      if (xtextDocument != lastActiveDocument) {
        selectionLinker.setXtextEditor(xtextEditor);
        final IFigure contents = xtextDocument.readOnly(new IUnitOfWork<IFigure, XtextResource>() {
          @Override
          public IFigure exec(final XtextResource resource) throws Exception {
            return createFigure(resource);
          }
        });
View Full Code Here

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

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 = (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

Examples of org.jboss.managed.api.annotation.ManagementProperty.readOnly()

               if (mandatory)
                  fields.setField(Fields.MANDATORY, Boolean.TRUE);

               boolean readOnly = propertyInfo.isWritable() == false;
               if (readOnly == false && managementProperty != null)
                  readOnly = managementProperty.readOnly();
               if (readOnly)
                  fields.setField(Fields.READ_ONLY, Boolean.TRUE);

               boolean managed = false;
               if (managementProperty != null)
View Full Code Here

Examples of org.jboss.managed.api.annotation.ManagementProperty.readOnly()

               if (mandatory)
                  fields.setField(Fields.MANDATORY, Boolean.TRUE);

               boolean readOnly = propertyInfo.isWritable() == false;
               if (readOnly == false && managementProperty != null)
                  readOnly = managementProperty.readOnly();
               if (readOnly)
                  fields.setField(Fields.READ_ONLY, Boolean.TRUE);

               boolean managed = false;
               if (managementProperty != null)
View Full Code Here

Examples of org.jboss.managed.api.annotation.ManagementProperty.readOnly()

               if (mandatory)
                  fields.setField(Fields.MANDATORY, Boolean.TRUE);
              
               boolean readOnly = propertyInfo.isWritable() == false;
               if (readOnly == false && managementProperty != null)
                  readOnly = managementProperty.readOnly();
               if (readOnly)
                  fields.setField(Fields.READ_ONLY, Boolean.TRUE);

               boolean managed = false;
               if (managementProperty != 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.