Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Feature to associate file types with external editors#15088

Merged
niteskum merged 5 commits intoadobe:masterfrom
niteskum:OpenWithExternalEditor
Mar 13, 2020
Merged

Feature to associate file types with external editors#15088
niteskum merged 5 commits intoadobe:masterfrom
niteskum:OpenWithExternalEditor

Conversation

@niteskum
Copy link
Copy Markdown
Collaborator

@niteskum niteskum commented Mar 5, 2020

in this PR, added an extension to which read User preferences "externalApplications" wher users can associate an external Applications to any file type:

sample Prefernces:
"externalApplications": {
"jpg": "default",
"doc": "notepad"
}

in this case double click on a jpg file in file tree, jpg file will be opened in its associated os default Application and ,doc file will be opened in notepad Application.

@swmitra @shubhsnov @sobisht @narayani28 Please review

@niteskum niteskum changed the title Feature to associate graphic files and other file types with external editors Feature to associate file types with external editors Mar 5, 2020
{
"name": "brackets-open-external_application",
"dependencies": {
"open": "0.0.5"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

open module does not seem to be latest.
Quoting https://www.npmjs.com/package/open

Note: The original open package was previously deprecated in favor of this package, and we got the name, so this package is now named open instead of opn. If you're upgrading from the original open package (open@0.0.5 or lower), keep in mind that the API is different.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

above 0.0.5 , open module version starts with 6.0.0. Open module starting 6.0.0 is not compatible with node version 6.11.0.

It gives below error when requiring module:
const wslToWindowsPath = async path => {
^^^^

SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)

*/
function addExtensionToExternalAppList(ext) {

if(typeof ext !== 'string') {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add check for list instead.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

Copy link
Copy Markdown
Contributor

@g-217 g-217 left a comment

Choose a reason for hiding this comment

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

Please have a look at node_module named open.

@niteskum niteskum merged commit e5ff7d2 into adobe:master Mar 13, 2020
niteskum added a commit that referenced this pull request Mar 24, 2020
Feature to associate file types with external editors
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.

2 participants