/** * Returns IJavaProjects and IPaths that will be on the classpath */ private JavadocLinkRef[] getReferencedElements(IJavaProject[] checkedProjects) { HashSet result= new HashSet(); for (int i= 0; i < checkedProjects.length; i++) { IJavaProject project= checkedProjects[i]; try { collectReferencedElements(project, result); } catch (CoreException e) { JavaPlugin.log(e); // ignore } } return (JavadocLinkRef[]) result.toArray(new JavadocLinkRef[result.size()]); }
public void createControl(Composite parent) { initializeDialogUnits(parent); fUpperComposite= new Composite(parent, SWT.NONE); fUpperComposite.setFont(parent.getFont()); fUpperComposite.setLayoutData(createGridData(GridData.FILL_VERTICAL | GridData.FILL_HORIZONTAL, 1, 0)); GridLayout layout= createGridLayout(4); layout.marginHeight= 0; fUpperComposite.setLayout(layout); createBasicOptionsGroup(fUpperComposite); createTagOptionsGroup(fUpperComposite); createListDialogField(fUpperComposite); createStyleSheetGroup(fUpperComposite); setControl(fUpperComposite); Dialog.applyDialogFont(fUpperComposite); PlatformUI.getWorkbench().getHelpSystem().setHelp(fUpperComposite, IJavaHelpContextIds.JAVADOC_STANDARD_PAGE); } private void createBasicOptionsGroup(Composite composite) {
private void createStyleSheetGroup(Composite composite) { Composite c= new Composite(composite, SWT.NONE); c.setLayout(createGridLayout(3)); c.setLayoutData(createGridData(GridData.FILL_HORIZONTAL, 4, 0)); ((GridLayout) c.getLayout()).marginWidth= 0; fStyleSheetButton= createButton(c, SWT.CHECK, JavadocExportMessages.JavadocStandardWizardPage_stylesheettext_label, createGridData(1)); fStyleSheetText= createText(c, SWT.SINGLE | SWT.BORDER, null, createGridData(GridData.FILL_HORIZONTAL, 1, 0)); fStyleSheetBrowseButton= createButton(c, SWT.PUSH, JavadocExportMessages.JavadocStandardWizardPage_stylesheetbrowsebutton_label, createGridData(GridData.HORIZONTAL_ALIGN_END, 1, 0)); SWTUtil.setButtonDimensionHint(fStyleSheetBrowseButton); doValidation(STYLESHEETSTATUS);
private void createListDialogField(Composite composite) { Composite c= new Composite(composite, SWT.NONE); c.setFont(composite.getFont()); c.setLayout(createGridLayout(3)); c.setLayoutData(createGridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL, 4, 0)); ((GridLayout) c.getLayout()).marginWidth= 0; String[] buttonlabels= new String[] { JavadocExportMessages.JavadocStandardWizardPage_selectallbutton_label, JavadocExportMessages.JavadocStandardWizardPage_clearallbutton_label, JavadocExportMessages.JavadocStandardWizardPage_configurebutton_label}; JavadocLinkDialogLabelProvider labelProvider= new JavadocLinkDialogLabelProvider(); ListAdapter adapter= new ListAdapter(); fListDialogField= new CheckedListDialogField<>(adapter, buttonlabels, labelProvider); fListDialogField.setDialogFieldListener(adapter); fListDialogField.setCheckAllButtonIndex(0); fListDialogField.setUncheckAllButtonIndex(1); fListDialogField.setViewerComparator(new ViewerComparator()); createLabel(c, SWT.NONE, JavadocExportMessages.JavadocStandardWizardPage_referencedclasses_label, createGridData(GridData.HORIZONTAL_ALIGN_BEGINNING, 4, 0)); fListDialogField.doFillIntoGrid(c, 3); LayoutUtil.setHorizontalGrabbing(fListDialogField.getListControl(null)); fListDialogField.enableButton(2, false); }
public void addPages() { fJTWPage= new JavadocTreeWizardPage(TREE_PAGE_DESC, fStore); fJSWPage= new JavadocSpecificsWizardPage(SPECIFICS_PAGE_DESC, fJTWPage, fStore); fJSpWPage= new JavadocStandardWizardPage(STANDARD_PAGE_DESC, fJTWPage, fStore); super.addPage(fJTWPage); super.addPage(fJSpWPage); super.addPage(fJSWPage); fJTWPage.init(); fJSpWPage.init(); fJSWPage.init(); }
private void createTagOptionsGroup(Composite composite) { fTagsGroup= new Group(composite, SWT.SHADOW_ETCHED_IN); fTagsGroup.setLayout(createGridLayout(1)); fTagsGroup.setLayoutData(createGridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL, 2, 0)); fTagsGroup.setText(JavadocExportMessages.JavadocStandardWizardPage_tagsgroup_label); new FlaggedButton(fTagsGroup, JavadocExportMessages.JavadocStandardWizardPage_authorbutton_label, new GridData(GridData.FILL_HORIZONTAL), fStore.AUTHOR, true); new FlaggedButton(fTagsGroup, JavadocExportMessages.JavadocStandardWizardPage_versionbutton_label, new GridData(GridData.FILL_HORIZONTAL), fStore.VERSION, true); fDeprecatedCheck= new FlaggedButton(fTagsGroup, JavadocExportMessages.JavadocStandardWizardPage_deprecatedbutton_label, new GridData(GridData.FILL_HORIZONTAL), fStore.NODEPRECATED, false); fDeprecatedList= new FlaggedButton(fTagsGroup, JavadocExportMessages.JavadocStandardWizardPage_deprecatedlistbutton_label, createGridData(GridData.FILL_HORIZONTAL, 1, convertWidthInCharsToPixels(3)), fStore.NODEPRECATEDLIST, false); fDeprecatedList.getButton().setEnabled(fDeprecatedCheck.getButton().getSelection()); fDeprecatedCheck.getButton().addSelectionListener(new ToggleSelectionAdapter(new Control[] { fDeprecatedList.getButton()})); } //end createTagOptionsGroup
private void createTagOptionsGroup(Composite composite) { fTagsGroup= new Group(composite, SWT.SHADOW_ETCHED_IN); fTagsGroup.setLayout(createGridLayout(1)); fTagsGroup.setLayoutData(createGridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL, 2, 0)); fTagsGroup.setText(JavadocExportMessages.JavadocStandardWizardPage_tagsgroup_label); new FlaggedButton(fTagsGroup, JavadocExportMessages.JavadocStandardWizardPage_authorbutton_label, new GridData(GridData.FILL_HORIZONTAL), fStore.AUTHOR, true); new FlaggedButton(fTagsGroup, JavadocExportMessages.JavadocStandardWizardPage_versionbutton_label, new GridData(GridData.FILL_HORIZONTAL), fStore.VERSION, true); fDeprecatedCheck= new FlaggedButton(fTagsGroup, JavadocExportMessages.JavadocStandardWizardPage_deprecatedbutton_label, new GridData(GridData.FILL_HORIZONTAL), fStore.NODEPRECATED, false); fDeprecatedList= new FlaggedButton(fTagsGroup, JavadocExportMessages.JavadocStandardWizardPage_deprecatedlistbutton_label, createGridData(GridData.FILL_HORIZONTAL, 1, LayoutUtil.getIndent()), fStore.NODEPRECATEDLIST, false); fDeprecatedList.getButton().setEnabled(fDeprecatedCheck.getButton().getSelection()); fDeprecatedCheck.getButton().addSelectionListener(new ToggleSelectionAdapter(new Control[] { fDeprecatedList.getButton()})); } //end createTagOptionsGroup
public FlaggedButton(Composite composite, String message, GridData gridData, String flag, boolean show) { fFlag= flag; fShowFlag= show; fButton= createButton(composite, SWT.CHECK, message, gridData); fButtonsList.add(this); setButtonSettings(); }
private void createListDialogField(Composite composite) { Composite c= new Composite(composite, SWT.NONE); c.setFont(composite.getFont()); c.setLayout(createGridLayout(3)); c.setLayoutData(createGridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL, 4, 0)); ((GridLayout) c.getLayout()).marginWidth= 0; String[] buttonlabels= new String[] { JavadocExportMessages.JavadocStandardWizardPage_selectallbutton_label, JavadocExportMessages.JavadocStandardWizardPage_clearallbutton_label, JavadocExportMessages.JavadocStandardWizardPage_configurebutton_label}; JavadocLinkDialogLabelProvider labelProvider= new JavadocLinkDialogLabelProvider(); ListAdapter adapter= new ListAdapter(); fListDialogField= new CheckedListDialogField(adapter, buttonlabels, labelProvider); fListDialogField.setDialogFieldListener(adapter); fListDialogField.setCheckAllButtonIndex(0); fListDialogField.setUncheckAllButtonIndex(1); fListDialogField.setViewerComparator(new ViewerComparator()); createLabel(c, SWT.NONE, JavadocExportMessages.JavadocStandardWizardPage_referencedclasses_label, createGridData(GridData.HORIZONTAL_ALIGN_BEGINNING, 4, 0)); fListDialogField.doFillIntoGrid(c, 3); LayoutUtil.setHorizontalGrabbing(fListDialogField.getListControl(null)); fListDialogField.enableButton(2, false); }
@Override public void addPages() { fContributedJavadocWizardPages= ContributedJavadocWizardPage.getContributedPages(fStore); fTreeWizardPage= new JavadocTreeWizardPage(TREE_PAGE_DESC, fStore); fLastWizardPage= new JavadocSpecificsWizardPage(SPECIFICS_PAGE_DESC, fTreeWizardPage, fStore); fStandardDocletWizardPage= new JavadocStandardWizardPage(STANDARD_PAGE_DESC, fTreeWizardPage, fStore); super.addPage(fTreeWizardPage); super.addPage(fStandardDocletWizardPage); for (int i= 0; i < fContributedJavadocWizardPages.length; i++) { super.addPage(fContributedJavadocWizardPages[i]); } super.addPage(fLastWizardPage); fTreeWizardPage.init(); fStandardDocletWizardPage.init(); fLastWizardPage.init(); }
private void createTagOptionsGroup(Composite composite) { fTagsGroup= new Group(composite, SWT.SHADOW_ETCHED_IN); fTagsGroup.setLayout(createGridLayout(1)); fTagsGroup.setLayoutData(createGridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL, 2, 0)); fTagsGroup.setText(JavadocExportMessages.JavadocStandardWizardPage_tagsgroup_label); new FlaggedButton(fTagsGroup, JavadocExportMessages.JavadocStandardWizardPage_authorbutton_label, new GridData(GridData.FILL_HORIZONTAL), fStore.AUTHOR, true); new FlaggedButton(fTagsGroup, JavadocExportMessages.JavadocStandardWizardPage_versionbutton_label, new GridData(GridData.FILL_HORIZONTAL), fStore.VERSION, true); fDeprecatedCheck= new FlaggedButton(fTagsGroup, JavadocExportMessages.JavadocStandardWizardPage_deprecatedbutton_label, new GridData(GridData.FILL_HORIZONTAL), fStore.NODEPRECATED, false); fDeprecatedList= new FlaggedButton(fTagsGroup, JavadocExportMessages.JavadocStandardWizardPage_deprecatedlistbutton_label, createGridData(GridData.FILL_HORIZONTAL, 1, LayoutUtil.getIndent()), fStore.NODEPRECATEDLIST, false); fDeprecatedList.getButton().setEnabled(fDeprecatedCheck.getButton().getSelection()); fDeprecatedCheck.getButton().addSelectionListener(new ToggleSelectionAdapter(new Control[] { fDeprecatedList.getButton()})); } //end createTagOptionsGroup
public FlaggedButton(Composite composite, String message, GridData gridData, String flag, boolean show) { fFlag= flag; fShowFlag= show; fButton= createButton(composite, SWT.CHECK, message, gridData); fButtonsList.add(this); setButtonSettings(); }
@Override public void createControl(Composite parent) { initializeDialogUnits(parent); fUpperComposite= new Composite(parent, SWT.NONE); fUpperComposite.setFont(parent.getFont()); fUpperComposite.setLayoutData(createGridData(GridData.FILL_VERTICAL | GridData.FILL_HORIZONTAL, 1, 0)); GridLayout layout= createGridLayout(4); layout.marginHeight= 0; fUpperComposite.setLayout(layout); createBasicOptionsGroup(fUpperComposite); createTagOptionsGroup(fUpperComposite); createListDialogField(fUpperComposite); createStyleSheetGroup(fUpperComposite); setControl(fUpperComposite); Dialog.applyDialogFont(fUpperComposite); PlatformUI.getWorkbench().getHelpSystem().setHelp(fUpperComposite, IJavaHelpContextIds.JAVADOC_STANDARD_PAGE); } private void createBasicOptionsGroup(Composite composite) {
private void createStyleSheetGroup(Composite composite) { Composite c= new Composite(composite, SWT.NONE); c.setLayout(createGridLayout(3)); c.setLayoutData(createGridData(GridData.FILL_HORIZONTAL, 4, 0)); ((GridLayout) c.getLayout()).marginWidth= 0; fStyleSheetButton= createButton(c, SWT.CHECK, JavadocExportMessages.JavadocStandardWizardPage_stylesheettext_label, createGridData(1)); fStyleSheetText= createText(c, SWT.SINGLE | SWT.BORDER, null, createGridData(GridData.FILL_HORIZONTAL, 1, 0)); SWTUtil.setAccessibilityText(fStyleSheetText, JavadocExportMessages.JavadocStandardWizardPage_stylesheettext_description); fStyleSheetBrowseButton= createButton(c, SWT.PUSH, JavadocExportMessages.JavadocStandardWizardPage_stylesheetbrowsebutton_label, createGridData(GridData.HORIZONTAL_ALIGN_END, 1, 0)); SWTUtil.setButtonDimensionHint(fStyleSheetBrowseButton);
private void createListDialogField(Composite composite) { Composite c= new Composite(composite, SWT.NONE); c.setFont(composite.getFont()); c.setLayout(createGridLayout(3)); c.setLayoutData(createGridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL, 4, 0)); ((GridLayout) c.getLayout()).marginWidth= 0; String[] buttonlabels= new String[] { JavadocExportMessages.JavadocStandardWizardPage_selectallbutton_label, JavadocExportMessages.JavadocStandardWizardPage_clearallbutton_label, JavadocExportMessages.JavadocStandardWizardPage_configurebutton_label}; JavadocLinkDialogLabelProvider labelProvider= new JavadocLinkDialogLabelProvider(); ListAdapter adapter= new ListAdapter(); fListDialogField= new CheckedListDialogField<>(adapter, buttonlabels, labelProvider); fListDialogField.setDialogFieldListener(adapter); fListDialogField.setCheckAllButtonIndex(0); fListDialogField.setUncheckAllButtonIndex(1); fListDialogField.setViewerComparator(new ViewerComparator()); createLabel(c, SWT.NONE, JavadocExportMessages.JavadocStandardWizardPage_referencedclasses_label, createGridData(GridData.HORIZONTAL_ALIGN_BEGINNING, 4, 0)); fListDialogField.doFillIntoGrid(c, 3); LayoutUtil.setHorizontalGrabbing(fListDialogField.getListControl(null)); fListDialogField.enableButton(2, false); }
@Override public void addPages() { fContributedJavadocWizardPages= ContributedJavadocWizardPage.getContributedPages(fStore); fTreeWizardPage= new JavadocTreeWizardPage(TREE_PAGE_DESC, fStore); fLastWizardPage= new JavadocSpecificsWizardPage(SPECIFICS_PAGE_DESC, fTreeWizardPage, fStore); fStandardDocletWizardPage= new JavadocStandardWizardPage(STANDARD_PAGE_DESC, fTreeWizardPage, fStore); super.addPage(fTreeWizardPage); super.addPage(fStandardDocletWizardPage); for (int i= 0; i < fContributedJavadocWizardPages.length; i++) { super.addPage(fContributedJavadocWizardPages[i]); } super.addPage(fLastWizardPage); fTreeWizardPage.init(); fStandardDocletWizardPage.init(); fLastWizardPage.init(); }
public FlaggedButton(Composite composite, String message, GridData gridData, String flag, boolean show) { fFlag= flag; fShowFlag= show; fButton= createButton(composite, SWT.CHECK, message, gridData); fButtonsList.add(this); setButtonSettings(); }
/** * Returns IJavaProjects and IPaths that will be on the classpath * @param checkedProjects the list of checked projects * @return all IJavaProjects and IPaths that will be on the classpath */ private JavadocLinkRef[] getReferencedElements(IJavaProject[] checkedProjects) { HashSet<JavadocLinkRef> result= new HashSet<>(); for (int i= 0; i < checkedProjects.length; i++) { IJavaProject project= checkedProjects[i]; try { collectReferencedElements(project, result); } catch (CoreException e) { JavaPlugin.log(e); // ignore } } return result.toArray(new JavadocLinkRef[result.size()]); }
@Override public void createControl(Composite parent) { initializeDialogUnits(parent); fUpperComposite= new Composite(parent, SWT.NONE); fUpperComposite.setFont(parent.getFont()); fUpperComposite.setLayoutData(createGridData(GridData.FILL_VERTICAL | GridData.FILL_HORIZONTAL, 1, 0)); GridLayout layout= createGridLayout(4); layout.marginHeight= 0; fUpperComposite.setLayout(layout); createBasicOptionsGroup(fUpperComposite); createTagOptionsGroup(fUpperComposite); createListDialogField(fUpperComposite); createStyleSheetGroup(fUpperComposite); setControl(fUpperComposite); Dialog.applyDialogFont(fUpperComposite); PlatformUI.getWorkbench().getHelpSystem().setHelp(fUpperComposite, IJavaHelpContextIds.JAVADOC_STANDARD_PAGE); } private void createBasicOptionsGroup(Composite composite) {
private void createStyleSheetGroup(Composite composite) { Composite c= new Composite(composite, SWT.NONE); c.setLayout(createGridLayout(3)); c.setLayoutData(createGridData(GridData.FILL_HORIZONTAL, 4, 0)); ((GridLayout) c.getLayout()).marginWidth= 0; fStyleSheetButton= createButton(c, SWT.CHECK, JavadocExportMessages.JavadocStandardWizardPage_stylesheettext_label, createGridData(1)); fStyleSheetText= createText(c, SWT.SINGLE | SWT.BORDER, null, createGridData(GridData.FILL_HORIZONTAL, 1, 0)); SWTUtil.setAccessibilityText(fStyleSheetText, JavadocExportMessages.JavadocStandardWizardPage_stylesheettext_description); fStyleSheetBrowseButton= createButton(c, SWT.PUSH, JavadocExportMessages.JavadocStandardWizardPage_stylesheetbrowsebutton_label, createGridData(GridData.HORIZONTAL_ALIGN_END, 1, 0)); SWTUtil.setButtonDimensionHint(fStyleSheetBrowseButton);