repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
StackHistory.refresh
def refresh(self): """Remove editors that are not longer open.""" self._update_id_list() for _id in self.history[:]: if _id not in self.id_list: self.history.remove(_id)
python
def refresh(self): """Remove editors that are not longer open.""" self._update_id_list() for _id in self.history[:]: if _id not in self.id_list: self.history.remove(_id)
[ "def", "refresh", "(", "self", ")", ":", "self", ".", "_update_id_list", "(", ")", "for", "_id", "in", "self", ".", "history", "[", ":", "]", ":", "if", "_id", "not", "in", "self", ".", "id_list", ":", "self", ".", "history", ".", "remove", "(", ...
Remove editors that are not longer open.
[ "Remove", "editors", "that", "are", "not", "longer", "open", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L254-L259
train
Refresh the list of all the items in the history.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
StackHistory.insert
def insert(self, i, tab_index): """Insert the widget (at tab index) in the position i (index).""" _id = id(self.editor.tabs.widget(tab_index)) self.history.insert(i, _id)
python
def insert(self, i, tab_index): """Insert the widget (at tab index) in the position i (index).""" _id = id(self.editor.tabs.widget(tab_index)) self.history.insert(i, _id)
[ "def", "insert", "(", "self", ",", "i", ",", "tab_index", ")", ":", "_id", "=", "id", "(", "self", ".", "editor", ".", "tabs", ".", "widget", "(", "tab_index", ")", ")", "self", ".", "history", ".", "insert", "(", "i", ",", "_id", ")" ]
Insert the widget (at tab index) in the position i (index).
[ "Insert", "the", "widget", "(", "at", "tab", "index", ")", "in", "the", "position", "i", "(", "index", ")", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L282-L285
train
Insert the widget at the given tab index in the position i.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
StackHistory.remove
def remove(self, tab_index): """Remove the widget at the corresponding tab_index.""" _id = id(self.editor.tabs.widget(tab_index)) if _id in self.history: self.history.remove(_id)
python
def remove(self, tab_index): """Remove the widget at the corresponding tab_index.""" _id = id(self.editor.tabs.widget(tab_index)) if _id in self.history: self.history.remove(_id)
[ "def", "remove", "(", "self", ",", "tab_index", ")", ":", "_id", "=", "id", "(", "self", ".", "editor", ".", "tabs", ".", "widget", "(", "tab_index", ")", ")", "if", "_id", "in", "self", ".", "history", ":", "self", ".", "history", ".", "remove", ...
Remove the widget at the corresponding tab_index.
[ "Remove", "the", "widget", "at", "the", "corresponding", "tab_index", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L287-L291
train
Removes the widget at the corresponding tab_index.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
StackHistory.remove_and_append
def remove_and_append(self, index): """Remove previous entrances of a tab, and add it as the latest.""" while index in self: self.remove(index) self.append(index)
python
def remove_and_append(self, index): """Remove previous entrances of a tab, and add it as the latest.""" while index in self: self.remove(index) self.append(index)
[ "def", "remove_and_append", "(", "self", ",", "index", ")", ":", "while", "index", "in", "self", ":", "self", ".", "remove", "(", "index", ")", "self", ".", "append", "(", "index", ")" ]
Remove previous entrances of a tab, and add it as the latest.
[ "Remove", "previous", "entrances", "of", "a", "tab", "and", "add", "it", "as", "the", "latest", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L293-L297
train
Remove previous entrances of a tab and add it as the latest.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
TabSwitcherWidget.load_data
def load_data(self): """Fill ListWidget with the tabs texts. Add elements in inverse order of stack_history. """ for index in reversed(self.stack_history): text = self.tabs.tabText(index) text = text.replace('&', '') item = QListWidgetItem(i...
python
def load_data(self): """Fill ListWidget with the tabs texts. Add elements in inverse order of stack_history. """ for index in reversed(self.stack_history): text = self.tabs.tabText(index) text = text.replace('&', '') item = QListWidgetItem(i...
[ "def", "load_data", "(", "self", ")", ":", "for", "index", "in", "reversed", "(", "self", ".", "stack_history", ")", ":", "text", "=", "self", ".", "tabs", ".", "tabText", "(", "index", ")", "text", "=", "text", ".", "replace", "(", "'&'", ",", "''...
Fill ListWidget with the tabs texts. Add elements in inverse order of stack_history.
[ "Fill", "ListWidget", "with", "the", "tabs", "texts", ".", "Add", "elements", "in", "inverse", "order", "of", "stack_history", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L326-L336
train
Fill ListWidget with the tabs texts.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
TabSwitcherWidget.item_selected
def item_selected(self, item=None): """Change to the selected document and hide this widget.""" if item is None: item = self.currentItem() # stack history is in inverse order try: index = self.stack_history[-(self.currentRow()+1)] except IndexErro...
python
def item_selected(self, item=None): """Change to the selected document and hide this widget.""" if item is None: item = self.currentItem() # stack history is in inverse order try: index = self.stack_history[-(self.currentRow()+1)] except IndexErro...
[ "def", "item_selected", "(", "self", ",", "item", "=", "None", ")", ":", "if", "item", "is", "None", ":", "item", "=", "self", ".", "currentItem", "(", ")", "# stack history is in inverse order\r", "try", ":", "index", "=", "self", ".", "stack_history", "[...
Change to the selected document and hide this widget.
[ "Change", "to", "the", "selected", "document", "and", "hide", "this", "widget", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L338-L351
train
Change to the selected document and hide this widget.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
TabSwitcherWidget.select_row
def select_row(self, steps): """Move selected row a number of steps. Iterates in a cyclic behaviour. """ row = (self.currentRow() + steps) % self.count() self.setCurrentRow(row)
python
def select_row(self, steps): """Move selected row a number of steps. Iterates in a cyclic behaviour. """ row = (self.currentRow() + steps) % self.count() self.setCurrentRow(row)
[ "def", "select_row", "(", "self", ",", "steps", ")", ":", "row", "=", "(", "self", ".", "currentRow", "(", ")", "+", "steps", ")", "%", "self", ".", "count", "(", ")", "self", ".", "setCurrentRow", "(", "row", ")" ]
Move selected row a number of steps. Iterates in a cyclic behaviour.
[ "Move", "selected", "row", "a", "number", "of", "steps", ".", "Iterates", "in", "a", "cyclic", "behaviour", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L353-L359
train
Move selected row a number of steps.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
TabSwitcherWidget.set_dialog_position
def set_dialog_position(self): """Positions the tab switcher in the top-center of the editor.""" left = self.editor.geometry().width()/2 - self.width()/2 top = self.editor.tabs.tabBar().geometry().height() self.move(self.editor.mapToGlobal(QPoint(left, top)))
python
def set_dialog_position(self): """Positions the tab switcher in the top-center of the editor.""" left = self.editor.geometry().width()/2 - self.width()/2 top = self.editor.tabs.tabBar().geometry().height() self.move(self.editor.mapToGlobal(QPoint(left, top)))
[ "def", "set_dialog_position", "(", "self", ")", ":", "left", "=", "self", ".", "editor", ".", "geometry", "(", ")", ".", "width", "(", ")", "/", "2", "-", "self", ".", "width", "(", ")", "/", "2", "top", "=", "self", ".", "editor", ".", "tabs", ...
Positions the tab switcher in the top-center of the editor.
[ "Positions", "the", "tab", "switcher", "in", "the", "top", "-", "center", "of", "the", "editor", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L361-L366
train
Positions the tab switcher in the top - center of the editor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
TabSwitcherWidget.keyReleaseEvent
def keyReleaseEvent(self, event): """Reimplement Qt method. Handle "most recent used" tab behavior, When ctrl is released and tab_switcher is visible, tab will be changed. """ if self.isVisible(): qsc = get_shortcut(context='Editor', name='Go to next file') ...
python
def keyReleaseEvent(self, event): """Reimplement Qt method. Handle "most recent used" tab behavior, When ctrl is released and tab_switcher is visible, tab will be changed. """ if self.isVisible(): qsc = get_shortcut(context='Editor', name='Go to next file') ...
[ "def", "keyReleaseEvent", "(", "self", ",", "event", ")", ":", "if", "self", ".", "isVisible", "(", ")", ":", "qsc", "=", "get_shortcut", "(", "context", "=", "'Editor'", ",", "name", "=", "'Go to next file'", ")", "for", "key", "in", "qsc", ".", "spli...
Reimplement Qt method. Handle "most recent used" tab behavior, When ctrl is released and tab_switcher is visible, tab will be changed.
[ "Reimplement", "Qt", "method", ".", "Handle", "most", "recent", "used", "tab", "behavior", "When", "ctrl", "is", "released", "and", "tab_switcher", "is", "visible", "tab", "will", "be", "changed", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L368-L382
train
Reimplement Qt method.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
TabSwitcherWidget.keyPressEvent
def keyPressEvent(self, event): """Reimplement Qt method to allow cyclic behavior.""" if event.key() == Qt.Key_Down: self.select_row(1) elif event.key() == Qt.Key_Up: self.select_row(-1)
python
def keyPressEvent(self, event): """Reimplement Qt method to allow cyclic behavior.""" if event.key() == Qt.Key_Down: self.select_row(1) elif event.key() == Qt.Key_Up: self.select_row(-1)
[ "def", "keyPressEvent", "(", "self", ",", "event", ")", ":", "if", "event", ".", "key", "(", ")", "==", "Qt", ".", "Key_Down", ":", "self", ".", "select_row", "(", "1", ")", "elif", "event", ".", "key", "(", ")", "==", "Qt", ".", "Key_Up", ":", ...
Reimplement Qt method to allow cyclic behavior.
[ "Reimplement", "Qt", "method", "to", "allow", "cyclic", "behavior", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L384-L389
train
Reimplement Qt method to allow cyclic behavior.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
TabSwitcherWidget.focusOutEvent
def focusOutEvent(self, event): """Reimplement Qt method to close the widget when loosing focus.""" event.ignore() # Inspired from CompletionWidget.focusOutEvent() in file # widgets/sourcecode/base.py line 212 if sys.platform == "darwin": if event.reason() != Qt...
python
def focusOutEvent(self, event): """Reimplement Qt method to close the widget when loosing focus.""" event.ignore() # Inspired from CompletionWidget.focusOutEvent() in file # widgets/sourcecode/base.py line 212 if sys.platform == "darwin": if event.reason() != Qt...
[ "def", "focusOutEvent", "(", "self", ",", "event", ")", ":", "event", ".", "ignore", "(", ")", "# Inspired from CompletionWidget.focusOutEvent() in file\r", "# widgets/sourcecode/base.py line 212\r", "if", "sys", ".", "platform", "==", "\"darwin\"", ":", "if", "event", ...
Reimplement Qt method to close the widget when loosing focus.
[ "Reimplement", "Qt", "method", "to", "close", "the", "widget", "when", "loosing", "focus", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L391-L400
train
Reimplement Qt method to close the widget when loosing focus.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.create_shortcuts
def create_shortcuts(self): """Create local shortcuts""" # --- Configurable shortcuts inspect = config_shortcut(self.inspect_current_object, context='Editor', name='Inspect current object', parent=self) set_breakpoint = config_shortcut(self.set_or_c...
python
def create_shortcuts(self): """Create local shortcuts""" # --- Configurable shortcuts inspect = config_shortcut(self.inspect_current_object, context='Editor', name='Inspect current object', parent=self) set_breakpoint = config_shortcut(self.set_or_c...
[ "def", "create_shortcuts", "(", "self", ")", ":", "# --- Configurable shortcuts\r", "inspect", "=", "config_shortcut", "(", "self", ".", "inspect_current_object", ",", "context", "=", "'Editor'", ",", "name", "=", "'Inspect current object'", ",", "parent", "=", "sel...
Create local shortcuts
[ "Create", "local", "shortcuts" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L597-L726
train
Create local shortcuts and shortcuts for the current object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.setup_editorstack
def setup_editorstack(self, parent, layout): """Setup editorstack's layout""" layout.setSpacing(1) self.fname_label = QLabel() self.fname_label.setStyleSheet( "QLabel {margin: 0px; padding: 3px;}") layout.addWidget(self.fname_label) menu_btn = creat...
python
def setup_editorstack(self, parent, layout): """Setup editorstack's layout""" layout.setSpacing(1) self.fname_label = QLabel() self.fname_label.setStyleSheet( "QLabel {margin: 0px; padding: 3px;}") layout.addWidget(self.fname_label) menu_btn = creat...
[ "def", "setup_editorstack", "(", "self", ",", "parent", ",", "layout", ")", ":", "layout", ".", "setSpacing", "(", "1", ")", "self", ".", "fname_label", "=", "QLabel", "(", ")", "self", ".", "fname_label", ".", "setStyleSheet", "(", "\"QLabel {margin: 0px; p...
Setup editorstack's layout
[ "Setup", "editorstack", "s", "layout" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L737-L787
train
Setup editorstack s layout
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.update_fname_label
def update_fname_label(self): """Upadte file name label.""" filename = to_text_string(self.get_current_filename()) if len(filename) > 100: shorten_filename = u'...' + filename[-100:] else: shorten_filename = filename self.fname_label.setText(shorten...
python
def update_fname_label(self): """Upadte file name label.""" filename = to_text_string(self.get_current_filename()) if len(filename) > 100: shorten_filename = u'...' + filename[-100:] else: shorten_filename = filename self.fname_label.setText(shorten...
[ "def", "update_fname_label", "(", "self", ")", ":", "filename", "=", "to_text_string", "(", "self", ".", "get_current_filename", "(", ")", ")", "if", "len", "(", "filename", ")", ">", "100", ":", "shorten_filename", "=", "u'...'", "+", "filename", "[", "-"...
Upadte file name label.
[ "Upadte", "file", "name", "label", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L790-L797
train
Update the fname label.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.closeEvent
def closeEvent(self, event): """Overrides QWidget closeEvent().""" self.threadmanager.close_all_threads() self.analysis_timer.timeout.disconnect(self.analyze_script) # Remove editor references from the outline explorer settings if self.outlineexplorer is not None: ...
python
def closeEvent(self, event): """Overrides QWidget closeEvent().""" self.threadmanager.close_all_threads() self.analysis_timer.timeout.disconnect(self.analyze_script) # Remove editor references from the outline explorer settings if self.outlineexplorer is not None: ...
[ "def", "closeEvent", "(", "self", ",", "event", ")", ":", "self", ".", "threadmanager", ".", "close_all_threads", "(", ")", "self", ".", "analysis_timer", ".", "timeout", ".", "disconnect", "(", "self", ".", "analyze_script", ")", "# Remove editor references fro...
Overrides QWidget closeEvent().
[ "Overrides", "QWidget", "closeEvent", "()", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L808-L818
train
Overrides QWidget. closeEvent to disconnect threads and threads from the threadmanager and the analysis timer.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.clone_from
def clone_from(self, other): """Clone EditorStack from other instance""" for other_finfo in other.data: self.clone_editor_from(other_finfo, set_current=True) self.set_stack_index(other.get_stack_index())
python
def clone_from(self, other): """Clone EditorStack from other instance""" for other_finfo in other.data: self.clone_editor_from(other_finfo, set_current=True) self.set_stack_index(other.get_stack_index())
[ "def", "clone_from", "(", "self", ",", "other", ")", ":", "for", "other_finfo", "in", "other", ".", "data", ":", "self", ".", "clone_editor_from", "(", "other_finfo", ",", "set_current", "=", "True", ")", "self", ".", "set_stack_index", "(", "other", ".", ...
Clone EditorStack from other instance
[ "Clone", "EditorStack", "from", "other", "instance" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L830-L834
train
Clone EditorStack from other instance
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.open_fileswitcher_dlg
def open_fileswitcher_dlg(self): """Open file list management dialog box""" if not self.tabs.count(): return if self.fileswitcher_dlg is not None and \ self.fileswitcher_dlg.is_visible: self.fileswitcher_dlg.hide() self.fileswitcher_dlg.is_vis...
python
def open_fileswitcher_dlg(self): """Open file list management dialog box""" if not self.tabs.count(): return if self.fileswitcher_dlg is not None and \ self.fileswitcher_dlg.is_visible: self.fileswitcher_dlg.hide() self.fileswitcher_dlg.is_vis...
[ "def", "open_fileswitcher_dlg", "(", "self", ")", ":", "if", "not", "self", ".", "tabs", ".", "count", "(", ")", ":", "return", "if", "self", ".", "fileswitcher_dlg", "is", "not", "None", "and", "self", ".", "fileswitcher_dlg", ".", "is_visible", ":", "s...
Open file list management dialog box
[ "Open", "file", "list", "management", "dialog", "box" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L837-L850
train
Open file list management dialog box
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.go_to_line
def go_to_line(self, line=None): """Go to line dialog""" if line is not None: # When this method is called from the flileswitcher, a line # number is specified, so there is no need for the dialog. self.get_current_editor().go_to_line(line) else: ...
python
def go_to_line(self, line=None): """Go to line dialog""" if line is not None: # When this method is called from the flileswitcher, a line # number is specified, so there is no need for the dialog. self.get_current_editor().go_to_line(line) else: ...
[ "def", "go_to_line", "(", "self", ",", "line", "=", "None", ")", ":", "if", "line", "is", "not", "None", ":", "# When this method is called from the flileswitcher, a line\r", "# number is specified, so there is no need for the dialog.\r", "self", ".", "get_current_editor", ...
Go to line dialog
[ "Go", "to", "line", "dialog" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L861-L869
train
Go to line dialog
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.set_or_clear_breakpoint
def set_or_clear_breakpoint(self): """Set/clear breakpoint""" if self.data: editor = self.get_current_editor() editor.debugger.toogle_breakpoint()
python
def set_or_clear_breakpoint(self): """Set/clear breakpoint""" if self.data: editor = self.get_current_editor() editor.debugger.toogle_breakpoint()
[ "def", "set_or_clear_breakpoint", "(", "self", ")", ":", "if", "self", ".", "data", ":", "editor", "=", "self", ".", "get_current_editor", "(", ")", "editor", ".", "debugger", ".", "toogle_breakpoint", "(", ")" ]
Set/clear breakpoint
[ "Set", "/", "clear", "breakpoint" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L871-L875
train
Set or clear breakpoint
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.set_or_edit_conditional_breakpoint
def set_or_edit_conditional_breakpoint(self): """Set conditional breakpoint""" if self.data: editor = self.get_current_editor() editor.debugger.toogle_breakpoint(edit_condition=True)
python
def set_or_edit_conditional_breakpoint(self): """Set conditional breakpoint""" if self.data: editor = self.get_current_editor() editor.debugger.toogle_breakpoint(edit_condition=True)
[ "def", "set_or_edit_conditional_breakpoint", "(", "self", ")", ":", "if", "self", ".", "data", ":", "editor", "=", "self", ".", "get_current_editor", "(", ")", "editor", ".", "debugger", ".", "toogle_breakpoint", "(", "edit_condition", "=", "True", ")" ]
Set conditional breakpoint
[ "Set", "conditional", "breakpoint" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L877-L881
train
Set conditional breakpoint
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.set_bookmark
def set_bookmark(self, slot_num): """Bookmark current position to given slot.""" if self.data: editor = self.get_current_editor() editor.add_bookmark(slot_num)
python
def set_bookmark(self, slot_num): """Bookmark current position to given slot.""" if self.data: editor = self.get_current_editor() editor.add_bookmark(slot_num)
[ "def", "set_bookmark", "(", "self", ",", "slot_num", ")", ":", "if", "self", ".", "data", ":", "editor", "=", "self", ".", "get_current_editor", "(", ")", "editor", ".", "add_bookmark", "(", "slot_num", ")" ]
Bookmark current position to given slot.
[ "Bookmark", "current", "position", "to", "given", "slot", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L883-L887
train
Set the bookmark current position to given slot.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.inspect_current_object
def inspect_current_object(self): """Inspect current object in the Help plugin""" editor = self.get_current_editor() editor.sig_display_signature.connect(self.display_signature_help) line, col = editor.get_cursor_line_column() editor.request_hover(line, col)
python
def inspect_current_object(self): """Inspect current object in the Help plugin""" editor = self.get_current_editor() editor.sig_display_signature.connect(self.display_signature_help) line, col = editor.get_cursor_line_column() editor.request_hover(line, col)
[ "def", "inspect_current_object", "(", "self", ")", ":", "editor", "=", "self", ".", "get_current_editor", "(", ")", "editor", ".", "sig_display_signature", ".", "connect", "(", "self", ".", "display_signature_help", ")", "line", ",", "col", "=", "editor", ".",...
Inspect current object in the Help plugin
[ "Inspect", "current", "object", "in", "the", "Help", "plugin" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L889-L894
train
Inspect current object in the Help plugin
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.initialize_outlineexplorer
def initialize_outlineexplorer(self): """This method is called separately from 'set_oulineexplorer' to avoid doing unnecessary updates when there are multiple editor windows""" for index in range(self.get_stack_count()): if index != self.get_stack_index(): self._...
python
def initialize_outlineexplorer(self): """This method is called separately from 'set_oulineexplorer' to avoid doing unnecessary updates when there are multiple editor windows""" for index in range(self.get_stack_count()): if index != self.get_stack_index(): self._...
[ "def", "initialize_outlineexplorer", "(", "self", ")", ":", "for", "index", "in", "range", "(", "self", ".", "get_stack_count", "(", ")", ")", ":", "if", "index", "!=", "self", ".", "get_stack_index", "(", ")", ":", "self", ".", "_refresh_outlineexplorer", ...
This method is called separately from 'set_oulineexplorer' to avoid doing unnecessary updates when there are multiple editor windows
[ "This", "method", "is", "called", "separately", "from", "set_oulineexplorer", "to", "avoid", "doing", "unnecessary", "updates", "when", "there", "are", "multiple", "editor", "windows" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L923-L928
train
This method is called by the parent class to initialize the outline explorer.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.get_tab_text
def get_tab_text(self, index, is_modified=None, is_readonly=None): """Return tab title.""" files_path_list = [finfo.filename for finfo in self.data] fname = self.data[index].filename fname = sourcecode.disambiguate_fname(files_path_list, fname) return self.__modified_readonl...
python
def get_tab_text(self, index, is_modified=None, is_readonly=None): """Return tab title.""" files_path_list = [finfo.filename for finfo in self.data] fname = self.data[index].filename fname = sourcecode.disambiguate_fname(files_path_list, fname) return self.__modified_readonl...
[ "def", "get_tab_text", "(", "self", ",", "index", ",", "is_modified", "=", "None", ",", "is_readonly", "=", "None", ")", ":", "files_path_list", "=", "[", "finfo", ".", "filename", "for", "finfo", "in", "self", ".", "data", "]", "fname", "=", "self", "...
Return tab title.
[ "Return", "tab", "title", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1183-L1189
train
Return tab title.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.get_tab_tip
def get_tab_tip(self, filename, is_modified=None, is_readonly=None): """Return tab menu title""" text = u"%s — %s" text = self.__modified_readonly_title(text, is_modified, is_readonly) if self.tempfile_path is not None\ and f...
python
def get_tab_tip(self, filename, is_modified=None, is_readonly=None): """Return tab menu title""" text = u"%s — %s" text = self.__modified_readonly_title(text, is_modified, is_readonly) if self.tempfile_path is not None\ and f...
[ "def", "get_tab_tip", "(", "self", ",", "filename", ",", "is_modified", "=", "None", ",", "is_readonly", "=", "None", ")", ":", "text", "=", "u\"%s — %s\"\r", "text", "=", "self", ".", "__modified_readonly_title", "(", "text", ",", "is_modified", ",", "is_re...
Return tab menu title
[ "Return", "tab", "menu", "title" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1191-L1201
train
Return tab menu title
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.__setup_menu
def __setup_menu(self): """Setup tab context menu before showing it""" self.menu.clear() if self.data: actions = self.menu_actions else: actions = (self.new_action, self.open_action) self.setFocus() # --> Editor.__get_focus_editortabwidget ...
python
def __setup_menu(self): """Setup tab context menu before showing it""" self.menu.clear() if self.data: actions = self.menu_actions else: actions = (self.new_action, self.open_action) self.setFocus() # --> Editor.__get_focus_editortabwidget ...
[ "def", "__setup_menu", "(", "self", ")", ":", "self", ".", "menu", ".", "clear", "(", ")", "if", "self", ".", "data", ":", "actions", "=", "self", ".", "menu_actions", "else", ":", "actions", "=", "(", "self", ".", "new_action", ",", "self", ".", "...
Setup tab context menu before showing it
[ "Setup", "tab", "context", "menu", "before", "showing", "it" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1272-L1281
train
Setup tab context menu before showing it
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.has_filename
def has_filename(self, filename): """Return the self.data index position for the filename. Args: filename: Name of the file to search for in self.data. Returns: The self.data index for the filename. Returns None if the filename is not found in self....
python
def has_filename(self, filename): """Return the self.data index position for the filename. Args: filename: Name of the file to search for in self.data. Returns: The self.data index for the filename. Returns None if the filename is not found in self....
[ "def", "has_filename", "(", "self", ",", "filename", ")", ":", "fixpath", "=", "lambda", "path", ":", "osp", ".", "normcase", "(", "osp", ".", "realpath", "(", "path", ")", ")", "for", "index", ",", "finfo", "in", "enumerate", "(", "self", ".", "data...
Return the self.data index position for the filename. Args: filename: Name of the file to search for in self.data. Returns: The self.data index for the filename. Returns None if the filename is not found in self.data.
[ "Return", "the", "self", ".", "data", "index", "position", "for", "the", "filename", ".", "Args", ":", "filename", ":", "Name", "of", "the", "file", "to", "search", "for", "in", "self", ".", "data", ".", "Returns", ":", "The", "self", ".", "data", "i...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1364-L1378
train
Returns the index of the first file in the list that contains the filename. Returns None if the filename is not found in the list.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.set_current_filename
def set_current_filename(self, filename, focus=True): """Set current filename and return the associated editor instance.""" index = self.has_filename(filename) if index is not None: if focus: self.set_stack_index(index) editor = self.data[index].edit...
python
def set_current_filename(self, filename, focus=True): """Set current filename and return the associated editor instance.""" index = self.has_filename(filename) if index is not None: if focus: self.set_stack_index(index) editor = self.data[index].edit...
[ "def", "set_current_filename", "(", "self", ",", "filename", ",", "focus", "=", "True", ")", ":", "index", "=", "self", ".", "has_filename", "(", "filename", ")", "if", "index", "is", "not", "None", ":", "if", "focus", ":", "self", ".", "set_stack_index"...
Set current filename and return the associated editor instance.
[ "Set", "current", "filename", "and", "return", "the", "associated", "editor", "instance", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1380-L1392
train
Set current filename and return the associated editor instance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.is_file_opened
def is_file_opened(self, filename=None): """Return if filename is in the editor stack. Args: filename: Name of the file to search for. If filename is None, then checks if any file is open. Returns: True: If filename is None and a file is open. ...
python
def is_file_opened(self, filename=None): """Return if filename is in the editor stack. Args: filename: Name of the file to search for. If filename is None, then checks if any file is open. Returns: True: If filename is None and a file is open. ...
[ "def", "is_file_opened", "(", "self", ",", "filename", "=", "None", ")", ":", "if", "filename", "is", "None", ":", "# Is there any file opened?\r", "return", "len", "(", "self", ".", "data", ")", ">", "0", "else", ":", "return", "self", ".", "has_filename"...
Return if filename is in the editor stack. Args: filename: Name of the file to search for. If filename is None, then checks if any file is open. Returns: True: If filename is None and a file is open. False: If filename is None and no files a...
[ "Return", "if", "filename", "is", "in", "the", "editor", "stack", ".", "Args", ":", "filename", ":", "Name", "of", "the", "file", "to", "search", "for", ".", "If", "filename", "is", "None", "then", "checks", "if", "any", "file", "is", "open", ".", "R...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1394-L1411
train
Returns if a file is opened in the editor stack.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.get_index_from_filename
def get_index_from_filename(self, filename): """ Return the position index of a file in the tab bar of the editorstack from its name. """ filenames = [d.filename for d in self.data] return filenames.index(filename)
python
def get_index_from_filename(self, filename): """ Return the position index of a file in the tab bar of the editorstack from its name. """ filenames = [d.filename for d in self.data] return filenames.index(filename)
[ "def", "get_index_from_filename", "(", "self", ",", "filename", ")", ":", "filenames", "=", "[", "d", ".", "filename", "for", "d", "in", "self", ".", "data", "]", "return", "filenames", ".", "index", "(", "filename", ")" ]
Return the position index of a file in the tab bar of the editorstack from its name.
[ "Return", "the", "position", "index", "of", "a", "file", "in", "the", "tab", "bar", "of", "the", "editorstack", "from", "its", "name", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1413-L1419
train
Returns the position index of a file in the tab bar of the editorstack of the editorstack of its name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.move_editorstack_data
def move_editorstack_data(self, start, end): """Reorder editorstack.data so it is synchronized with the tab bar when tabs are moved.""" if start < 0 or end < 0: return else: steps = abs(end - start) direction = (end-start) // steps # +1 for rig...
python
def move_editorstack_data(self, start, end): """Reorder editorstack.data so it is synchronized with the tab bar when tabs are moved.""" if start < 0 or end < 0: return else: steps = abs(end - start) direction = (end-start) // steps # +1 for rig...
[ "def", "move_editorstack_data", "(", "self", ",", "start", ",", "end", ")", ":", "if", "start", "<", "0", "or", "end", "<", "0", ":", "return", "else", ":", "steps", "=", "abs", "(", "end", "-", "start", ")", "direction", "=", "(", "end", "-", "s...
Reorder editorstack.data so it is synchronized with the tab bar when tabs are moved.
[ "Reorder", "editorstack", ".", "data", "so", "it", "is", "synchronized", "with", "the", "tab", "bar", "when", "tabs", "are", "moved", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1422-L1438
train
Reorder editorstack. data so that the tab bar when tabs are moved.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.close_file
def close_file(self, index=None, force=False): """Close file (index=None -> close current file) Keep current file index unchanged (if current file that is being closed)""" current_index = self.get_stack_index() count = self.get_stack_count() if index is None: ...
python
def close_file(self, index=None, force=False): """Close file (index=None -> close current file) Keep current file index unchanged (if current file that is being closed)""" current_index = self.get_stack_index() count = self.get_stack_count() if index is None: ...
[ "def", "close_file", "(", "self", ",", "index", "=", "None", ",", "force", "=", "False", ")", ":", "current_index", "=", "self", ".", "get_stack_index", "(", ")", "count", "=", "self", ".", "get_stack_count", "(", ")", "if", "index", "is", "None", ":",...
Close file (index=None -> close current file) Keep current file index unchanged (if current file that is being closed)
[ "Close", "file", "(", "index", "=", "None", "-", ">", "close", "current", "file", ")", "Keep", "current", "file", "index", "unchanged", "(", "if", "current", "file", "that", "is", "being", "closed", ")" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1442-L1502
train
Close file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.poll_open_file_languages
def poll_open_file_languages(self): """Get list of current opened files' languages""" languages = [] for index in range(self.get_stack_count()): languages.append( self.tabs.widget(index).language.lower()) return set(languages)
python
def poll_open_file_languages(self): """Get list of current opened files' languages""" languages = [] for index in range(self.get_stack_count()): languages.append( self.tabs.widget(index).language.lower()) return set(languages)
[ "def", "poll_open_file_languages", "(", "self", ")", ":", "languages", "=", "[", "]", "for", "index", "in", "range", "(", "self", ".", "get_stack_count", "(", ")", ")", ":", "languages", ".", "append", "(", "self", ".", "tabs", ".", "widget", "(", "ind...
Get list of current opened files' languages
[ "Get", "list", "of", "current", "opened", "files", "languages" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1504-L1510
train
Get list of current opened files languages
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.notify_server_ready
def notify_server_ready(self, language, config): """Notify language server availability to code editors.""" for index in range(self.get_stack_count()): editor = self.tabs.widget(index) if editor.language.lower() == language: editor.start_lsp_services(config)
python
def notify_server_ready(self, language, config): """Notify language server availability to code editors.""" for index in range(self.get_stack_count()): editor = self.tabs.widget(index) if editor.language.lower() == language: editor.start_lsp_services(config)
[ "def", "notify_server_ready", "(", "self", ",", "language", ",", "config", ")", ":", "for", "index", "in", "range", "(", "self", ".", "get_stack_count", "(", ")", ")", ":", "editor", "=", "self", ".", "tabs", ".", "widget", "(", "index", ")", "if", "...
Notify language server availability to code editors.
[ "Notify", "language", "server", "availability", "to", "code", "editors", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1512-L1517
train
Notify language server availability to code editors.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.close_all_right
def close_all_right(self): """ Close all files opened to the right """ num = self.get_stack_index() n = self.get_stack_count() for i in range(num, n-1): self.close_file(num+1)
python
def close_all_right(self): """ Close all files opened to the right """ num = self.get_stack_index() n = self.get_stack_count() for i in range(num, n-1): self.close_file(num+1)
[ "def", "close_all_right", "(", "self", ")", ":", "num", "=", "self", ".", "get_stack_index", "(", ")", "n", "=", "self", ".", "get_stack_count", "(", ")", "for", "i", "in", "range", "(", "num", ",", "n", "-", "1", ")", ":", "self", ".", "close_file...
Close all files opened to the right
[ "Close", "all", "files", "opened", "to", "the", "right" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1524-L1529
train
Close all files opened to the right
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.close_all_but_this
def close_all_but_this(self): """Close all files but the current one""" self.close_all_right() for i in range(0, self.get_stack_count()-1 ): self.close_file(0)
python
def close_all_but_this(self): """Close all files but the current one""" self.close_all_right() for i in range(0, self.get_stack_count()-1 ): self.close_file(0)
[ "def", "close_all_but_this", "(", "self", ")", ":", "self", ".", "close_all_right", "(", ")", "for", "i", "in", "range", "(", "0", ",", "self", ".", "get_stack_count", "(", ")", "-", "1", ")", ":", "self", ".", "close_file", "(", "0", ")" ]
Close all files but the current one
[ "Close", "all", "files", "but", "the", "current", "one" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1531-L1535
train
Close all files but the current one
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.sort_file_tabs_alphabetically
def sort_file_tabs_alphabetically(self): """Sort open tabs alphabetically.""" while self.sorted() is False: for i in range(0, self.tabs.tabBar().count()): if(self.tabs.tabBar().tabText(i) > self.tabs.tabBar().tabText(i + 1)): ...
python
def sort_file_tabs_alphabetically(self): """Sort open tabs alphabetically.""" while self.sorted() is False: for i in range(0, self.tabs.tabBar().count()): if(self.tabs.tabBar().tabText(i) > self.tabs.tabBar().tabText(i + 1)): ...
[ "def", "sort_file_tabs_alphabetically", "(", "self", ")", ":", "while", "self", ".", "sorted", "(", ")", "is", "False", ":", "for", "i", "in", "range", "(", "0", ",", "self", ".", "tabs", ".", "tabBar", "(", ")", ".", "count", "(", ")", ")", ":", ...
Sort open tabs alphabetically.
[ "Sort", "open", "tabs", "alphabetically", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1537-L1543
train
Sort open tabs alphabetically.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.sorted
def sorted(self): """Utility function for sort_file_tabs_alphabetically().""" for i in range(0, self.tabs.tabBar().count() - 1): if (self.tabs.tabBar().tabText(i) > self.tabs.tabBar().tabText(i + 1)): return False return True
python
def sorted(self): """Utility function for sort_file_tabs_alphabetically().""" for i in range(0, self.tabs.tabBar().count() - 1): if (self.tabs.tabBar().tabText(i) > self.tabs.tabBar().tabText(i + 1)): return False return True
[ "def", "sorted", "(", "self", ")", ":", "for", "i", "in", "range", "(", "0", ",", "self", ".", "tabs", ".", "tabBar", "(", ")", ".", "count", "(", ")", "-", "1", ")", ":", "if", "(", "self", ".", "tabs", ".", "tabBar", "(", ")", ".", "tabTe...
Utility function for sort_file_tabs_alphabetically().
[ "Utility", "function", "for", "sort_file_tabs_alphabetically", "()", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1545-L1551
train
Utility function for sort_file_tabs_alphabetically (). Returns True if the file is sorted False otherwise.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.add_last_closed_file
def add_last_closed_file(self, fname): """Add to last closed file list.""" if fname in self.last_closed_files: self.last_closed_files.remove(fname) self.last_closed_files.insert(0, fname) if len(self.last_closed_files) > 10: self.last_closed_files.pop(-1)
python
def add_last_closed_file(self, fname): """Add to last closed file list.""" if fname in self.last_closed_files: self.last_closed_files.remove(fname) self.last_closed_files.insert(0, fname) if len(self.last_closed_files) > 10: self.last_closed_files.pop(-1)
[ "def", "add_last_closed_file", "(", "self", ",", "fname", ")", ":", "if", "fname", "in", "self", ".", "last_closed_files", ":", "self", ".", "last_closed_files", ".", "remove", "(", "fname", ")", "self", ".", "last_closed_files", ".", "insert", "(", "0", "...
Add to last closed file list.
[ "Add", "to", "last", "closed", "file", "list", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1553-L1559
train
Add a new entry to the last closed file list.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.save_if_changed
def save_if_changed(self, cancelable=False, index=None): """Ask user to save file if modified. Args: cancelable: Show Cancel button. index: File to check for modification. Returns: False when save() fails or is cancelled. True when save(...
python
def save_if_changed(self, cancelable=False, index=None): """Ask user to save file if modified. Args: cancelable: Show Cancel button. index: File to check for modification. Returns: False when save() fails or is cancelled. True when save(...
[ "def", "save_if_changed", "(", "self", ",", "cancelable", "=", "False", ",", "index", "=", "None", ")", ":", "if", "index", "is", "None", ":", "indexes", "=", "list", "(", "range", "(", "self", ".", "get_stack_count", "(", ")", ")", ")", "else", ":",...
Ask user to save file if modified. Args: cancelable: Show Cancel button. index: File to check for modification. Returns: False when save() fails or is cancelled. True when save() is successful, there are no modifications, or user...
[ "Ask", "user", "to", "save", "file", "if", "modified", ".", "Args", ":", "cancelable", ":", "Show", "Cancel", "button", ".", "index", ":", "File", "to", "check", "for", "modification", ".", "Returns", ":", "False", "when", "save", "()", "fails", "or", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1568-L1637
train
Ask user to save file if modified.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack._write_to_file
def _write_to_file(self, fileinfo, filename): """Low-level function for writing text of editor to file. Args: fileinfo: FileInfo object associated to editor to be saved filename: str with filename to save to This is a low-level function that only saves the text t...
python
def _write_to_file(self, fileinfo, filename): """Low-level function for writing text of editor to file. Args: fileinfo: FileInfo object associated to editor to be saved filename: str with filename to save to This is a low-level function that only saves the text t...
[ "def", "_write_to_file", "(", "self", ",", "fileinfo", ",", "filename", ")", ":", "txt", "=", "to_text_string", "(", "fileinfo", ".", "editor", ".", "get_text_with_eol", "(", ")", ")", "fileinfo", ".", "encoding", "=", "encoding", ".", "write", "(", "txt",...
Low-level function for writing text of editor to file. Args: fileinfo: FileInfo object associated to editor to be saved filename: str with filename to save to This is a low-level function that only saves the text to file in the correct encoding without doing any ...
[ "Low", "-", "level", "function", "for", "writing", "text", "of", "editor", "to", "file", ".", "Args", ":", "fileinfo", ":", "FileInfo", "object", "associated", "to", "editor", "to", "be", "saved", "filename", ":", "str", "with", "filename", "to", "save", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1639-L1650
train
Write the text of the file to the specified file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.save
def save(self, index=None, force=False): """Write text of editor to a file. Args: index: self.data index to save. If None, defaults to currentIndex(). force: Force save regardless of file state. Returns: True upon successful save or...
python
def save(self, index=None, force=False): """Write text of editor to a file. Args: index: self.data index to save. If None, defaults to currentIndex(). force: Force save regardless of file state. Returns: True upon successful save or...
[ "def", "save", "(", "self", ",", "index", "=", "None", ",", "force", "=", "False", ")", ":", "if", "index", "is", "None", ":", "# Save the currently edited file\r", "if", "not", "self", ".", "get_stack_count", "(", ")", ":", "return", "index", "=", "self...
Write text of editor to a file. Args: index: self.data index to save. If None, defaults to currentIndex(). force: Force save regardless of file state. Returns: True upon successful save or when file doesn't need to be saved. Fal...
[ "Write", "text", "of", "editor", "to", "a", "file", ".", "Args", ":", "index", ":", "self", ".", "data", "index", "to", "save", ".", "If", "None", "defaults", "to", "currentIndex", "()", ".", "force", ":", "Force", "save", "regardless", "of", "file", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1652-L1732
train
Write text of editor to a file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.file_saved_in_other_editorstack
def file_saved_in_other_editorstack(self, original_filename, filename): """ File was just saved in another editorstack, let's synchronize! This avoids file being automatically reloaded. The original filename is passed instead of an index in case the tabs on the editor stac...
python
def file_saved_in_other_editorstack(self, original_filename, filename): """ File was just saved in another editorstack, let's synchronize! This avoids file being automatically reloaded. The original filename is passed instead of an index in case the tabs on the editor stac...
[ "def", "file_saved_in_other_editorstack", "(", "self", ",", "original_filename", ",", "filename", ")", ":", "index", "=", "self", ".", "has_filename", "(", "original_filename", ")", "if", "index", "is", "None", ":", "return", "finfo", "=", "self", ".", "data",...
File was just saved in another editorstack, let's synchronize! This avoids file being automatically reloaded. The original filename is passed instead of an index in case the tabs on the editor stacks were moved and are now in a different order - see issue 5703. Filename is...
[ "File", "was", "just", "saved", "in", "another", "editorstack", "let", "s", "synchronize!", "This", "avoids", "file", "being", "automatically", "reloaded", ".", "The", "original", "filename", "is", "passed", "instead", "of", "an", "index", "in", "case", "the",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1734-L1750
train
Check if a file was just saved in another editorstack.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.select_savename
def select_savename(self, original_filename): """Select a name to save a file. Args: original_filename: Used in the dialog to display the current file path and name. Returns: Normalized path for the selected file name or None if no name was ...
python
def select_savename(self, original_filename): """Select a name to save a file. Args: original_filename: Used in the dialog to display the current file path and name. Returns: Normalized path for the selected file name or None if no name was ...
[ "def", "select_savename", "(", "self", ",", "original_filename", ")", ":", "if", "self", ".", "edit_filetypes", "is", "None", ":", "self", ".", "edit_filetypes", "=", "get_edit_filetypes", "(", ")", "if", "self", ".", "edit_filters", "is", "None", ":", "self...
Select a name to save a file. Args: original_filename: Used in the dialog to display the current file path and name. Returns: Normalized path for the selected file name or None if no name was selected.
[ "Select", "a", "name", "to", "save", "a", "file", ".", "Args", ":", "original_filename", ":", "Used", "in", "the", "dialog", "to", "display", "the", "current", "file", "path", "and", "name", ".", "Returns", ":", "Normalized", "path", "for", "the", "selec...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1752-L1788
train
Select a name to save a file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.save_as
def save_as(self, index=None): """Save file as... Args: index: self.data index for the file to save. Returns: False if no file name was selected or if save() was unsuccessful. True is save() was successful. Gets the new file name from sele...
python
def save_as(self, index=None): """Save file as... Args: index: self.data index for the file to save. Returns: False if no file name was selected or if save() was unsuccessful. True is save() was successful. Gets the new file name from sele...
[ "def", "save_as", "(", "self", ",", "index", "=", "None", ")", ":", "if", "index", "is", "None", ":", "# Save the currently edited file\r", "index", "=", "self", ".", "get_stack_index", "(", ")", "finfo", "=", "self", ".", "data", "[", "index", "]", "# T...
Save file as... Args: index: self.data index for the file to save. Returns: False if no file name was selected or if save() was unsuccessful. True is save() was successful. Gets the new file name from select_savename(). If no name is chosen, ...
[ "Save", "file", "as", "...", "Args", ":", "index", ":", "self", ".", "data", "index", "for", "the", "file", "to", "save", ".", "Returns", ":", "False", "if", "no", "file", "name", "was", "selected", "or", "if", "save", "()", "was", "unsuccessful", "....
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1790-L1844
train
Save a new file as...
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.save_copy_as
def save_copy_as(self, index=None): """Save copy of file as... Args: index: self.data index for the file to save. Returns: False if no file name was selected or if save() was unsuccessful. True is save() was successful. Gets the new file n...
python
def save_copy_as(self, index=None): """Save copy of file as... Args: index: self.data index for the file to save. Returns: False if no file name was selected or if save() was unsuccessful. True is save() was successful. Gets the new file n...
[ "def", "save_copy_as", "(", "self", ",", "index", "=", "None", ")", ":", "if", "index", "is", "None", ":", "# Save the currently edited file\r", "index", "=", "self", ".", "get_stack_index", "(", ")", "finfo", "=", "self", ".", "data", "[", "index", "]", ...
Save copy of file as... Args: index: self.data index for the file to save. Returns: False if no file name was selected or if save() was unsuccessful. True is save() was successful. Gets the new file name from select_savename(). If no name is chose...
[ "Save", "copy", "of", "file", "as", "...", "Args", ":", "index", ":", "self", ".", "data", "index", "for", "the", "file", "to", "save", ".", "Returns", ":", "False", "if", "no", "file", "name", "was", "selected", "or", "if", "save", "()", "was", "u...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1846-L1895
train
Save a copy of a file as...
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.save_all
def save_all(self): """Save all opened files. Iterate through self.data and call save() on any modified files. """ for index in range(self.get_stack_count()): if self.data[index].editor.document().isModified(): self.save(index)
python
def save_all(self): """Save all opened files. Iterate through self.data and call save() on any modified files. """ for index in range(self.get_stack_count()): if self.data[index].editor.document().isModified(): self.save(index)
[ "def", "save_all", "(", "self", ")", ":", "for", "index", "in", "range", "(", "self", ".", "get_stack_count", "(", ")", ")", ":", "if", "self", ".", "data", "[", "index", "]", ".", "editor", ".", "document", "(", ")", ".", "isModified", "(", ")", ...
Save all opened files. Iterate through self.data and call save() on any modified files.
[ "Save", "all", "opened", "files", ".", "Iterate", "through", "self", ".", "data", "and", "call", "save", "()", "on", "any", "modified", "files", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1897-L1904
train
Save all opened files.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.analyze_script
def analyze_script(self, index=None): """Analyze current script with todos""" if self.is_analysis_done: return if index is None: index = self.get_stack_index() if self.data: finfo = self.data[index] if self.todolist_enabled: ...
python
def analyze_script(self, index=None): """Analyze current script with todos""" if self.is_analysis_done: return if index is None: index = self.get_stack_index() if self.data: finfo = self.data[index] if self.todolist_enabled: ...
[ "def", "analyze_script", "(", "self", ",", "index", "=", "None", ")", ":", "if", "self", ".", "is_analysis_done", ":", "return", "if", "index", "is", "None", ":", "index", "=", "self", ".", "get_stack_index", "(", ")", "if", "self", ".", "data", ":", ...
Analyze current script with todos
[ "Analyze", "current", "script", "with", "todos" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1910-L1920
train
Analyze current script with todos
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.set_todo_results
def set_todo_results(self, filename, todo_results): """Synchronize todo results between editorstacks""" index = self.has_filename(filename) if index is None: return self.data[index].set_todo_results(todo_results)
python
def set_todo_results(self, filename, todo_results): """Synchronize todo results between editorstacks""" index = self.has_filename(filename) if index is None: return self.data[index].set_todo_results(todo_results)
[ "def", "set_todo_results", "(", "self", ",", "filename", ",", "todo_results", ")", ":", "index", "=", "self", ".", "has_filename", "(", "filename", ")", "if", "index", "is", "None", ":", "return", "self", ".", "data", "[", "index", "]", ".", "set_todo_re...
Synchronize todo results between editorstacks
[ "Synchronize", "todo", "results", "between", "editorstacks" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1922-L1927
train
Synchronize todo results between editorstacks
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.current_changed
def current_changed(self, index): """Stack index has changed""" # count = self.get_stack_count() # for btn in (self.filelist_btn, self.previous_btn, self.next_btn): # btn.setEnabled(count > 1) editor = self.get_current_editor() if editor.lsp_ready and not editor....
python
def current_changed(self, index): """Stack index has changed""" # count = self.get_stack_count() # for btn in (self.filelist_btn, self.previous_btn, self.next_btn): # btn.setEnabled(count > 1) editor = self.get_current_editor() if editor.lsp_ready and not editor....
[ "def", "current_changed", "(", "self", ",", "index", ")", ":", "# count = self.get_stack_count()\r", "# for btn in (self.filelist_btn, self.previous_btn, self.next_btn):\r", "# btn.setEnabled(count > 1)\r", "editor", "=", "self", ".", "get_current_editor", "(...
Stack index has changed
[ "Stack", "index", "has", "changed" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1933-L1969
train
An internal method to update the statusbar when the current file has changed.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.tab_navigation_mru
def tab_navigation_mru(self, forward=True): """ Tab navigation with "most recently used" behaviour. It's fired when pressing 'go to previous file' or 'go to next file' shortcuts. forward: True: move to next file False: move to previous file ...
python
def tab_navigation_mru(self, forward=True): """ Tab navigation with "most recently used" behaviour. It's fired when pressing 'go to previous file' or 'go to next file' shortcuts. forward: True: move to next file False: move to previous file ...
[ "def", "tab_navigation_mru", "(", "self", ",", "forward", "=", "True", ")", ":", "self", ".", "tabs_switcher", "=", "TabSwitcherWidget", "(", "self", ",", "self", ".", "stack_history", ",", "self", ".", "tabs", ")", "self", ".", "tabs_switcher", ".", "show...
Tab navigation with "most recently used" behaviour. It's fired when pressing 'go to previous file' or 'go to next file' shortcuts. forward: True: move to next file False: move to previous file
[ "Tab", "navigation", "with", "most", "recently", "used", "behaviour", ".", "It", "s", "fired", "when", "pressing", "go", "to", "previous", "file", "or", "go", "to", "next", "file", "shortcuts", ".", "forward", ":", "True", ":", "move", "to", "next", "fil...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1978-L1993
train
Tab navigation with most recently used behaviour.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.focus_changed
def focus_changed(self): """Editor focus has changed""" fwidget = QApplication.focusWidget() for finfo in self.data: if fwidget is finfo.editor: self.refresh() self.editor_focus_changed.emit()
python
def focus_changed(self): """Editor focus has changed""" fwidget = QApplication.focusWidget() for finfo in self.data: if fwidget is finfo.editor: self.refresh() self.editor_focus_changed.emit()
[ "def", "focus_changed", "(", "self", ")", ":", "fwidget", "=", "QApplication", ".", "focusWidget", "(", ")", "for", "finfo", "in", "self", ".", "data", ":", "if", "fwidget", "is", "finfo", ".", "editor", ":", "self", ".", "refresh", "(", ")", "self", ...
Editor focus has changed
[ "Editor", "focus", "has", "changed" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L1995-L2001
train
Editor focus has changed
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack._refresh_outlineexplorer
def _refresh_outlineexplorer(self, index=None, update=True, clear=False): """Refresh outline explorer panel""" oe = self.outlineexplorer if oe is None: return if index is None: index = self.get_stack_index() if self.data: finfo = self.d...
python
def _refresh_outlineexplorer(self, index=None, update=True, clear=False): """Refresh outline explorer panel""" oe = self.outlineexplorer if oe is None: return if index is None: index = self.get_stack_index() if self.data: finfo = self.d...
[ "def", "_refresh_outlineexplorer", "(", "self", ",", "index", "=", "None", ",", "update", "=", "True", ",", "clear", "=", "False", ")", ":", "oe", "=", "self", ".", "outlineexplorer", "if", "oe", "is", "None", ":", "return", "if", "index", "is", "None"...
Refresh outline explorer panel
[ "Refresh", "outline", "explorer", "panel" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2003-L2026
train
Refresh the outline explorer panel
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack._sync_outlineexplorer_file_order
def _sync_outlineexplorer_file_order(self): """ Order the root file items of the outline explorer as in the tabbar of the current EditorStack. """ if self.outlineexplorer is not None: self.outlineexplorer.treewidget.set_editor_ids_order( [finfo....
python
def _sync_outlineexplorer_file_order(self): """ Order the root file items of the outline explorer as in the tabbar of the current EditorStack. """ if self.outlineexplorer is not None: self.outlineexplorer.treewidget.set_editor_ids_order( [finfo....
[ "def", "_sync_outlineexplorer_file_order", "(", "self", ")", ":", "if", "self", ".", "outlineexplorer", "is", "not", "None", ":", "self", ".", "outlineexplorer", ".", "treewidget", ".", "set_editor_ids_order", "(", "[", "finfo", ".", "editor", ".", "get_document...
Order the root file items of the outline explorer as in the tabbar of the current EditorStack.
[ "Order", "the", "root", "file", "items", "of", "the", "outline", "explorer", "as", "in", "the", "tabbar", "of", "the", "current", "EditorStack", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2028-L2035
train
Order the root file items of the outline explorer as in the current tabbar.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.__refresh_statusbar
def __refresh_statusbar(self, index): """Refreshing statusbar widgets""" finfo = self.data[index] self.encoding_changed.emit(finfo.encoding) # Refresh cursor position status: line, index = finfo.editor.get_cursor_line_column() self.sig_editor_cursor_position_changed...
python
def __refresh_statusbar(self, index): """Refreshing statusbar widgets""" finfo = self.data[index] self.encoding_changed.emit(finfo.encoding) # Refresh cursor position status: line, index = finfo.editor.get_cursor_line_column() self.sig_editor_cursor_position_changed...
[ "def", "__refresh_statusbar", "(", "self", ",", "index", ")", ":", "finfo", "=", "self", ".", "data", "[", "index", "]", "self", ".", "encoding_changed", ".", "emit", "(", "finfo", ".", "encoding", ")", "# Refresh cursor position status:\r", "line", ",", "in...
Refreshing statusbar widgets
[ "Refreshing", "statusbar", "widgets" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2037-L2043
train
Refreshes the statusbar widgets with the current index
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.__check_file_status
def __check_file_status(self, index): """Check if file has been changed in any way outside Spyder: 1. removed, moved or renamed outside Spyder 2. modified outside Spyder""" if self.__file_status_flag: # Avoid infinite loop: when the QMessageBox.question pops, it ...
python
def __check_file_status(self, index): """Check if file has been changed in any way outside Spyder: 1. removed, moved or renamed outside Spyder 2. modified outside Spyder""" if self.__file_status_flag: # Avoid infinite loop: when the QMessageBox.question pops, it ...
[ "def", "__check_file_status", "(", "self", ",", "index", ")", ":", "if", "self", ".", "__file_status_flag", ":", "# Avoid infinite loop: when the QMessageBox.question pops, it\r", "# gets focus and then give it back to the CodeEditor instance,\r", "# triggering a refresh cycle which ca...
Check if file has been changed in any way outside Spyder: 1. removed, moved or renamed outside Spyder 2. modified outside Spyder
[ "Check", "if", "file", "has", "been", "changed", "in", "any", "way", "outside", "Spyder", ":", "1", ".", "removed", "moved", "or", "renamed", "outside", "Spyder", "2", ".", "modified", "outside", "Spyder" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2054-L2115
train
Check if a file has been changed in any way outside Spyder
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.refresh
def refresh(self, index=None): """Refresh tabwidget""" if index is None: index = self.get_stack_index() # Set current editor if self.get_stack_count(): index = self.get_stack_index() finfo = self.data[index] editor = finfo.editor ...
python
def refresh(self, index=None): """Refresh tabwidget""" if index is None: index = self.get_stack_index() # Set current editor if self.get_stack_count(): index = self.get_stack_index() finfo = self.data[index] editor = finfo.editor ...
[ "def", "refresh", "(", "self", ",", "index", "=", "None", ")", ":", "if", "index", "is", "None", ":", "index", "=", "self", ".", "get_stack_index", "(", ")", "# Set current editor\r", "if", "self", ".", "get_stack_count", "(", ")", ":", "index", "=", "...
Refresh tabwidget
[ "Refresh", "tabwidget" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2122-L2143
train
Refresh the tabwidget with the current index.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.modification_changed
def modification_changed(self, state=None, index=None, editor_id=None): """ Current editor's modification state has changed --> change tab title depending on new modification state --> enable/disable save/save all actions """ if editor_id is not None: f...
python
def modification_changed(self, state=None, index=None, editor_id=None): """ Current editor's modification state has changed --> change tab title depending on new modification state --> enable/disable save/save all actions """ if editor_id is not None: f...
[ "def", "modification_changed", "(", "self", ",", "state", "=", "None", ",", "index", "=", "None", ",", "editor_id", "=", "None", ")", ":", "if", "editor_id", "is", "not", "None", ":", "for", "index", ",", "_finfo", "in", "enumerate", "(", "self", ".", ...
Current editor's modification state has changed --> change tab title depending on new modification state --> enable/disable save/save all actions
[ "Current", "editor", "s", "modification", "state", "has", "changed", "--", ">", "change", "tab", "title", "depending", "on", "new", "modification", "state", "--", ">", "enable", "/", "disable", "save", "/", "save", "all", "actions" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2145-L2173
train
Updates the tab title depending on the modification state of the current file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.reload
def reload(self, index): """Reload file from disk""" finfo = self.data[index] txt, finfo.encoding = encoding.read(finfo.filename) finfo.lastmodified = QFileInfo(finfo.filename).lastModified() position = finfo.editor.get_position('cursor') finfo.editor.set_text(txt) ...
python
def reload(self, index): """Reload file from disk""" finfo = self.data[index] txt, finfo.encoding = encoding.read(finfo.filename) finfo.lastmodified = QFileInfo(finfo.filename).lastModified() position = finfo.editor.get_position('cursor') finfo.editor.set_text(txt) ...
[ "def", "reload", "(", "self", ",", "index", ")", ":", "finfo", "=", "self", ".", "data", "[", "index", "]", "txt", ",", "finfo", ".", "encoding", "=", "encoding", ".", "read", "(", "finfo", ".", "filename", ")", "finfo", ".", "lastmodified", "=", "...
Reload file from disk
[ "Reload", "file", "from", "disk" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2181-L2199
train
Reload file from disk
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.revert
def revert(self): """Revert file from disk""" index = self.get_stack_index() finfo = self.data[index] filename = finfo.filename if finfo.editor.document().isModified(): self.msgbox = QMessageBox( QMessageBox.Warning, sel...
python
def revert(self): """Revert file from disk""" index = self.get_stack_index() finfo = self.data[index] filename = finfo.filename if finfo.editor.document().isModified(): self.msgbox = QMessageBox( QMessageBox.Warning, sel...
[ "def", "revert", "(", "self", ")", ":", "index", "=", "self", ".", "get_stack_index", "(", ")", "finfo", "=", "self", ".", "data", "[", "index", "]", "filename", "=", "finfo", ".", "filename", "if", "finfo", ".", "editor", ".", "document", "(", ")", ...
Revert file from disk
[ "Revert", "file", "from", "disk" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2201-L2218
train
Revert file from disk
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.create_new_editor
def create_new_editor(self, fname, enc, txt, set_current, new=False, cloned_from=None, add_where='end'): """ Create a new editor instance Returns finfo object (instead of editor as in previous releases) """ editor = codeeditor.CodeEditor(self) ...
python
def create_new_editor(self, fname, enc, txt, set_current, new=False, cloned_from=None, add_where='end'): """ Create a new editor instance Returns finfo object (instead of editor as in previous releases) """ editor = codeeditor.CodeEditor(self) ...
[ "def", "create_new_editor", "(", "self", ",", "fname", ",", "enc", ",", "txt", ",", "set_current", ",", "new", "=", "False", ",", "cloned_from", "=", "None", ",", "add_where", "=", "'end'", ")", ":", "editor", "=", "codeeditor", ".", "CodeEditor", "(", ...
Create a new editor instance Returns finfo object (instead of editor as in previous releases)
[ "Create", "a", "new", "editor", "instance", "Returns", "finfo", "object", "(", "instead", "of", "editor", "as", "in", "previous", "releases", ")" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2220-L2311
train
Create a new file editor instance
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.send_to_help
def send_to_help(self, name, signature, force=False): """qstr1: obj_text, qstr2: argpspec, qstr3: note, qstr4: doc_text""" if not force and not self.help_enabled: return if self.help is not None \ and (force or self.help.dockwidget.isVisible()): signature ...
python
def send_to_help(self, name, signature, force=False): """qstr1: obj_text, qstr2: argpspec, qstr3: note, qstr4: doc_text""" if not force and not self.help_enabled: return if self.help is not None \ and (force or self.help.dockwidget.isVisible()): signature ...
[ "def", "send_to_help", "(", "self", ",", "name", ",", "signature", ",", "force", "=", "False", ")", ":", "if", "not", "force", "and", "not", "self", ".", "help_enabled", ":", "return", "if", "self", ".", "help", "is", "not", "None", "and", "(", "forc...
qstr1: obj_text, qstr2: argpspec, qstr3: note, qstr4: doc_text
[ "qstr1", ":", "obj_text", "qstr2", ":", "argpspec", "qstr3", ":", "note", "qstr4", ":", "doc_text" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2317-L2337
train
Send a message to the help widget
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.new
def new(self, filename, encoding, text, default_content=False, empty=False): """ Create new filename with *encoding* and *text* """ finfo = self.create_new_editor(filename, encoding, text, set_current=False, new=True) finf...
python
def new(self, filename, encoding, text, default_content=False, empty=False): """ Create new filename with *encoding* and *text* """ finfo = self.create_new_editor(filename, encoding, text, set_current=False, new=True) finf...
[ "def", "new", "(", "self", ",", "filename", ",", "encoding", ",", "text", ",", "default_content", "=", "False", ",", "empty", "=", "False", ")", ":", "finfo", "=", "self", ".", "create_new_editor", "(", "filename", ",", "encoding", ",", "text", ",", "s...
Create new filename with *encoding* and *text*
[ "Create", "new", "filename", "with", "*", "encoding", "*", "and", "*", "text", "*" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2339-L2352
train
Create new file with given filename encoding and text.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.load
def load(self, filename, set_current=True, add_where='end'): """ Load filename, create an editor instance and return it *Warning* This is loading file, creating editor but not executing the source code analysis -- the analysis must be done by the editor plugin (in case multi...
python
def load(self, filename, set_current=True, add_where='end'): """ Load filename, create an editor instance and return it *Warning* This is loading file, creating editor but not executing the source code analysis -- the analysis must be done by the editor plugin (in case multi...
[ "def", "load", "(", "self", ",", "filename", ",", "set_current", "=", "True", ",", "add_where", "=", "'end'", ")", ":", "filename", "=", "osp", ".", "abspath", "(", "to_text_string", "(", "filename", ")", ")", "self", ".", "starting_long_process", ".", "...
Load filename, create an editor instance and return it *Warning* This is loading file, creating editor but not executing the source code analysis -- the analysis must be done by the editor plugin (in case multiple editorstack instances are handled)
[ "Load", "filename", "create", "an", "editor", "instance", "and", "return", "it", "*", "Warning", "*", "This", "is", "loading", "file", "creating", "editor", "but", "not", "executing", "the", "source", "code", "analysis", "--", "the", "analysis", "must", "be"...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2354-L2383
train
Load a file and create an editor instance and return it
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.set_os_eol_chars
def set_os_eol_chars(self, index=None, osname=None): """Sets the EOL character(s) based on the operating system. If `osname` is None, then the default line endings for the current operating system (`os.name` value) will be used. `osname` can be one of: ('posix', 'nt'...
python
def set_os_eol_chars(self, index=None, osname=None): """Sets the EOL character(s) based on the operating system. If `osname` is None, then the default line endings for the current operating system (`os.name` value) will be used. `osname` can be one of: ('posix', 'nt'...
[ "def", "set_os_eol_chars", "(", "self", ",", "index", "=", "None", ",", "osname", "=", "None", ")", ":", "if", "osname", "is", "None", ":", "osname", "=", "os", ".", "name", "if", "index", "is", "None", ":", "index", "=", "self", ".", "get_stack_inde...
Sets the EOL character(s) based on the operating system. If `osname` is None, then the default line endings for the current operating system (`os.name` value) will be used. `osname` can be one of: ('posix', 'nt', 'java')
[ "Sets", "the", "EOL", "character", "(", "s", ")", "based", "on", "the", "operating", "system", ".", "If", "osname", "is", "None", "then", "the", "default", "line", "endings", "for", "the", "current", "operating", "system", "(", "os", ".", "name", "value"...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2385-L2401
train
Sets the EOL character(s) based on the operating system.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.remove_trailing_spaces
def remove_trailing_spaces(self, index=None): """Remove trailing spaces""" if index is None: index = self.get_stack_index() finfo = self.data[index] finfo.editor.remove_trailing_spaces()
python
def remove_trailing_spaces(self, index=None): """Remove trailing spaces""" if index is None: index = self.get_stack_index() finfo = self.data[index] finfo.editor.remove_trailing_spaces()
[ "def", "remove_trailing_spaces", "(", "self", ",", "index", "=", "None", ")", ":", "if", "index", "is", "None", ":", "index", "=", "self", ".", "get_stack_index", "(", ")", "finfo", "=", "self", ".", "data", "[", "index", "]", "finfo", ".", "editor", ...
Remove trailing spaces
[ "Remove", "trailing", "spaces" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2403-L2408
train
Remove trailing spaces from the current tab.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.fix_indentation
def fix_indentation(self, index=None): """Replace tab characters by spaces""" if index is None: index = self.get_stack_index() finfo = self.data[index] finfo.editor.fix_indentation()
python
def fix_indentation(self, index=None): """Replace tab characters by spaces""" if index is None: index = self.get_stack_index() finfo = self.data[index] finfo.editor.fix_indentation()
[ "def", "fix_indentation", "(", "self", ",", "index", "=", "None", ")", ":", "if", "index", "is", "None", ":", "index", "=", "self", ".", "get_stack_index", "(", ")", "finfo", "=", "self", ".", "data", "[", "index", "]", "finfo", ".", "editor", ".", ...
Replace tab characters by spaces
[ "Replace", "tab", "characters", "by", "spaces" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2410-L2415
train
Replace tab characters by spaces
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.run_selection
def run_selection(self): """ Run selected text or current line in console. If some text is selected, then execute that text in console. If no text is selected, then execute current line, unless current line is empty. Then, advance cursor to next line. If cursor is on las...
python
def run_selection(self): """ Run selected text or current line in console. If some text is selected, then execute that text in console. If no text is selected, then execute current line, unless current line is empty. Then, advance cursor to next line. If cursor is on las...
[ "def", "run_selection", "(", "self", ")", ":", "text", "=", "self", ".", "get_current_editor", "(", ")", ".", "get_selection_as_executable_code", "(", ")", "if", "text", ":", "self", ".", "exec_in_extconsole", ".", "emit", "(", "text", ".", "rstrip", "(", ...
Run selected text or current line in console. If some text is selected, then execute that text in console. If no text is selected, then execute current line, unless current line is empty. Then, advance cursor to next line. If cursor is on last line and that line is not empty, the...
[ "Run", "selected", "text", "or", "current", "line", "in", "console", ".", "If", "some", "text", "is", "selected", "then", "execute", "that", "text", "in", "console", ".", "If", "no", "text", "is", "selected", "then", "execute", "current", "line", "unless",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2418-L2441
train
Runs selected text or current line in console.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.run_cell
def run_cell(self): """Run current cell.""" text, line = self.get_current_editor().get_cell_as_executable_code() self._run_cell_text(text, line)
python
def run_cell(self): """Run current cell.""" text, line = self.get_current_editor().get_cell_as_executable_code() self._run_cell_text(text, line)
[ "def", "run_cell", "(", "self", ")", ":", "text", ",", "line", "=", "self", ".", "get_current_editor", "(", ")", ".", "get_cell_as_executable_code", "(", ")", "self", ".", "_run_cell_text", "(", "text", ",", "line", ")" ]
Run current cell.
[ "Run", "current", "cell", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2443-L2446
train
Run current cell.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.advance_cell
def advance_cell(self, reverse=False): """Advance to the next cell. reverse = True --> go to previous cell. """ if not reverse: move_func = self.get_current_editor().go_to_next_cell else: move_func = self.get_current_editor().go_to_previous_cell ...
python
def advance_cell(self, reverse=False): """Advance to the next cell. reverse = True --> go to previous cell. """ if not reverse: move_func = self.get_current_editor().go_to_next_cell else: move_func = self.get_current_editor().go_to_previous_cell ...
[ "def", "advance_cell", "(", "self", ",", "reverse", "=", "False", ")", ":", "if", "not", "reverse", ":", "move_func", "=", "self", ".", "get_current_editor", "(", ")", ".", "go_to_next_cell", "else", ":", "move_func", "=", "self", ".", "get_current_editor", ...
Advance to the next cell. reverse = True --> go to previous cell.
[ "Advance", "to", "the", "next", "cell", ".", "reverse", "=", "True", "--", ">", "go", "to", "previous", "cell", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2453-L2471
train
Advance to the next cell.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.re_run_last_cell
def re_run_last_cell(self): """Run the previous cell again.""" text, line = (self.get_current_editor() .get_last_cell_as_executable_code()) self._run_cell_text(text, line)
python
def re_run_last_cell(self): """Run the previous cell again.""" text, line = (self.get_current_editor() .get_last_cell_as_executable_code()) self._run_cell_text(text, line)
[ "def", "re_run_last_cell", "(", "self", ")", ":", "text", ",", "line", "=", "(", "self", ".", "get_current_editor", "(", ")", ".", "get_last_cell_as_executable_code", "(", ")", ")", "self", ".", "_run_cell_text", "(", "text", ",", "line", ")" ]
Run the previous cell again.
[ "Run", "the", "previous", "cell", "again", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2473-L2477
train
Run the previous cell again.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack._run_cell_text
def _run_cell_text(self, text, line): """Run cell code in the console. Cell code is run in the console by copying it to the console if `self.run_cell_copy` is ``True`` otherwise by using the `run_cell` function. Parameters ---------- text : str ...
python
def _run_cell_text(self, text, line): """Run cell code in the console. Cell code is run in the console by copying it to the console if `self.run_cell_copy` is ``True`` otherwise by using the `run_cell` function. Parameters ---------- text : str ...
[ "def", "_run_cell_text", "(", "self", ",", "text", ",", "line", ")", ":", "finfo", "=", "self", ".", "get_current_finfo", "(", ")", "editor", "=", "self", ".", "get_current_editor", "(", ")", "oe_data", "=", "editor", ".", "highlighter", ".", "get_outlinee...
Run cell code in the console. Cell code is run in the console by copying it to the console if `self.run_cell_copy` is ``True`` otherwise by using the `run_cell` function. Parameters ---------- text : str The code in the cell as a string. li...
[ "Run", "cell", "code", "in", "the", "console", ".", "Cell", "code", "is", "run", "in", "the", "console", "by", "copying", "it", "to", "the", "console", "if", "self", ".", "run_cell_copy", "is", "True", "otherwise", "by", "using", "the", "run_cell", "func...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2479-L2504
train
Run cell code in the console.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.dragEnterEvent
def dragEnterEvent(self, event): """Reimplement Qt method Inform Qt about the types of data that the widget accepts""" source = event.mimeData() # The second check is necessary on Windows, where source.hasUrls() # can return True but source.urls() is [] # The third ...
python
def dragEnterEvent(self, event): """Reimplement Qt method Inform Qt about the types of data that the widget accepts""" source = event.mimeData() # The second check is necessary on Windows, where source.hasUrls() # can return True but source.urls() is [] # The third ...
[ "def", "dragEnterEvent", "(", "self", ",", "event", ")", ":", "source", "=", "event", ".", "mimeData", "(", ")", "# The second check is necessary on Windows, where source.hasUrls()\r", "# can return True but source.urls() is []\r", "# The third check is needed since a file could be...
Reimplement Qt method Inform Qt about the types of data that the widget accepts
[ "Reimplement", "Qt", "method", "Inform", "Qt", "about", "the", "types", "of", "data", "that", "the", "widget", "accepts" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2507-L2532
train
Reimplement Qt method Inform Qt about the types of data that the widget accepts
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorStack.dropEvent
def dropEvent(self, event): """Reimplement Qt method Unpack dropped data and handle it""" source = event.mimeData() # The second check is necessary when mimedata2url(source) # returns None. # Fixes issue 7742 if source.hasUrls() and mimedata2url(source): ...
python
def dropEvent(self, event): """Reimplement Qt method Unpack dropped data and handle it""" source = event.mimeData() # The second check is necessary when mimedata2url(source) # returns None. # Fixes issue 7742 if source.hasUrls() and mimedata2url(source): ...
[ "def", "dropEvent", "(", "self", ",", "event", ")", ":", "source", "=", "event", ".", "mimeData", "(", ")", "# The second check is necessary when mimedata2url(source)\r", "# returns None.\r", "# Fixes issue 7742\r", "if", "source", ".", "hasUrls", "(", ")", "and", "...
Reimplement Qt method Unpack dropped data and handle it
[ "Reimplement", "Qt", "method", "Unpack", "dropped", "data", "and", "handle", "it" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2534-L2553
train
Reimplement Qt method Unpack dropped data and handle it
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorSplitter.split
def split(self, orientation=Qt.Vertical): """Create and attach a new EditorSplitter to the current EditorSplitter. The new EditorSplitter widget will contain an EditorStack that is a clone of the current EditorStack. A single EditorSplitter instance can be split multiple times, b...
python
def split(self, orientation=Qt.Vertical): """Create and attach a new EditorSplitter to the current EditorSplitter. The new EditorSplitter widget will contain an EditorStack that is a clone of the current EditorStack. A single EditorSplitter instance can be split multiple times, b...
[ "def", "split", "(", "self", ",", "orientation", "=", "Qt", ".", "Vertical", ")", ":", "self", ".", "setOrientation", "(", "orientation", ")", "self", ".", "editorstack", ".", "set_orientation", "(", "orientation", ")", "editorsplitter", "=", "EditorSplitter",...
Create and attach a new EditorSplitter to the current EditorSplitter. The new EditorSplitter widget will contain an EditorStack that is a clone of the current EditorStack. A single EditorSplitter instance can be split multiple times, but the orientation will be the same for all t...
[ "Create", "and", "attach", "a", "new", "EditorSplitter", "to", "the", "current", "EditorSplitter", ".", "The", "new", "EditorSplitter", "widget", "will", "contain", "an", "EditorStack", "that", "is", "a", "clone", "of", "the", "current", "EditorStack", ".", "A...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2655-L2676
train
Create and attach a new EditorSplitter to the current EditorSplitter.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorSplitter.iter_editorstacks
def iter_editorstacks(self): """Return the editor stacks for this splitter and every first child. Note: If a splitter contains more than one splitter as a direct child, only the first child's editor stack is included. Returns: List of tuples containing (EditorS...
python
def iter_editorstacks(self): """Return the editor stacks for this splitter and every first child. Note: If a splitter contains more than one splitter as a direct child, only the first child's editor stack is included. Returns: List of tuples containing (EditorS...
[ "def", "iter_editorstacks", "(", "self", ")", ":", "editorstacks", "=", "[", "(", "self", ".", "widget", "(", "0", ")", ",", "self", ".", "orientation", "(", ")", ")", "]", "if", "self", ".", "count", "(", ")", ">", "1", ":", "editorsplitter", "=",...
Return the editor stacks for this splitter and every first child. Note: If a splitter contains more than one splitter as a direct child, only the first child's editor stack is included. Returns: List of tuples containing (EditorStack instance, orientation).
[ "Return", "the", "editor", "stacks", "for", "this", "splitter", "and", "every", "first", "child", ".", "Note", ":", "If", "a", "splitter", "contains", "more", "than", "one", "splitter", "as", "a", "direct", "child", "only", "the", "first", "child", "s", ...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2678-L2691
train
Return the editor stacks for this splitter and every first child.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorSplitter.get_layout_settings
def get_layout_settings(self): """Return the layout state for this splitter and its children. Record the current state, including file names and current line numbers, of the splitter panels. Returns: A dictionary containing keys {hexstate, sizes, splitsettings}. ...
python
def get_layout_settings(self): """Return the layout state for this splitter and its children. Record the current state, including file names and current line numbers, of the splitter panels. Returns: A dictionary containing keys {hexstate, sizes, splitsettings}. ...
[ "def", "get_layout_settings", "(", "self", ")", ":", "splitsettings", "=", "[", "]", "for", "editorstack", ",", "orientation", "in", "self", ".", "iter_editorstacks", "(", ")", ":", "clines", "=", "[", "]", "cfname", "=", "''", "# XXX - this overrides value fr...
Return the layout state for this splitter and its children. Record the current state, including file names and current line numbers, of the splitter panels. Returns: A dictionary containing keys {hexstate, sizes, splitsettings}. hexstate: String of saveState(...
[ "Return", "the", "layout", "state", "for", "this", "splitter", "and", "its", "children", ".", "Record", "the", "current", "state", "including", "file", "names", "and", "current", "line", "numbers", "of", "the", "splitter", "panels", ".", "Returns", ":", "A",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2693-L2724
train
Return the layout state for this splitter and its children.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorSplitter.set_layout_settings
def set_layout_settings(self, settings, dont_goto=None): """Restore layout state for the splitter panels. Apply the settings to restore a saved layout within the editor. If the splitsettings key doesn't exist, then return without restoring any settings. The current Edit...
python
def set_layout_settings(self, settings, dont_goto=None): """Restore layout state for the splitter panels. Apply the settings to restore a saved layout within the editor. If the splitsettings key doesn't exist, then return without restoring any settings. The current Edit...
[ "def", "set_layout_settings", "(", "self", ",", "settings", ",", "dont_goto", "=", "None", ")", ":", "splitsettings", "=", "settings", ".", "get", "(", "'splitsettings'", ")", "if", "splitsettings", "is", "None", ":", "return", "splitter", "=", "self", "edit...
Restore layout state for the splitter panels. Apply the settings to restore a saved layout within the editor. If the splitsettings key doesn't exist, then return without restoring any settings. The current EditorSplitter (self) calls split() for each element in split_se...
[ "Restore", "layout", "state", "for", "the", "splitter", "panels", ".", "Apply", "the", "settings", "to", "restore", "a", "saved", "layout", "within", "the", "editor", ".", "If", "the", "splitsettings", "key", "doesn", "t", "exist", "then", "return", "without...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2726-L2780
train
Restore the layout state for the splitter panels.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorMainWindow.add_toolbars_to_menu
def add_toolbars_to_menu(self, menu_title, actions): """Add toolbars to a menu.""" # Six is the position of the view menu in menus list # that you can find in plugins/editor.py setup_other_windows. view_menu = self.menus[6] if actions == self.toolbars and view_menu: ...
python
def add_toolbars_to_menu(self, menu_title, actions): """Add toolbars to a menu.""" # Six is the position of the view menu in menus list # that you can find in plugins/editor.py setup_other_windows. view_menu = self.menus[6] if actions == self.toolbars and view_menu: ...
[ "def", "add_toolbars_to_menu", "(", "self", ",", "menu_title", ",", "actions", ")", ":", "# Six is the position of the view menu in menus list\r", "# that you can find in plugins/editor.py setup_other_windows.\r", "view_menu", "=", "self", ".", "menus", "[", "6", "]", "if", ...
Add toolbars to a menu.
[ "Add", "toolbars", "to", "a", "menu", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2928-L2938
train
Add toolbars to a menu.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorMainWindow.load_toolbars
def load_toolbars(self): """Loads the last visible toolbars from the .ini file.""" toolbars_names = CONF.get('main', 'last_visible_toolbars', default=[]) if toolbars_names: dic = {} for toolbar in self.toolbars: dic[toolbar.objectName()] = toolbar ...
python
def load_toolbars(self): """Loads the last visible toolbars from the .ini file.""" toolbars_names = CONF.get('main', 'last_visible_toolbars', default=[]) if toolbars_names: dic = {} for toolbar in self.toolbars: dic[toolbar.objectName()] = toolbar ...
[ "def", "load_toolbars", "(", "self", ")", ":", "toolbars_names", "=", "CONF", ".", "get", "(", "'main'", ",", "'last_visible_toolbars'", ",", "default", "=", "[", "]", ")", "if", "toolbars_names", ":", "dic", "=", "{", "}", "for", "toolbar", "in", "self"...
Loads the last visible toolbars from the .ini file.
[ "Loads", "the", "last", "visible", "toolbars", "from", "the", ".", "ini", "file", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2940-L2952
train
Loads the last visible toolbars from the. ini file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorMainWindow.resizeEvent
def resizeEvent(self, event): """Reimplement Qt method""" if not self.isMaximized() and not self.isFullScreen(): self.window_size = self.size() QMainWindow.resizeEvent(self, event)
python
def resizeEvent(self, event): """Reimplement Qt method""" if not self.isMaximized() and not self.isFullScreen(): self.window_size = self.size() QMainWindow.resizeEvent(self, event)
[ "def", "resizeEvent", "(", "self", ",", "event", ")", ":", "if", "not", "self", ".", "isMaximized", "(", ")", "and", "not", "self", ".", "isFullScreen", "(", ")", ":", "self", ".", "window_size", "=", "self", ".", "size", "(", ")", "QMainWindow", "."...
Reimplement Qt method
[ "Reimplement", "Qt", "method" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2954-L2958
train
Reimplement Qt method resizeEvent
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorMainWindow.get_layout_settings
def get_layout_settings(self): """Return layout state""" splitsettings = self.editorwidget.editorsplitter.get_layout_settings() return dict(size=(self.window_size.width(), self.window_size.height()), pos=(self.pos().x(), self.pos().y()), is_maximized=...
python
def get_layout_settings(self): """Return layout state""" splitsettings = self.editorwidget.editorsplitter.get_layout_settings() return dict(size=(self.window_size.width(), self.window_size.height()), pos=(self.pos().x(), self.pos().y()), is_maximized=...
[ "def", "get_layout_settings", "(", "self", ")", ":", "splitsettings", "=", "self", ".", "editorwidget", ".", "editorsplitter", ".", "get_layout_settings", "(", ")", "return", "dict", "(", "size", "=", "(", "self", ".", "window_size", ".", "width", "(", ")", ...
Return layout state
[ "Return", "layout", "state" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2970-L2978
train
Return layout state
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorMainWindow.set_layout_settings
def set_layout_settings(self, settings): """Restore layout state""" size = settings.get('size') if size is not None: self.resize( QSize(*size) ) self.window_size = self.size() pos = settings.get('pos') if pos is not None: self.move( QPo...
python
def set_layout_settings(self, settings): """Restore layout state""" size = settings.get('size') if size is not None: self.resize( QSize(*size) ) self.window_size = self.size() pos = settings.get('pos') if pos is not None: self.move( QPo...
[ "def", "set_layout_settings", "(", "self", ",", "settings", ")", ":", "size", "=", "settings", ".", "get", "(", "'size'", ")", "if", "size", "is", "not", "None", ":", "self", ".", "resize", "(", "QSize", "(", "*", "size", ")", ")", "self", ".", "wi...
Restore layout state
[ "Restore", "layout", "state" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L2980-L2999
train
Restore layout state
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorPluginExample.file_saved_in_editorstack
def file_saved_in_editorstack(self, editorstack_id_str, original_filename, filename): """A file was saved in editorstack, this notifies others""" for editorstack in self.editorstacks: if str(id(editorstack)) != editorstack_id_str: editor...
python
def file_saved_in_editorstack(self, editorstack_id_str, original_filename, filename): """A file was saved in editorstack, this notifies others""" for editorstack in self.editorstacks: if str(id(editorstack)) != editorstack_id_str: editor...
[ "def", "file_saved_in_editorstack", "(", "self", ",", "editorstack_id_str", ",", "original_filename", ",", "filename", ")", ":", "for", "editorstack", "in", "self", ".", "editorstacks", ":", "if", "str", "(", "id", "(", "editorstack", ")", ")", "!=", "editorst...
A file was saved in editorstack, this notifies others
[ "A", "file", "was", "saved", "in", "editorstack", "this", "notifies", "others" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L3131-L3137
train
A file was saved in editorstack this notifies others
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/widgets/editor.py
EditorPluginExample.file_renamed_in_data_in_editorstack
def file_renamed_in_data_in_editorstack(self, editorstack_id_str, original_filename, filename): """A file was renamed in data in editorstack, this notifies others""" for editorstack in self.editorstacks: if str(id(editorstack)) != editorstack_i...
python
def file_renamed_in_data_in_editorstack(self, editorstack_id_str, original_filename, filename): """A file was renamed in data in editorstack, this notifies others""" for editorstack in self.editorstacks: if str(id(editorstack)) != editorstack_i...
[ "def", "file_renamed_in_data_in_editorstack", "(", "self", ",", "editorstack_id_str", ",", "original_filename", ",", "filename", ")", ":", "for", "editorstack", "in", "self", ".", "editorstacks", ":", "if", "str", "(", "id", "(", "editorstack", ")", ")", "!=", ...
A file was renamed in data in editorstack, this notifies others
[ "A", "file", "was", "renamed", "in", "data", "in", "editorstack", "this", "notifies", "others" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/widgets/editor.py#L3142-L3147
train
A file was renamed in data in editorstack this notifies others
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/findinfiles/plugin.py
FindInFiles.findinfiles_callback
def findinfiles_callback(self): """Find in files callback""" widget = QApplication.focusWidget() if not self.ismaximized: self.dockwidget.setVisible(True) self.dockwidget.raise_() text = '' try: if widget.has_selected_text(): ...
python
def findinfiles_callback(self): """Find in files callback""" widget = QApplication.focusWidget() if not self.ismaximized: self.dockwidget.setVisible(True) self.dockwidget.raise_() text = '' try: if widget.has_selected_text(): ...
[ "def", "findinfiles_callback", "(", "self", ")", ":", "widget", "=", "QApplication", ".", "focusWidget", "(", ")", "if", "not", "self", ".", "ismaximized", ":", "self", ".", "dockwidget", ".", "setVisible", "(", "True", ")", "self", ".", "dockwidget", ".",...
Find in files callback
[ "Find", "in", "files", "callback" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/plugin.py#L98-L113
train
Find in files callback
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/findinfiles/plugin.py
FindInFiles.register_plugin
def register_plugin(self): """Register plugin in Spyder's main window""" self.main.add_dockwidget(self) self.findinfiles.result_browser.sig_edit_goto.connect( self.main.editor.load) self.findinfiles.find_options.redirect_stdio...
python
def register_plugin(self): """Register plugin in Spyder's main window""" self.main.add_dockwidget(self) self.findinfiles.result_browser.sig_edit_goto.connect( self.main.editor.load) self.findinfiles.find_options.redirect_stdio...
[ "def", "register_plugin", "(", "self", ")", ":", "self", ".", "main", ".", "add_dockwidget", "(", "self", ")", "self", ".", "findinfiles", ".", "result_browser", ".", "sig_edit_goto", ".", "connect", "(", "self", ".", "main", ".", "editor", ".", "load", ...
Register plugin in Spyder's main window
[ "Register", "plugin", "in", "Spyder", "s", "main", "window" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/plugin.py#L138-L161
train
Register plugin in Spyder s main window
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/findinfiles/plugin.py
FindInFiles.closing_plugin
def closing_plugin(self, cancelable=False): """Perform actions before parent main window is closed""" self.findinfiles.closing_widget() # stop search thread and clean-up options = self.findinfiles.find_options.get_options(to_save=True) if options is not None: (search_te...
python
def closing_plugin(self, cancelable=False): """Perform actions before parent main window is closed""" self.findinfiles.closing_widget() # stop search thread and clean-up options = self.findinfiles.find_options.get_options(to_save=True) if options is not None: (search_te...
[ "def", "closing_plugin", "(", "self", ",", "cancelable", "=", "False", ")", ":", "self", ".", "findinfiles", ".", "closing_widget", "(", ")", "# stop search thread and clean-up\r", "options", "=", "self", ".", "findinfiles", ".", "find_options", ".", "get_options"...
Perform actions before parent main window is closed
[ "Perform", "actions", "before", "parent", "main", "window", "is", "closed" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/findinfiles/plugin.py#L167-L188
train
Perform actions before parent main window is closed
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/codefolding.py
FoldingPanel._draw_fold_region_background
def _draw_fold_region_background(self, block, painter): """ Draw the fold region when the mouse is over and non collapsed indicator. :param top: Top position :param block: Current block. :param painter: QPainter """ r = FoldScope(block) th = TextH...
python
def _draw_fold_region_background(self, block, painter): """ Draw the fold region when the mouse is over and non collapsed indicator. :param top: Top position :param block: Current block. :param painter: QPainter """ r = FoldScope(block) th = TextH...
[ "def", "_draw_fold_region_background", "(", "self", ",", "block", ",", "painter", ")", ":", "r", "=", "FoldScope", "(", "block", ")", "th", "=", "TextHelper", "(", "self", ".", "editor", ")", "start", ",", "end", "=", "r", ".", "get_range", "(", "ignor...
Draw the fold region when the mouse is over and non collapsed indicator. :param top: Top position :param block: Current block. :param painter: QPainter
[ "Draw", "the", "fold", "region", "when", "the", "mouse", "is", "over", "and", "non", "collapsed", "indicator", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/codefolding.py#L226-L247
train
Draw the fold region when the mouse is over and non collapsed indicator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/codefolding.py
FoldingPanel._draw_rect
def _draw_rect(self, rect, painter): """ Draw the background rectangle using the current style primitive color. :param rect: The fold zone rect to draw :param painter: The widget's painter. """ c = self.editor.sideareas_color grad = QLinearGradient(rect.topLeft(...
python
def _draw_rect(self, rect, painter): """ Draw the background rectangle using the current style primitive color. :param rect: The fold zone rect to draw :param painter: The widget's painter. """ c = self.editor.sideareas_color grad = QLinearGradient(rect.topLeft(...
[ "def", "_draw_rect", "(", "self", ",", "rect", ",", "painter", ")", ":", "c", "=", "self", ".", "editor", ".", "sideareas_color", "grad", "=", "QLinearGradient", "(", "rect", ".", "topLeft", "(", ")", ",", "rect", ".", "topRight", "(", ")", ")", "if"...
Draw the background rectangle using the current style primitive color. :param rect: The fold zone rect to draw :param painter: The widget's painter.
[ "Draw", "the", "background", "rectangle", "using", "the", "current", "style", "primitive", "color", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/codefolding.py#L249-L285
train
Draw the fold zone background rectangle using the current style primitive color.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/codefolding.py
FoldingPanel._draw_fold_indicator
def _draw_fold_indicator(self, top, mouse_over, collapsed, painter): """ Draw the fold indicator/trigger (arrow). :param top: Top position :param mouse_over: Whether the mouse is over the indicator :param collapsed: Whether the trigger is collapsed or not. :param painter...
python
def _draw_fold_indicator(self, top, mouse_over, collapsed, painter): """ Draw the fold indicator/trigger (arrow). :param top: Top position :param mouse_over: Whether the mouse is over the indicator :param collapsed: Whether the trigger is collapsed or not. :param painter...
[ "def", "_draw_fold_indicator", "(", "self", ",", "top", ",", "mouse_over", ",", "collapsed", ",", "painter", ")", ":", "rect", "=", "QRect", "(", "0", ",", "top", ",", "self", ".", "sizeHint", "(", ")", ".", "width", "(", ")", ",", "self", ".", "si...
Draw the fold indicator/trigger (arrow). :param top: Top position :param mouse_over: Whether the mouse is over the indicator :param collapsed: Whether the trigger is collapsed or not. :param painter: QPainter
[ "Draw", "the", "fold", "indicator", "/", "trigger", "(", "arrow", ")", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/codefolding.py#L287-L322
train
Draw the fold indicator.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/codefolding.py
FoldingPanel.find_parent_scope
def find_parent_scope(block): """Find parent scope, if the block is not a fold trigger.""" original = block if not TextBlockHelper.is_fold_trigger(block): # search level of next non blank line while block.text().strip() == '' and block.isValid(): block = b...
python
def find_parent_scope(block): """Find parent scope, if the block is not a fold trigger.""" original = block if not TextBlockHelper.is_fold_trigger(block): # search level of next non blank line while block.text().strip() == '' and block.isValid(): block = b...
[ "def", "find_parent_scope", "(", "block", ")", ":", "original", "=", "block", "if", "not", "TextBlockHelper", ".", "is_fold_trigger", "(", "block", ")", ":", "# search level of next non blank line", "while", "block", ".", "text", "(", ")", ".", "strip", "(", "...
Find parent scope, if the block is not a fold trigger.
[ "Find", "parent", "scope", "if", "the", "block", "is", "not", "a", "fold", "trigger", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/codefolding.py#L325-L338
train
Find parent scope of the block.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/codefolding.py
FoldingPanel._clear_scope_decos
def _clear_scope_decos(self): """Clear scope decorations (on the editor)""" for deco in self._scope_decos: self.editor.decorations.remove(deco) self._scope_decos[:] = []
python
def _clear_scope_decos(self): """Clear scope decorations (on the editor)""" for deco in self._scope_decos: self.editor.decorations.remove(deco) self._scope_decos[:] = []
[ "def", "_clear_scope_decos", "(", "self", ")", ":", "for", "deco", "in", "self", ".", "_scope_decos", ":", "self", ".", "editor", ".", "decorations", ".", "remove", "(", "deco", ")", "self", ".", "_scope_decos", "[", ":", "]", "=", "[", "]" ]
Clear scope decorations (on the editor)
[ "Clear", "scope", "decorations", "(", "on", "the", "editor", ")" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/codefolding.py#L340-L344
train
Clear scope decorations on the editor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/codefolding.py
FoldingPanel._get_scope_highlight_color
def _get_scope_highlight_color(self): """ Gets the base scope highlight color (derivated from the editor background) For lighter themes will be a darker color, and for darker ones will be a lighter color """ color = self.editor.sideareas_color if color.l...
python
def _get_scope_highlight_color(self): """ Gets the base scope highlight color (derivated from the editor background) For lighter themes will be a darker color, and for darker ones will be a lighter color """ color = self.editor.sideareas_color if color.l...
[ "def", "_get_scope_highlight_color", "(", "self", ")", ":", "color", "=", "self", ".", "editor", ".", "sideareas_color", "if", "color", ".", "lightness", "(", ")", "<", "128", ":", "color", "=", "drift_color", "(", "color", ",", "130", ")", "else", ":", ...
Gets the base scope highlight color (derivated from the editor background) For lighter themes will be a darker color, and for darker ones will be a lighter color
[ "Gets", "the", "base", "scope", "highlight", "color", "(", "derivated", "from", "the", "editor", "background", ")" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/codefolding.py#L346-L359
train
Gets the base scope highlight color
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/codefolding.py
FoldingPanel._decorate_block
def _decorate_block(self, start, end): """ Create a decoration and add it to the editor. Args: start (int) start line of the decoration end (int) end line of the decoration """ color = self._get_scope_highlight_color() draw_order = DRAW_ORDERS.get...
python
def _decorate_block(self, start, end): """ Create a decoration and add it to the editor. Args: start (int) start line of the decoration end (int) end line of the decoration """ color = self._get_scope_highlight_color() draw_order = DRAW_ORDERS.get...
[ "def", "_decorate_block", "(", "self", ",", "start", ",", "end", ")", ":", "color", "=", "self", ".", "_get_scope_highlight_color", "(", ")", "draw_order", "=", "DRAW_ORDERS", ".", "get", "(", "'codefolding'", ")", "d", "=", "TextDecoration", "(", "self", ...
Create a decoration and add it to the editor. Args: start (int) start line of the decoration end (int) end line of the decoration
[ "Create", "a", "decoration", "and", "add", "it", "to", "the", "editor", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/codefolding.py#L361-L376
train
Create a decoration and add it to the editor.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/codefolding.py
FoldingPanel._highlight_block
def _highlight_block(self, block): """ Highlights the current fold scope. :param block: Block that starts the current fold scope. """ scope = FoldScope(block) if (self._current_scope is None or self._current_scope.get_range() != scope.get_range()): ...
python
def _highlight_block(self, block): """ Highlights the current fold scope. :param block: Block that starts the current fold scope. """ scope = FoldScope(block) if (self._current_scope is None or self._current_scope.get_range() != scope.get_range()): ...
[ "def", "_highlight_block", "(", "self", ",", "block", ")", ":", "scope", "=", "FoldScope", "(", "block", ")", "if", "(", "self", ".", "_current_scope", "is", "None", "or", "self", ".", "_current_scope", ".", "get_range", "(", ")", "!=", "scope", ".", "...
Highlights the current fold scope. :param block: Block that starts the current fold scope.
[ "Highlights", "the", "current", "fold", "scope", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/codefolding.py#L378-L392
train
Highlights the current fold scope.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/codefolding.py
FoldingPanel.mouseMoveEvent
def mouseMoveEvent(self, event): """ Detect mouser over indicator and highlight the current scope in the editor (up and down decoration arround the foldable text when the mouse is over an indicator). :param event: event """ super(FoldingPanel, self).mouseMoveEven...
python
def mouseMoveEvent(self, event): """ Detect mouser over indicator and highlight the current scope in the editor (up and down decoration arround the foldable text when the mouse is over an indicator). :param event: event """ super(FoldingPanel, self).mouseMoveEven...
[ "def", "mouseMoveEvent", "(", "self", ",", "event", ")", ":", "super", "(", "FoldingPanel", ",", "self", ")", ".", "mouseMoveEvent", "(", "event", ")", "th", "=", "TextHelper", "(", "self", ".", "editor", ")", "line", "=", "th", ".", "line_nbr_from_posit...
Detect mouser over indicator and highlight the current scope in the editor (up and down decoration arround the foldable text when the mouse is over an indicator). :param event: event
[ "Detect", "mouser", "over", "indicator", "and", "highlight", "the", "current", "scope", "in", "the", "editor", "(", "up", "and", "down", "decoration", "arround", "the", "foldable", "text", "when", "the", "mouse", "is", "over", "an", "indicator", ")", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/codefolding.py#L394-L430
train
Detect mouser over indicator and highlight the current scope in the folding panel
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/codefolding.py
FoldingPanel.mousePressEvent
def mousePressEvent(self, event): """Folds/unfolds the pressed indicator if any.""" if self._mouse_over_line is not None: block = self.editor.document().findBlockByNumber( self._mouse_over_line) self.toggle_fold_trigger(block)
python
def mousePressEvent(self, event): """Folds/unfolds the pressed indicator if any.""" if self._mouse_over_line is not None: block = self.editor.document().findBlockByNumber( self._mouse_over_line) self.toggle_fold_trigger(block)
[ "def", "mousePressEvent", "(", "self", ",", "event", ")", ":", "if", "self", ".", "_mouse_over_line", "is", "not", "None", ":", "block", "=", "self", ".", "editor", ".", "document", "(", ")", ".", "findBlockByNumber", "(", "self", ".", "_mouse_over_line", ...
Folds/unfolds the pressed indicator if any.
[ "Folds", "/", "unfolds", "the", "pressed", "indicator", "if", "any", "." ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/codefolding.py#L487-L492
train
Folds the pressed indicator if any.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/codefolding.py
FoldingPanel._show_previous_blank_lines
def _show_previous_blank_lines(block): """ Show the block previous blank lines """ # set previous blank lines visibles pblock = block.previous() while (pblock.text().strip() == '' and pblock.blockNumber() >= 0): pblock.setVisible(True) ...
python
def _show_previous_blank_lines(block): """ Show the block previous blank lines """ # set previous blank lines visibles pblock = block.previous() while (pblock.text().strip() == '' and pblock.blockNumber() >= 0): pblock.setVisible(True) ...
[ "def", "_show_previous_blank_lines", "(", "block", ")", ":", "# set previous blank lines visibles", "pblock", "=", "block", ".", "previous", "(", ")", "while", "(", "pblock", ".", "text", "(", ")", ".", "strip", "(", ")", "==", "''", "and", "pblock", ".", ...
Show the block previous blank lines
[ "Show", "the", "block", "previous", "blank", "lines" ]
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/codefolding.py#L552-L561
train
Show the previous blank lines in the block
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
spyder-ide/spyder
spyder/plugins/editor/panels/codefolding.py
FoldingPanel.refresh_decorations
def refresh_decorations(self, force=False): """ Refresh decorations colors. This function is called by the syntax highlighter when the style changed so that we may update our decorations colors according to the new style. """ cursor = self.editor.textCursor() if (...
python
def refresh_decorations(self, force=False): """ Refresh decorations colors. This function is called by the syntax highlighter when the style changed so that we may update our decorations colors according to the new style. """ cursor = self.editor.textCursor() if (...
[ "def", "refresh_decorations", "(", "self", ",", "force", "=", "False", ")", ":", "cursor", "=", "self", ".", "editor", ".", "textCursor", "(", ")", "if", "(", "self", ".", "_prev_cursor", "is", "None", "or", "force", "or", "self", ".", "_prev_cursor", ...
Refresh decorations colors. This function is called by the syntax highlighter when the style changed so that we may update our decorations colors according to the new style.
[ "Refresh", "decorations", "colors", ".", "This", "function", "is", "called", "by", "the", "syntax", "highlighter", "when", "the", "style", "changed", "so", "that", "we", "may", "update", "our", "decorations", "colors", "according", "to", "the", "new", "style",...
f76836ce1b924bcc4efd3f74f2960d26a4e528e0
https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/panels/codefolding.py#L563-L579
train
Refreshes the decorations colors.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...