Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "FAQ How can I reuse wizard pages in more than one wizard?"

 
m
 
Line 1: Line 1:
The wizard framework is designed to allow for very loose coupling between
+
The wizard framework is designed to allow for very loose coupling between a wizard page and its containing wizard.  Just as a wizard interacts with an abstraction of its container via <tt>IWizardContainer</tt>, a wizard page can interact with the wizard it is part of, using the generic <tt>IWizard</tt> interface.  This allows the page to act as a reusable piece that can be incorporated into different concrete wizards.
a wizard page and its containing wizard.  Just as a wizard interacts with
+
an abstraction of its container via <tt>IWizardContainer</tt>, a wizard
+
page can interact with the wizard it is part of, using the generic
+
<tt>IWizard</tt> interface.  This allows the page to act as a reusable
+
piece that can be incorporated into different concrete wizards.
+
 
+
 
+
Of course, it is up to the page implementer
+
to ensure that tighter coupling does not creep in.  Some wizard page
+
implementations pass a reference to a concrete wizard in the page constructor,
+
thus making it difficult or impossible to reuse the page in a different wizard.
+
To avoid this, try to keep each wizard page as generic as possible.  A page
+
is really only a mechanism for gathering information from the user.  The page
+
should simply expose accessors for the information it collects, allowing the concrete
+
wizard to pull together all the information and use it for that wizard&#146;s ultimate goal.
+
  
 +
Of course, it is up to the page implementer to ensure that tighter coupling does not creep in.  Some wizard page implementations pass a reference to a concrete wizard in the page constructor, thus making it difficult or impossible to reuse the page in a different wizard. To avoid this, try to keep each wizard page as generic as possible.  A page is really only a mechanism for gathering information from the user.  The page should simply expose accessors for the information it collects, allowing the concrete wizard to pull together all the information and use it for that wizard&#146;s ultimate goal.
  
 
== See Also: ==
 
== See Also: ==
 +
*[[FAQ Can I reuse wizards from other plug-ins?]]
  
[[FAQ_Can_I_reuse_wizards_from_other_plug-ins%3F]]
+
{{Template:FAQ_Tagline}}
 
+
<hr><font size=-2>This FAQ was originally published in [http://www.eclipsefaq.org Official Eclipse 3.0 FAQs]. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the [http://www.eclipse.org/legal/epl-v10.html Eclipse Public License v1.0].</font>
+

Latest revision as of 23:40, 14 June 2006

The wizard framework is designed to allow for very loose coupling between a wizard page and its containing wizard. Just as a wizard interacts with an abstraction of its container via IWizardContainer, a wizard page can interact with the wizard it is part of, using the generic IWizard interface. This allows the page to act as a reusable piece that can be incorporated into different concrete wizards.

Of course, it is up to the page implementer to ensure that tighter coupling does not creep in. Some wizard page implementations pass a reference to a concrete wizard in the page constructor, thus making it difficult or impossible to reuse the page in a different wizard. To avoid this, try to keep each wizard page as generic as possible. A page is really only a mechanism for gathering information from the user. The page should simply expose accessors for the information it collects, allowing the concrete wizard to pull together all the information and use it for that wizard&#146;s ultimate goal.

See Also:


This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.

Back to the top