Skip to content
This repository was archived by the owner on Mar 16, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/atom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ AtomPackage _package;
/// The singleton instance of [Atom].
final Atom atom = new Atom();

final Shell shell = new Shell();

final JsObject _ctx = context['atom'];

/// An Atom package. Register your package using [registerPackage].
Expand Down Expand Up @@ -638,6 +640,14 @@ class AtomEvent extends ProxyHolder {
void stopImmediatePropagation() => invoke('stopImmediatePropagation');
}

class Shell {
Shell();

JsObject get _shell => require('shell');

openExternal(String url) => _shell.callMethod('openExternal', [url]);
}

class BufferedProcess extends ProxyHolder {
static BufferedProcess create(String command, {
List<String> args,
Expand Down
3 changes: 3 additions & 0 deletions lib/plugin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ class AtomDartPackage extends AtomPackage {
return new Future.delayed((new Duration(milliseconds: 100)));
}).then((_) => analysisServer.reanalyzeSources());
});
_addCmd('atom-workspace', 'dartlang:send-feedback', (_) {
shell.openExternal('https://github.com/dart-atom/dartlang/issues');
});

// Text editor commands.
_addCmd('atom-text-editor', 'dartlang:newline', editing.handleEnterKey);
Expand Down
8 changes: 4 additions & 4 deletions menus/atom-dart.cson
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# See https://atom.io/docs/latest/hacking-atom-package-word-count#menus.

'menu': [
{
'menu': [ {
label: 'Packages'
submenu: [
label: 'Dart'
submenu: [
{label: 'Reanalyze Sources', command: 'dartlang:reanalyze-sources'},
{label: 'Show Analysis Server Status', command: 'dartlang:analysis-server-status'}
{label: 'Re-analyze Sources', command: 'dartlang:reanalyze-sources'},
{label: 'Show Analysis Server Status', command: 'dartlang:analysis-server-status'},
{label: 'Send Feedback…', command: 'dartlang:send-feedback'}
]
]
}
Expand Down
Loading