|
Re: Reuse UML New Diagram wizards [message #474691 is a reply to message #474690] |
Thu, 17 July 2008 10:58 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
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 10:58 |
Tatiana Fesenko Messages: 530 Registered: July 2009 |
Senior Member |
|
|
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.
>
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.25921 seconds