Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] Open on GitHub command #35

Closed
paulvi opened this issue Jun 11, 2014 · 11 comments
Closed

[feature request] Open on GitHub command #35

paulvi opened this issue Jun 11, 2014 · 11 comments

Comments

@paulvi
Copy link
Contributor

paulvi commented Jun 11, 2014

Please add Open on GitHub command for context menu.
It should open repository and locate file page, e.g. for README.md

https://github.com/ANCIT/eGit-extensions/blob/master/README.md

that is branch should be checked from git repository propoerties.

With it user can quickly do even more GitHub operations.

@cmalai
Copy link
Member

cmalai commented Jun 11, 2014

Correct me if i am wrong. But the understanding is that

On Git Repositories view, if somebody expands the working directory and selects a file in it and right clicks, he should see a Open on GitHub command. Clicking on that should open a Browser in Eclipse to show its content on GitHub.

@paulvi
Copy link
Contributor Author

paulvi commented Jun 11, 2014

User can righ-click on any file in Project Explorer (Package Explorer is to be deprecated)
and select Open on GitHub. If the project has .git/config and there is github remote in it, then open GitHub page for that file

Example https://github.com/Nodeclipse/www.nodeclipse.org

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = https://github.com/Nodeclipse/www.nodeclipse.org.git
    puttykeyfile =

I right-click demos\navigation.html Open on GitHub

then browser is opened for https://github.com/Nodeclipse/www.nodeclipse.org/blob/gh-pages/demos/navigation.html

@paulvi
Copy link
Contributor Author

paulvi commented Jun 18, 2014

Now the same makes sense for BitBucket

Open on BitBucket

or maybe general

Open on Git server (GitHub, BitBucket)

@cmalai
Copy link
Member

cmalai commented Jun 18, 2014

We are thinking of open on Git Server and try to get the GitServer URL and try to open on it. Thanks for the comment and time taken to do that.

@cmalai
Copy link
Member

cmalai commented Aug 1, 2014

Its implemented in the latest build. Please take an update and confirm from your side that this is the requirement.

@cmalai cmalai closed this as completed Aug 1, 2014
@paulvi
Copy link
Contributor Author

paulvi commented Aug 4, 2014

OK

@paulvi
Copy link
Contributor Author

paulvi commented Aug 4, 2014

I see new open in Browser

But it does nothing in Eclipse Luna 4.4, on Windows 7, Java 1.8_10

because of error

org.eclipse.e4.core.di.InjectionException: java.lang.LinkageError: org/eclipse/jgit/lib/Repository
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:62)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:247)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:229)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:149)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:825)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:701)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$6(HandledContributionItem.java:685)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:613)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.lang.LinkageError: org/eclipse/jgit/lib/Repository
    at org.ancit.github.utils.pr.commands.OpenInBrowserHandler.calculateURL(OpenInBrowserHandler.java:107)
    at org.ancit.github.utils.pr.commands.OpenInBrowserHandler.execute(OpenInBrowserHandler.java:69)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
    ... 37 more

@cmalai cmalai reopened this Aug 4, 2014
@amrutha
Copy link
Contributor

amrutha commented Aug 4, 2014

According to our understanding, there are 2 "org.eclipse.jgit" plugins available in your plugins folder
{"org.eclipse.jgit_3.4" and "org.eclipse.jgit_3.0"}. Can you please try removing plugin "org.eclipse.jgit_3.4.x" from plugins folder and start your eclipse.
This should resolve above mentioned Linkage Error.

@paulvi
Copy link
Contributor Author

paulvi commented Aug 7, 2014

Eclipse is actually relative fresh Luna 4.4.0

I checked there are 2 files

org.eclipse.jgit_3.4.1.201406201815-r.jar
org.eclipse.jgit_3.4.2.201406211858.jar

However as far as I know eclipse should not care about just files in plugins folder, there can be much more after series of updates. But important is what is inside Eclipse registry of plugins.

UPDATE: strangely, but org.eclipse.jgit_3.4.1.201406201815-r.jar was used (and blocked) and org.eclipse.jgit_3.4.2.201406211858.jar could be deleted. After restart I could open a page for a README.md file

@paulvi
Copy link
Contributor Author

paulvi commented Aug 7, 2014

I think external default browser should be used

(On Windows default internal browser is IE, and it is not default browser of around 50% users)

@paulvi
Copy link
Contributor Author

paulvi commented Aug 8, 2014

OK, the browser to use is taken from Eclipse Preferences.

It just should be noted in features or changes list.

closing. Thank you for the feature

@paulvi paulvi closed this as completed Aug 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants