Examples of RSyntaxTextArea


Examples of org.fife.ui.rsyntaxtextarea.RSyntaxTextArea

  public void open(File file) {
   
    setTabbs();
   
    final RSyntaxTextArea area = SwingFactory.createSyntaxTextArea("editor", Literal.EMPTY);

    area.addKeyListener(new CodeAssistant(area));
   
    AutoCompletion autoCompletion = new AutoCompletion(provider);
    autoCompletion.install(area);

    FileTabb tab = new FileTabb(area, file);

    if(file.exists()) {
     
      try {

        String content = new Util().read(file);
       
        area.setText(content);
      }
      catch (Exception e) {

        logger.error(e.getMessage());
      }
View Full Code Here

Examples of org.fife.ui.rsyntaxtextarea.RSyntaxTextArea

    }
  }

  private void closeOpenTab(int index) {
    RTextScrollPane co = (RTextScrollPane) house.getComponentAt(index);
    RSyntaxTextArea pane = (RSyntaxTextArea) co.getViewport().getView();
    OpenFile open = null;
    for (OpenFile file : hmap)
      if (pane.equals(file.textArea))
        open = file;
    if (open != null && hmap.contains(open))
      hmap.remove(open);
    house.remove(co);
  }
View Full Code Here

Examples of org.fife.ui.rsyntaxtextarea.RSyntaxTextArea

    }
    return tabTitle;
  }

  public RSyntaxTextArea getCurrentTextArea() {
    RSyntaxTextArea currentTextArea = null;
    try {
      int pos = house.getSelectedIndex();
      if (pos >= 0) {
        RTextScrollPane co = (RTextScrollPane) house.getComponentAt(pos);
        currentTextArea = (RSyntaxTextArea) co.getViewport().getView();
View Full Code Here

Examples of org.fife.ui.rsyntaxtextarea.RSyntaxTextArea

  }
 
  public OpenFile(String name, String path, String contents, Theme theme) {
    this.name = name;
    this.path = path;
    textArea = new RSyntaxTextArea(25, 70);
    textArea.setCaretPosition(0);
    textArea.requestFocusInWindow();
    textArea.setMarkOccurrences(true);
    textArea.setClearWhitespaceLinesEnabled(false);
    textArea.setEditable(false);
View Full Code Here

Examples of org.fife.ui.rsyntaxtextarea.RSyntaxTextArea

    this.setHideOnEscapeButton();

    JLabel label = new JLabel("Find What:");
    textField = new JTextField();

    RSyntaxTextArea pane = mainWindow.getModel().getCurrentTextArea();
    if (pane != null) {
      textField.setText(pane.getSelectedText());
    }
    mcase = new JCheckBox("Match Case");
    regex = new JCheckBox("Regex");
    wholew = new JCheckBox("Whole Words");
    reverse = new JCheckBox("Search Backwards");
View Full Code Here

Examples of org.fife.ui.rsyntaxtextarea.RSyntaxTextArea

    @Override
    public void actionPerformed(ActionEvent event) {
      if (textField.getText().length() == 0)
        return;

      RSyntaxTextArea pane = mainWindow.getModel().getCurrentTextArea();
      if (pane == null)
        return;

      SearchContext context = new SearchContext();
      context.setSearchFor(textField.getText());
      context.setMatchCase(mcase.isSelected());
      context.setRegularExpression(regex.isSelected());
      context.setSearchForward(!reverse.isSelected());
      context.setWholeWord(wholew.isSelected());

      if (!SearchEngine.find(pane, context).wasFound()) {
        pane.setSelectionStart(0);
        pane.setSelectionEnd(0);
      }
    }
View Full Code Here

Examples of org.fife.ui.rsyntaxtextarea.RSyntaxTextArea

  public void onCloseFileMenu() {
    this.getModel().closeFile();
  }

  public void onSaveAsMenu() {
    RSyntaxTextArea pane = this.getModel().getCurrentTextArea();
    if (pane == null)
      return;
    String tabTitle = this.getModel().getCurrentTabTitle();
    if (tabTitle == null)
      return;

    String recommendedFileName = tabTitle.replace(".class", ".java");
    File selectedFile = fileDialog.doSaveDialog(recommendedFileName);
    if (selectedFile != null) {
      fileSaver.saveText(pane.getText(), selectedFile);
    }
  }
View Full Code Here

Examples of org.fife.ui.rsyntaxtextarea.RSyntaxTextArea

    quit();
  }

  public void onSelectAllMenu() {
    try {
      RSyntaxTextArea pane = this.getModel().getCurrentTextArea();
      if (pane != null) {
        pane.requestFocusInWindow();
        pane.setSelectionStart(0);
        pane.setSelectionEnd(pane.getText().length());
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of org.fife.ui.rsyntaxtextarea.RSyntaxTextArea

    }
  }

  public void onFindMenu() {
    try {
      RSyntaxTextArea pane = this.getModel().getCurrentTextArea();
      if (pane != null) {
        if (findBox == null)
          findBox = new FindBox(this);
        findBox.showFindBox();
      }
View Full Code Here

Examples of org.fife.ui.rsyntaxtextarea.RSyntaxTextArea

        return panel;
    }

    private Component buildResponseTab() {
        RSyntaxTextArea responseArea = SyntaxEditorUtil.createDefaultXmlSyntaxTextArea();
        responseArea.setText(XmlUtils.prettyPrintXml(result.getResponseContent()));
        responseArea.setEditable(false);
        responseArea.setToolTipText("Response Content");
        responseArea.setFont(UISupport.getEditorFont());
        RTextScrollPane scrollPane = new RTextScrollPane(responseArea);
        scrollPane.setFoldIndicatorEnabled(true);
        scrollPane.setLineNumbersEnabled(true);

        JSplitPane split = UISupport.createVerticalSplit(new JScrollPane(JTableFactory.getInstance().makeJTable(new StringToStringsMapTableModel(
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.