Comments (7)
Hi John,
Even if we publish such an API in the Git Client, currently plugins are isolated from one another so your plugin has no mechanism to use this API. We would have to first implement this cross-plugin communication within Oxygen.
Yes, you can poll ${git(short_branch_name)} to detect the change. If your plugin contributes a view, perhaps you can make these checks on a focus gain event.
from oxygen-git-client-addon.
Thanks for the quick response.
(1) This may be a kludge, but I'd like to know in concept if you think it could also work to have a project-specific custom editor variable that includes ${git(short_name)} as it's value. Would this be evaluated always if the branch changes?
(2) Do you think there would be other business drivers for Syncrosoft to consider adding a delegation proxy or broker in Oxygen core that could safely relay requests to another plugin via introspection or other such magic? For security's sake, this might involve asking the user if they want to allow plugin X to have certain privs on plugin Y, perhaps with the option to only allow it for digitally signed plugins.
I know this second one is not trivial by any means, but perhaps if you keep it in the back of your mind and discuss with your peers, it might form the basis for extending the Oxygen ecosystem or at lease allow custom plugin developers to leverage your many plugins in new ways.
Best regards,
John
from oxygen-git-client-addon.
Hi John,
Somehow I've missed your reply, sorry for that.
(1) Yes, there is no caching involved, so it should work.
(2) We don't have such a huge plugin community to justify it. If both plugins are developed by you, you can pass information between them through the PluginWorkspace.getOptionsStorage()
API. One plugin writes options, the other listens on them. Thinking on this approach, one (maybe you :) could fork the Git Client project and implement a notification system based on the same principle like this:
- Add a {{com.oxygenxml.git.service.GitEventListener}}
- For each intercepted event you use
PluginWorkspace.getOptionsStorage()
to write a GIT_EVENTS option. - In your plugin you listen on this GIT_EVENTS and decide what to do.
from oxygen-git-client-addon.
What we could do fairly easy is to write a couple of options, like GIT_REPOSITORY or GIT_CHECKOUT_BRANCH. Your plugin could add listeners on these options and react immediately when once the user changes the repository or the branch. Are there other events you are interested in?
from oxygen-git-client-addon.
I'm a bit fried at the moment to consider other possible events, but for our current purposes, we just need a way to refresh our plugin's internal state when a branch change occurs while the user has the same project open. The events you mentioned would be perfect for this. Thanks.
from oxygen-git-client-addon.
We released version 5.2.0 in which we save these two options:
PLUGIN_CUSTOM_OPTIONS.com.oxygenxml.git.current.branch
PLUGIN_CUSTOM_OPTIONS.com.oxygenxml.git.selected.repository
This means that you can add a listener on ro.sync.exml.workspace.api.options.WSOptionsStorage from another plugin and you will be notified when they are changed. If you encounter any challenges, please write on our support email address and we will give you additional details and consulting.
from oxygen-git-client-addon.
Wow. Thanks so much for providing a way to do this.
from oxygen-git-client-addon.
Related Issues (20)
- GitLFS Support HOT 9
- Restore deleted file from Git History HOT 1
- Show current branch in Git Staging view HOT 3
- Refresh on view: Git History and Git Branch Manager HOT 2
- Feature request: Ask user to discard XPR changes before checkout HOT 4
- Version 4.0.0 release HOT 1
- In Windows, Oxygen UI temporarily freezes after changing focus to Oxygen with Git Staging view shown HOT 3
- 4.0.0 problem HOT 8
- Support filesystem-based remote repositories HOT 1
- Do not show outdated unstaged/staged information during branch or repo changes HOT 6
- Feature request: Add "Discard changes" to the context menu of a file HOT 1
- Release 5.0.0 HOT 3
- In history view, provide a bit more name for longer origin HEAD markers HOT 4
- In the Stashes dialog, use a movable divider between the stash names and file list HOT 3
- For detached HEAD, include commit details in commit SHA tooltip HOT 2
- Improve dialog box message for failed pull when affected locally modified files exist HOT 6
- Improve dialog box message for failed pull-rebase when locally modified files and unpushed commits exist HOT 6
- Error "Too Many Authentication Failures" when using ssh URLs to Gerrit server HOT 10
- Error retrieving files from Gitlab repo with large number of files HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oxygen-git-client-addon.