Skip to content
This repository was archived by the owner on Dec 30, 2019. It is now read-only.

Conversation

@Rxbsxn
Copy link
Contributor

@Rxbsxn Rxbsxn commented Jul 7, 2017

WIP, but almost done. I think we let user define his OS and IDE, and later pass this information to component

When I come back. I will work on this feature: https://www.youtube.com/watch?v=lYGIaAkyu6M

@PoslinskiNet
Copy link
Member

It will close this issue: #10

{{/content.menu-item}}

{{#content.menu-item onClick="openSomething" disabled=true}}
{{#content.menu-item onClick="openInDirectory"}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always use closure actions (action "openInDirectory") :)


openInDirectory() {
let projectPath = this.get('project.path')
return this.get('terminal').execute(`nautilus ${projectPath}`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nautilus?
Rather than using 3rd parties try to use official electron API:
https://github.com/electron/electron/blob/master/docs/api/shell.md

export default Component.extend({
notify: inject.service(),
terminal: inject.service(),
ideName: 'code',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, hardcoded :/ I will push my changes related with settings but is still need to be tested. If you would like to practice, go ahead.

});
},

openInEditor() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can move these methods to terminal service and just pass them the path :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants