Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » BasicNewFileResourceWizard
BasicNewFileResourceWizard [message #336178] Wed, 27 May 2009 18:43 Go to next message
Eclipse User
Originally posted by: riwright.adobe.com

I am building a custom perspective to support some scientific modeling. As
part of the workflow, I need to let the user create new datasets (which are
arrays in memory, zipfiles on disk). There are several aspects to datasets,
including class-type, dataset type, name, number of dimensions, elements per
dimensions, etc.

This sort of calls out for a wizard and it seems like a subclass of
BasicNewFileResourceWizard would be the way to go. But the documentation
says "This class can be instantiated, but is not intended to be
sub-classed". Why? How should this be done in a blessed way? I hate to
re-invent the wheel by building out a wizard that already exists.

TIA, Ric
Re: BasicNewFileResourceWizard [message #336184 is a reply to message #336178] Thu, 28 May 2009 06:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26007
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070200080606090603040901
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Ric,

It sounds like maybe you should be using EMF
<http://www.eclipse.org/modeling/emf/?project=emf>. :-P

If you did, EMF would generate exactly the kind of wizard you'd need to
do what you describe. You should be extending Wizard and reusing the
WizardNewFileCreationPage.

If you follow one of the tutorials, it will generate an example:

http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/xlibmod/xlibmod.html


Ric Wright wrote:
> I am building a custom perspective to support some scientific modeling. As
> part of the workflow, I need to let the user create new datasets (which are
> arrays in memory, zipfiles on disk). There are several aspects to datasets,
> including class-type, dataset type, name, number of dimensions, elements per
> dimensions, etc.
>
> This sort of calls out for a wizard and it seems like a subclass of
> BasicNewFileResourceWizard would be the way to go. But the documentation
> says "This class can be instantiated, but is not intended to be
> sub-classed". Why? How should this be done in a blessed way? I hate to
> re-invent the wheel by building out a wizard that already exists.
>
> TIA, Ric
>
>

--------------070200080606090603040901
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ric,<br>
<br>
It sounds like maybe you should be using <a
href="http://www.eclipse.org/modeling/emf/?project=emf">EMF</a>. :-P<br>
<br>
If you did, EMF would generate exactly the kind of wizard you'd need to
do what you describe.&nbsp; You should be extending Wizard and reusing the
WizardNewFileCreationPage.<br>
<br>
If you follow one of the tutorials, it will generate an example: <br>
<blockquote><a
href=" http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/xlibmod/xlibmod.html"> http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/xlibmod/xlibmod.html</a><br>
</blockquote>
<br>
Ric Wright wrote:
<blockquote cite="mid:C6431032.2A1E3%25riwright@adobe.com" type="cite">
<pre wrap="">I am building a custom perspective to support some scientific modeling. As
part of the workflow, I need to let the user create new datasets (which are
arrays in memory, zipfiles on disk). There are several aspects to datasets,
including class-type, dataset type, name, number of dimensions, elements per
dimensions, etc.

This sort of calls out for a wizard and it seems like a subclass of
BasicNewFileResourceWizard would be the way to go. But the documentation
says "This class can be instantiated, but is not intended to be
sub-classed". Why? How should this be done in a blessed way? I hate to
re-invent the wheel by building out a wizard that already exists.

TIA, Ric

</pre>
</blockquote>
</body>
</html>

--------------070200080606090603040901--
Re: BasicNewFileResourceWizard [message #336195 is a reply to message #336184] Thu, 28 May 2009 11:55 Go to previous messageGo to next message
Eclipse User
Originally posted by: riwright.adobe.com

> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--B_3326345707_22621011
Content-type: text/plain;
charset="ISO-8859-1"
Content-transfer-encoding: 8bit

Ed,

Thanks for the pointer to the tutorial. Very detailed. I
Re: BasicNewFileResourceWizard [message #336215 is a reply to message #336195] Fri, 29 May 2009 15:15 Go to previous message
Eclipse User
Originally posted by: eclipse-news.rizzoweb.com

Ric Wright wrote:
> Ed,
>
> Thanks for the pointer to the tutorial. Very detailed. I’ll walk
> through it, but it seems like overkill for what I need. But I will walk
> through it and see how it goes. I think pieces of it are appropriate
> and maybe I can apply parts of it.

The parts that are key, as Ed mentioned, are to extend
org.eclipse.jface.wizard.Wizard and in the addPages() method call
addPage(IWizardPage) for each page you want to create.

This package has a couple of useful base class that you can look at as
examples for your Wizard and WizardPage implementations (note, these are
GPL licensed code):
https://www.skywayperspectives.org/fisheye/browse/CVS_OpenSo urce/skyway/common/plugins/org.skyway.ui/src/org/skyway/ui/w izard

Hope this helps,
Eric


> On 5/28/09 3:45 AM, in article gvlq09$l49$1@build.eclipse.org, "Ed
> Merks" <Ed.Merks@gmail.com> wrote:
>
> Ric,
>
> It sounds like maybe you should be using EMF
> <http://www.eclipse.org/modeling/emf/?project=emf> . :-P
>
> If you did, EMF would generate exactly the kind of wizard you'd need
> to do what you describe. You should be extending Wizard and reusing
> the WizardNewFileCreationPage.
>
> If you follow one of the tutorials, it will generate an example:
>
> http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/tutorials/xlibmod/xlibmod.html
>
>
> Ric Wright wrote:
>
>
> I am building a custom perspective to support some scientific
> modeling. As
> part of the workflow, I need to let the user create new datasets
> (which are
> arrays in memory, zipfiles on disk). There are several aspects
> to datasets,
> including class-type, dataset type, name, number of dimensions,
> elements per
> dimensions, etc.
>
> This sort of calls out for a wizard and it seems like a subclass of
> BasicNewFileResourceWizard would be the way to go. But the
> documentation
> says "This class can be instantiated, but is not intended to be
> sub-classed". Why? How should this be done in a blessed way?
> I hate to
> re-invent the wheel by building out a wizard that already exists.
>
> TIA, Ric
>
>
>
>
Previous Topic:Sample for using FilteredItemsSelectionDialog
Next Topic:Unsatisfied version constraint
Goto Forum:
  


Current Time: Wed Aug 27 07:10:35 EDT 2014

Powered by FUDForum. Page generated in 0.01607 seconds