Skip to content

Commit

Permalink
Merge pull request #35 from vnijs/master
Browse files Browse the repository at this point in the history
Update CRAN version of shinyAce
  • Loading branch information
trestletech committed Feb 4, 2016
2 parents a90fcc3 + 0ff2c89 commit 368322a
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 33 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ Package: shinyAce
Type: Package
Title: Ace Editor Bindings for Shiny
Version: 0.2.1
Date: 2015-06-28
Date: 2016-02-3
Authors@R: c(
person(family="Trestle Technology, LLC", role="aut", email="cran@trestletechnology.net"),
person("Jeff", "Allen", role="cre", email="cran@trestletechnology.net"),
person(family="Institut de Radioprotection et de Sûreté Nucléaire", role=c("cph"), email = "yann.richet@irsn.fr"),
person(family="Institut de Radioprotection et de Surete Nucleaire", role=c("cph"), email = "yann.richet@irsn.fr"),
person(family="Ajax.org B.V.", role=c("ctb", "cph"), comment="Ace"))
Description: Ace editor bindings to enable a rich text editing environment
within Shiny.
License: MIT
License: MIT + file LICENSE
Depends:
R (>= 2.15.0)
Imports:
Expand Down
22 changes: 2 additions & 20 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,20 +1,2 @@
The MIT License (MIT)

Copyright (c) 2013 Jeff Allen

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
YEAR: 2016
COPYRIGHT HOLDER: Jeff Allen, Ajax.org B.V. (Ace)
5 changes: 4 additions & 1 deletion R/ace-autocomplete.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ aceAutocomplete <- function(inputId, session = shiny::getDefaultReactiveDomain()
value <- session$input[[paste0("shinyAce_", inputId, "_hint")]]
if(is.null(value)) return(NULL)

utilEnv <- environment(utils::alarm)
w32 <- get(".win32consoleCompletion", utilEnv)

comps <- list(id = inputId,
codeCompletions = utils:::.win32consoleCompletion(value$linebuffer, value$cursorPosition)$comps)
codeCompletions = w32(value$linebuffer, value$cursorPosition)$comps)

