Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 412592 | Differences between
and this patch

Collapse All | Expand All

(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/actions/ActionMessages.java (+38 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011-2013 EclipseSource Muenchen GmbH and others.
3
 * 
4
 * All rights reserved. This program and the accompanying materials
5
 * are made available under the terms of the Eclipse Public License v1.0
6
 * which accompanies this distribution, and is available at
7
 * http://www.eclipse.org/legal/epl-v10.html
8
 * 
9
 * Contributors:
10
 * mknauer - initial API and implementation
11
 *******************************************************************************/
12
package org.eclipse.emf.ecp.edit.internal.swt.actions;
13
14
import org.eclipse.osgi.util.NLS;
15
16
public class ActionMessages extends NLS {
17
18
	private static final String BUNDLE_NAME = "org.eclipse.emf.ecp.edit.internal.swt.actions.messages"; //$NON-NLS-1$
19
20
	public static String AddAttributeAction_AddEntry;
21
	public static String AddReferenceAction_Link;
22
	public static String DeleteReferenceAction_Confimation;
23
	public static String DeleteReferenceAction_DeleteModelQuestion;
24
	public static String DeleteReferenceAction_DeleteReference;
25
	public static String DeleteReferenceAction_No;
26
	public static String DeleteReferenceAction_Questionmark;
27
	public static String DeleteReferenceAction_Yes;
28
	public static String NewReferenceAction_CreateAndLinkNew;
29
30
	private ActionMessages() {
31
	}
32
33
	static {
34
		// initialize resource bundle
35
		NLS.initializeMessages(BUNDLE_NAME, ActionMessages.class);
36
	}
37
38
}
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/actions/AddAttributeAction.java (-2 / +2 lines)
Lines 38-45 Link Here
38
		EStructuralFeature feature) {
38
		EStructuralFeature feature) {
39
		super(modelElementContext, itemPropertyDescriptor, feature);
39
		super(modelElementContext, itemPropertyDescriptor, feature);
40
		// TODO remove PlatformUI
40
		// TODO remove PlatformUI
41
		setImageDescriptor(Activator.getImageDescriptor("icons/add.png"));
41
		setImageDescriptor(Activator.getImageDescriptor("icons/add.png")); //$NON-NLS-1$
42
		setToolTipText("Add Entry"); //$NON-NLS-1$
42
		setToolTipText(ActionMessages.AddAttributeAction_AddEntry);
43
	}
43
	}
44
44
45
	@Override
45
	@Override
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/actions/AddReferenceAction.java (-2 / +1 lines)
Lines 77-84 Link Here
77
		} else if (attribute.endsWith("s")) {//$NON-NLS-1$
77
		} else if (attribute.endsWith("s")) {//$NON-NLS-1$
78
			attribute = attribute.substring(0, attribute.length() - 1);
78
			attribute = attribute.substring(0, attribute.length() - 1);
79
		}
79
		}
80
		// TODO language dependent
80
		setToolTipText(ActionMessages.AddReferenceAction_Link + attribute);
81
		setToolTipText("Link " + attribute);//$NON-NLS-1$
82
	}
81
	}
