GithubHelp home page GithubHelp logo

Comments (8)

dhuebner avatar dhuebner commented on June 2, 2024

@chroberino
Are you also missing the "Open in External App" file browser menu contribution after installing Open in External App extension?
I see the command in the palette, but not the menu entry...

from theia.

dhuebner avatar dhuebner commented on June 2, 2024

Right now theia.env.openExternal() is called when the vscode.env.openExternal is triggered. This calls windowStateExt.openUri(uri) and its current implementation just redirects to the opener-service.ts without providing any further information except the URI. The only handler that matches is the EditorPreview so the file is opened in Theia. I also didn't found a registered handler that can call external applications. In electron case such a handler should probably call shell.openPath(fsPath) to redirect to the OS editors.

from theia.

dhuebner avatar dhuebner commented on June 2, 2024

Maybe we could also offer Open With... -> System Editor in Theia?

from theia.

chroberino avatar chroberino commented on June 2, 2024

@chroberino Are you also missing the "Open in External App" file browser menu contribution after installing Open in External App extension? I see the command in the palette, but not the menu entry...

It's the same for me: I don't get this item in the context menu but only the entry in the command palette.
I have already created an issue for this: tjx666/open-in-external-app#63

from theia.

dhuebner avatar dhuebner commented on June 2, 2024

@chroberino
Menu contribution works in vs-code, so might be a problem with Thiea. We should investigate what goes wrong there.

@JonasHelming
It is not related to the vscode.env.openExternal handling problem, but I did some experiments with the new OpenWithService and could contribute a new built-in "open handler" that redirects to the operation system.

Bildschirmfoto 2024-04-12 um 15 06 50

from theia.

chroberino avatar chroberino commented on June 2, 2024

Menu contribution works in vs-code, so might be a problem with Thiea. We should investigate what goes wrong there.

I am far from being a deep-water-diver in Eclipse Theia. I am rather just learning to swim...

But I can quickly contribute to following snippet as an insight from the package.json file of the "Open in External App" extension:

   "contributes": {
       "commands": [
           {
               "command": "openInExternalApp.open",
               "title": "%cmd.open%"
           },
           {
               "command": "openInExternalApp.openMultiple",
               "title": "%cmd.openMultiple%"
           }
       ],
       "menus": {
           "explorer/context": [
               {
                   "when": "!explorerResourceIsFolder && isFileSystemResource",
                   "command": "openInExternalApp.open",
                   "alt": "openInExternalApp.openMultiple",
                   "group": "navigation@10"
               }
           ],
           "editor/title/context": [
               {
                   "when": "isFileSystemResource",
                   "command": "openInExternalApp.open",
                   "alt": "openInExternalApp.openMultiple",
                   "group": "navigation@10"
               }
           ]
       }
   }

https://github.com/tjx666/open-in-external-app/blob/main/package.json

Maybe this offers some obvious hints?
Maybe the when condition is not true in Theia?
Maybe the alt or group confuses Theia?

from theia.

dhuebner avatar dhuebner commented on June 2, 2024

@chroberino
Okay, thanks! I will check why the contribution doesn't work.

from theia.

dhuebner avatar dhuebner commented on June 2, 2024

@chroberino
Yes, it looks like Theia is missing context key handling for isFileSystemResource

from theia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.