Examples of EditorContext


Examples of org.eclipse.emf.ecp.explorereditorbridge.internal.EditorContext

   * @param modelElement the model to be opened
   */
  public static void openEditor(EObject modelElement, String editorID)
  {
    ECPProject    project = ECPUtil.getECPProjectManager().getProject(modelElement);
    EditorContext context = new EditorContext(modelElement, project);
    MEEditorInput input   = new MEEditorInput(context);
       
    try
    {
      PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, editorID, true);
View Full Code Here

Examples of org.eclipse.wb.internal.core.xml.model.EditorContext

  ////////////////////////////////////////////////////////////////////////////
  /**
   * @return <code>true</code> if given {@link XmlObjectInfo} is UiBinder.
   */
  public static boolean isUiBinder(XmlObjectInfo object) {
    EditorContext context = object.getContext();
    return context instanceof UiBinderContext;
  }
View Full Code Here

Examples of org.netbeans.spi.debugger.jpda.EditorContext

            logger.println("NetBeans: The debugger is not running");
            return;
        }

        Map<String, byte[]> map = new HashMap<>();
        EditorContext editorContext = DebuggerManager.
                getDebuggerManager().lookupFirst(null, EditorContext.class);

        String clazz = classname.replace('.', '/') + ".class"; //NOI18N
        GradleClassPathProvider prv = project.getLookup().lookup(GradleClassPathProvider.class);
        FileObject fo2 = prv.getBuildOutputClassPaths().findResource(clazz);

        if (fo2 != null) {
            try {
                String basename = fo2.getName();
                for (FileObject classfile : fo2.getParent().getChildren()) {
                    String basename2 = classfile.getName();
                    if (/*#220338*/!"class".equals(classfile.getExt()) || (!basename2.equals(basename) && !basename2.startsWith(basename + '$'))) {
                        continue;
                    }
                    String url = classToSourceURL(classfile, logger);
                    if (url != null) {
                        editorContext.updateTimeStamp(debugger, url);
                    }
                    map.put(classname + basename2.substring(basename.length()), classfile.asBytes());
                }
            } catch (IOException ex) {
                NbGradleProject gradleProject = project.getLookup().lookup(NbGradleProject.class);
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.EditorContext

  /**
   * @param editorDiv editor
   * @param end end of selection range
   */
  public static void webdriverEditorSetSelection(Element editorDiv, int start, int end) {
    EditorContext editor = getByEditorDiv(editorDiv);
    editor.getSelectionHelper().setSelectionRange(new FocusedRange(start, end));
  }
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.EditorContext

  }

  @Override
  public void onUpdate(EditorUpdateEvent event) {
    if (event.selectionLocationChanged()) {
      EditorContext context = event.context();

      // Special case to exempt caret annotations from being undoable.
      context.getResponsibilityManager().startIndirectSequence();
      try {
        writeSelection(context);
      } finally {
        context.getResponsibilityManager().endIndirectSequence();
      }
    }
  }
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.EditorContext

      // The simpler approach is to do nothing, and let the user upload the
      // file again if it still makes sense (the blip in which they intended it
      // to go has been deleted, so they may not want to upload it anymore).
      return;
    }
    EditorContext context = edit.getEditor();
    CMutableDocument doc = context.getDocument();
    FocusedContentRange selection = context.getSelectionHelper().getSelectionPoints();
    Point<ContentNode> point;
    if (selection != null) {
      point = selection.getFocus();
    } else {
      // Focus was probably lost.  Bring it back.
      context.focus(false);
      selection = context.getSelectionHelper().getSelectionPoints();
      if (selection != null) {
        point = selection.getFocus();
      } else {
        // Still no selection.  Oh well, put it at the end.
        point = doc.locate(doc.size() - 1);
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.EditorContext

  /**
   * @param editorDiv editor
   * @param end end of selection range
   */
  public static void webdriverEditorSetSelection(Element editorDiv, int start, int end) {
    EditorContext editor = getByEditorDiv(editorDiv);
    editor.getSelectionHelper().setSelectionRange(new FocusedRange(start, end));
  }
View Full Code Here

Examples of org.waveprotocol.wave.client.editor.EditorContext

  }

  @Override
  public void onUpdate(EditorUpdateEvent event) {
    if (event.selectionLocationChanged()) {
      EditorContext context = event.context();

      // Special case to exempt caret annotations from being undoable.
      context.getResponsibilityManager().startIndirectSequence();
      try {
        writeSelection(context);
      } finally {
        context.getResponsibilityManager().endIndirectSequence();
      }
    }
  }
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.