83
82
84
	/**
83
	/**
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/actions/DeleteReferenceAction.java (-7 / +5 lines)
Lines 48-56 Link Here
48
		super(modelElementContext, itemPropertyDescriptor, feature);
48
		super(modelElementContext, itemPropertyDescriptor, feature);
49
		// TODO remove PlatformUI
49
		// TODO remove PlatformUI
50
50
51
		setImageDescriptor(Activator.getImageDescriptor("icons/delete.png"));
51
		setImageDescriptor(Activator.getImageDescriptor("icons/delete.png")); //$NON-NLS-1$
52
		// TODO language
52
		setToolTipText(ActionMessages.DeleteReferenceAction_DeleteReference);
53
		setToolTipText("Delete Reference"); //$NON-NLS-1$
54
	}
53
	}
55
54
56
	@Override
55
	@Override
Lines 92-104 Link Here
92
		AdapterFactoryItemDelegator adapterFactoryItemDelegator = new AdapterFactoryItemDelegator(adapterFactory);
91
		AdapterFactoryItemDelegator adapterFactoryItemDelegator = new AdapterFactoryItemDelegator(adapterFactory);
93
		// AdapterFactoryLabelProvider adapterFactoryLabelProvider = new AdapterFactoryLabelProvider(adapterFactory);
92
		// AdapterFactoryLabelProvider adapterFactoryLabelProvider = new AdapterFactoryLabelProvider(adapterFactory);
94
		String modelElementName = adapterFactoryItemDelegator.getText(toBeDeleted);
93
		String modelElementName = adapterFactoryItemDelegator.getText(toBeDeleted);
95
		// TODO language
94
		question = ActionMessages.DeleteReferenceAction_DeleteModelQuestion + modelElementName + ActionMessages.DeleteReferenceAction_Questionmark;
96
		question = "Do you really want to delete the model element " + modelElementName + "?";//$NON-NLS-1$ //$NON-NLS-2$
97
		// } else {
95
		// } else {
98
		// question = "Do you really want to delete these " + toBeDeleted.size() + " model elements?";
96
		// question = "Do you really want to delete these " + toBeDeleted.size() + " model elements?";
99
		// }
97
		// }
100
		MessageDialog dialog = new MessageDialog(null, "Confirmation", null, question, MessageDialog.QUESTION,//$NON-NLS-1$
98
		MessageDialog dialog = new MessageDialog(null, ActionMessages.DeleteReferenceAction_Confimation, null, question, MessageDialog.QUESTION,
101
			new String[] { "Yes", "No" }, 0);//$NON-NLS-1$//$NON-NLS-2$
99
			new String[] { ActionMessages.DeleteReferenceAction_Yes, ActionMessages.DeleteReferenceAction_No }, 0);
102
100
103
		boolean confirm = false;
101
		boolean confirm = false;
104
		if (dialog.open() == Window.OK) {
102
		if (dialog.open() == Window.OK) {
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/actions/NewReferenceAction.java (-1 / +1 lines)
Lines 75-81 Link Here
75
		} else if (attribute.endsWith("s")) {//$NON-NLS-1$
75
		} else if (attribute.endsWith("s")) {//$NON-NLS-1$
76
			attribute = attribute.substring(0, attribute.length() - 1);
76
			attribute = attribute.substring(0, attribute.length() - 1);
77
		}
77
		}
78
		setToolTipText("Create and link new " + attribute);//$NON-NLS-1$
78
		setToolTipText(ActionMessages.NewReferenceAction_CreateAndLinkNew + attribute);
79
	}
79
	}
80
80
81
	/**
81
	/**
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/actions/messages.properties (+13 lines)
Added Link Here
1
2
AddAttributeAction_AddEntry=Add Entry
3
4
AddReferenceAction_Link=Link 
5
6
DeleteReferenceAction_Confimation=Confirmation
7
DeleteReferenceAction_DeleteModelQuestion=Do you really want to delete the model element 
8
DeleteReferenceAction_DeleteReference=Delete Reference
9
DeleteReferenceAction_No=No
10
DeleteReferenceAction_Questionmark=?
11
DeleteReferenceAction_Yes=Yes
12
13
NewReferenceAction_CreateAndLinkNew=Create and link new 
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/AbstractTextControl.java (-5 / +4 lines)
Lines 75-82 Link Here
75
	private void addControlDecoration(Composite composite) {
75
	private void addControlDecoration(Composite composite) {
76
		controlDecoration = new ControlDecoration(text, SWT.LEFT | SWT.TOP, composite);
76
		controlDecoration = new ControlDecoration(text, SWT.LEFT | SWT.TOP, composite);
77
		controlDecoration.hide();
77
		controlDecoration.hide();
78
		// TODO language
78
		controlDecoration.setDescriptionText(ControlMessages.AbstractTextControl_InvalidInput);
79
		controlDecoration.setDescriptionText("Invalid input");//$NON-NLS-1$
80
		controlDecoration.setShowHover(true);
79
		controlDecoration.setShowHover(true);
81
		FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
80
		FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
82
			FieldDecorationRegistry.DEC_ERROR);
81
			FieldDecorationRegistry.DEC_ERROR);
Lines 87-93 Link Here
87
		text = new Text(composite, getTextWidgetStyle());
86
		text = new Text(composite, getTextWidgetStyle());
88
		text.setLayoutData(getTextWidgetLayoutData());
87
		text.setLayoutData(getTextWidgetLayoutData());
89
		if (getStructuralFeature().isUnsettable()) {
88
		if (getStructuralFeature().isUnsettable()) {
90
			text.setMessage("<unset>");
89
			text.setMessage(ControlMessages.AbstractTextControl_UNSET);
91
		}
90
		}
92
		text.setData(CUSTOM_VARIANT, getTextVariantID());
91
		text.setData(CUSTOM_VARIANT, getTextVariantID());
93
		customizeText(text);
92
		customizeText(text);
Lines 241-247 Link Here
241
240
242
				controlDecoration.hide();
241
				controlDecoration.hide();
243
				updateValidationColor(null);
242
				updateValidationColor(null);
244
				if ("".equals(value)) {
243
				if ("".equals(value)) { //$NON-NLS-1$
245
					value = null;
244
					value = null;
246
				}
245
				}
247
				if (value == null && getStructuralFeature().isUnsettable()) {
246
				if (value == null && getStructuralFeature().isUnsettable()) {
Lines 255-261 Link Here
255
			} catch (IllegalArgumentException e) {
254
			} catch (IllegalArgumentException e) {
256
				controlDecoration.show();
255
				controlDecoration.show();
257
				updateValidationColor(getText().getShell().getDisplay().getSystemColor(SWT.COLOR_RED));
256
				updateValidationColor(getText().getShell().getDisplay().getSystemColor(SWT.COLOR_RED));
258
				controlDecoration.setDescriptionText("Invalid input " + e.getLocalizedMessage());
257
				controlDecoration.setDescriptionText(ControlMessages.AbstractTextControl_InvalidInputSpace + e.getLocalizedMessage());
259
				throw e;
258
				throw e;
260
			}
259
			}
261
		}
260
		}
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/AttributeMultiControl.java (-2 / +2 lines)
Lines 62-68 Link Here
62
	 */
62
	 */
63
	@Override
63
	@Override
64
	protected String getUnsetLabelText() {
64
	protected String getUnsetLabelText() {
65
		return "Not set. Click to set!";
65
		return ControlMessages.AttributeMultiControl_NotSetClickToSet;
66
	}
66
	}
67
67
68
	/*
68
	/*
Lines 71-77 Link Here
71
	 */
71
	 */
72
	@Override
72
	@Override
73
	protected String getUnsetButtonTooltip() {
73
	protected String getUnsetButtonTooltip() {
74
		return "Unset";
74
		return ControlMessages.AttributeMultiControl_Unset;
75
	}
75
	}
76
76
77
}
77
}
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/BooleanControl.java (-4 / +3 lines)
Lines 52-58 Link Here
52
	@Override
52
	@Override
53
	protected void fillControlComposite(Composite composite) {
53
	protected void fillControlComposite(Composite composite) {
54
		check = new Button(composite, SWT.CHECK);
54
		check = new Button(composite, SWT.CHECK);
55
		check.setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_control_boolean");
55
		check.setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_control_boolean"); //$NON-NLS-1$
56
	}
56
	}
57
57
58
	/**
58
	/**
Lines 80-87 Link Here
80
	 */
80
	 */
81
	@Override
81
	@Override
82
	protected String getUnsetLabelText() {
82
	protected String getUnsetLabelText() {
83
		// TODO language
83
		return ControlMessages.BooleanControl_NoBooleanSetClickToSetBoolean;
84
		return "No boolean set! Click to set boolean."; //$NON-NLS-1$
85
	}
84
	}
86
85
87
	/*
86
	/*
Lines 90-96 Link Here
90
	 */
89
	 */
91
	@Override
90
	@Override
92
	protected String getUnsetButtonTooltip() {
91
	protected String getUnsetButtonTooltip() {
93
		return "Unset boolean";
92
		return ControlMessages.BooleanControl_UnsetBoolean;
94
	}
93
	}
