summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-04-13 09:36:48 (EDT)
committer Stephan Born2012-04-24 10:14:02 (EDT)
commite781d2fac4f88486bb4f31eaa654e50ebca2f756 (patch)
treee26642c8c2a111d03b13f43f63777c78b0876591
parent076f1461f85bd01d06e7c01197fdb9dc67fa35d8 (diff)
downloadorg.eclipse.stardust.ide-e781d2fac4f88486bb4f31eaa654e50ebca2f756.zip
org.eclipse.stardust.ide-e781d2fac4f88486bb4f31eaa654e50ebca2f756.tar.gz
org.eclipse.stardust.ide-e781d2fac4f88486bb4f31eaa654e50ebca2f756.tar.bz2
Jira-ID: CRNT-23739
Creating structured type with duplicate ids, doesn't give proper error message in properties page. git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@55477 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--modeling/org.eclipse.stardust.modeling.data.structured.nl/src/org/eclipse/stardust/modeling/data/structured/structured-messages_en.properties6
-rw-r--r--modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/Structured_Messages.java6
-rw-r--r--modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/properties/TypeDeclarationPropertyPage.java10
-rw-r--r--modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/structured-messages.properties5
4 files changed, 22 insertions, 5 deletions
diff --git a/modeling/org.eclipse.stardust.modeling.data.structured.nl/src/org/eclipse/stardust/modeling/data/structured/structured-messages_en.properties b/modeling/org.eclipse.stardust.modeling.data.structured.nl/src/org/eclipse/stardust/modeling/data/structured/structured-messages_en.properties
index a794f62..9a54fc3 100644
--- a/modeling/org.eclipse.stardust.modeling.data.structured.nl/src/org/eclipse/stardust/modeling/data/structured/structured-messages_en.properties
+++ b/modeling/org.eclipse.stardust.modeling.data.structured.nl/src/org/eclipse/stardust/modeling/data/structured/structured-messages_en.properties
@@ -210,3 +210,9 @@ EXC_XOM_DOM_TRANSFORMATION_IS_NOT_VALID_FOR_THIS_DATAPATH=XOM/DOM transformation
# EXC_XOM_DOM_TRANSFORMATION_IS_NOT_VALID_FOR_THIS_DATAPATH_en=XOM/DOM transformation is not valid for this datapath.
LBL_Sequence=<sequence>
# LBL_Sequence_en=<sequence>
+TypeDeclarationPropertyPage_EmptyValuesMessage=Empty values are not allowed.
+# TypeDeclarationPropertyPage_EmptyValuesMessage=Empty values are not allowed.
+TypeDeclarationPropertyPage_DuplicateValueMessage=Duplicate value: ''{0}''.
+# TypeDeclarationPropertyPage_DuplicateValueMessage=Duplicate value: ''{0}''.
+TypeDeclarationPropertyPage_InvalidIdentifierErrorMessage=''{0}'' is not a valid identifier.
+# TypeDeclarationPropertyPage_InvalidIdentifierErrorMessage=''{0}'' is not a valid identifier.
diff --git a/modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/Structured_Messages.java b/modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/Structured_Messages.java
index fd5cd1c..93a0f82 100644
--- a/modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/Structured_Messages.java
+++ b/modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/Structured_Messages.java
@@ -227,6 +227,12 @@ public class Structured_Messages extends NLS
public static String ImportIdDialog_EmptyId;
public static String LBL_Sequence;
+
+ public static String TypeDeclarationPropertyPage_EmptyValuesMessage;
+
+ public static String TypeDeclarationPropertyPage_DuplicateValueMessage;
+
+ public static String TypeDeclarationPropertyPage_InvalidIdentifierErrorMessage;
public static String Question;
diff --git a/modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/properties/TypeDeclarationPropertyPage.java b/modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/properties/TypeDeclarationPropertyPage.java
index 8cf8fc9..d2cc216 100644
--- a/modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/properties/TypeDeclarationPropertyPage.java
+++ b/modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/properties/TypeDeclarationPropertyPage.java
@@ -171,6 +171,8 @@ public class TypeDeclarationPropertyPage extends AbstractModelElementPropertyPag
txtName.getText().setEnabled(false);
autoIdButton.setEnabled(false);
}
+
+ validateInput();
}
public void apply()
@@ -327,7 +329,7 @@ public class TypeDeclarationPropertyPage extends AbstractModelElementPropertyPag
if (txtName.getText().getText().length() == 0
|| txtId.getText().getText().length() == 0)
{
- setMessage("", ERROR); //$NON-NLS-1$
+ setMessage(Structured_Messages.TypeDeclarationPropertyPage_EmptyValuesMessage, ERROR);
setValid(false);
return;
}
@@ -335,7 +337,7 @@ public class TypeDeclarationPropertyPage extends AbstractModelElementPropertyPag
if(!ModelUtils.isValidId(txtId.getText().getText()))
{
setMessage(MessageFormat.format(
- "", //$NON-NLS-1$
+ Structured_Messages.ComplexTypePropertyPage_InvalidFieldIdentifierErrorMessage,
new Object [] {txtId.getText().getText()}), ERROR);
setValid(false);
return;
@@ -352,7 +354,7 @@ public class TypeDeclarationPropertyPage extends AbstractModelElementPropertyPag
if (td.getId().equals(txtId.getText().getText()))
{
setMessage(MessageFormat.format(
- "", //$NON-NLS-1$
+ Structured_Messages.TypeDeclarationPropertyPage_DuplicateValueMessage,
new Object [] {txtId.getText().getText()}), ERROR);
setValid(false);
return;
@@ -360,7 +362,7 @@ public class TypeDeclarationPropertyPage extends AbstractModelElementPropertyPag
if (td.getName().equals(txtName.getText().getText()))
{
setMessage(MessageFormat.format(
- "", //$NON-NLS-1$
+ Structured_Messages.TypeDeclarationPropertyPage_DuplicateValueMessage,
new Object [] {txtName.getText().getText()}), ERROR);
setValid(false);
return;
diff --git a/modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/structured-messages.properties b/modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/structured-messages.properties
index 3532282..d30c388 100644
--- a/modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/structured-messages.properties
+++ b/modeling/org.eclipse.stardust.modeling.data.structured/src/org/eclipse/stardust/modeling/data/structured/structured-messages.properties
@@ -113,4 +113,7 @@ ImportIdDialog_DuplicateId=ID already exists in Model\!
ImportIdDialog_EmptyId=ID must not be empty\!
SYNCHRONIZE_NAMESPACE_AND_ID=Synchronize namespace with type id
EXC_XOM_DOM_TRANSFORMATION_IS_NOT_VALID_FOR_THIS_DATAPATH=XOM/DOM transformation is not valid for this datapath.
-LBL_Sequence=<sequence> \ No newline at end of file
+LBL_Sequence=<sequence>
+TypeDeclarationPropertyPage_EmptyValuesMessage=Empty values are not allowed.
+TypeDeclarationPropertyPage_DuplicateValueMessage=Duplicate value: ''{0}''.
+TypeDeclarationPropertyPage_InvalidIdentifierErrorMessage=''{0}'' is not a valid identifier. \ No newline at end of file