Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 277648 - [plug-in registry] Dialog to establish the connection with remote OSGi applciation
Summary: [plug-in registry] Dialog to establish the connection with remote OSGi applci...
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 243439
  Show dependency tree
 
Reported: 2009-05-25 04:31 EDT by Wojciech Galanciak CLA
Modified: 2009-07-21 02:26 EDT (History)
1 user (show)

See Also:


Attachments
simple connection dialog (51.08 KB, patch)
2009-05-28 11:08 EDT, Wojciech Galanciak CLA
no flags Details | Diff
updated version of connection dialog (7.25 KB, patch)
2009-07-11 17:56 EDT, Wojciech Galanciak CLA
no flags Details | Diff
updated connection dialog (6.02 KB, patch)
2009-07-14 04:57 EDT, Wojciech Galanciak CLA
jacek.pospychala: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wojciech Galanciak CLA 2009-05-25 04:31:50 EDT
Part of the GSoC 2009 project "OSGi Remote Management Tool"
Comment 1 Jacek Pospychala CLA 2009-05-25 04:46:16 EDT
let's keep it simple for start. try extend this class org.eclipse.jface.dialogs.InputDialog 
Comment 2 Wojciech Galanciak CLA 2009-05-28 11:08:58 EDT
Created attachment 137504 [details]
simple connection dialog

I added first version of connection dialog. It extends simple ImputDialog. There is also partly implemented address validation.
Comment 3 Wojciech Galanciak CLA 2009-07-11 17:56:12 EDT
Created attachment 141361 [details]
updated version of connection dialog

It's updated version of the connection dialog. It's a patch for pde-incubator/osgimonitoring/plugins/org.eclipse.pde.runtime. Main change is a simpler validation which only checks that url is not null and it's correct URI constructor argument syntax.
Comment 4 Jacek Pospychala CLA 2009-07-13 19:31:42 EDT
Thanks Wojciech. Change looks simple. 

1. Do we really need a separate class for ConnectionDialog? Why not just create anonymous IInputValidator class, like:

InputValidator validator = new IInputValidator() {
  public String isValid(String url) { ... }
};
InputDialog dialog = new InputDialog(Display.getCurrent().getActiveShell(), PDERuntimeMessages.RegistryView_connectAction_label, PDERuntimeMessages.RegistryView_enterURL, validator);


2. I wonder what would happen if a RegistryModel got disconnected. Would Plug-in registry automatically turn back to local connection? (We might solve this in separate bug, please open one for that.)

3. Second, it'd be good to show the "Connect" option only when connectors other than "local" are available, to keep User interface simple. To do that we could check how much extensions are registered with our extension point. (This is minor)
Comment 5 Wojciech Galanciak CLA 2009-07-14 04:57:29 EDT
Created attachment 141491 [details]
updated connection dialog

This is updated version of connection dialog. I've added anonymous IInputValidator definition as argument for InputDialog constructor instead of additional ConnectionDialog class. Additionaly, it checks a number of extensions registered with our extension point and shows "Connect" option only if there is at least one available.
Comment 6 Jacek Pospychala CLA 2009-07-21 02:26:33 EDT
I have simplified the validation a bit. We might think about improving the dialog to give a hint or use some default URL to the user.

Thanks Wojtek, good job!

FIXED.