95
94
96
	/*
95
	/*
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/ControlMessages.java (+74 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011-2013 EclipseSource Muenchen GmbH and others.
3
 * 
4
 * All rights reserved. This program and the accompanying materials
5
 * are made available under the terms of the Eclipse Public License v1.0
6
 * which accompanies this distribution, and is available at
7
 * http://www.eclipse.org/legal/epl-v10.html
8
 * 
9
 * Contributors:
10
 * mknauer - initial API and implementation
11
 *******************************************************************************/
12
package org.eclipse.emf.ecp.edit.internal.swt.controls;
13
14
import org.eclipse.osgi.util.NLS;
15
16
public class ControlMessages extends NLS {
17
18
	private static final String BUNDLE_NAME = "org.eclipse.emf.ecp.edit.internal.swt.controls.messages"; //$NON-NLS-1$
19
20
	public static String AbstractTextControl_InvalidInput;
21
	public static String AbstractTextControl_InvalidInputSpace;
22
	public static String AbstractTextControl_UNSET;
23
24
	public static String AttributeMultiControl_NotSetClickToSet;
25
	public static String AttributeMultiControl_Unset;
26
27
	public static String BooleanControl_NoBooleanSetClickToSetBoolean;
28
	public static String BooleanControl_UnsetBoolean;
29
30
	public static String DateTimeControl_NoDateSetClickToSetDate;
31
	public static String DateTimeControl_UnsetDate;
32
33
	public static String EEnumControl_NoValueSetClickToSetValue;
34
	public static String EEnumControl_UnsetValue;
35
36
	public static String LinkControl_NoLinkSetClickToSetLink;
37
	public static String LinkControl_NotSet;
38
	public static String LinkControl_UnsetLink;
39
40
	public static String NumericalControl_FormatNumerical;
41
	public static String NumericalControl_FormatNumericalDecimal;
42
	public static String NumericalControl_InvalidNumber;
43
	public static String NumericalControl_InvalidNumberWillBeUnset;
44
	public static String NumericalControl_NoNumberClickToSetNumber;
45
	public static String NumericalControl_UnsetNumber;
46
47
	public static String ReferenceMultiControl_NotSetClickToSet;
48
	public static String ReferenceMultiControl_Unset;
49
50
	public static String StringControl_NoTextSetClickToSetText;
51
	public static String StringControl_UnsetText;
52
53
	public static String TableControl_AddInstanceOf;
54
	public static String TableControl_Delete;
55
	public static String TableControl_DeleteAreYouSure;
56
	public static String TableControl_NotSetClickToSet;
57
	public static String TableControl_RemoveSelected;
58
	public static String TableControl_Unset;
59
60
	public static String XmlDateControlText_InvalidNumber;
61
	public static String XmlDateControlText_NoDateSetClickToSetDate;
62
	public static String XmlDateControlText_NumberInvalidValueWillBeUnset;
63
	public static String XmlDateControlText_SelectDate;
64
	public static String XmlDateControlText_UnsetDate;
65
66
	private ControlMessages() {
67
	}
68
69
	static {
70
		// initialize resource bundle
71
		NLS.initializeMessages(BUNDLE_NAME, ControlMessages.class);
72
	}
73
74
}
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/DateTimeControl.java (-5 / +4 lines)
Lines 75-85 Link Here
75
75
76
		dateWidget = new DateTime(composite, SWT.DATE | SWT.BORDER);
76
		dateWidget = new DateTime(composite, SWT.DATE | SWT.BORDER);
77
		dateWidget.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
77
		dateWidget.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
78
		dateWidget.setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_control_dateTime_date");
78
		dateWidget.setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_control_dateTime_date"); //$NON-NLS-1$
79
79
80
		timeWidget = new DateTime(composite, SWT.TIME | SWT.SHORT | SWT.BORDER);
80
		timeWidget = new DateTime(composite, SWT.TIME | SWT.SHORT | SWT.BORDER);
81
		timeWidget.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
81
		timeWidget.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
82
		timeWidget.setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_control_dateTime_time");
82
		timeWidget.setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_control_dateTime_time"); //$NON-NLS-1$
83
	}
83
	}
84
84
85
	/**
85
	/**
Lines 105-112 Link Here
105
	 */
105
	 */
106
	@Override
106
	@Override
107
	protected String getUnsetLabelText() {
107
	protected String getUnsetLabelText() {
108
		// TODO language
108
		return ControlMessages.DateTimeControl_NoDateSetClickToSetDate;
109
		return "No date set! Click to set date."; //$NON-NLS-1$
110
	}
109
	}
111
110
112
	/*
111
	/*
Lines 115-121 Link Here
115
	 */
114
	 */
116
	@Override
115
	@Override
117
	protected String getUnsetButtonTooltip() {
116
	protected String getUnsetButtonTooltip() {
118
		return "Unset Date";
117
		return ControlMessages.DateTimeControl_UnsetDate;
119
	}
118
	}
120
119
121
	/*
120
	/*
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/EEnumControl.java (-4 / +3 lines)
Lines 67-73 Link Here
67
67
68
		});
68
		});
69
		combo.setInput(getStructuralFeature().getEType().getInstanceClass().getEnumConstants());
69
		combo.setInput(getStructuralFeature().getEType().getInstanceClass().getEnumConstants());
70
		combo.setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_control_enum");
70
		combo.setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_control_enum"); //$NON-NLS-1$
71
	}
71
	}
72
72
73
	/**
73
	/**
Lines 89-96 Link Here
89
	 */
89
	 */
90
	@Override
90
	@Override
91
	protected String getUnsetLabelText() {
91
	protected String getUnsetLabelText() {
92
		// TODO language
92
		return ControlMessages.EEnumControl_NoValueSetClickToSetValue;
93
		return "No value set! Click to set value."; //$NON-NLS-1$
94
	}
93
	}
95
94
96
	/*
95
	/*
Lines 99-105 Link Here
99
	 */
98
	 */
100
	@Override
99
	@Override
101
	protected String getUnsetButtonTooltip() {
100
	protected String getUnsetButtonTooltip() {
102
		return "Unset value";
101
		return ControlMessages.EEnumControl_UnsetValue;
103
	}
102
	}
