@Override protected Control createDialogArea(Composite parent) { Composite contents= (Composite) super.createDialogArea(parent); createMessageArea(contents); createFilterText(contents); createFilteredList(contents); fCurrentPage= 0; setPageData(); applyDialogFont(contents); return contents; }
/** * @see AbstractElementListSelectionDialog#handleDefaultSelected() */ protected void handleDefaultSelected() { if (validateCurrentSelection()) { if (fCurrentPage == fNumberOfPages - 1) { buttonPressed(IDialogConstants.OK_ID); } else { buttonPressed(IDialogConstants.NEXT_ID); } } }
@Override protected void createButtonsForButtonBar(Composite parent) { fSkipButton= createButton(parent, IDialogConstants.SKIP_ID, IDialogConstants.SKIP_LABEL, false); fBackButton= createButton(parent, IDialogConstants.BACK_ID, IDialogConstants.BACK_LABEL, false); // XXX: Workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=279425 boolean HAS_BUG_279425= true; fNextButton= createButton(parent, IDialogConstants.NEXT_ID, IDialogConstants.NEXT_LABEL, !HAS_BUG_279425); fFinishButton= createButton(parent, IDialogConstants.OK_ID, IDialogConstants.FINISH_LABEL, HAS_BUG_279425); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
@Override protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.SKIP_ID) { boolean isLastPage= fCurrentPage == fNumberOfPages - 1 ? true : false; turnPage(true, true); if (isLastPage) { buttonPressed(IDialogConstants.OK_ID); } } else if (buttonId == IDialogConstants.BACK_ID) { turnPage(false, false); } else if (buttonId == IDialogConstants.NEXT_ID) { turnPage(true, false); } else { super.buttonPressed(buttonId); } }
dialog.setTitle(ActionMessages.OrganizeImportsAction_selectiondialog_title); dialog.setMessage(ActionMessages.OrganizeImportsAction_selectiondialog_message); dialog.setElements(openChoices); dialog.setComparator(ORGANIZE_IMPORT_COMPARATOR); if (dialog.open() == Window.OK) { Object[] res= dialog.getResult(); result= new TypeNameMatch[res.length]; for (int i= 0; i < res.length; i++) {
protected Label createMessageArea(Composite parent) { Composite composite= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; layout.horizontalSpacing= 5; layout.numColumns= 2; composite.setLayout(layout); GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL); composite.setLayoutData(data); Label messageLabel= super.createMessageArea(composite); fPageInfoLabel= new Label(composite, SWT.NULL); fPageInfoLabel.setText(getPageInfoMessage()); data= new GridData(GridData.HORIZONTAL_ALIGN_FILL); data.horizontalAlignment= GridData.END; fPageInfoLabel.setLayoutData(data); applyDialogFont(messageLabel); return messageLabel; }
@Override protected void handleSelectionChanged() { super.handleSelectionChanged(); // show choices in editor doListSelectionChanged(getCurrentPage(), ranges, editor); } };
dialog.setTitle(ActionMessages.OrganizeImportsAction_selectiondialog_title); dialog.setMessage(ActionMessages.OrganizeImportsAction_selectiondialog_message); dialog.setElements(openChoices); dialog.setComparator(ORGANIZE_IMPORT_COMPARATOR); if (dialog.open() == Window.OK) { Object[] res= dialog.getResult(); result= new TypeNameMatch[res.length]; for (int i= 0; i < res.length; i++) {
@Override protected Label createMessageArea(Composite parent) { Composite composite= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; layout.horizontalSpacing= 5; layout.numColumns= 2; composite.setLayout(layout); GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL); composite.setLayoutData(data); Label messageLabel= super.createMessageArea(composite); fPageInfoLabel= new Label(composite, SWT.NULL); fPageInfoLabel.setText(getPageInfoMessage()); data= new GridData(GridData.HORIZONTAL_ALIGN_FILL); data.horizontalAlignment= GridData.END; fPageInfoLabel.setLayoutData(data); applyDialogFont(messageLabel); return messageLabel; }
protected void handleSelectionChanged() { super.handleSelectionChanged(); // show choices in editor doListSelectionChanged(getCurrentPage(), ranges); } };
dialog.setTitle(ActionMessages.OrganizeImportsAction_selectiondialog_title); dialog.setMessage(ActionMessages.OrganizeImportsAction_selectiondialog_message); dialog.setElements(openChoices); dialog.setComparator(ORGANIZE_IMPORT_COMPARATOR); if (dialog.open() == Window.OK) { Object[] res= dialog.getResult(); result= new TypeNameMatch[res.length]; for (int i= 0; i < res.length; i++) {
@Override protected Control createDialogArea(Composite parent) { Composite contents= (Composite) super.createDialogArea(parent); createMessageArea(contents); createFilterText(contents); createFilteredList(contents); fCurrentPage= 0; setPageData(); applyDialogFont(contents); return contents; }
/** * @see AbstractElementListSelectionDialog#handleDefaultSelected() */ @Override protected void handleDefaultSelected() { if (validateCurrentSelection()) { if (fCurrentPage == fNumberOfPages - 1) { buttonPressed(IDialogConstants.OK_ID); } else { buttonPressed(IDialogConstants.NEXT_ID); } } }
@Override protected Label createMessageArea(Composite parent) { Composite composite= new Composite(parent, SWT.NONE); GridLayout layout= new GridLayout(); layout.marginHeight= 0; layout.marginWidth= 0; layout.horizontalSpacing= 5; layout.numColumns= 2; composite.setLayout(layout); GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL); composite.setLayoutData(data); Label messageLabel= super.createMessageArea(composite); fPageInfoLabel= new Label(composite, SWT.NULL); fPageInfoLabel.setText(getPageInfoMessage()); data= new GridData(GridData.HORIZONTAL_ALIGN_FILL); data.horizontalAlignment= GridData.END; fPageInfoLabel.setLayoutData(data); applyDialogFont(messageLabel); return messageLabel; }
protected void handleSelectionChanged() { super.handleSelectionChanged(); // show choices in editor doListSelectionChanged(getCurrentPage(), ranges, editor); } };
@Override protected void createButtonsForButtonBar(Composite parent) { fBackButton= createButton(parent, IDialogConstants.BACK_ID, IDialogConstants.BACK_LABEL, false); // XXX: Workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=279425 boolean HAS_BUG_279425= true; fNextButton= createButton(parent, IDialogConstants.NEXT_ID, IDialogConstants.NEXT_LABEL, !HAS_BUG_279425); fFinishButton= createButton(parent, IDialogConstants.OK_ID, IDialogConstants.FINISH_LABEL, HAS_BUG_279425); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
dialog.setTitle(ActionMessages.OrganizeImportsAction_selectiondialog_title); dialog.setMessage(ActionMessages.OrganizeImportsAction_selectiondialog_message); dialog.setElements(openChoices); dialog.setComparator(ORGANIZE_IMPORT_COMPARATOR); if (dialog.open() == Window.OK) { Object[] res= dialog.getResult(); result= new TypeNameMatch[res.length]; for (int i= 0; i < res.length; i++) {
protected Control createDialogArea(Composite parent) { Composite contents= (Composite) super.createDialogArea(parent); createMessageArea(contents); createFilterText(contents); createFilteredList(contents); fCurrentPage= 0; setPageData(); applyDialogFont(contents); return contents; }
/** * @see AbstractElementListSelectionDialog#handleDefaultSelected() */ @Override protected void handleDefaultSelected() { if (validateCurrentSelection()) { if (fCurrentPage == fNumberOfPages - 1) { buttonPressed(IDialogConstants.OK_ID); } else { buttonPressed(IDialogConstants.NEXT_ID); } } }
@Override protected void handleSelectionChanged() { super.handleSelectionChanged(); // show choices in editor doListSelectionChanged(getCurrentPage(), ranges, editor); } };