Commit 8e1ec62d authored by ThorbenQuast's avatar ThorbenQuast
Browse files

editor: allow .R files, rephrase overwrite alert

parent 7f3c77bb
......@@ -9,7 +9,8 @@ var CommandLine = Emitter.extend({
"php %file": ["php"],
"pdflatex %file": ["tex"],
"gcc %file -o %file.out && ./%file.out": ["c"],
"g++ %file -o %file.out && ./%file.out": ["cc", "cp", "cxx", "cpp", "CPP", "c++", "C"]
"g++ %file -o %file.out && ./%file.out": ["cc", "cp", "cxx", "cpp", "CPP", "c++", "C"],
"R -f %file": ["R"]
};
this.commandline = null;
......
......@@ -303,7 +303,7 @@ var CodeEditor = Emitter.extend({
};
if (selectedType == "f") { //selected element is an existing file
var msg = "<html> File exists already! <br />" +
var msg = "<html> File already exists. <br />" +
"Do you want to overwrite it ? </html>";
self.view.confirm(msg, function(confirmed) {
if (confirmed)
......
......@@ -29,7 +29,7 @@ var CodeEditorExtension = vispa.Extension.extend({
// register to listen to certain file extensions
this.fileExtensions = ["bsc", "c", "cc", "conf", "cpp", "csh", "css", "diff", "f", "f70",
"f90", "f95", "f03", "h", "hh", "hpp", "html", "ini", "java", "js", "less", "log", "json",
"md", "orig", "php", "py", "rb", "sh", "tex", "txt", "xml", "yml", "yaml", "zsh"
"md", "orig", "php", "py", "R", "rb", "sh", "tex", "txt", "xml", "yml", "yaml", "zsh"
];
$.each(this.fileExtensions, function(i, key) {
self.addFileHandler(key, function(workspaceId, path) {
......@@ -42,8 +42,9 @@ var CodeEditorExtension = vispa.Extension.extend({
var CodeEditorView = vispa.ExtensionView.Center.extend({
init: function(preferences, shortcuts, path, writable, showOutput) {
//writable: force the editor to turn on/off read-only mode (writable -> read-only off)
//if file not writable but writable === true --> appropriate message when trying to save shows up
//writable: force the editor to turn on/off read-only mode (writable = true -> read-only off)
//if no write permission but writable == true
//--> appropriate message when trying to save shows up
//showOutput: if set to false --> complete right side is hidden at first
//(loaded but not shown because css properties are simply set to appropriate values)
if (writable === undefined)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment