View | Details | Raw Unified | Return to bug 387272 | Differences between
and this patch

Collapse All | Expand All

(-)a/org.eclipse.jdt.ui/templates/default-swttemplates.xml (-2 / +9 lines)
Lines 11-16 Link Here
11
 * Contributors:
11
 * Contributors:
12
 *     IBM Corporation - initial API and implementation
12
 *     IBM Corporation - initial API and implementation
13
 *     Benjamin Muskalla <bmuskalla@eclipsesource.com> - [templates] new SWT templates - ToolBar and ToolItem - https://bugs.eclipse.org/bugs/show_bug.cgi?id=264052
13
 *     Benjamin Muskalla <bmuskalla@eclipsesource.com> - [templates] new SWT templates - ToolBar and ToolItem - https://bugs.eclipse.org/bugs/show_bug.cgi?id=264052
14
 *     Lars Vogel <lars.vogel@gmail.com> - Bug 387272
14
 *******************************************************************************/
15
 *******************************************************************************/
15
-->
16
-->
16
17
Lines 165-172 Link Here
165
	
166
	
166
>${buttonType:newType(org.eclipse.swt.widgets.Button)} ${button:newName(org.eclipse.swt.widgets.Button)}= new ${buttonType}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(SWT.PUSH, SWT.TOGGLE, SWT.RADIO, SWT.CHECK, SWT.FLAT)});
167
>${buttonType:newType(org.eclipse.swt.widgets.Button)} ${button:newName(org.eclipse.swt.widgets.Button)}= new ${buttonType}(${parent:var(org.eclipse.swt.widgets.Composite)}, ${style:link(SWT.PUSH, SWT.TOGGLE, SWT.RADIO, SWT.CHECK, SWT.FLAT)});
167
${button}.setLayoutData(new ${type:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(BEGINNING, CENTER, END, FILL)}, SWT.${vertical:link(CENTER, TOP, BOTTOM, FILL)}, ${hex:link(false, true)}, ${vex:link(false, true)}));
168
${button}.setLayoutData(new ${type:newType(org.eclipse.swt.layout.GridData)}(SWT.${horizontal:link(BEGINNING, CENTER, END, FILL)}, SWT.${vertical:link(CENTER, TOP, BOTTOM, FILL)}, ${hex:link(false, true)}, ${vex:link(false, true)}));
168
${button}.setText(${word_selection}${});
169
${button}.setText("${word_selection}${}");
169
${imp:import(org.eclipse.swt.SWT)}${cursor}</template>
170
${button}.addSelectionListener(new SelectionAdapter() {
171
			@Override
172
			public void widgetSelected(SelectionEvent e) {
173
				${cursor}
174
			}
175
		});
176
${imp:import(org.eclipse.swt.SWT, org.eclipse.swt.events.SelectionAdapter, org.eclipse.swt.events.SelectionEvent)}</template>
170
177
171
<template 
178
<template 
172
	name="Link" 
179
	name="Link" 

Return to bug 387272