Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 227964 Details for
Bug 387272
[templates] SWT templates - add SelectionListener
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Template change for button
button-template.patch (text/plain), 1.59 KB, created by
Lars Vogel
on 2013-03-05 15:54:40 EST
(
hide
)
Description:
Template change for button
Filename:
MIME Type:
Creator:
Lars Vogel
Created:
2013-03-05 15:54:40 EST
Size:
1.59 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.ui/templates/default-swttemplates.xml b/org.eclipse.jdt.ui/templates/default-swttemplates.xml >index 1d0c57a..b5e1982 100644 >--- a/org.eclipse.jdt.ui/templates/default-swttemplates.xml >+++ b/org.eclipse.jdt.ui/templates/default-swttemplates.xml >@@ -11,6 +11,7 @@ > * Contributors: > * IBM Corporation - initial API and implementation > * Benjamin Muskalla <bmuskalla@eclipsesource.com> - [templates] new SWT templates - ToolBar and ToolItem - https://bugs.eclipse.org/bugs/show_bug.cgi?id=264052 >+ * Lars Vogel <lars.vogel@gmail.com> - Bug 387272 > *******************************************************************************/ > --> > >@@ -165,8 +166,14 @@ > > >${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)}); > ${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)})); >-${button}.setText(${word_selection}${}); >-${imp:import(org.eclipse.swt.SWT)}${cursor}</template> >+${button}.setText("${word_selection}${}"); >+${button}.addSelectionListener(new SelectionAdapter() { >+ @Override >+ public void widgetSelected(SelectionEvent e) { >+ ${cursor} >+ } >+ }); >+${imp:import(org.eclipse.swt.SWT, org.eclipse.swt.events.SelectionAdapter, org.eclipse.swt.events.SelectionEvent)}</template> > > <template > name="Link"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 387272
:
227964
|
227965
|
227966
|
230235