J ai un petit soucie -rien de bien grave- avec l affectation du nom a un wizard
j essaye de définir un setTitle avec un nom mais il m affiche New null comme sur le screen ici bas
quelqu un aurait une idée ?
J ai un petit soucie -rien de bien grave- avec l affectation du nom a un wizard
j essaye de définir un setTitle avec un nom mais il m affiche New null comme sur le screen ici bas
quelqu un aurait une idée ?
Si tu montrais ton code de création et d'initialisation de Wizard, peut-être ca nous aiderait à comprendre.
voici mon constructeur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 public NewWidgetWizardPage(IWorkbench aWorkbench, IStructuredSelection currentSelection,IPath containerFullPath) { super(PAGE_NAME); this.workbench = aWorkbench; this.containerFullPath = containerFullPath; setTitle("toto"); setDescription("toto2"); }
Je viens de le tester, il faut utiliser la methode :
Code : Sélectionner tout - Visualiser dans une fenêtre à part setWindowTitle("Ton titre");
bizzard ca ne change rien
voici mon code complet
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53 public class NewWidgetWizard extends AbstractPageDesignerWizard { /** The first and only WizardPage. */ private NewWidgetWizardPage wizardPage1; /** The Workbench. */ private IWorkbench workbench; /** The current selection. */ private IStructuredSelection currentSelection; /** The BOM selection wizard*/ private BOMAttributesWizardPage wizardPage2; /** * Constructor */ public NewWidgetWizard () { super(PageConstants.PAGE_FRAGMENT_FILE_EXTENSION); setWindowTitle("New fragment wizard"); } /** * Adds the pages to the Wizard. */ public void addPages() { super.addPages(); wizardPage1 = new NewWidgetWizardPage(workbench, currentSelection,containerFullPath); wizardPage1.setTitle("Create new Page Fragment");//$NON-NLS-1$ wizardPage1.setDescription("Creates a new Page Fragment");//$NON-NLS-1$ wizardPage1.setImageDescriptor(PageUIPlugin.getImageDescriptor("icons/obj16/module.png")); //$NON-NLS-1$ addPage(wizardPage1); wizardPage2 = new BOMAttributesWizardPage("pageFragmentBOMAttributesSelection"); addPage(wizardPage2); } /** * Initialises the Wizard. * * @param workbench * The Workbench * @param currentSelection * The IStructuredSelection */ public void init(IWorkbench workbench, IStructuredSelection currentSelection) { this.workbench = workbench; this.currentSelection = currentSelection; super.init(workbench, currentSelection); } /** * Executed when the Wizard is finished. */ public boolean performFinish() { return wizardPage1.finish(); } }
il fallait simplement mettre le setWindowTitle dans la méthode init et non dans le constructeur ...
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager