Code Monkey home page Code Monkey logo

nb-git-open-in-external-repoviewer's Introduction


Looking for maintainers, who want to take over the development!


Build Status Donate

nb-git-open-in-external-repoviewer

NetBeans Plugin which opens the Web UI of the Git repository you cloned from.

See http://plugins.netbeans.org/plugin/49930/open-url-of-git-repository-hoster

This plugins adds git-related actions to the context menu of a GIT-versioned project OR of the tab context menu. Internally it parses the GIT URL of the project, generates specific URLs for the GIT repository hoster and opens the URL in the browser. The browser is configurable at Tools|Options|General|Web Browser.

Following actions are added to the project context menu:

  • "Show log"

    Open the commit overview/history view for the current branch

  • "Show commit"

    Open the commit for the current revision (where implemented)

  • "Show diff"

    Open the commit diff for the current revision (where implemented: currently github, gitblit, gitlab)

  • "Create pull request'

    Open a website to create a pull request (where implemented: currently bitbucket, gitlab)

Following actions are added to the context menu of the editor and its tab:

  • "Show file"

    Open the current file for the current revision (where implemented: currently gitblit, bitbucket, github, gitlab)

  • "Show file history"

    Open the history view of the current file (where implemented: currently gitblit, bitbucket, github, gitlab)

You can configure shortcuts for each action at Tools|Options|Keymap. Filter for the actions with the name "* (in browser)" in the category "Git".

Currently supported patterns: GitBlit, gitlab.com, bitbucket.org, github.com, GitWeb

Updates in 1.6.0:

  • [Feature 40]: Improved Gitlab support / add support for 'Merge request'

Updates in 1.5.0:

Updates in 1.4.2.1:

  • [Feature 35]: Add possibility to add keyboard shortcuts. Configure them at Tools|Options|Keymap
  • [Bugfix 36]: Fixed: Use configured browser to open links. Configure it at Tools|Options|General|Web Browser
  • [Bugfix 31]: Fixed: WARNING [org.openide.util.Utilities]: findContextMenuImpl, getPopupPresenter returning null for

Updates in 1.4.1.1:

  • [Issue 34]: Configuration-Migrator from 1.4.0.2 to 1.4.1.0 does not work

Updates in 1.4.1:

  • [Issue 28]: Open file, open file history and commit diff actions for github.com
  • [Issue 32]: Open file, open file history actions for bitbucket (PR by @mkleint)
  • [Issue 33]: Migrator for new patterns (NOTE: If you altered the pattern configuration manually in the previous version then the migration cannot be done automatically. You have to reset the configuration in the options and reintroduce your changed manually.)

Updates in 1.4.0.2:

  • [Issue 30]: Fixed NoSuchElementException

Updates in 1.4.0:

  • [Issue 22]: Add "Create Pull Request" action (currently for bitbucket only) (PR by @mkleint)
  • [Issue 20]: Support patterns for Gitlab.com
  • [Issue 24]: Additional patterns for github/gitblit
  • [Issue 26]: More patterns for gitblit
  • [Refactoring 23]: Refactoring of patterns - introduced a submenu and registered to editor tab too
  • [Refactoring 27]: Configurable options - custom patterns for hosters can be defined in options

Updates in 1.3.7:

Updates in 1.3.6:

  • [Issue 19]: Fixed: Pattern for Gitblit does not work

Updates in 1.3.5:

  • [Issue 10]: Fixed: Make query of strategies failsafe

Updates in 1.3.4:

  • [Issue 9]: Fixed: NullPointerException at GitUtils.getRemote

Updates in 1.3.3:

  • [Issue 8]: Fixed: Github: Remote URLs without ".git" postfix are not supported

Updates in 1.3.2:

  • [Issue 7]: Fixed: Branchnames with slashes are not supported

Updates in 1.3.1:

  • [Issue 5]: Fixed StringIndexOutOfBoundsException when opening the project's context menu
  • [Issue 6]: Add position attribute to action to prevent warning in the log

Updates in 1.3:

  • [Issue 2]: Convert to maven based module
  • [Issue 3]: Add support for URLs with embedded credentials
  • [Issue 4]: Implement GitHub connection also for git@... URLs

Note: It only works for tracked branches. That means your local branch must be associated with a remote one. For example: your local branch 'myfeature' has a remote counterpart 'origin/myfeature'.

Not supported are

  • Pure local branches
  • Checked out tags/revisions/detached heads
  • Multiple selected projects

Provide defects, request for enhancements (f.e. new patterns) and feedback at https://github.com/markiewb/nb-git-open-in-external-repoviewer/issues

btn_donate_SM.gif

Compatible to >=NB 7.4

Legal disclaimer: Code is licensed under Apache 2.0. The names of the GIT repository hosters are trademarks of their owners. I am not affiliated with any of these owners nor endorsed by them.

