Reuse UML New Diagram wizards [message #474690] |
Wed, 16 July 2008 22:19  |
Eclipse User |
|
|
|
Hello,
How can I call a UMLCreationWizard to create new diagrams on my RCP
application?
I've put the code:
UMLCreationWizard wizard = new UMLCreationWizard();
WizardDialog dialog = new WizardDialog(wizard.getShell(), wizard);
dialog.open();
But it didn't work.
Thanks in advance,
Nogueira.
|
|
|
Re: Reuse UML New Diagram wizards [message #474691 is a reply to message #474690] |
Thu, 17 July 2008 06:58   |
Eclipse User |
|
|
|
Hello Nogueira,
I created a test with the code you produced. NPE is thrown:
java.lang.NullPointerException
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.initialPopu lateContainerNameField(WizardNewFileCreationPage.java:568)
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.createContr ol(WizardNewFileCreationPage.java:216)
at org.eclipse.uml2.diagram.clazz.part.UMLCreationWizardPage.cr eateControl(UMLCreationWizardPage.java:65)
....
Do you have the same excection in your log?
If yes, the problem is that wizard should be initialized:
UMLCreationWizard wizard = new UMLCreationWizard();
// init wizard
wizard.init(PlatformUI.getWorkbench(), new StructuredSelection());
WizardDialog dialog = new WizardDialog(wizard.getShell(), wizard);
dialog.open();
The second paramer (selection) is used to calculate parentPath. In my example
it's empty, but it should be filled with IResource. See WizardNewFileCreationPage#initialPopulateContainerNameField( )
for details.
Best wishes,
Tatiana.
> Hello,
>
> How can I call a UMLCreationWizard to create new diagrams on my RCP
> application?
>
> I've put the code:
>
> UMLCreationWizard wizard = new UMLCreationWizard();
> WizardDialog dialog = new WizardDialog(wizard.getShell(), wizard);
> dialog.open();
> But it didn't work.
>
> Thanks in advance,
>
> Nogueira.
>
|
|
|
|
|
|
|
Re: Reuse UML New Diagram wizards [message #621271 is a reply to message #474690] |
Thu, 17 July 2008 06:58  |
Eclipse User |
|
|
|
Hello Nogueira,
I created a test with the code you produced. NPE is thrown:
java.lang.NullPointerException
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.initialPopu lateContainerNameField(WizardNewFileCreationPage.java:568)
at org.eclipse.ui.dialogs.WizardNewFileCreationPage.createContr ol(WizardNewFileCreationPage.java:216)
at org.eclipse.uml2.diagram.clazz.part.UMLCreationWizardPage.cr eateControl(UMLCreationWizardPage.java:65)
....
Do you have the same excection in your log?
If yes, the problem is that wizard should be initialized:
UMLCreationWizard wizard = new UMLCreationWizard();
// init wizard
wizard.init(PlatformUI.getWorkbench(), new StructuredSelection());
WizardDialog dialog = new WizardDialog(wizard.getShell(), wizard);
dialog.open();
The second paramer (selection) is used to calculate parentPath. In my example
it's empty, but it should be filled with IResource. See WizardNewFileCreationPage#initialPopulateContainerNameField( )
for details.
Best wishes,
Tatiana.
> Hello,
>
> How can I call a UMLCreationWizard to create new diagrams on my RCP
> application?
>
> I've put the code:
>
> UMLCreationWizard wizard = new UMLCreationWizard();
> WizardDialog dialog = new WizardDialog(wizard.getShell(), wizard);
> dialog.open();
> But it didn't work.
>
> Thanks in advance,
>
> Nogueira.
>
|
|
|
Re: Reuse UML New Diagram wizards [message #621274 is a reply to message #474691] |
Thu, 17 July 2008 12:09  |
Eclipse User |
|
|
|
Tatiana,
Thank you so much!!!!!! The wizard was created successfuly :D
No, there is no exception in my log. The wizard just didn't appear.
But the "init" method works fine! :)
Thank you again!
P.S.: Are you brazilian? If yes, could you give me your e-mail (msn or
google talk) to keep contact?
Best regards,
Nogueira.
|
|
|
Re: Reuse UML New Diagram wizards [message #621275 is a reply to message #474691] |
Fri, 18 July 2008 14:58  |
Eclipse User |
|
|
|
One more question...
In my RCP application, when I select a wizard to create a new diagram,
it's needed to select the parent folder where will be created the file.
But the names of the project folders and its subdirectories are invisible
to me.
It's possible to select a folder, but in blinding. In the new file wizard
is shown the tree items ('+' to expand the tree) but any title is visible.
How to solve it?
Thank you in advance,
Best regards,
Nogueira.
|
|
|
Re: Reuse UML New Diagram wizards [message #621713 is a reply to message #474693] |
Tue, 22 July 2008 17:22  |
Eclipse User |
|
|
|
Any ideias? =/
Nogueira wrote:
> One more question...
> In my RCP application, when I select a wizard to create a new diagram,
> it's needed to select the parent folder where will be created the file.
> But the names of the project folders and its subdirectories are invisible
> to me.
> It's possible to select a folder, but in blinding. In the new file wizard
> is shown the tree items ('+' to expand the tree) but any title is visible.
> How to solve it?
> Thank you in advance,
> Best regards,
> Nogueira.
|
|
|
|
Powered by
FUDForum. Page generated in 0.20665 seconds