Browse Source

fixed compile_command cp to source folder

master
oyvang 11 years ago
parent
commit
18ff966814
  1. 5
      juci/config.json
  2. 19
      juci/plugins/snippet.py
  3. 4
      juci/window.cc

5
juci/config.json

@ -72,8 +72,9 @@
"compile_commands": [
"rm -rf ./.build",
"mkdir ./.build",
"cmake -B./.build -H.",
"cd ./.build/; make"
"cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B./.build -H.",
"cd ./.build/; make",
"cp ./.build/compile_commands.json compile_commands.json"
]
},
"example": {

19
juci/plugins/snippet.py

@ -12,28 +12,29 @@ def initPlugin():
snippets = {}
snippets["for"] = """\
for(#int i=0; #i<#v.size(); #i++) {
std::cout << v[i] << std::endl;
for(int i=0; i<v.size(); i++) {
// std::cout << v[i] << std::endl;
// Write code here
}
"""
snippets["if"] = """\
if(#) {
#
if(true) {
// Write code here
}
"""
snippets["ifelse"] = """\
if(#) {
#
if(false) {
// Write code here
} else {
#
// Write code here
}
"""
snippets["while"] = """\
while(#) {
#
while(condition) {
// Write code here
}
"""

4
juci/window.cc

@ -76,9 +76,9 @@ Window::Window() :
std::string executable = notebook_.directories().
GetCmakeVarValue(path,"add_executable");
terminal_.Run(executable);
running.unlock();
});
execute.detach();
running.unlock();
}
});
@ -99,9 +99,9 @@ Window::Window() :
terminal_.SetFolderCommand(path);
}
terminal_.Compile();
running.unlock();
});
execute.detach();
running.unlock();
}
});
this->signal_button_release_event().

Loading…
Cancel
Save