nb-git-open-in-external-repoviewer's People

Contributors

chris2011 avatar datamints-off avatar markiewb avatar mqrius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nb-git-open-in-external-repoviewer's Issues

NullPointerException at GitUtils.getRemote

I have a git-based project with 2 remotes. Both private BitBucket repositories.
I get the exception when I right-click on the project in "Projects" panel.

Other git-based projects don't have the same problem.

https://gist.github.com/MacDada/cbd6b0533b6df878e90e
https://gist.github.com/MacDada/1ac8c9ac600c1427c557
http://statistics.netbeans.org/analytics/exception.do?id=725483

java.lang.NullPointerException
    at de.markiewb.netbeans.plugin.git.openinexternalviewer.GitUtils.getRemote(GitUtils.java:69)

WARNING [org.openide.util.Utilities]: findContextMenuImpl, getPopupPresenter returning null for

...
System Info:
Product Version = NetBeans IDE 8.0.2 (Build 201411181905) (#8230772f5f18)
...

WARNING [org.openide.util.Utilities]: findContextMenuImpl, getPopupPresenter returning null for de.markiewb.netbeans.plugin.git.openinexternalviewer.SubMenuActionForEditor@43e18667
WARNING [org.openide.util.Utilities]: findContextMenuImpl, getPopupPresenter returning null for de.markiewb.netbeans.plugin.git.openinexternalviewer.SubMenuActionForProject@7e16f5ee
WARNING [org.openide.util.Utilities]: findContextMenuImpl, getPopupPresenter returning null for de.markiewb.netbeans.plugin.git.openinexternalviewer.SubMenuActionForProject@7e16f5ee

Add to editor context menu

I know there is a plugin called github navigator: https://github.com/jglick/nbgittricks but because of your plugin can handle gitlab, bitbucket, github and what I added to it, it would be very nice, if we can have a context menu fĂźr each file to open this file in the git repo and inside a file, a context menu entry and shortcut to open the file with a specific line is selected. If I have time, I could do a pull request, but atm it is only a feature request to you.

Regards

Chris

Right-clicking on Python Project's Root causes a java.util.NoSuchElementException

I just performed a Plug-ins update and...

Right-clicking on Python Project's Root causes a java.util.NoSuchElementException shown below.
(No context menu appears on project root but sub tiers do show a context menu without issue)

This issue does not occur when context obtaining context menu of Java based projects.
Deactivated this Plugin and this issue does not manifest itself.

Plugin Version: 1.4.0.1

Nebeatns/JRE:
Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 2
Java: 1.8.0_60; Java HotSpot(TM) 64-Bit Server VM 25.60-b23
Runtime: Java(TM) SE Runtime Environment 1.8.0_60-b27
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)

untitled

java.util.NoSuchElementException
at java.util.ArrayList$Itr.next(ArrayList.java:854)
at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1042)
at de.markiewb.netbeans.plugin.git.openinexternalviewer.actions.AbstractRepositoryPopupAction.detectRepositoryStrategy(AbstractRepositoryPopupAction.java:101)
at de.markiewb.netbeans.plugin.git.openinexternalviewer.actions.AbstractRepositoryPopupAction.getPopupPresenter(AbstractRepositoryPopupAction.java:63)
at org.openide.util.Utilities.actionsToPopup(Utilities.java:2842)
at org.openide.util.Utilities.actionsToPopup(Utilities.java:2928)
at org.openide.explorer.view.TreeView.createPopup(TreeView.java:1058)
at org.openide.explorer.view.TreeView$PopupAdapter.showPopup(TreeView.java:1555)
at org.openide.awt.MouseUtils$PopupMouseAdapter.maybePopup(MouseUtils.java:189)
at org.openide.awt.MouseUtils$PopupMouseAdapter.mouseReleased(MouseUtils.java:184)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6535)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6300)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4891)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2750)
at java.awt.Component.dispatchEvent(Component.java:4713)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Context menu of maven/git-Project throws java.lang.StringIndexOutOfBoundsException: String index out of range: -1

https://netbeans.org/bugzilla/show_bug.cgi?id=237721

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1911)
    at de.markiewb.netbeans.plugin.git.openinexternalviewer.OpenAction$ContextAction.init(OpenAction.java:111)
    at de.markiewb.netbeans.plugin.git.openinexternalviewer.OpenAction$ContextAction.<init>(OpenAction.java:61)
    at de.markiewb.netbeans.plugin.git.openinexternalviewer.OpenAction$ContextAction.<init>(OpenAction.java:55)
    at de.markiewb.netbeans.plugin.git.openinexternalviewer.OpenAction.createContextAwareInstance(OpenAction.java:52)
    at org.openide.util.Utilities.actionsToPopup(Utilities.java:2832)
    at org.openide.util.Utilities.actionsToPopup(Utilities.java:2928)
    at org.openide.explorer.view.TreeView.createPopup(TreeView.java:1058)
    at org.openide.explorer.view.TreeView$PopupAdapter.showPopup(TreeView.java:1555)
    at org.openide.awt.MouseUtils$PopupMouseAdapter.maybePopup(MouseUtils.java:189)
    at org.openide.awt.MouseUtils$PopupMouseAdapter.mousePressed(MouseUtils.java:180)

