private void updateMatchLocationText() { if (fMatchLocationsLink != null) { int searchFor= getSearchFor(); int totNum= MatchLocations.getTotalNumberOfSettings(searchFor); int currNum= MatchLocations.getNumberOfSelectedSettings(fMatchLocations, searchFor); fMatchLocationsLink.setText(Messages.format(SearchMessages.JavaSearchPage_match_location_link_label, new Object[] { Integer.valueOf(currNum), Integer.valueOf(totNum) })); fMatchLocationsLink.setToolTipText(SearchMessages.JavaSearchPage_match_location_link_label_tooltip); } }
private void updateMatchLocationText() { if (fMatchLocationsLink != null) { int searchFor= getSearchFor(); int totNum= MatchLocations.getTotalNumberOfSettings(searchFor); int currNum= MatchLocations.getNumberOfSelectedSettings(fMatchLocations, searchFor); fMatchLocationsLink.setText(Messages.format(SearchMessages.JavaSearchPage_match_location_link_label, new Object[] { new Integer(currNum), new Integer(totNum) })); fMatchLocationsLink.setToolTipText(SearchMessages.JavaSearchPage_match_location_link_label_tooltip); } }
private void createHeader(Composite contents) { final Link link = new Link(contents, SWT.NONE); link.setText(AntPreferencesMessages.AntEditorPreferencePage_0); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if ("org.eclipse.ui.preferencePages.GeneralTextEditor".equals(e.text)) //$NON-NLS-1$ PreferencesUtil.createPreferenceDialogOn(link.getShell(), e.text, null, null); else if ("org.eclipse.ui.preferencePages.ColorsAndFonts".equals(e.text)) //$NON-NLS-1$ PreferencesUtil.createPreferenceDialogOn(link.getShell(), e.text, null, "selectFont:org.eclipse.jface.textfont"); //$NON-NLS-1$ } }); String linktooltip = AntPreferencesMessages.AntEditorPreferencePage_3; link.setToolTipText(linktooltip); }
protected Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP); link.setText(ActionMessages.AddGetterSetterAction_template_link_description); link.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { openCodeTempatePage(CodeTemplateContextType.GETTERCOMMENT_ID); } }); link.setToolTipText(ActionMessages.AddGetterSetterAction_template_link_tooltip); GridData gridData= new GridData(SWT.FILL, SWT.BEGINNING, true, false); gridData.widthHint= convertWidthInCharsToPixels(40); // only expand further if anyone else requires it link.setLayoutData(gridData); return link; } }
private Link createHelpLink(Composite parent) { Link link = new Link(parent, SWT.WRAP | SWT.NO_FOCUS); ((GridLayout) parent.getLayout()).numColumns++; link.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER)); link.setText("<a>"+IDialogConstants.HELP_LABEL+"</a>"); //$NON-NLS-1$ //$NON-NLS-2$ link.setToolTipText(IDialogConstants.HELP_LABEL); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { helpPressed(); } }); return link; }
protected Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP); link.setText(JavaUIMessages.OverrideMethodDialog_link_message); link.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { openCodeTempatePage(CodeTemplateContextType.OVERRIDECOMMENT_ID); } }); link.setToolTipText(JavaUIMessages.OverrideMethodDialog_link_tooltip); GridData gridData= new GridData(SWT.FILL, SWT.BEGINNING, true, false); gridData.widthHint= convertWidthInCharsToPixels(40); // only expand further if anyone else requires it link.setLayoutData(gridData); return link; }
@Override protected Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP); link.setText(ActionMessages.GenerateConstructorUsingFieldsSelectionDialog_template_link_message); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { openCodeTempatePage(CodeTemplateContextType.CONSTRUCTORCOMMENT_ID); } }); link.setToolTipText(ActionMessages.GenerateConstructorUsingFieldsSelectionDialog_template_link_tooltip); GridData gridData= new GridData(SWT.FILL, SWT.BEGINNING, true, false); gridData.widthHint= convertWidthInCharsToPixels(40); // only expand further if anyone else requires it link.setLayoutData(gridData); return link; }
protected Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP); link.setText(ActionMessages.AddUnimplementedConstructorsAction_template_link_message); link.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { openCodeTempatePage(CodeTemplateContextType.CONSTRUCTORCOMMENT_ID); } }); link.setToolTipText(ActionMessages.AddUnimplementedConstructorsAction_template_link_tooltip); GridData gridData= new GridData(SWT.FILL, SWT.BEGINNING, true, false); gridData.widthHint= convertWidthInCharsToPixels(40); // only expand further if anyone else requires it link.setLayoutData(gridData); return link; }
protected Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP); link.setText(ActionMessages.GenerateConstructorUsingFieldsSelectionDialog_template_link_message); link.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { openCodeTempatePage(CodeTemplateContextType.CONSTRUCTORCOMMENT_ID); } }); link.setToolTipText(ActionMessages.GenerateConstructorUsingFieldsSelectionDialog_template_link_tooltip); GridData gridData= new GridData(SWT.FILL, SWT.BEGINNING, true, false); gridData.widthHint= convertWidthInCharsToPixels(40); // only expand further if anyone else requires it link.setLayoutData(gridData); return link; }
protected Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP); link.setText(ActionMessages.AddDelegateMethodsAction_template_link_message); link.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { openCodeTempatePage(CodeTemplateContextType.OVERRIDECOMMENT_ID); } }); link.setToolTipText(ActionMessages.AddDelegateMethodsAction_template_link_tooltip); GridData gridData= new GridData(SWT.FILL, SWT.BEGINNING, true, false); gridData.widthHint= convertWidthInCharsToPixels(40); // only expand further if anyone else requires it link.setLayoutData(gridData); return link; } }
@Override protected Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP); link.setText(JavaUIMessages.OverrideMethodDialog_link_message); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { openCodeTempatePage(CodeTemplateContextType.OVERRIDECOMMENT_ID); } }); link.setToolTipText(JavaUIMessages.OverrideMethodDialog_link_tooltip); GridData gridData= new GridData(SWT.FILL, SWT.BEGINNING, true, false); gridData.widthHint= convertWidthInCharsToPixels(40); // only expand further if anyone else requires it link.setLayoutData(gridData); return link; }
@Override protected Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP); link.setText(ActionMessages.GenerateConstructorUsingFieldsSelectionDialog_template_link_message); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { openCodeTempatePage(CodeTemplateContextType.CONSTRUCTORCOMMENT_ID); } }); link.setToolTipText(ActionMessages.GenerateConstructorUsingFieldsSelectionDialog_template_link_tooltip); GridData gridData= new GridData(SWT.FILL, SWT.BEGINNING, true, false); gridData.widthHint= convertWidthInCharsToPixels(40); // only expand further if anyone else requires it link.setLayoutData(gridData); return link; }
private Link createHelpLink(Composite parent) { Link link = new Link(parent, SWT.WRAP | SWT.NO_FOCUS); ((GridLayout) parent.getLayout()).numColumns++; link.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER)); link.setText("<a>"+IDialogConstants.HELP_LABEL+"</a>"); //$NON-NLS-1$ //$NON-NLS-2$ link.setToolTipText(IDialogConstants.HELP_LABEL); link.addSelectionListener(widgetSelectedAdapter(e -> helpPressed())); return link; }
private Link createLink(Composite parent, IAction action, String text) { Link link = new Link(parent, SWT.PUSH); link.setText(text); link.addListener(SWT.Selection, new Listener() { public void handleEvent(Event event) { IAction linkAction = getLinkAction(event.widget); if (linkAction != null) { linkAction.runWithEvent(event); } } }); link.setToolTipText(action.getToolTipText()); link.setData(LINKACTION, action); return link; }
private Link createHelpLink(Composite parent) { Link link = new Link(parent, SWT.WRAP | SWT.NO_FOCUS); ((GridLayout) parent.getLayout()).numColumns++; link.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER)); link.setText("<a>"+IDialogConstants.get().HELP_LABEL+"</a>"); //$NON-NLS-1$ //$NON-NLS-2$ link.setToolTipText(IDialogConstants.get().HELP_LABEL); link.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { helpPressed(); } }); return link; }
private Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP | SWT.RIGHT); link.setText(DialogsMessages.SortMembersMessageDialog_description); link.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { openCodeTempatePage(CodeTemplateContextType.CONSTRUCTORCOMMENT_ID); } }); link.setToolTipText(DialogsMessages.SortMembersMessageDialog_link_tooltip); GridData gridData= new GridData(GridData.FILL, GridData.CENTER, true, false); gridData.widthHint= convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);//convertWidthInCharsToPixels(60); link.setLayoutData(gridData); link.setFont(composite.getFont()); return link; }
private Link createLink(Composite parent, IAction action, String text) { Link link = new Link(parent, SWT.PUSH); link.setText(text); link.addListener(SWT.Selection, new Listener() { public void handleEvent(Event event) { IAction linkAction = getLinkAction(event.widget); if (linkAction != null) { linkAction.runWithEvent(event); } } }); link.setToolTipText(action.getToolTipText()); link.setData(LINKACTION, action); return link; }
private Link createLink(Composite parent, IAction action, String text) { Link link = new Link(parent, SWT.PUSH); link.setText(text); link.addListener(SWT.Selection, new Listener() { public void handleEvent(Event event) { IAction linkAction = getLinkAction(event.widget); if (linkAction != null) { linkAction.runWithEvent(event); } } }); link.setToolTipText(action.getToolTipText()); link.setData(LINKACTION, action); return link; }
private Control createLinkControl(Composite composite) { Link link= new Link(composite, SWT.WRAP | SWT.RIGHT); link.setText(DialogsMessages.SortMembersMessageDialog_description); link.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { openMembersSortOrderPage(); } }); link.setToolTipText(DialogsMessages.SortMembersMessageDialog_link_tooltip); GridData gridData= new GridData(GridData.FILL, GridData.CENTER, true, false); gridData.widthHint= convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH);//convertWidthInCharsToPixels(60); link.setLayoutData(gridData); link.setFont(composite.getFont()); return link; }
private Link createShowErrorLogLink() { Link link = new Link(linkComposite, SWT.NONE); link.addSelectionListener(widgetSelectedAdapter(e -> { try { Workbench.getInstance().getActiveWorkbenchWindow().getActivePage().showView(LOG_VIEW_ID); } catch (CoreException ce) { StatusManager.getManager().handle(ce, WorkbenchPlugin.PI_WORKBENCH); } })); link.setText(WorkbenchMessages.ErrorLogUtil_ShowErrorLogHyperlink); link .setToolTipText(WorkbenchMessages.ErrorLogUtil_ShowErrorLogTooltip); Dialog.applyDialogFont(link); return link; }