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 157601 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 'textFormImpl.mtl'
CustomTextFormImpl.mtl (text/plain), 3.78 KB, created by
thalesepm
on 2010-01-29 05:19:28 EST
(
hide
)
Description:
this the patch should be applied to 'textFormImpl.mtl'
Filename:
MIME Type:
Creator:
thalesepm
Created:
2010-01-29 05:19:28 EST
Size:
3.78 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 CustomTextFormImpl('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 textFormImpl/] > >[import common /] >[import naming /] >[import viewCommon /] >[comment I don't see a better way to get specific form services for the moment /] >[import widgetFormImpl /] > >[template public additionalImplementation(editor : ElementEditor, pec : PropertiesEditionComponent, inputPEC: PropertiesEditionComponent) overrides additionalImplementation ? (editor.representation.name = 'Text')] > protected void create[editor.name.toJavaClassifier()/]Text(FormToolkit widgetFactory, Composite parent) { > FormUtils.createPartLabel(widgetFactory, parent, [editor.owningViewsRepository().messagesProvider()/].[editor.editorKey(editor.owningView())/], propertiesEditionComponent.isRequired([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_KIND)); > [editor.name.toJavaIdentifier()/] = widgetFactory.createText(parent, ""); //$NON-NLS-1$ > [if (editor.readOnly)] > [editor.name.toJavaIdentifier()/].setEnabled(false); > [editor.name.toJavaIdentifier()/].setToolTipText([editor.owningViewsRepository().messagesProvider()/].[editor.owningViewString()/]_ReadOnly); > [/if] > [editor.name.toJavaIdentifier()/].setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER); > widgetFactory.paintBordersFor(parent); > 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())); > } > } > }); > FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent([editor.editorID()/], [editor.owningViewsRepository().vrClass()/].FORM_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