Open madoar opened 5 years ago
Makes sense for me but I would like @qparis to decide.
For the moment I agree. The shortcut thing has been made quickly so that we have something that can work, but it clearly lacks some features. At the target, we could use a template system like mustache to generate different kinds of shortcuts
At the target, we could use a template system like mustache to generate different kinds of shortcuts
The suggestion targets not the creation of new shortcuts just the reading part. I don't think a template system would work for reading. Another idea is: do we really need a custom shortcut reader for every engine type? Or can we create a more abstract implementation which delegates some tasks to the engine implementation?
Or can we create a more abstract implementation which delegates some tasks to the engine implementation?
Could work. But probably this would only lead to the WineShortcutReader
being moved inside of the Wine implementation. Is it an advantage compared to having it separated?
I think this depends on how we define a shortcut
. For me a shortcut is simply a location
and a visualized name
. A shortcut has the meaning that the file at the given location
can be accessed with an application the user has installed.
The open question in this definition is: how can the file at the location
be accessed, i.e. with which application? The answer to this is in my opinion given by the used engine. Therefore I think it is fine to add the shortcut execution logic directly to the engine implementation.
Slightly off-topic: We could also think about adding other kinds of shortcuts that don't depend on the engine. For example shortcuts for text files. A text-file shortcut would then open a system editor for the specified text-file.
@qparis what's your definition of a shortcut? Given @madoar's definition, we could even thing about using the Appdata standard and get rid of our custom shortcuts directly.
As an alternative to #1068 we could think about remove
ShortcutReader
because it basically functions as a wrapper for a concrete engine specific shortcut reader implementation (currently onlyWineShortcutReader
). Therefore we could alternatively use the concrete engine specificWineShortcutReader
instead. If we later on add other shortcut reader implementations we would then need to add some selection logic in Java to choose the correct shortcut reader implementation.See also https://github.com/PhoenicisOrg/phoenicis/pull/2025