Add a functionality to test the urls

I thought that your plugin worked with the git.company.net url but maybe I missed smth (#20). After I installed the 1.6.0 no entries for the gitlab project. I have to change the regex and for this I have to apply them, right click on the project and see whether I got a entry or not and this is very a pain in the ass. Maybe a teste for such urls would be good, right inside the regex window. That it will show you (maybe live or after apply) which projects were detected.

Add position attribute to remove warning from log

WARNING [org.openide.filesystems.Ordering]: Not all children in Projects/Actions/ marked with the position attribute: [de-markiewb-netbeans-plugin-git-openinexternalviewer-OpenAction.shadow], but some are: [org-netbeans-modules-projectimport-eclipse-core-UpdateProjectAction.shadow, org-netbeans-modules-versioning-core-ProjectMenuItem.instance]

Make query of strategies failsafe

java.lang.NullPointerException
    at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
    at java.util.regex.Matcher.reset(Matcher.java:309)
    at java.util.regex.Matcher.<init>(Matcher.java:229)
    at java.util.regex.Pattern.matcher(Pattern.java:1093)
    at de.markiewb.netbeans.plugin.git.openinexternalviewer.strategies.BitBucketStrategyImpl.supports(BitBucketStrategyImpl.java:52)
    at de.markiewb.netbeans.plugin.git.openinexternalviewer.OpenAction$ContextAction.getStrategy(OpenAction.java:68)
    at de.markiewb.netbeans.plugin.git.openinexternalviewer.OpenAction$ContextAction.init(OpenAction.java:125)
    at de.markiewb.netbeans.plugin.git.openinexternalviewer.OpenAction$ContextAction.<init>(OpenAction.java:61)
    at de.markiewb.netbeans.plugin.git.openinexternalviewer.OpenAction$ContextAction.<init>(OpenAction.java:55)
    at de.markiewb.netbeans.plugin.git.openinexternalviewer.OpenAction.createContextAwareInstance(OpenAction.java:52)
    at org.openide.util.Utilities.actionsToPopup(Utilities.java:2832)
    at org.openide.util.Utilities.actionsToPopup(Utilities.java:2928)
    at org.openide.explorer.view.TreeView.createPopup(TreeView.java:1058)
    at org.openide.explorer.view.TreeView$PopupAdapter.showPopup(TreeView.java:1555)
    at org.openide.awt.MouseUtils$PopupMouseAdapter.maybePopup(MouseUtils.java:189)
    at org.openide.awt.MouseUtils$PopupMouseAdapter.mousePressed(MouseUtils.java:180)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:280)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279)
    at java.awt.Component.processMouseEvent(Component.java:6524)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
    at java.awt.Component.processEvent(Component.java:6292)
    at java.awt.Container.processEvent(Container.java:2234)
    at java.awt.Component.dispatchEventImpl(Component.java:4883)
    at java.awt.Container.dispatchEventImpl(Container.java:2292)
    at java.awt.Component.dispatchEvent(Component.java:4705)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4530)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
    at java.awt.Container.dispatchEventImpl(Container.java:2278)
    at java.awt.Window.dispatchEventImpl(Window.java:2739)
    at java.awt.Component.dispatchEvent(Component.java:4705)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
    at java.awt.EventQueue.access$400(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.awt.EventQueue$3.run(EventQueue.java:691)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.awt.EventQueue$4.run(EventQueue.java:719)
    at java.awt.EventQueue$4.run(EventQueue.java:717)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Support patterns for Gitlab.com

In my daily work, I have to use gitlab, but when I want to use your tool, to open the external url, it doesn't work, because I don't get an entry. I think that the support for gitlab is missing.

Regards

Chris

Use configured browser to open links

The links opened by this extension / addon seem to open in IE by default when working on a Windows environment. Though I can understand that will work in most cases. This is definitely not the preferred browser of most of Netbeans users (even the ones that use windows ;)).

It would be awesome if it could load the systems default browser instead.

Like I have set here:
default browser

Migrator for new patterns

The configuration of 1.4.0.2 must be migrated because of newly introduced patterns #28 #32

❗ If you altered the pattern configuration manually in the previous version then the migration cannot be done automatically. You have to reset the configuration in the options and reintroduce your changed manually

More patterns for gitblit

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.