104
103
105
	/*
104
	/*
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/LinkControl.java (-8 / +6 lines)
Lines 112-119 Link Here
112
		mainComposite.setLayout(stackLayout);
112
		mainComposite.setLayout(stackLayout);
113
113
114
		unsetLabel = new Label(mainComposite, SWT.NONE);
114
		unsetLabel = new Label(mainComposite, SWT.NONE);
115
		// TODO language
115
		unsetLabel.setText(ControlMessages.LinkControl_NotSet);
116
		unsetLabel.setText("(Not Set)");//$NON-NLS-1$
117
		unsetLabel.setBackground(composite.getBackground());
116
		unsetLabel.setBackground(composite.getBackground());
118
		unsetLabel.setForeground(composite.getShell().getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
117
		unsetLabel.setForeground(composite.getShell().getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
119
		unsetLabel.setAlignment(SWT.CENTER);
118
		unsetLabel.setAlignment(SWT.CENTER);
Lines 161-167 Link Here
161
		imageHyperlink.setBackground(linkComposite.getBackground());
160
		imageHyperlink.setBackground(linkComposite.getBackground());
162
161
163
		hyperlink = new Link(linkComposite, SWT.NONE);
162
		hyperlink = new Link(linkComposite, SWT.NONE);
164
		hyperlink.setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_control_reference");
163
		hyperlink.setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_control_reference"); //$NON-NLS-1$
165
		hyperlink.setBackground(linkComposite.getBackground());
164
		hyperlink.setBackground(linkComposite.getBackground());
166
		hyperlink.addSelectionListener(new SelectionAdapter() {
165
		hyperlink.addSelectionListener(new SelectionAdapter() {
167
166
Lines 219-225 Link Here
219
			@Override
218
			@Override
220
			public Object convert(Object value) {
219
			public Object convert(Object value) {
221
				updateChangeListener((EObject) value);
220
				updateChangeListener((EObject) value);
222
				return "<a>" + getLinkText(value) + "</a>";
221
				return "<a>" + getLinkText(value) + "</a>"; //$NON-NLS-1$ //$NON-NLS-2$
223
			}
222
			}
224
		});
223
		});
225
		IObservableValue tooltipValue = SWTObservables.observeTooltipText(hyperlink);
224
		IObservableValue tooltipValue = SWTObservables.observeTooltipText(hyperlink);
Lines 259-265 Link Here
259
258
260
	protected Object getLinkText(Object value) {
259
	protected Object getLinkText(Object value) {
261
		String linkName = adapterFactoryItemDelegator.getText(value);
260
		String linkName = adapterFactoryItemDelegator.getText(value);
262
		return linkName == null ? "" : linkName;
261
		return linkName == null ? "" : linkName; //$NON-NLS-1$
263
	}
262
	}
264
263
265
	private void updateChangeListener(final EObject value) {
264
	private void updateChangeListener(final EObject value) {
Lines 321-328 Link Here
321
	 */
320
	 */
322
	@Override
321
	@Override
323
	protected String getUnsetLabelText() {
322
	protected String getUnsetLabelText() {
324
		// TODO language
323
		return ControlMessages.LinkControl_NoLinkSetClickToSetLink;
325
		return "No link set! Click to set link."; //$NON-NLS-1$
326
	}
324
	}
327
325
328
	/*
326
	/*
Lines 331-337 Link Here
331
	 */
329
	 */
332
	@Override
330
	@Override
333
	protected String getUnsetButtonTooltip() {
331
	protected String getUnsetButtonTooltip() {
334
		return "Unset Link";
332
		return ControlMessages.LinkControl_UnsetLink;
335
	}
333
	}
336
334
337
	/*
335
	/*
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/MultiControl.java (-1 / +1 lines)
Lines 350-356 Link Here
350
		 */
350
		 */
