satyagraha / gfm_viewer

An Eclipse plugin providing an accurate view of GitHub Flavored Markdown (.md) files
95 stars 27 forks source link

Does it take into account the proxies I configured in Eclipse? #64

Closed culmat closed 10 years ago

culmat commented 10 years ago

It just went transforming and never came back ...

paulvi commented 10 years ago

As far as I know Eclipse is using OS preferences, that is Internet Explorer on Windows, while this plugin uses java libraries to do network communication.

satyagraha commented 10 years ago

The issue is with the transformation stage, not the viewing stage. At https://github.com/satyagraha/gfm_viewer/blob/master/plugin/source/code/satyagraha/gfm/support/impl/WebServiceClientDefault.java#L71 we can see where the call to GitHub API services is made. No provision for web proxies is made in this code presently.

At http://blog.vogella.com/2009/12/08/eclipse-rcp-proxy-preference/ we get some clues as to how to go about getting the Eclipse proxy information. Then these need to be attached to the Jersey API configuration prior to the API call.

This looks like a very desirable enhancement, and it should definitely be in the next release. I believe, as Paul indicates, that no changes would be necessary in the area of the view window browser component as it should already handle proxies properly, either by using the Eclipse proxy settings or system-wide ones (as on Windows via IE registry settings I think).

satyagraha commented 10 years ago

@PaulVI I have implemented support for proxies configured as Manual in Eclipse Preferences/General/Network Connections. This work is in the develop branch. If you have time, could you verify that there is no regression in functionality for non-proxy usage by building locally and running?

@culmat As above, I have implemented this requested feature, and tested it manually as best I can. If you are in a position to build the plugin from the develop branch and try it out in your environment that would be great. If not, no problem. Note the Native provider is not supported (this is a known Eclipse issue).

If all turns out good, I will merge to master and do an official release to BinTray of this version. This was not a simple change, and involved using an entirely new web client jar. Small enhancements can have big implications...

paulvi commented 10 years ago

I don't have proxy.

Could you put binary somewhere as 1.9 (or 2.0 as it is big change ) beta

Generally if you want more people to try what you think is not finished, just label it beta and release.

culmat commented 10 years ago

I have difficulties to compile / build the project. Have you got a snapshot build at hand?

paulvi commented 10 years ago

@satyagraha you, see I am not the only one to have problem with build, see #61 now reopened

satyagraha commented 10 years ago

I've got a binary build locally, however BinTray have unilaterally changed their upload REST API recently by removing the explode= option to unpack zip files which is currently used in the publishing of the update site. So I have had to try to emulate that and it has proved rather difficult.

I am continuing to work on the problem and will update when possible.

satyagraha commented 10 years ago

OK, I have manually added a new binary build available from the update site http://dl.bintray.com/satyagraha/generic/1.8.4 - please both give this a try. The default installation via Eclipse Marketplace remains 1.8.3 as that is controlled from the master branch of the project.

paulvi commented 10 years ago

I pass, I don't have a proxy.

Generally if you want more people to try what you think is not finished, just label it beta and release.

Release is general availability, e.g. mentioned in README.

satyagraha commented 10 years ago

@PaulVI Were you able to try the new version in default non-proxy mode to verify that there is no regression in functionality?

paulvi commented 10 years ago

Yes, (that was my post-thought) I will.

I repeat for 3rd time, make http://dl.bintray.com/satyagraha/generic/1.8.4 more public, e.g. in README and/or MP entry

paulvi commented 10 years ago

Installed.

gfm

Using.

But I expected that UI of preferenced at least show checkbox

[ ] use system proxy

Without this UI change this new feature is not discoverable

satyagraha commented 10 years ago

This feature is meant to be automatic and transparent, i.e. proxy support is automatically enabled if set in main Eclipse preferences Network pages. Many other plugins use network operations, and none have individual control of proxy usage.

culmat commented 10 years ago

I just wanted to test the bintray update site for 1.8.4 when I noticed it now works with 1.8.3 installed! So I can not reproduce my initial problem and can not very the fix in 1.8.4.... Sorry for that.

satyagraha commented 10 years ago

Thanks to both for input. I have released an updated version 1.9.0 at update site http://dl.bintray.com/satyagraha/generic/1.9.0 and would appreciate it if anyone could try it out.

I am completely baffled about how earlier versions could work in a proxy environment. Just remember that unless the .md file changes then no attempt is made to regenerate the HTML and the local filesystem version will be shown.

satyagraha commented 10 years ago

Fixed in 1.9.2.