Merge pull request #1168 from atom/cj-feedback-package

Add feedback package
This commit is contained in:
Corey Johnson
2013-11-27 11:32:59 -08:00
8 changed files with 2 additions and 62 deletions

View File

@@ -165,7 +165,6 @@
{ label: "Install &update", command: 'application:install-update', visible: false }
{ type: 'separator' }
{ label: '&Documentation', command: 'application:open-documentation' }
{ label: 'Report an &Issue', command: 'application:report-issue' }
{ type: 'separator' }
]
}

View File

@@ -9,7 +9,7 @@
"bugs": {
"url": "https://github.com/atom/atom/issues"
},
"atomShellVersion": "0.6.11",
"atomShellVersion": "0.6.12",
"dependencies": {
"async": "0.2.6",
"bootstrap": "git://github.com/benogle/bootstrap.git",
@@ -81,6 +81,7 @@
"dev-live-reload": "0.18.0",
"editor-stats": "0.8.0",
"exception-reporting": "0.8.0",
"feedback": "0.7.0",
"find-and-replace": "0.54.0",
"fuzzy-finder": "0.27.0",
"gists": "0.12.0",

View File

@@ -2730,21 +2730,6 @@ describe "EditorView", ->
expect(buffer.lineForRow(15)).toBeUndefined()
expect(editorView.getCursorBufferPosition()).toEqual [13, 0]
describe "editor:save-debug-snapshot", ->
it "saves the state of the rendered lines, the display buffer, and the buffer to a file of the user's choosing", ->
saveDialogCallback = null
spyOn(atom, 'showSaveDialog').andCallFake (callback) -> saveDialogCallback = callback
spyOn(fs, 'writeFileSync')
editorView.trigger 'editor:save-debug-snapshot'
statePath = path.join(temp.dir, 'state')
expect(atom.showSaveDialog).toHaveBeenCalled()
saveDialogCallback(statePath)
expect(fs.writeFileSync).toHaveBeenCalled()
expect(fs.writeFileSync.argsForCall[0][0]).toBe statePath
expect(typeof fs.writeFileSync.argsForCall[0][1]).toBe 'string'
describe "when the escape key is pressed on the editor view", ->
it "clears multiple selections if there are any, and otherwise allows other bindings to be handled", ->
atom.keymap.bindKeys 'name', '.editor', 'escape': 'test-event'

View File

@@ -584,12 +584,6 @@ class DisplayBuffer
line = @lineForRow(row).text
console.log row, line, line.length
getDebugSnapshot: ->
lines = ["Display Buffer:"]
for screenLine, row in @linesForRows(0, @getLastRow())
lines.push "#{row}: #{screenLine.text}"
lines.join('\n')
### Internal ###
handleTokenizedBufferChange: (tokenizedBufferChange) =>

View File

@@ -206,7 +206,6 @@ class EditorView extends View
'editor:duplicate-line': @duplicateLine
'editor:join-line': @joinLine
'editor:toggle-indent-guide': => atom.config.toggle('editor.showIndentGuide')
'editor:save-debug-snapshot': @saveDebugSnapshot
'editor:toggle-line-numbers': => atom.config.toggle('editor.showLineNumbers')
'editor:scroll-to-cursor': @scrollToCursorPosition
@@ -1850,25 +1849,6 @@ class EditorView extends View
commitTransaction: -> @editor.commitTransaction()
abortTransaction: -> @editor.abortTransaction()
saveDebugSnapshot: ->
atom.showSaveDialog (path) =>
fs.writeFileSync(path, @getDebugSnapshot()) if path
getDebugSnapshot: ->
[
"Debug Snapshot: #{@getPath()}"
@getRenderedLinesDebugSnapshot()
@editor.getDebugSnapshot()
@getBuffer().getDebugSnapshot()
].join('\n\n')
getRenderedLinesDebugSnapshot: ->
lines = ['Rendered Lines:']
firstRenderedScreenRow = @firstRenderedScreenRow
@renderedLines.find('.line').each (n) ->
lines.push "#{firstRenderedScreenRow + n}: #{$(this).text()}"
lines.join('\n')
logScreenLines: (start, end) ->
@editor.logScreenLines(start, end)

View File

@@ -1437,10 +1437,3 @@ class Editor
# Private:
getSelectionMarkerAttributes: ->
type: 'selection', editorId: @id, invalidate: 'never'
# Private:
getDebugSnapshot: ->
[
@displayBuffer.getDebugSnapshot()
@displayBuffer.tokenizedBuffer.getDebugSnapshot()
].join('\n\n')

View File

@@ -670,9 +670,3 @@ class TextBuffer extends telepath.Model
for row in [start..end]
line = @lineForRow(row)
console.log row, line, line.length
getDebugSnapshot: ->
lines = ['TextBuffer:']
for row in [0..@getLastRow()]
lines.push "#{row}: #{@lineForRow(row)}"
lines.join('\n')

View File

@@ -322,9 +322,3 @@ class TokenizedBuffer
for row in [start..end]
line = @lineForScreenRow(row).text
console.log row, line, line.length
getDebugSnapshot: ->
lines = ["Tokenized Buffer:"]
for screenLine, row in @linesForScreenRows(0, @getLastRow())
lines.push "#{row}: #{screenLine.text}"
lines.join('\n')