session$sendCustomMessage('shinyAce', comps)
})
Expand Down
6 changes: 5 additions & 1 deletion R/ace-editor.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#' @param theme The Ace \code{theme} to be used by the editor. The \code{theme}
#' in Ace determines the styling and coloring of the editor. Use
#' \code{\link{getAceThemes}} to enumerate all the themes available.
#' @param vimKeyBinding If set to \code{TRUE}, Ace will enable vim-keybindings.
#' Default value is \code{FALSE}.
#' @param readOnly If set to \code{TRUE}, Ace will disable client-side editing.
#' If \code{FALSE} (the default), it will enable editing.
#' @param height A number (which will be interpreted as a number of pixels) or
Expand All @@ -23,6 +25,8 @@
#' of every keystroke as it happens.
#' @param wordWrap If set to \code{TRUE}, Ace will enable word wrapping.
#' Default value is \code{FALSE}.
#' @param showLineNumbers If set to \code{TRUE}, Ace will show line numbers.
#' @param highlightActiveLine If set to \code{TRUE}, Ace will highlight the active line.
#' @param cursorId The ID associated with a cursor change.
#' @param selectionId The ID associated with a change of selected text
#' @param hotkeys A list whose names are ID names and whose elements are the shortcuts of keys. Shortcuts can either be a simple string or a list with elements 'win' and 'mac' that that specifies different shortcuts for win and mac (see example).
Expand Down Expand Up @@ -55,7 +59,7 @@
aceEditor <- function(outputId, value, mode, theme, vimKeyBinding = FALSE,
readOnly=FALSE, height="400px",
fontSize=12, debounce=1000, wordWrap=FALSE,
showLineNumbers = TRUE,highlightActiveLine=TRUE,
showLineNumbers = TRUE, highlightActiveLine=TRUE,
selectionId=NULL, cursorId=NULL, hotkeys=NULL,
autoComplete=c("disabled", "enabled", "live"),
autoCompleteList=NULL){
Expand Down
1 change: 1 addition & 0 deletions R/update-ace-editor.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#' Should be an integer.
#' @param wordWrap If set to \code{TRUE}, Ace will enable word wrapping.
#' Default value is \code{FALSE}.
#' @param border Set the \code{border} 'normal', 'alert', or 'flash'.
#' @param autoComplete Enable/Disable code completion. See \code{\link{aceEditor}} for details.
#' @param autoCompleteList If set to \code{NULL}, exisitng static completions list will be unset. See \code{\link{aceEditor}} for details.
#' @examples \dontrun{
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Contributors (In order of first commit)
---------------------------------------

- [Jeff Allen](https://github.com/trestletech) - Core project
- [Vincent Nijs](https://github.com/mostly-harmless) - Vim key bindings ([#9](https://github.com/trestletech/shinyAce/pull/9))
- [Vincent Nijs](https://github.com/vnijs) - Vim key bindings, package maintenance ([#9](https://github.com/trestletech/shinyAce/pull/9), [#35](https://github.com/trestletech/shinyAce/pull/35))
- [Nick Carchedi](https://github.com/ncarchedi) - Word wrapping ([#12](https://github.com/trestletech/shinyAce/pull/12))
- [Sebastian Kranz](https://github.com/skranz) - Hotkey feature and cursor listener ([#16](https://github.com/trestletech/shinyAce/pull/16/files))
- [Forest Fang](https://github.com/saurfang) - Code completion ([#21](https://github.com/trestletech/shinyAce/pull/21))
Expand Down
2 changes: 1 addition & 1 deletion man/aceAutocomplete.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1.9000): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/ace-autocomplete.R
\name{aceAutocomplete}
\alias{aceAutocomplete}
Expand Down
11 changes: 9 additions & 2 deletions man/aceEditor.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1.9000): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/ace-editor.R
\name{aceEditor}
\alias{aceEditor}
Expand All @@ -24,6 +24,9 @@ determines things like syntax highlighting and code folding. Use the
in Ace determines the styling and coloring of the editor. Use
\code{\link{getAceThemes}} to enumerate all the themes available.}
\item{vimKeyBinding}{If set to \code{TRUE}, Ace will enable vim-keybindings.
Default value is \code{FALSE}.}
\item{readOnly}{If set to \code{TRUE}, Ace will disable client-side editing.
If \code{FALSE} (the default), it will enable editing.}
Expand All @@ -42,6 +45,10 @@ of every keystroke as it happens.}
\item{wordWrap}{If set to \code{TRUE}, Ace will enable word wrapping.
Default value is \code{FALSE}.}
\item{showLineNumbers}{If set to \code{TRUE}, Ace will show line numbers.}
\item{highlightActiveLine}{If set to \code{TRUE}, Ace will highlight the active line.}
\item{selectionId}{The ID associated with a change of selected text}
\item{cursorId}{The ID associated with a cursor change.}
Expand All @@ -54,7 +61,7 @@ Default value is \code{FALSE}.}
\item{\code{"enabled"}}{Enable Basic Code Autocomplete. Autocomplete can be triggered using Ctrl-Space, Ctrl-Shift-Space, or Alt-Space.}
\item{\code{"live"}}{Enable Live Code Autocomplete. In addition to Basic Autocomplete, it will automatically trigger at each key stroke.}
}
By default, only local completer is used where all aforementioned code pieces will be considered as candidates. Use \code{autoCompleteList} for static completions and \code{\link{aceAutocomplete}} for dynamic R code compeltions.}
By default, only local completer is used where all aforementioned code pieces will be considered as candidates. Use \code{autoCompleteList} for static completions and \code{\link{aceAutocomplete}} for dynamic R code completions.}
\item{autoCompleteList}{A named list that contains static code completions candidates. This can be especially useful for Non-Standard Evaluation (NSE) functions such as those in \code{dplyr} and \code{ggvis}. Each element in list should be a character array whose words will be listed under the element key. For example, to suggests column names from \code{mtcars} and \code{airquality}, you can use \code{list(mtcars = colnames(mtcars), airquality = colnames(airquality))}.}
}
Expand Down
2 changes: 1 addition & 1 deletion man/getAceModes.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1.9000): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/get-ace-modes.R
\name{getAceModes}
\alias{getAceModes}
Expand Down
2 changes: 1 addition & 1 deletion man/getAceThemes.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1.9000): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/get-ace-themes.R
\name{getAceThemes}
\alias{getAceThemes}
Expand Down
2 changes: 1 addition & 1 deletion man/jsQuote.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1.9000): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/js-quote.R
\name{jsQuote}
\alias{jsQuote}
Expand Down
4 changes: 3 additions & 1 deletion man/updateAceEditor.Rd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
% Generated by roxygen2 (4.1.1.9000): do not edit by hand
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/update-ace-editor.R
\name{updateAceEditor}
\alias{updateAceEditor}
Expand Down Expand Up @@ -33,6 +33,8 @@ Should be an integer.}
\item{wordWrap}{If set to \code{TRUE}, Ace will enable word wrapping.
Default value is \code{FALSE}.}
\item{border}{Set the \code{border} 'normal', 'alert', or 'flash'.}
\item{autoComplete}{Enable/Disable code completion. See \code{\link{aceEditor}} for details.}
\item{autoCompleteList}{If set to \code{NULL}, exisitng static completions list will be unset. See \code{\link{aceEditor}} for details.}
Expand Down

0 comments on commit 368322a

Please sign in to comment.