Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Target Management » How to open a new connection wizard for a particular system type?
How to open a new connection wizard for a particular system type? [message #10580] Fri, 08 June 2007 16:55 Go to next message
Andreas Schik is currently offline Andreas Schik
Messages: 12
Registered: July 2009
Junior Member
Hi there,
I have the following problem.
From within my code I would like to open the wizard for a new connectio=
n =

to create a new connection of a certain system type. What I do is:

<codesnippet>

RSEMainNewConnectionWizard newConnWizard =3D new =

RSEMainNewConnectionWizard();
IRSESystemType systemType =3D =

RSECorePlugin.getTheCoreRegistry().getSystemTypeById("my.system.type ");
newConnWizard.restrictToSystemType(systemType);

Shell shell =3D getShell();
SystemWizardDialog dialog =3D null; =

dialog =3D new SystemWizardDialog(shell, newConnWizard); =

dialog.setBlockOnOpen(true);
dialog.open();

</codesnippet>

"my.system.type" is a custom type.
With DSDP 2.0M7 this code brings up something weird:
The main page of RSEMainNewConnectionWizard comes up displaying the tree=
=

with system types, restricted to "my.system.type" as the only entry, the=
=

'next' and 'Finish' buttons are disabled and there is nothing I can do.

In RSE 1.0.1 I did exactly the same (there using the class =

RSENewConnectionWizard) and it worked perfectly: there was no system typ=
e =

selection necessary as I restricted the wizard to a particular kind. =

Instead the connectionpage was displayed immediately. Exactly what I nee=
d.

Looking at the code of RSEMainNewConnectionWizard I can see that in the =
=

case of "onlySystemType" no other pages are added to wizard. Why's that?=


The other thing is that with RSE 1.0.1 I did this:

<codesnippet>

dialog.open();
if (!dialog.wasCancelled()) {
// Select the newly created host
Object output =3D newConnWizard.getOutputObject();
// some code here
}

</codesnippet>

This does not work either as getOutputObject is gone from the wizard. Ho=
w =

do I get the handle to the newly created IHost?

Thanks,
Andreas
Re: How to open a new connection wizard for a particular system type? [message #12002 is a reply to message #10580] Tue, 26 June 2007 19:22 Go to previous message
Martin Oberhuber is currently offline Martin Oberhuber
Messages: 983
Registered: July 2009
Senior Member
Hello Andreas,

could you try again with CVS HEAD?
We fixed the "getOutputObject" issue, and chances are that the
restrictToSystemType() thing should also work. If not, please file a bug.

Thanks,
--
Martin Oberhuber
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm


Andreas Schik wrote:
> Hi there,
> I have the following problem.
> From within my code I would like to open the wizard for a new
> connection to create a new connection of a certain system type. What I
> do is:
>
> <codesnippet>
>
> RSEMainNewConnectionWizard newConnWizard = new
> RSEMainNewConnectionWizard();
> IRSESystemType systemType =
> RSECorePlugin.getTheCoreRegistry().getSystemTypeById("my.system.type ");
> newConnWizard.restrictToSystemType(systemType);
>
> Shell shell = getShell();
> SystemWizardDialog dialog = null;
> dialog = new SystemWizardDialog(shell, newConnWizard);
> dialog.setBlockOnOpen(true);
> dialog.open();
>
> </codesnippet>
>
> "my.system.type" is a custom type.
> With DSDP 2.0M7 this code brings up something weird:
> The main page of RSEMainNewConnectionWizard comes up displaying the tree
> with system types, restricted to "my.system.type" as the only entry, the
> 'next' and 'Finish' buttons are disabled and there is nothing I can do.
>
> In RSE 1.0.1 I did exactly the same (there using the class
> RSENewConnectionWizard) and it worked perfectly: there was no system
> type selection necessary as I restricted the wizard to a particular
> kind. Instead the connectionpage was displayed immediately. Exactly what
> I need.
>
> Looking at the code of RSEMainNewConnectionWizard I can see that in the
> case of "onlySystemType" no other pages are added to wizard. Why's that?
>
> The other thing is that with RSE 1.0.1 I did this:
>
> <codesnippet>
>
> dialog.open();
> if (!dialog.wasCancelled()) {
> // Select the newly created host
> Object output = newConnWizard.getOutputObject();
> // some code here
> }
>
> </codesnippet>
>
> This does not work either as getOutputObject is gone from the wizard.
> How do I get the handle to the newly created IHost?
>
> Thanks,
> Andreas
Re: How to open a new connection wizard for a particular system type? [message #568538 is a reply to message #10580] Tue, 26 June 2007 19:22 Go to previous message
Martin Oberhuber is currently offline Martin Oberhuber
Messages: 983
Registered: July 2009
Senior Member
Hello Andreas,

could you try again with CVS HEAD?
We fixed the "getOutputObject" issue, and chances are that the
restrictToSystemType() thing should also work. If not, please file a bug.

Thanks,
--
Martin Oberhuber
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm


Andreas Schik wrote:
> Hi there,
> I have the following problem.
> From within my code I would like to open the wizard for a new
> connection to create a new connection of a certain system type. What I
> do is:
>
> <codesnippet>
>
> RSEMainNewConnectionWizard newConnWizard = new
> RSEMainNewConnectionWizard();
> IRSESystemType systemType =
> RSECorePlugin.getTheCoreRegistry().getSystemTypeById("my.system.type ");
> newConnWizard.restrictToSystemType(systemType);
>
> Shell shell = getShell();
> SystemWizardDialog dialog = null;
> dialog = new SystemWizardDialog(shell, newConnWizard);
> dialog.setBlockOnOpen(true);
> dialog.open();
>
> </codesnippet>
>
> "my.system.type" is a custom type.
> With DSDP 2.0M7 this code brings up something weird:
> The main page of RSEMainNewConnectionWizard comes up displaying the tree
> with system types, restricted to "my.system.type" as the only entry, the
> 'next' and 'Finish' buttons are disabled and there is nothing I can do.
>
> In RSE 1.0.1 I did exactly the same (there using the class
> RSENewConnectionWizard) and it worked perfectly: there was no system
> type selection necessary as I restricted the wizard to a particular
> kind. Instead the connectionpage was displayed immediately. Exactly what
> I need.
>
> Looking at the code of RSEMainNewConnectionWizard I can see that in the
> case of "onlySystemType" no other pages are added to wizard. Why's that?
>
> The other thing is that with RSE 1.0.1 I did this:
>
> <codesnippet>
>
> dialog.open();
> if (!dialog.wasCancelled()) {
> // Select the newly created host
> Object output = newConnWizard.getOutputObject();
> // some code here
> }
>
> </codesnippet>
>
> This does not work either as getOutputObject is gone from the wizard.
> How do I get the handle to the newly created IHost?
>
> Thanks,
> Andreas
Previous Topic:RCP status
Next Topic:Terminal Editor instead of View?
Goto Forum:
  


Current Time: Sun Sep 21 00:09:03 GMT 2014

Powered by FUDForum. Page generated in 0.02026 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software