351
		private void createDeleteButton(Composite composite) {
351
		private void createDeleteButton(Composite composite) {
352
			Button delB = new Button(composite, SWT.PUSH);
352
			Button delB = new Button(composite, SWT.PUSH);
353
			delB.setImage(Activator.getImage("icons/delete.png"));
353
			delB.setImage(Activator.getImage("icons/delete.png")); //$NON-NLS-1$
354
			delB.addSelectionListener(new SelectionAdapter() {
354
			delB.addSelectionListener(new SelectionAdapter() {
355
355
356
				/*
356
				/*
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/NumericalControl.java (-15 / +14 lines)
Lines 68-74 Link Here
68
	 */
68
	 */
69
	@Override
69
	@Override
70
	protected String getTextVariantID() {
70
	protected String getTextVariantID() {
71
		return "org_eclipse_emf_ecp_control_numerical";
71
		return "org_eclipse_emf_ecp_control_numerical"; //$NON-NLS-1$
72
	}
72
	}
73
73
74
	/*
74
	/*
Lines 77-84 Link Here
77
	 */
77
	 */
78
	@Override
78
	@Override
79
	protected String getUnsetLabelText() {
79
	protected String getUnsetLabelText() {
80
		// TODO language
80
		return ControlMessages.NumericalControl_NoNumberClickToSetNumber;
81
		return "No number set! Click to set number."; //$NON-NLS-1$
82
	}
81
	}
83
82
84
	/*
83
	/*
Lines 87-93 Link Here
87
	 */
86
	 */
88
	@Override
87
	@Override
89
	protected String getUnsetButtonTooltip() {
88
	protected String getUnsetButtonTooltip() {
90
		return "Unset number";
89
		return ControlMessages.NumericalControl_UnsetNumber;
91
	}
90
	}
92
91
93
	@Override
92
	@Override
Lines 138-149 Link Here
138
	private String getFormatText() {
137
	private String getFormatText() {
139
138
140
		if (NumericalHelper.isInteger(getInstanceClass())) {
139
		if (NumericalHelper.isInteger(getInstanceClass())) {
141
			return "The format is '#'.";
140
			return ControlMessages.NumericalControl_FormatNumerical;
142
		} else if (NumericalHelper.isDouble(getInstanceClass())) {
141
		} else if (NumericalHelper.isDouble(getInstanceClass())) {
143
			return "The format is '#.#'.";
142
			return ControlMessages.NumericalControl_FormatNumericalDecimal;
144
		}
143
		}
145
144
146
		return "";
145
		return ""; //$NON-NLS-1$
147
	}
146
	}
148
147
149
	// TODO: Remarks EM:
148
	// TODO: Remarks EM:
Lines 187-202 Link Here
187
					if (NumericalHelper.isInteger(getInstanceClass())) {
186
					if (NumericalHelper.isInteger(getInstanceClass())) {
188
						boolean maxValue = false;
187
						boolean maxValue = false;
189
						Class<?> instanceClass = getInstanceClass();
188
						Class<?> instanceClass = getInstanceClass();
190
						String formatedValue = "";
189
						String formatedValue = ""; //$NON-NLS-1$
191
						try {
190
						try {
192
							if (Integer.class.isAssignableFrom(instanceClass)
191
							if (Integer.class.isAssignableFrom(instanceClass)
193
								|| Integer.class.getField("TYPE").get(null).equals(instanceClass)) {
192
								|| Integer.class.getField("TYPE").get(null).equals(instanceClass)) { //$NON-NLS-1$
194
								if (Integer.MAX_VALUE == number.intValue()) {
193
								if (Integer.MAX_VALUE == number.intValue()) {
195
									maxValue = true;
194
									maxValue = true;
196
									formatedValue = format.format(Integer.MAX_VALUE);
195
									formatedValue = format.format(Integer.MAX_VALUE);
197
								}
196
								}
198
							} else if (Long.class.isAssignableFrom(instanceClass)
197
							} else if (Long.class.isAssignableFrom(instanceClass)
199
								|| Long.class.getField("TYPE").get(null).equals(instanceClass)) {
198
								|| Long.class.getField("TYPE").get(null).equals(instanceClass)) { //$NON-NLS-1$
200
								if (Long.MAX_VALUE == number.longValue()) {
199
								if (Long.MAX_VALUE == number.longValue()) {
201
									maxValue = true;
200
									maxValue = true;
202
									formatedValue = format.format(Long.MAX_VALUE);
201
									formatedValue = format.format(Long.MAX_VALUE);
Lines 218-224 Link Here
218
						}
217
						}
219
					}
218
					}
220
				}
219
				}
221
				String formatedNumber = "";
220
				String formatedNumber = ""; //$NON-NLS-1$
222
				if (number != null) {
221
				if (number != null) {
223
					formatedNumber = format.format(number);
222
					formatedNumber = format.format(number);
224
				}
223
				}
Lines 240-253 Link Here
240
239
241
		private Object revertToOldValue(final Object value) {
240
		private Object revertToOldValue(final Object value) {
242
241
243
			if (getStructuralFeature().getDefaultValue() == null && (value == null || value.equals(""))) {
242
			if (getStructuralFeature().getDefaultValue() == null && (value == null || value.equals(""))) { //$NON-NLS-1$
244
				return null;
243
				return null;
245
			}
244
			}
246
245
247
			Object result = getModelValue().getValue();
246
			Object result = getModelValue().getValue();
248
247
249
			MessageDialog messageDialog = new MessageDialog(getText().getShell(), "Invalid Number", null,
248
			MessageDialog messageDialog = new MessageDialog(getText().getShell(), ControlMessages.NumericalControl_InvalidNumber, null,
250
				"The Number you have entered is invalid. The value will be unset.", MessageDialog.ERROR,
249
				ControlMessages.NumericalControl_InvalidNumberWillBeUnset, MessageDialog.ERROR,
251
				new String[] { JFaceResources.getString(IDialogLabelKeys.OK_LABEL_KEY) }, 0);
250
				new String[] { JFaceResources.getString(IDialogLabelKeys.OK_LABEL_KEY) }, 0);
252
251
253
			new ECPDialogExecutor(messageDialog) {
252
			new ECPDialogExecutor(messageDialog) {
Lines 258-264 Link Here
258
			}.execute();
257
			}.execute();
259
258
260
			if (result == null) {
259
			if (result == null) {
261
				getText().setText("");
260
				getText().setText(""); //$NON-NLS-1$
262
			} else {
261
			} else {
263
				getText().setText(format.format(result));
262
				getText().setText(format.format(result));
264
			}
263
			}
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/NumericalHelper.java (-12 / +12 lines)
Lines 57-66 Link Here
57
	public static Number getDefaultValue(Class<?> instanceClass) {
57
	public static Number getDefaultValue(Class<?> instanceClass) {
58
		if (instanceClass.isPrimitive()) {
58
		if (instanceClass.isPrimitive()) {
59
			try {
59
			try {
60
				if (Double.class.getField("TYPE").get(null).equals(instanceClass)
60
				if (Double.class.getField("TYPE").get(null).equals(instanceClass) //$NON-NLS-1$
61
					|| Float.class.getField("TYPE").get(null).equals(instanceClass)
61
					|| Float.class.getField("TYPE").get(null).equals(instanceClass) //$NON-NLS-1$
62
					|| Integer.class.getField("TYPE").get(null).equals(instanceClass)
62
					|| Integer.class.getField("TYPE").get(null).equals(instanceClass) //$NON-NLS-1$
63
					|| Long.class.getField("TYPE").get(null).equals(instanceClass)) {
63
					|| Long.class.getField("TYPE").get(null).equals(instanceClass)) { //$NON-NLS-1$
64
					return 0;
64
					return 0;
65
				}
65
				}
66
			} catch (IllegalArgumentException ex) {
66
			} catch (IllegalArgumentException ex) {
Lines 91-98 Link Here
91
	public static boolean isDouble(Class<?> instanceClass) {
91
	public static boolean isDouble(Class<?> instanceClass) {
92
		if (instanceClass.isPrimitive()) {
92
		if (instanceClass.isPrimitive()) {
93
			try {
93
			try {
94
				return Double.class.getField("TYPE").get(null).equals(instanceClass)
94
				return Double.class.getField("TYPE").get(null).equals(instanceClass) //$NON-NLS-1$
95
					|| Float.class.getField("TYPE").get(null).equals(instanceClass);
95
					|| Float.class.getField("TYPE").get(null).equals(instanceClass); //$NON-NLS-1$
96
			} catch (IllegalArgumentException ex) {
96
			} catch (IllegalArgumentException ex) {
97
				Activator.logException(ex);
97
				Activator.logException(ex);
98
			} catch (SecurityException ex) {
98
			} catch (SecurityException ex) {
Lines 116-123 Link Here
116
	public static boolean isInteger(Class<?> instanceClass) {
116
	public static boolean isInteger(Class<?> instanceClass) {
117
		if (instanceClass.isPrimitive()) {
117
		if (instanceClass.isPrimitive()) {
118
			try {
118
			try {
119
				return Integer.class.getField("TYPE").get(null).equals(instanceClass)
119
				return Integer.class.getField("TYPE").get(null).equals(instanceClass) //$NON-NLS-1$
120
					|| Long.class.getField("TYPE").get(null).equals(instanceClass);
120
					|| Long.class.getField("TYPE").get(null).equals(instanceClass); //$NON-NLS-1$
121
			} catch (IllegalArgumentException ex) {
121
			} catch (IllegalArgumentException ex) {
122
				Activator.logException(ex);
122
				Activator.logException(ex);
123
			} catch (SecurityException ex) {
123
			} catch (SecurityException ex) {
Lines 145-157 Link Here
145
	public static Object numberToInstanceClass(Number number, Class<?> instanceClass) {
145
	public static Object numberToInstanceClass(Number number, Class<?> instanceClass) {
146
		if (instanceClass.isPrimitive()) {
146
		if (instanceClass.isPrimitive()) {
147
			try {
147
			try {
148
				if (Double.class.getField("TYPE").get(null).equals(instanceClass)) {
148
				if (Double.class.getField("TYPE").get(null).equals(instanceClass)) { //$NON-NLS-1$
149
					return number.doubleValue();
149
					return number.doubleValue();
150
				} else if (Integer.class.getField("TYPE").get(null).equals(instanceClass)) {
150
				} else if (Integer.class.getField("TYPE").get(null).equals(instanceClass)) { //$NON-NLS-1$
151
					return number.intValue();
151
					return number.intValue();
152
				} else if (Long.class.getField("TYPE").get(null).equals(instanceClass)) {
152
				} else if (Long.class.getField("TYPE").get(null).equals(instanceClass)) { //$NON-NLS-1$
153
					return number.longValue();
153
					return number.longValue();
154
				} else if (Float.class.getField("TYPE").get(null).equals(instanceClass)) {
154
				} else if (Float.class.getField("TYPE").get(null).equals(instanceClass)) { //$NON-NLS-1$
155
					return number.floatValue();
155
					return number.floatValue();
156
				}
156
				}
157
			} catch (IllegalArgumentException ex) {
157
			} catch (IllegalArgumentException ex) {
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/ReferenceMultiControl.java (-2 / +2 lines)
Lines 64-70 Link Here
64
	 */
64
	 */
65
	@Override
65
	@Override
66
	protected String getUnsetLabelText() {
66
	protected String getUnsetLabelText() {
67
		return "Not set. Click to set!";
67
		return ControlMessages.ReferenceMultiControl_NotSetClickToSet;
68
	}
68
	}
69
69
70
	/*
70
	/*
Lines 73-78 Link Here
73
	 */
73
	 */
74
	@Override
74
	@Override
75
	protected String getUnsetButtonTooltip() {
75
	protected String getUnsetButtonTooltip() {
76
		return "Unset";
76
		return ControlMessages.ReferenceMultiControl_Unset;
77
	}
77
	}
78
}
78
}
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/SingleControl.java (-1 / +1 lines)
Lines 85-91 Link Here
85
			return;
85
			return;
86
		}
86
		}
87
		validationLabel.setImage(null);
87
		validationLabel.setImage(null);
88
		validationLabel.setToolTipText("");
88
		validationLabel.setToolTipText(""); //$NON-NLS-1$
89
		updateValidationColor(null);
89
		updateValidationColor(null);
90
	}
90
	}
91
91
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/StringControl.java (-4 / +3 lines)
Lines 72-78 Link Here
72
	 */
72
	 */
73
	@Override
73
	@Override
74
	protected String getTextVariantID() {
74
	protected String getTextVariantID() {
75
		return "org_eclipse_emf_ecp_control_string";
75
		return "org_eclipse_emf_ecp_control_string"; //$NON-NLS-1$
76
	}
76
	}
77
77
78
	/*
78
	/*
Lines 81-88 Link Here
81
	 */
81
	 */
82
	@Override
82
	@Override
83
	protected String getUnsetLabelText() {
83
	protected String getUnsetLabelText() {
84
		// TODO language
84
		return ControlMessages.StringControl_NoTextSetClickToSetText;
85
		return "No text set! Click to set text."; //$NON-NLS-1$
86
	}
85
	}
87
86
88
	/*
87
	/*
Lines 91-97 Link Here
91
	 */
90
	 */
92
	@Override
91
	@Override
93
	protected String getUnsetButtonTooltip() {
92
	protected String getUnsetButtonTooltip() {
94
		return "Unset text";
93
		return ControlMessages.StringControl_UnsetText;
95
	}
94
	}
96
95
97
	@Override
96
	@Override
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/TableControl.java (-12 / +12 lines)
Lines 208-214 Link Here
208
		tableViewer = new TableViewer(composite, SWT.MULTI | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);
208
		tableViewer = new TableViewer(composite, SWT.MULTI | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);
209
		// GridDataFactory.fillDefaults().grab(true, true).align(SWT.FILL, SWT.FILL).hint(SWT.DEFAULT, SWT.DEFAULT)
209
		// GridDataFactory.fillDefaults().grab(true, true).align(SWT.FILL, SWT.FILL).hint(SWT.DEFAULT, SWT.DEFAULT)
210
		// .applyTo(tableViewer.getTable());
210
		// .applyTo(tableViewer.getTable());
211
		tableViewer.setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_control_table");
211
		tableViewer.setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_control_table"); //$NON-NLS-1$
212
		tableViewer.getTable().setHeaderVisible(true);
212
		tableViewer.getTable().setHeaderVisible(true);
213
		tableViewer.getTable().setLinesVisible(true);
213
		tableViewer.getTable().setLinesVisible(true);
214
214
Lines 260-268 Link Here
260
			final TableViewerColumn column = new TableViewerColumn(tableViewer, cellEditor.getStyle());
260
			final TableViewerColumn column = new TableViewerColumn(tableViewer, cellEditor.getStyle());
261
261
262
			if (ECPCellEditor.class.isInstance(cellEditor)) {
262
			if (ECPCellEditor.class.isInstance(cellEditor)) {
263
				column.getColumn().setData("width", ((ECPCellEditor) cellEditor).getColumnWidthWeight());
263
				column.getColumn().setData("width", ((ECPCellEditor) cellEditor).getColumnWidthWeight()); //$NON-NLS-1$
264
			} else {
264
			} else {
265
				column.getColumn().setData("width", 100);
265
				column.getColumn().setData("width", 100); //$NON-NLS-1$
266
			}
266
			}
267
267
268
			// determine the attribute that should be observed
268
			// determine the attribute that should be observed
Lines 281-292 Link Here
281
					if (ECPCellEditor.class.isInstance(cellEditor)) {
281
					if (ECPCellEditor.class.isInstance(cellEditor)) {
282
						ECPCellEditor ecpCellEditor = (ECPCellEditor) cellEditor;
282
						ECPCellEditor ecpCellEditor = (ECPCellEditor) cellEditor;
283
						String text = ecpCellEditor.getFormatedString(value);
283
						String text = ecpCellEditor.getFormatedString(value);
284
						cell.setText(text == null ? "" : text);
284
						cell.setText(text == null ? "" : text); //$NON-NLS-1$
285
285
286
					} else {
286
					} else {
287
287
288
						cell.setText(value == null ? "" : value.toString()); //$NON-NLS-1$
288
						cell.setText(value == null ? "" : value.toString()); //$NON-NLS-1$
289
						cell.getControl().setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_edit_cellEditor_string");
289
						cell.getControl().setData(CUSTOM_VARIANT, "org_eclipse_emf_ecp_edit_cellEditor_string"); //$NON-NLS-1$
290
					}
290
					}
291
291
292
					// if (featureErrorMap.containsKey(element)
292
					// if (featureErrorMap.containsKey(element)
Lines 469-475 Link Here
469
		TableColumnLayout layout = new TableColumnLayout();
469
		TableColumnLayout layout = new TableColumnLayout();
470
		composite.setLayout(layout);
470
		composite.setLayout(layout);
471
		for (int i = 0; i < tableViewer.getTable().getColumns().length; i++) {
471
		for (int i = 0; i < tableViewer.getTable().getColumns().length; i++) {
472
			Integer storedValue = (Integer) tableViewer.getTable().getColumns()[i].getData("width");
472
			Integer storedValue = (Integer) tableViewer.getTable().getColumns()[i].getData("width"); //$NON-NLS-1$
473
			layout.setColumnData(tableViewer.getTable().getColumns()[i], new ColumnWeightData(storedValue == null ? 50
473
			layout.setColumnData(tableViewer.getTable().getColumns()[i], new ColumnWeightData(storedValue == null ? 50
474
				: storedValue));
474
				: storedValue));
475
		}
475
		}
Lines 501-507 Link Here
501
		removeButton = new Button(buttonComposite, SWT.None);
501
		removeButton = new Button(buttonComposite, SWT.None);
502
		Image image = Activator.getImage("icons/delete.png"); //$NON-NLS-1$
502
		Image image = Activator.getImage("icons/delete.png"); //$NON-NLS-1$
503
		removeButton.setImage(image);
503
		removeButton.setImage(image);
504
		removeButton.setToolTipText("Remove the selected " + clazz.getInstanceClass().getSimpleName());
504
		removeButton.setToolTipText(ControlMessages.TableControl_RemoveSelected + clazz.getInstanceClass().getSimpleName());
505
		removeButton.addSelectionListener(new SelectionAdapter() {
505
		removeButton.addSelectionListener(new SelectionAdapter() {
506
			/*
506
			/*
507
			 * (non-Javadoc)
507
			 * (non-Javadoc)
Lines 522-529 Link Here
522
					deletionList.add((EObject) iterator.next());
522
					deletionList.add((EObject) iterator.next());
523
				}
523
				}
524
524
525
				MessageDialog dialog = new MessageDialog(tableViewer.getTable().getShell(), "Delete?", null,
525
				MessageDialog dialog = new MessageDialog(tableViewer.getTable().getShell(), ControlMessages.TableControl_Delete, null,
526
					"Are you sure you want to delete the selected Elements?", MessageDialog.CONFIRM, new String[] {
526
					ControlMessages.TableControl_DeleteAreYouSure, MessageDialog.CONFIRM, new String[] {
527
						JFaceResources.getString(IDialogLabelKeys.YES_LABEL_KEY),
527
						JFaceResources.getString(IDialogLabelKeys.YES_LABEL_KEY),
528
						JFaceResources.getString(IDialogLabelKeys.NO_LABEL_KEY) }, 0);
528
						JFaceResources.getString(IDialogLabelKeys.NO_LABEL_KEY) }, 0);
529
529
Lines 565-571 Link Here
565
		addButton = new Button(buttonComposite, SWT.None);
565
		addButton = new Button(buttonComposite, SWT.None);
566
		Image image = Activator.getImage("icons/add.png"); //$NON-NLS-1$
566
		Image image = Activator.getImage("icons/add.png"); //$NON-NLS-1$
567
		addButton.setImage(image);
567
		addButton.setImage(image);
568
		addButton.setToolTipText("Add an instance of " + clazz.getInstanceClass().getSimpleName());
568
		addButton.setToolTipText(ControlMessages.TableControl_AddInstanceOf + clazz.getInstanceClass().getSimpleName());
569
		addButton.addSelectionListener(new SelectionAdapter() {
569
		addButton.addSelectionListener(new SelectionAdapter() {
570
			/*
570
			/*
571
			 * (non-Javadoc)
571
			 * (non-Javadoc)
Lines 721-727 Link Here
721
	 */
721
	 */
722
	@Override
722
	@Override
723
	protected String getUnsetLabelText() {
723
	protected String getUnsetLabelText() {
724
		return "Not set. Click to set!";
724
		return ControlMessages.TableControl_NotSetClickToSet;
725
	}
725
	}
726
726
727
	/*
727
	/*
Lines 730-736 Link Here
730
	 */
730
	 */
731
	@Override
731
	@Override
732
	protected String getUnsetButtonTooltip() {
732
	protected String getUnsetButtonTooltip() {
733
		return "Unset";
733
		return ControlMessages.TableControl_Unset;
734
	}
734
	}
735
735
736
	/*
736
	/*
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/XmlDateControlText.java (-9 / +8 lines)
Lines 72-89 Link Here
72
72
73
	@Override
73
	@Override
74
	protected String getTextVariantID() {
74
	protected String getTextVariantID() {
75
		return "org_eclipse_emf_ecp_control_xmldate";
75
		return "org_eclipse_emf_ecp_control_xmldate"; //$NON-NLS-1$
76
	}
76
	}
77
77
78
	@Override
78
	@Override
79
	protected String getUnsetLabelText() {
79
	protected String getUnsetLabelText() {
80
		// TODO language
80
		return ControlMessages.XmlDateControlText_NoDateSetClickToSetDate;
81
		return "No date set! Click to set date."; //$NON-NLS-1$
82
	}
81
	}
83
82
84
	@Override
83
	@Override
85
	protected String getUnsetButtonTooltip() {
84
	protected String getUnsetButtonTooltip() {
86
		return "Unset date";
85
		return ControlMessages.XmlDateControlText_UnsetDate;
87
	}
86
	}
88
87
89
	@Override
88
	@Override
Lines 97-103 Link Here
97
		super.fillControlComposite(composite);
96
		super.fillControlComposite(composite);
98
		((GridLayout) composite.getLayout()).numColumns = 2;
97
		((GridLayout) composite.getLayout()).numColumns = 2;
99
		final Button button = new Button(composite, SWT.PUSH);
98
		final Button button = new Button(composite, SWT.PUSH);
100
		button.setText("Datum wählen");
99
		button.setText(ControlMessages.XmlDateControlText_SelectDate);
101
		button.addSelectionListener(new SelectionAdapter() {
100
		button.addSelectionListener(new SelectionAdapter() {
102
101
103
			@Override
102
			@Override
Lines 221-234 Link Here
221
220
222
		private Object revertToOldValue(final Object value) {
221
		private Object revertToOldValue(final Object value) {
223
222
224
			if (getStructuralFeature().getDefaultValue() == null && (value == null || value.equals(""))) {
223
			if (getStructuralFeature().getDefaultValue() == null && (value == null || value.equals(""))) { //$NON-NLS-1$
225
				return null;
224
				return null;
226
			}
225
			}
227
226
228
			Object result = getModelValue().getValue();
227
			Object result = getModelValue().getValue();
229
228
230
			MessageDialog messageDialog = new MessageDialog(getText().getShell(), "Invalid Number", null,
229
			MessageDialog messageDialog = new MessageDialog(getText().getShell(), ControlMessages.XmlDateControlText_InvalidNumber, null,
231
				"The Number you have entered is invalid. The value will be unset.", MessageDialog.ERROR,
230
				ControlMessages.XmlDateControlText_NumberInvalidValueWillBeUnset, MessageDialog.ERROR,
232
				new String[] { JFaceResources.getString(IDialogLabelKeys.OK_LABEL_KEY) }, 0);
231
				new String[] { JFaceResources.getString(IDialogLabelKeys.OK_LABEL_KEY) }, 0);
233
232
234
			new ECPDialogExecutor(messageDialog) {
233
			new ECPDialogExecutor(messageDialog) {
Lines 239-245 Link Here
239
			}.execute();
238
			}.execute();
240
239
241
			if (result == null) {
240
			if (result == null) {
242
				getText().setText("");
241
				getText().setText(""); //$NON-NLS-1$
243
			} else {
242
			} else {
244
				XMLGregorianCalendar gregorianCalendar = (XMLGregorianCalendar) result;
243
				XMLGregorianCalendar gregorianCalendar = (XMLGregorianCalendar) result;
245
				Date date = gregorianCalendar.toGregorianCalendar().getTime();
244
				Date date = gregorianCalendar.toGregorianCalendar().getTime();
(-)a/bundles/org.eclipse.emf.ecp.edit.swt/src/org/eclipse/emf/ecp/edit/internal/swt/controls/messages.properties (+45 lines)
Added Link Here
1
AbstractTextControl_InvalidInput=Invalid input
2
AbstractTextControl_InvalidInputSpace=Invalid input 
3
AbstractTextControl_UNSET=<unset>
4
5
AttributeMultiControl_NotSetClickToSet=Not set. Click to set\!
6
AttributeMultiControl_Unset=Unset
7
8
BooleanControl_NoBooleanSetClickToSetBoolean=No boolean set\! Click to set boolean.
9
BooleanControl_UnsetBoolean=Unset boolean
10
11
DateTimeControl_NoDateSetClickToSetDate=No date set\! Click to set date.
12
DateTimeControl_UnsetDate=Unset Date
13
14
EEnumControl_NoValueSetClickToSetValue=No value set\! Click to set value.
15
EEnumControl_UnsetValue=Unset value
16
17
LinkControl_NoLinkSetClickToSetLink=No link set\! Click to set link.
18
LinkControl_NotSet=(Not Set)
19
LinkControl_UnsetLink=Unset Link
20
21
NumericalControl_FormatNumerical=The format is '\#'.
22
NumericalControl_FormatNumericalDecimal=The format is '\#.\#'.
23
NumericalControl_InvalidNumber=Invalid Number
24
NumericalControl_InvalidNumberWillBeUnset=The Number you have entered is invalid. The value will be unset.
25
NumericalControl_NoNumberClickToSetNumber=No number set\! Click to set number.
26
NumericalControl_UnsetNumber=Unset number
27
28
ReferenceMultiControl_NotSetClickToSet=Not set. Click to set\!
29
ReferenceMultiControl_Unset=Unset
30
31
StringControl_NoTextSetClickToSetText=No text set\! Click to set text.
32
StringControl_UnsetText=Unset text
33
34
TableControl_AddInstanceOf=Add an instance of 
35
TableControl_Delete=Delete?
36
TableControl_DeleteAreYouSure=Are you sure you want to delete the selected Elements?
37
TableControl_NotSetClickToSet=Not set. Click to set\!
38
TableControl_RemoveSelected=Remove the selected 
39
TableControl_Unset=Unset
40
41
XmlDateControlText_InvalidNumber=Invalid Number
42
XmlDateControlText_NoDateSetClickToSetDate=No date set\! Click to set date.
43
XmlDateControlText_NumberInvalidValueWillBeUnset=The Number you have entered is invalid. The value will be unset.
44
XmlDateControlText_SelectDate=Select Date
45
XmlDateControlText_UnsetDate=Unset date

Return to bug 412592