Bug 221157 - [wizards] Refactorings needed for connection wizards - duplicates of code
Summary: [wizards] Refactorings needed for connection wizards - duplicates of code
Status: RESOLVED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.ui (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 2.1.0   Edit
Assignee: ecf.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 222866 222881
  Show dependency tree
 
Reported: 2008-03-03 10:39 EST by Jakub Jurkiewicz CLA
Modified: 2014-02-14 16:36 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jurkiewicz CLA 2008-03-03 10:39:19 EST
Today while working on couple of connection wizards bugs I found out that there were some duplicates of code. If you consider classes MSNConnectWizardPage and XMPPConnectWizardPage you will find some identical methods, like: saveComboItems, getPageSettings, restoreCombo, restorePassword, verifyEmail in MSNConnectWizardPage and verify in XMPPConnectWizardPage. I guess that this code could be pulled up or extracted to some utility class.
Comment 1 Scott Lewis CLA 2008-03-03 15:19:01 EST
(In reply to comment #0)
> Today while working on couple of connection wizards bugs I found out that there
> were some duplicates of code. If you consider classes MSNConnectWizardPage and
> XMPPConnectWizardPage you will find some identical methods, like:
> saveComboItems, getPageSettings, restoreCombo, restorePassword, verifyEmail in
> MSNConnectWizardPage and verify in XMPPConnectWizardPage. I guess that this
> code could be pulled up or extracted to some utility class.
> 

+1 for abstract utility class(es).  Probably can be located in org.eclipse.ecf.ui plugin...in org.eclipse.ecf.ui.wizards package I expect.
Comment 2 Jakub Jurkiewicz CLA 2008-03-04 11:37:48 EST
OK, so I will try to prepare a patch, so that we could discuss about it.
Comment 3 Jakub Jurkiewicz CLA 2008-03-10 10:52:56 EDT
In org.eclipse.ecf.ui.wizards package in org.eclipse.ecf.ui plugin I found class AbstractConnectWizardPage, which (as I suppose) was intended to be the superclass for all the connect wizard page, but it is used only in one place so far. This one place is GenericClientContainerConnectWizardPage, which is used in GenericClientContainerConnectWizard and to be honest I have not idea what this wizard is for? How can it be invoked from the UI?
Comment 4 Scott Lewis CLA 2008-03-10 11:22:22 EDT
(In reply to comment #3)
> In org.eclipse.ecf.ui.wizards package in org.eclipse.ecf.ui plugin I found
> class AbstractConnectWizardPage, which (as I suppose) was intended to be the
> superclass for all the connect wizard page, but it is used only in one place so
> far. 


Right.  It just wasn't used for the others.  Adding Remy Suen to cc as he was originally responsible for several of these wizard page classes.  I think also that AbstractConnectWizardPage probably needs enhancement.


This one place is GenericClientContainerConnectWizardPage, which is used
> in GenericClientContainerConnectWizard and to be honest I have not idea what
> this wizard is for? How can it be invoked from the UI?
> 

It's used in the org.eclipse.ecf.ui.connectWizards extension defined in org.eclipse.ecf.provider.ui

   <extension
         id="org.eclipse.ecf.provider.ui.generic.client"
         name="ECF Generic Client Connect Wizard Extension"
         point="org.eclipse.ecf.ui.connectWizards">
      <wizard
            class="org.eclipse.ecf.provider.ui.wizards.GenericClientContainerConnectWizard"
            containerFactoryName="ecf.generic.client"
            icon="icons/contact_enabled.gif"
            id="org.eclipse.ecf.provider.ui.generic.client"
            name="ECF Generic Client">
      </wizard>
   </extension>

Comment 5 Jakub Jurkiewicz CLA 2008-03-10 11:35:48 EDT
 (In reply to comment #4)
> Right.  It just wasn't used for the others.  Adding Remy Suen to cc as he was
> originally responsible for several of these wizard page classes.  I think also
> that AbstractConnectWizardPage probably needs enhancement.

OK, so I'll wait for Remy to confirm.

> It's used in the org.eclipse.ecf.ui.connectWizards extension defined in
> org.eclipse.ecf.provider.ui
> 
> <extension
> id="org.eclipse.ecf.provider.ui.generic.client"
> name="ECF Generic Client Connect Wizard Extension"
> point="org.eclipse.ecf.ui.connectWizards">
> <wizard
> 
> class="org.eclipse.ecf.provider.ui.wizards.GenericClientContainerConnectWizard"
> containerFactoryName="ecf.generic.client"
> icon="icons/contact_enabled.gif"
> id="org.eclipse.ecf.provider.ui.generic.client"
> name="ECF Generic Client">
> </wizard>
> </extension>

Yes, I found this, but I don't know how this wizard can be invoked from the Eclipse UI?
Comment 6 Remy Suen CLA 2008-03-10 13:00:07 EDT
(In reply to comment #4)
> Right.  It just wasn't used for the others.  Adding Remy Suen to cc as he was
> originally responsible for several of these wizard page classes.  I think also
> that AbstractConnectWizardPage probably needs enhancement.

That was the original intent. It is not customizable enough at the time, and will need some work to make it so.

> This one place is GenericClientContainerConnectWizardPage, which is used
> > in GenericClientContainerConnectWizard and to be honest I have not idea what
> > this wizard is for? How can it be invoked from the UI?

The same way all those other wizards are invoked, through the 'little man' icon. Make sure you have o.e.ecf.provider and o.e.ecf.provider.ui in your launch configuration. That should do it I think.
Comment 7 Abner Ballardo CLA 2008-03-11 01:29:23 EDT
I was working on bug #196295 and I had to refactor some connect wizard pages to fix that bug. I've just sent a patch that could help with this bug.
Comment 8 Scott Lewis CLA 2008-05-23 14:56:17 EDT
Under API and feature freeze for 2.0, so changing target milestone to 2.1
Comment 9 Pierre-Henry Perret CLA 2010-06-09 11:06:04 EDT
reactivating the bug - doing refactoring
Comment 10 Pierre-Henry Perret CLA 2010-06-11 05:13:32 EDT
Committed decouplage of o.e.e.provider.jgroups.ui.JoinGroupWizard (ecf1.eclipse.org) with o.e.example.collab (dev.eclipse.org)
Comment 11 Pierre-Henry Perret CLA 2011-03-21 09:29:45 EDT
Finalize org.eclipse.ecf.provider.jgroups.ui for integration in ECF perspective.
Comment 12 Pierre-Henry Perret CLA 2011-03-23 14:45:17 EDT
I have augmented and refactored the provider jgroups ui plugin with classes as to allow it to be integrated in the ECF communication perspective.

There is yet work to be done int the chat view.
Comment 13 Pierre-Henry Perret CLA 2011-03-23 15:05:14 EDT
I have pushed branch jgroups-ui on github
Comment 14 Scott Lewis CLA 2014-02-14 16:36:12 EST
Resolving as fixed.  I think we've done as much as we are going to do on this.