Skip to content

Commit

Permalink
IEP-1089: Updated the project creation wizard to have only one page w…
Browse files Browse the repository at this point in the history
…ith templates as well
  • Loading branch information
alirana01 committed Nov 2, 2023
1 parent de91c43 commit 7b2eb1d
Show file tree
Hide file tree
Showing 6 changed files with 261 additions and 434 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ public void createControl(Composite parent)
container.setLayoutData(new GridData(GridData.FILL_BOTH));

createAbove(container, 1);
if (templateElements == null || templateElements.getChildren().isEmpty())
{
Dialog.applyDialogFont(container);
setControl(container);
return;
}

Label label = new Label(container, SWT.NONE);
label.setText(getLabel());
GridData gd = new GridData();
Expand All @@ -107,7 +114,10 @@ public void createControl(Composite parent)
templateViewer.addDoubleClickListener(event -> doubleClickAction.run());
createDescriptionIn(sashForm);
createBelow(container, 1);
templateViewer.setInput(templateElements);
if (templateElements != null && !templateElements.getChildren().isEmpty())
{
templateViewer.setInput(templateElements);
}
initializeViewer();
templateViewer.addSelectionChangedListener(this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ public class Messages extends NLS
public static String BaseWizardSelectionPage_No_Desc;
public static String TemplateListSelectionPage_SelectTemplate_Desc;
public static String TemplateListSelectionPage_Template_Wizard_Desc;
public static String TemplateListSelectionPage_Templates;
public static String TemplateListSelectionPage_Templates_Desc;
public static String NewProjectWizardPage_Header;
public static String NewProjectWizardPage_DescriptionString;
public static String TemplateSelectionToolTip;
public static String NewProjectWizardPage_NoTemplateFoundMessage;

static
{
// initialize resource bundle
Expand Down
Loading

0 comments on commit 7b2eb1d

Please sign in to comment.