Package net.sf.rej.gui.editor.rendering

Examples of net.sf.rej.gui.editor.rendering.BytecodeRenderer


    if (query == null)
      return; // early return

    this.lastQueryString = query;
    this.lastSearch = new CaseInsensitiveMatcher(query);
    BytecodeRenderer renderer = new BytecodeRenderer();
    PlaintextSyntaxDrawer sd = new PlaintextSyntaxDrawer();
    Imports imports = EditorFacade.getInstance().getImports(cfA);

    for (int i = 0; i < model.size(); i++) {
      sd.clear();
      renderer.render((EditorRow) model.elementAt(i), sd, imports);
      if (this.lastSearch.matches(sd.getText())) {
        list.setSelectedIndex(i);
        list.ensureIndexIsVisible(i);
        SystemFacade.getInstance().setStatus("Found '" + query + "'.");
        return; // early return
View Full Code Here


  public void findNext() {
    if (this.lastSearch == null) {
      find();
    } else {
      BytecodeRenderer renderer = new BytecodeRenderer();
      PlaintextSyntaxDrawer sd = new PlaintextSyntaxDrawer();
      Imports imports = EditorFacade.getInstance().getImports(cfA);

      for (int i = this.list.getSelectedIndex() + 1; i < model
          .size(); i++) {
        sd.clear();
        renderer.render((EditorRow) model.elementAt(i), sd, imports);
        if (this.lastSearch.matches(sd.getText())) {
          this.list.setSelectedIndex(i);
          this.list.ensureIndexIsVisible(i);
          SystemFacade.getInstance().setStatus("Found '" + this.lastQueryString + "'.");
          return; // early return
View Full Code Here

      SystemFacade.getInstance().setStatus("No more occurances of '" + this.lastQueryString + "' found.");   
    }
  }

  public String getSelectionPlainText() {
    BytecodeRenderer renderer = new BytecodeRenderer();
    PlaintextSyntaxDrawer sd = new PlaintextSyntaxDrawer();
    Imports imports = EditorFacade.getInstance().getImports(this.cfA);
    for (Object obj : this.list.getSelectedValues()) {
      EditorRow er = (EditorRow) obj;
      renderer.render(er, sd, imports);
      sd.drawLineBreak();
    }

    return sd.getText();
  }
View Full Code Here

    return sd.getText();
  }

  public String getSelectionHTML() {
    BytecodeRenderer renderer = new BytecodeRenderer();
    HTMLSyntaxDrawer sd = new HTMLSyntaxDrawer();
    Imports imports = EditorFacade.getInstance().getImports(this.cfA);
    for (Object obj : this.list.getSelectedValues()) {
      EditorRow er = (EditorRow) obj;
      renderer.render(er, sd, imports);
      sd.drawLineBreak();
    }

    return "<HTML><FONT FACE=\"Courier New\">" + sd.getHTML() + "</FONT></HTML>";
  }
View Full Code Here

    if (query == null)
      return; // early return

    this.lastQueryString = query;
    this.lastSearch = new CaseInsensitiveMatcher(query);
    BytecodeRenderer renderer = new BytecodeRenderer();
    PlaintextSyntaxDrawer sd = new PlaintextSyntaxDrawer();
    Imports imports = EditorFacade.getInstance().getImports(cf);

    for (int i = 0; i < model.size(); i++) {
      sd.clear();
      renderer.render((EditorRow) model.elementAt(i), sd, imports);
      if (this.lastSearch.matches(sd.getText())) {
        list.setSelectedIndex(i);
        list.ensureIndexIsVisible(i);
        SystemFacade.getInstance().setStatus("Found '" + query + "'.");
        return; // early return
View Full Code Here

  public void findNext() {
    if (EditorTab.this.lastSearch == null) {
      find();
    } else {
      BytecodeRenderer renderer = new BytecodeRenderer();
      PlaintextSyntaxDrawer sd = new PlaintextSyntaxDrawer();
      Imports imports = EditorFacade.getInstance().getImports(cf);

      for (int i = EditorTab.this.list.getSelectedIndex() + 1; i < model
          .size(); i++) {
        sd.clear();
        renderer.render((EditorRow) model.elementAt(i), sd, imports);
        if (EditorTab.this.lastSearch.matches(sd.getText())) {
          EditorTab.this.list.setSelectedIndex(i);
          EditorTab.this.list.ensureIndexIsVisible(i);
          SystemFacade.getInstance().setStatus("Found '" + this.lastQueryString + "'.");
          return; // early return
View Full Code Here

      SystemFacade.getInstance().setStatus("No more occurances of '" + this.lastQueryString + "' found.");   
    }
  }

  public String getSelectionPlainText() {
    BytecodeRenderer renderer = new BytecodeRenderer();
    PlaintextSyntaxDrawer sd = new PlaintextSyntaxDrawer();
    Imports imports = EditorFacade.getInstance().getImports(
        this.classDef.getClassFile());
    for (Object obj : this.list.getSelectedValues()) {
      EditorRow er = (EditorRow) obj;
      renderer.render(er, sd, imports);
      sd.drawLineBreak();
    }

    return sd.getText();
  }
View Full Code Here

    return sd.getText();
  }

  public String getSelectionHTML() {
    BytecodeRenderer renderer = new BytecodeRenderer();
    HTMLSyntaxDrawer sd = new HTMLSyntaxDrawer();
    Imports imports = EditorFacade.getInstance().getImports(
        this.classDef.getClassFile());
    for (Object obj : this.list.getSelectedValues()) {
      EditorRow er = (EditorRow) obj;
      renderer.render(er, sd, imports);
      sd.drawLineBreak();
    }

    return "<HTML><FONT FACE=\"Courier New\">" + sd.getHTML() + "</FONT></HTML>";
  }
View Full Code Here

TOP

Related Classes of net.sf.rej.gui.editor.rendering.BytecodeRenderer

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.