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 144834 Details for
Bug 277662
'New JPA entity' wizard should accept short names for attribute types
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]
Version 3 of the patch
EntityPK_patch_v3.txt (text/plain), 23.92 KB, created by
Stefan Dimov
on 2009-08-18 11:04:25 EDT
(
hide
)
Description:
Version 3 of the patch
Filename:
MIME Type:
Creator:
Stefan Dimov
Created:
2009-08-18 11:04:25 EDT
Size:
23.92 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jpt.ui >Index: src/org/eclipse/jpt/ui/internal/wizards/entity/EntityWizardMsg.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jpa/components/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/entity/EntityWizardMsg.java,v >retrieving revision 1.7 >diff -u -r1.7 EntityWizardMsg.java >--- src/org/eclipse/jpt/ui/internal/wizards/entity/EntityWizardMsg.java 5 May 2009 20:44:05 -0000 1.7 >+++ src/org/eclipse/jpt/ui/internal/wizards/entity/EntityWizardMsg.java 18 Aug 2009 14:59:28 -0000 >@@ -54,7 +54,8 @@ > public static String BROWSE_BUTTON_LABEL; > public static String ADD_BUTTON_LABEL; > public static String EDIT_BUTTON_LABEL; >- public static String EntityDataModelProvider_entityNotInProjectClasspath; >+ public static String EntityDataModelProvider_typeNotInProjectClasspath; >+ public static String EntityDataModelProvider_invalidPKType; > public static String EntityDataModelProvider_invalidArgument; > public static String REMOVE_BUTTON_LABEL; > public static String DUPLICATED_ENTITY_NAMES_MESSAGE; >Index: src/org/eclipse/jpt/ui/internal/wizards/entity/EntityFieldsWizardPage.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jpa/components/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/entity/EntityFieldsWizardPage.java,v >retrieving revision 1.4 >diff -u -r1.4 EntityFieldsWizardPage.java >--- src/org/eclipse/jpt/ui/internal/wizards/entity/EntityFieldsWizardPage.java 8 May 2009 20:49:05 -0000 1.4 >+++ src/org/eclipse/jpt/ui/internal/wizards/entity/EntityFieldsWizardPage.java 18 Aug 2009 14:59:28 -0000 >@@ -56,7 +56,8 @@ > */ > @Override > protected String[] getValidationPropertyNames() { >- return new String[]{IEntityDataModelProperties.ENTITY_FIELDS}; >+ return new String[]{IEntityDataModelProperties.ENTITY_FIELDS, >+ IEntityDataModelProperties.PK_FIELDS}; > } > > /* Create the main composite and add to it the entity properties >Index: src/org/eclipse/jpt/ui/internal/wizards/entity/EntityRowTableWizardSection.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jpa/components/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/entity/EntityRowTableWizardSection.java,v >retrieving revision 1.7 >diff -u -r1.7 EntityRowTableWizardSection.java >--- src/org/eclipse/jpt/ui/internal/wizards/entity/EntityRowTableWizardSection.java 8 Apr 2009 21:14:43 -0000 1.7 >+++ src/org/eclipse/jpt/ui/internal/wizards/entity/EntityRowTableWizardSection.java 18 Aug 2009 14:59:28 -0000 >@@ -24,8 +24,14 @@ > import org.eclipse.jdt.core.JavaModelException; > import org.eclipse.jdt.core.search.IJavaSearchScope; > import org.eclipse.jdt.core.JavaCore; >+import org.eclipse.jface.bindings.keys.KeyStroke; >+import org.eclipse.jface.bindings.keys.ParseException; > import org.eclipse.jface.dialogs.Dialog; > import org.eclipse.jface.dialogs.IDialogConstants; >+import org.eclipse.jface.fieldassist.ContentProposalAdapter; >+import org.eclipse.jface.fieldassist.IContentProposalProvider; >+import org.eclipse.jface.fieldassist.SimpleContentProposalProvider; >+import org.eclipse.jface.fieldassist.TextContentAdapter; > import org.eclipse.jface.viewers.CheckStateChangedEvent; > import org.eclipse.jface.viewers.CheckboxTableViewer; > import org.eclipse.jface.viewers.DoubleClickEvent; >@@ -59,13 +65,13 @@ > import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.Button; >-import org.eclipse.swt.widgets.Combo; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Control; > import org.eclipse.swt.widgets.Label; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.swt.widgets.Table; > import org.eclipse.swt.widgets.TableColumn; >+import org.eclipse.swt.widgets.TableItem; > import org.eclipse.swt.widgets.Text; > import org.eclipse.ui.dialogs.SelectionDialog; > import org.eclipse.wst.common.frameworks.datamodel.IDataModel; >@@ -81,13 +87,42 @@ > /** > * The possible entity types, mentioned in the specification (Chapter 2.1.1 Persistent Fields and Properties p.20) > */ >- protected final static String[] VALID_TYPES = {"int", "long", "short", "char", "boolean", "byte", "double", "float", "java.lang.String", >- "byte[]", "char[]", "java.lang.Byte[]", "java.lang.Character[]", "java.math.BigDecimal", "java.math.BigInteger", "java.sql.Date", "java.sql.Time", "java.sql.Timestamp", >- "java.util.Date", "java.util.Calendar"}; >+ protected final static String[] VALID_TYPES = {"int", >+ "long", >+ "short", >+ "char", >+ "boolean", >+ "byte", >+ "double", >+ "float", >+ "java.lang.String", >+ "java.lang.Integer", >+ "java.lang.Long", >+ "java.lang.Short", >+ "java.lang.Character", >+ "java.lang.Boolean", >+ "java.lang.Byte", >+ "java.lang.Double", >+ "java.lang.Float", >+ "java.math.BigDecimal", >+ "java.math.BigInteger", >+ "java.util.Date", >+ "java.util.Calendar", >+ "java.sql.Date", >+ "java.sql.Time", >+ "java.sql.Timestamp", >+ "String", >+ "Integer", >+ "Long", >+ "Short", >+ "Character", >+ "Boolean", >+ "Byte", >+ "Double", >+ "Float" }; > > private CheckboxTableViewer mTableViewer = null; > private Table mTableWidget = null; >- private final int PK_COLUMN = 0; > private final int NAME_COLUMN = 1; > private final int TYPE_COLUMN = 2; > >@@ -98,12 +133,20 @@ > private Button editButton; > private Button removeButton; > private String title = EntityWizardMsg.ENTITY_FIELDS_DIALOG_TITLE; >- private String[] labelsForCombo = VALID_TYPES; >+ private String[] typeProposals = VALID_TYPES; > private String[] labelsForText = new String[]{EntityWizardMsg.TYPE_TEXT_FIELD, EntityWizardMsg.NAME_TEXT_FIELD}; > private IDataModel model; > private String propertyName; > private Image labelProviderImage = null; > private DialogCallback callback; >+ private static KeyStroke ks = null; >+ static { >+ try { >+ ks = KeyStroke.getInstance("Ctrl+Space"); >+ } catch (ParseException e1) { >+ JptUiPlugin.log(e1); >+ } >+ } > > > /** >@@ -261,16 +304,13 @@ > * add new entity field > */ > private void handleAddButtonSelected() { >- AddFieldDialog dialog = new AddFieldDialog(getShell(), title, labelsForCombo, labelsForText); >+ AddFieldDialog dialog = new AddFieldDialog(getShell(), title, typeProposals, labelsForText); > int result = dialog.open(); > if (result == Window.CANCEL) { > return; > } > EntityRow entityRow = dialog.getEntityRow(); > addEntityRow(entityRow); >- if (!entityRow.couldBeKey()) { >- mTableViewer.setGrayed(entityRow, true); >- } > } > > /** >@@ -305,18 +345,13 @@ > int index = mTableWidget.getSelectionIndex(); > boolean isChecked = mTableViewer.getChecked(entityForEdit); > >- EditFieldDialog dialog = new EditFieldDialog(getShell(), title, labelsForCombo, labelsForText, entityForEdit); >+ EditFieldDialog dialog = new EditFieldDialog(getShell(), title, typeProposals, labelsForText, entityForEdit); > dialog.open(); > EntityRow entityRow = dialog.getEntityRow(); > if (entityRow != null) { > editEntityRow(index, entityRow); > mTableViewer.setChecked(entityRow, isChecked); >- if (!entityRow.couldBeKey()) { >- mTableViewer.setChecked(entityRow, false); >- mTableViewer.setGrayed(entityRow, true); >- } else { >- mTableViewer.setGrayed(entityRow, false); >- } >+ mTableViewer.setGrayed(entityRow, false); > } > } > >@@ -425,9 +460,7 @@ > if (columnIndex == TYPE_COLUMN) { > return entity.getFqnTypeName(); > } >- if (entity.couldBeKey()) { >- mTableViewer.setChecked(entity, entity.isKey()); >- } >+ mTableViewer.setChecked(entity, entity.isKey()); > return ""; > } > >@@ -454,17 +487,16 @@ > private class PKFieldCheckStateListener implements ICheckStateListener { > > public void checkStateChanged(CheckStateChangedEvent event) { >- Object[] checkedElements = mTableViewer.getCheckedElements(); > List<String> pkFields = new ArrayList<String>(); >- for (Object object : checkedElements) { >- EntityRow entity = (EntityRow)object; >- if (entity.couldBeKey()) { >- pkFields.add(entity.getName()); >- } else { >- mTableViewer.setChecked(entity, false); >- } >- } >- model.setProperty(IEntityDataModelProperties.PK_FIELDS, pkFields); >+ TableItem[] children = mTableViewer.getTable().getItems(); >+ for (int i = 0; i < children.length; i++) { >+ TableItem item = children[i]; >+ EntityRow entityRow = (EntityRow)item.getData(); >+ entityRow.setKey(item.getChecked()); >+ if (item.getChecked()) >+ pkFields.add(entityRow.getName()); >+ } >+ model.setProperty(IEntityDataModelProperties.PK_FIELDS, pkFields); > } > > } >@@ -485,7 +517,7 @@ > * @return <code>true</code> if the values in the text fields are > * valid, <code>false</code> otherwise. > */ >- public boolean validate(Combo combo, Text[] texts); >+ public boolean validate(Text type, Text[] texts); > > /** > * Retrieves the entity presentation object from the fields of the dialog. >@@ -497,7 +529,7 @@ > * @param texts the name of the entity field > * @return the entity presentation object retrieved from the dialog > */ >- public EntityRow retrieveResultStrings(Combo combo, Text[] texts); >+ public EntityRow retrieveResultStrings(Text type, Text[] texts); > > } > >@@ -510,7 +542,7 @@ > /** > * The first text field should not be empty. > */ >- public boolean validate(Combo combo, Text[] texts) { >+ public boolean validate(Text type, Text[] texts) { > if (texts.length > 0) { > IStatus validateFieldNameStatus = JavaConventions > .validateFieldName(texts[0].getText(), >@@ -520,7 +552,7 @@ > return false; > } > } >- if (combo.getText().equals("")) { >+ if (type.getText().equals("")) { > return false; > } > return true; >@@ -531,9 +563,9 @@ > * entity field presentation > * @see org.eclipse.jpt.ui.internal.wizards.entity.data.model.EntityRow > */ >- public EntityRow retrieveResultStrings(Combo combo, Text[] texts) { >+ public EntityRow retrieveResultStrings(Text type, Text[] texts) { > EntityRow entity = new EntityRow(); >- entity.setFqnTypeName(combo.getText()); >+ entity.setFqnTypeName(type.getText()); > entity.setName(texts[0].getText()); > return entity; > } >@@ -546,23 +578,24 @@ > */ > private class AddFieldDialog extends Dialog implements ModifyListener, SelectionListener { > protected String windowTitle; >- protected String[] labelsForCombo; >+ protected String[] typeProposals; > protected String[] labelsForText; > protected Text[] texts; > protected EntityRow entityRow; >- protected Combo combo; >+ protected Text attributeType; >+ protected ContentProposalAdapter contentProposalAdapter; > > /** > * Constructs AddFieldDialog > * @param shell > * @param windowTitle dialog label >- * @param labelsForCombo the elements for the combo >+ * @param typeProposals the elements for the combo > * @param labelsForText name text > */ >- public AddFieldDialog(Shell shell, String windowTitle, String[] labelsForCombo, String[] labelsForText) { >+ public AddFieldDialog(Shell shell, String windowTitle, String[] typeProposals, String[] labelsForText) { > super(shell); > this.windowTitle = windowTitle; >- this.labelsForCombo = labelsForCombo; >+ this.typeProposals = typeProposals; > this.labelsForText = labelsForText; > } > >@@ -589,11 +622,11 @@ > label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); > > >- combo = new Combo(composite, SWT.SINGLE | SWT.BORDER);// | SWT.READ_ONLY); >- combo.setItems(labelsForCombo); >+ attributeType = new Text(composite, SWT.SINGLE | SWT.BORDER);// | SWT.READ_ONLY); >+ //combo.setItems(labelsForCombo); > data = new GridData(GridData.FILL_HORIZONTAL); > data.horizontalSpan = 2; >- combo.setLayoutData(data); >+ attributeType.setLayoutData(data); > > Button browseButton = new Button(composite, SWT.PUSH); > browseButton.setText(EntityWizardMsg.BROWSE_BUTTON_LABEL); >@@ -618,14 +651,31 @@ > labelI.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); > texts[i-1] = new Text(composite, SWT.SINGLE | SWT.BORDER); > data = new GridData(GridData.FILL_HORIZONTAL); >- data.widthHint = 100; >+ data.horizontalSpan = 2; > texts[i-1].setLayoutData(data); > } > >- combo.setFocus(); >+ attributeType.setFocus(); > Dialog.applyDialogFont(parent); >+ createContentProposalProvider(); > return composite; > } >+ >+ private IContentProposalProvider createContentProposalProvider() { >+ SimpleContentProposalProvider contProvider = new SimpleContentProposalProvider(typeProposals); >+ contProvider.setFiltering(true); >+ >+ contentProposalAdapter = new ContentProposalAdapter( >+ attributeType, >+ new TextContentAdapter(), >+ contProvider, >+ ks, >+ new char[] {'b', 'c', 'd', 'i', 'f', 'l', 's', 'j', 'B', 'C', 'D', 'F', 'S', 'L', 'I'}); >+ contentProposalAdapter.setEnabled(true); >+ contentProposalAdapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE); >+ return contProvider; >+ } >+ > > /** > * Process browsing when the Browse... button have been pressed. Allow adding of entity field >@@ -670,7 +720,7 @@ > if (type != null) { > superclassFullPath = type.getFullyQualifiedName(); > } >- combo.setText(superclassFullPath); >+ attributeType.setText(superclassFullPath); > //getControl().setCursor(null); > return; > } >@@ -685,8 +735,8 @@ > protected Control createContents(Composite parent) { > Composite composite = (Composite) super.createContents(parent); > >- combo.addSelectionListener(this); >- combo.addModifyListener(this); >+ attributeType.addSelectionListener(this); >+ attributeType.addModifyListener(this); > for (int i = 0; i < texts.length; i++) { > texts[i].addModifyListener(this); > } >@@ -701,7 +751,7 @@ > */ > @Override > protected void okPressed() { >- entityRow = callback.retrieveResultStrings(combo, texts); >+ entityRow = callback.retrieveResultStrings(attributeType, texts); > super.okPressed(); > } > >@@ -724,7 +774,7 @@ > * @see DialogCallback > */ > private void updateOKButton() { >- getButton(IDialogConstants.OK_ID).setEnabled(callback.validate(combo, texts)); >+ getButton(IDialogConstants.OK_ID).setEnabled(callback.validate(attributeType, texts)); > } > /* (non-Javadoc) > * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent) >@@ -762,7 +812,7 @@ > > Composite composite = (Composite) super.createDialogArea(parent); > >- combo.setText(entityRow.getFqnTypeName()); >+ attributeType.setText(entityRow.getFqnTypeName()); > texts[0].setText(entityRow.getName()); > > return composite; >Index: src/org/eclipse/jpt/ui/internal/wizards/entity/data/model/EntityRow.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jpa/components/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/entity/data/model/EntityRow.java,v >retrieving revision 1.1 >diff -u -r1.1 EntityRow.java >--- src/org/eclipse/jpt/ui/internal/wizards/entity/data/model/EntityRow.java 16 Apr 2008 02:15:36 -0000 1.1 >+++ src/org/eclipse/jpt/ui/internal/wizards/entity/data/model/EntityRow.java 18 Aug 2009 14:59:29 -0000 >@@ -17,48 +17,23 @@ > public class EntityRow { > > private static final String DOT = "."; >+ private static final char BRACKET_SQUARE = '['; >+ private static final char BRACKET_ANGULAR = '<'; >+ private static final String PACKAGE_JAVA_LANG = "java.lang."; > private boolean key = false; > private String name = ""; > private String type = ""; > private String fqnTypeName = ""; >- private boolean isSimpleType = false; > > private final static String[] PK_TYPES = {"int", "long", "short", "char", "boolean", "byte", "double", "float", > "java.lang.String", "java.sql.Date", "java.util.Date", "java.lang.Integer", "java.lang.Long", "java.lang.Short", > "java.lang.Character", "java.lang.Boolean", "java.lang.Byte", "java.lang.Double", "java.lang.Float"}; > >- private final static List<String> VALID_PK_TYPES = Arrays.asList(PK_TYPES); >- >- >- /** >- * Constructs <code>EntityColumn</code>. >- */ >- public EntityRow() { >- super(); >- } >+ private final static String[] PK_TYPES_SHORT = { "String", "Integer", "Long", "Short", "Character", "Boolean", >+ "Byte", "Double", "Float" }; > >- >- /** >- * >- * Constructs <code>EntityColumn</code> with the following parameters >- * >- * @param fqnTypeName - fully qualified name of the entity field type >- * @param name - name of the entity field >- * @param isKey - flag which indicates whether the entity field is primary key or part of composite primary key >- */ >- public EntityRow(String fqnTypeName, String name, boolean isKey) { >- super(); >- this.fqnTypeName = type; >- this.name = name; >- this.key = isKey; >- if (fqnTypeName.indexOf(DOT) == -1) { >- type = fqnTypeName; >- isSimpleType = true; >- } else { >- type = getSimpleName(fqnTypeName); >- } >- } >- >+ private final static List<String> VALID_PK_TYPES = Arrays.asList(PK_TYPES); >+ private final static List<String> VALID_PK_TYPES_SHORT = Arrays.asList(PK_TYPES_SHORT); > > /** > * @return whether the presented entity field is primary key or part of composite primary key >@@ -124,6 +99,31 @@ > public String getFqnTypeName() { > return fqnTypeName; > } >+ >+ private String removeSpaces(String str) { >+ str = str.trim(); >+ StringBuffer sb = new StringBuffer(); >+ for (int i = 0; i < str.length(); i++) { >+ char c = str.charAt(i); >+ if (!Character.isWhitespace(c)) >+ sb.append(c); >+ } >+ return sb.toString(); >+ } >+ >+ private String getBasicFQN(String fqn) { >+ String res; >+ int bsIndex = fqn.indexOf(BRACKET_SQUARE); >+ int baIndex = fqn.indexOf(BRACKET_ANGULAR); >+ if (bsIndex == -1) { >+ if (baIndex == -1) res = fqn; >+ else res = fqn.substring(0, baIndex); >+ } else { >+ if (baIndex == -1) res = fqn.substring(0, bsIndex); >+ else res = fqn.substring(0, Math.max(bsIndex, baIndex)); >+ } >+ return res; >+ } > > /** > * Sets the fully qualified type name of the entity field >@@ -131,30 +131,20 @@ > * @param fqnTypeName > */ > public void setFqnTypeName(String fqnTypeName) { >- this.fqnTypeName = fqnTypeName; >- if (fqnTypeName.indexOf(DOT) == -1) { >- setType(fqnTypeName); >- setSimpleType(true); >+ fqnTypeName = removeSpaces(fqnTypeName); >+ String fqnBasicTypeName = getBasicFQN(fqnTypeName); >+ if (fqnBasicTypeName.indexOf(DOT) == -1) { >+ if (VALID_PK_TYPES_SHORT.contains(fqnBasicTypeName)) { >+ this.fqnTypeName = PACKAGE_JAVA_LANG + fqnTypeName; >+ setType(fqnTypeName); >+ } else { >+ this.fqnTypeName = fqnTypeName; >+ setType(fqnTypeName); >+ } > } else { >+ this.fqnTypeName = fqnTypeName; > setType(getSimpleName(fqnTypeName)); >- } >- >- } >- >- /** >- * @return is the type of the entity field is primitive type >- */ >- public boolean isSimpleType() { >- return isSimpleType; >- } >- >- /** >- * Sets the flag which indicate the type of the entity field as primitive type >- * >- * @param isSimpleType >- */ >- public void setSimpleType(boolean isSimpleType) { >- this.isSimpleType = isSimpleType; >+ } > } > > /** >@@ -173,7 +163,6 @@ > */ > private String getSimpleName(String fullyName) { > return fullyName.substring(fullyName.lastIndexOf(DOT) + 1); >- > } > > @Override >Index: src/org/eclipse/jpt/ui/internal/wizards/entity/data/model/EntityDataModelProvider.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jpa/components/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/entity/data/model/EntityDataModelProvider.java,v >retrieving revision 1.10 >diff -u -r1.10 EntityDataModelProvider.java >--- src/org/eclipse/jpt/ui/internal/wizards/entity/data/model/EntityDataModelProvider.java 5 May 2009 20:44:05 -0000 1.10 >+++ src/org/eclipse/jpt/ui/internal/wizards/entity/data/model/EntityDataModelProvider.java 18 Aug 2009 14:59:29 -0000 >@@ -234,6 +234,13 @@ > private String checkInputElementsTypeValidation(List<EntityRow> inputElements) { > IStatus validateFieldTypeStatus = Status.OK_STATUS; > for (EntityRow entityRow: inputElements) { >+ if (entityRow.isKey() && !entityRow.couldBeKey()) { >+ String message = MessageFormat.format( >+ EntityWizardMsg.EntityDataModelProvider_invalidPKType, new Object[]{entityRow.getFqnTypeName()}); >+ validateFieldTypeStatus = new Status(IStatus.ERROR, >+ JptUiPlugin.PLUGIN_ID, message); >+ break; >+ } > String sig = null; > try { > sig = Signature.createTypeSignature(entityRow.getFqnTypeName(), true); >@@ -266,11 +273,10 @@ > private String checkInputElementsTypeExistence(List<EntityRow> inputElements) { > IStatus validateFieldTypeStatus=Status.OK_STATUS; > for (EntityRow entityRow: inputElements) { >- > String sig = Signature.createTypeSignature(entityRow.getFqnTypeName() ,true); > if (sig == null) { > String message = MessageFormat.format( >- EntityWizardMsg.EntityDataModelProvider_entityNotInProjectClasspath, new Object[]{entityRow.getFqnTypeName()}); >+ EntityWizardMsg.EntityDataModelProvider_typeNotInProjectClasspath, new Object[]{entityRow.getFqnTypeName()}); > validateFieldTypeStatus = new Status(IStatus.ERROR, > JptUiPlugin.PLUGIN_ID, message); > break; >@@ -296,7 +302,7 @@ > } > if (type == null) { > String message = MessageFormat.format( >- EntityWizardMsg.EntityDataModelProvider_entityNotInProjectClasspath, new Object[]{entityRow.getFqnTypeName()}); >+ EntityWizardMsg.EntityDataModelProvider_typeNotInProjectClasspath, new Object[]{entityRow.getFqnTypeName()}); > validateFieldTypeStatus = new Status(IStatus.ERROR, > JptUiPlugin.PLUGIN_ID, message); > break; >@@ -314,7 +320,7 @@ > } > if (type == null) { > String message = MessageFormat.format( >- EntityWizardMsg.EntityDataModelProvider_entityNotInProjectClasspath, new Object[]{entityRow.getFqnTypeName()}); >+ EntityWizardMsg.EntityDataModelProvider_typeNotInProjectClasspath, new Object[]{entityRow.getFqnTypeName()}); > validateFieldTypeStatus = new Status(IStatus.ERROR, > JptUiPlugin.PLUGIN_ID, message); > break; >Index: property_files/jpt_ui_entity_wizard.properties >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jpa/components/jpa/plugins/org.eclipse.jpt.ui/property_files/jpt_ui_entity_wizard.properties,v >retrieving revision 1.8 >diff -u -r1.8 jpt_ui_entity_wizard.properties >--- property_files/jpt_ui_entity_wizard.properties 8 Apr 2009 21:14:43 -0000 1.8 >+++ property_files/jpt_ui_entity_wizard.properties 18 Aug 2009 14:59:28 -0000 >@@ -52,5 +52,6 @@ > APPLY_CHANGES_TO_PERSISTENCE_XML=Apply changes to persistence XML > ADD_MAPPED_SUPERCLASS_TO_XML=Add mapped superclass to XML > ADD_ENTITY_TO_XML=Add entity to XML >-EntityDataModelProvider_entityNotInProjectClasspath=''{0}'' does not exist on the project classpath >+EntityDataModelProvider_typeNotInProjectClasspath=''{0}'' does not exist on the project classpath >+EntityDataModelProvider_invalidPKType=''{0}'' is not a valid simple primary key type > EntityDataModelProvider_invalidArgument=Invalid argument ''{0}''
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
Flags:
neil.hauge
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 277662
:
143401
|
143476
| 144834