Bug 299020 - [Net] Check Button for Edit Proxy Entry
Summary: [Net] Check Button for Edit Proxy Entry
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Team (show other bugs)
Version: 3.5.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform Team Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-07 05:00 EST by Juergen Weber CLA
Modified: 2019-09-06 16:06 EDT (History)
4 users (show)

See Also:
wojciech.galanciak: review? (Szymon.Brandys)


Attachments
Apache Directory Studio's check connection dialog (35.02 KB, image/png)
2010-01-07 05:01 EST, Juergen Weber CLA
no flags Details
initial patch (21.55 KB, patch)
2010-09-01 07:05 EDT, Wojciech Galanciak CLA
no flags Details | Diff
proposed patch (29.15 KB, text/plain)
2010-11-19 07:03 EST, Wojciech Galanciak CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Weber CLA 2010-01-07 05:00:16 EST
Build Identifier: 20090920-1017

The Edit Proxy Entry dialog should have an Check button and a setting for a web page (default: eclipse.org) which Eclipse would try to get on pressing the button. 
A similar feature has Apache Directory Studio (see screen shot).

Reproducible: Always
Comment 1 Juergen Weber CLA 2010-01-07 05:01:22 EST
Created attachment 155480 [details]
Apache Directory Studio's check connection dialog
Comment 2 Pawel Pogorzelski CLA 2010-01-07 09:58:15 EST
Team component only provides proxy settings which are consumed by various clients like JRE HTTP client and or ECF HTTP client. Having this in mind, how the "Test" button should be implemented?
Comment 3 Juergen Weber CLA 2010-01-07 10:14:18 EST
(In reply to comment #2)
> Team component only provides proxy settings which are consumed by various
> clients like JRE HTTP client and or ECF HTTP client. Having this in mind, how
> the "Test" button should be implemented?

I assume there is a well-defined semantic for these proxy settings. So, using these settings there could be behind the "Check connection" button a tiny implementation based on java.net.URL.openStream()  

see http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html
http://www.vogella.de/articles/JavaNetworking/article.html

In the case of an exception the user should see the exception details in a dialog.
Comment 4 Pawel Pogorzelski CLA 2010-01-07 11:46:23 EST
(In reply to comment #3)
It could happen that establishing a connection this way is successful but p2 doesn't work (or the other way around) because it uses ECF as a transportation layer.

What about making the whole thing extensible? Each communication framework could provide a tester and the test button would run them all. The default tester would be provided by Team and delegate to JRE connection handler.
Comment 5 Juergen Weber CLA 2010-01-07 13:10:07 EST
Wasn't it better to base all communication frameworks on a common low level code who'd handle proxy things?
Comment 6 Pawel Pogorzelski CLA 2010-01-08 05:16:39 EST
(In reply to comment #5)
> Wasn't it better to base all communication frameworks on a common low level
> code who'd handle proxy things?

Such decoupling is the whole point of having multiple frameworks. Also, it's technically impossible since frameworks use code developed outside the Eclipse foundation (like Apache HTTP client).
Comment 7 Juergen Weber CLA 2010-01-08 05:24:06 EST
(In reply to comment #6)

> Such decoupling is the whole point of having multiple frameworks. Also, it's
> technically impossible since frameworks use code developed outside the Eclipse
> foundation (like Apache HTTP client).

Given that, I am for your suggestion.
Comment 8 Wojciech Galanciak CLA 2010-09-01 07:05:39 EDT
Created attachment 177936 [details]
initial patch

Here is some initial work around this enhancement.

The idea is to add extension point in org.eclipse.core.net and provide extensions in providers. The default extension is in org.eclipse.ui.net and tests standard java URLConnection. In this concept there is only one method testConnection in IProxyTestProvider. It causes that implementors should support different protocols in this one method. Different approach could be to add separated methods for each protocol (e.g. testHttpConnection for http protocol and so on).

Now tests are executed just after user pressed Test button. At the end dialog displays results. Tests are performed for a host(s) defined in ProxyTester which is not a good solution. I think that the better idea is to show a dialog similar to this with test results but with modifiable host field. In this case there should be also Run button which executes these tests. After this dialog should be updated with test results.
Comment 9 Wojciech Galanciak CLA 2010-11-19 07:03:55 EST
Created attachment 183463 [details]
proposed patch

Here is a patch which is similar to the previous one. The main change is related to presentation layer. Now after Test button was pressed, there is a dialog with modifiable host which is used for testing purposes. Tests can be performed by pressing Run All button. The rest of the patch is the same (with some improvements).
Comment 10 Eclipse Webmaster CLA 2019-09-06 16:06:49 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.