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 157602 Details for
Bug 300794
Text field listeners
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
this the patch should be applied to 'textSWTImpl.mtl'
CustomTextSWTImpl.mtl (text/plain), 3.61 KB, created by
thalesepm
on 2010-01-29 05:20:02 EST
(
hide
)
Description:
this the patch should be applied to 'textSWTImpl.mtl'
Filename:
MIME Type:
Creator:
thalesepm
Created:
2010-01-29 05:20:02 EST
Size:
3.61 KB
patch
obsolete
>[comment > ******************************************************************************* > * Copyright (c) 2008-2009 Obeo. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at > * http://www.eclipse.org/legal/epl-v10.html > * > * Contributors: > * Obeo - initial API and implementation > ******************************************************************************* > /] >[module CustomTextSWTImpl('http://www.eclipse.org/emf/eef/views/1.0.0', 'http://www.eclipse.org/emf/eef/components/1.0.0', 'http://www.eclipse.org/emf/2002/Ecore') extends textSWTImpl/] > >[import common /] >[import naming /] >[import viewCommon /] >[comment I don't see a better way to get specific swt services for the moment /] >[import widgetSWTImpl /] > >[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (not (editor.oclIsTypeOf(CustomElementEditor)) and editor.representation.name = 'Text')] > protected void create[editor.name.toJavaClassifier()/]Text(Composite parent) { > SWTUtils.createPartLabel(parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND)); > [editor.name.toJavaIdentifier()/] = new Text(parent, SWT.BORDER); > [if (editor.readOnly)] > [editor.name.toJavaIdentifier()/].setEnabled(false); > [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly); > [/if] > GridData [editor.name.toJavaIdentifier()/]Data = new GridData(GridData.FILL_HORIZONTAL); > [editor.name.toJavaIdentifier()/].setLayoutData([editor.name.toJavaIdentifier()/]Data); > [editor.name.toJavaIdentifier()/].addFocusListener(new FocusAdapter() { > /** > * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent) > */ > @Override > @SuppressWarnings("synthetic-access") > public void focusLost(FocusEvent e) { > if ((propertiesEditionComponent != null) && NotificationHelper.isNotificationRequired(current, [editor.propertiesEditionElement(pec).metamodelGetter()/], [editor.name.toJavaIdentifier()/].getText())) > propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText())); > } > }); > [editor.name.toJavaIdentifier()/].addKeyListener(new KeyAdapter() { > /** > * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent) > */ > @Override > @SuppressWarnings("synthetic-access") > public void keyPressed(KeyEvent e) { > if (e.character == SWT.CR) { > if ((propertiesEditionComponent != null) && NotificationHelper.isNotificationRequired(current, [editor.propertiesEditionElement(pec).metamodelGetter()/], [editor.name.toJavaIdentifier()/].getText())) > propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent([editor.editionPart()/].this, [editor.editorID()/], PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, [editor.name.toJavaIdentifier()/].getText())); > } > } > }); > SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].SWT_KIND), null); //$NON-NLS-1$ > } >[/template]
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 300794
:
157601
| 157602 |
158996
|
158998