1 | String message = null;↵ | | 1 | String message = null;↵
|
|
2 | if (location == null || location.equals(""))↵ | | 2 | if (fileName == null || fileName.equals(""))↵
|
3 | {↵ | | 3 | {↵
|
4 | message = packageName == null ?↵ | | 4 | message = packageName == null ?↵
|
5 | ExporterPlugin.INSTANCE.getString("_UI_ArtifactFileNameCannotBeEmpty_message") :↵ | | 5 | ImporterPlugin.INSTANCE.getString("_UI_EcoreModelFileNameCannotBeEmpty_message") :↵
|
6 | ExporterPlugin.INSTANCE.getString("_UI_ArtifactFileNameForPackageCannotBeEmpty_message", new Object []{packageName});↵ | | 6 | ImporterPlugin.INSTANCE.getString("_UI_EcoreModelFileNameForPackageCannotBeEmpty_message", new Object []{ packageName });↵
|
7 | }↵ | | 7 | }↵
|
8 | else↵ | | 8 | else↵
|
9 | {↵ | | |
|
10 | message = doCheckEPackageArtifactLocation(location,↵ | | 9 | if (!fileName.endsWith(".ecore") && !fileName.endsWith(".emof"))↵
|
| | | 10 | {↵
|
| | | 11 | message = packageName == null ?↵
|
| | | 12 | ImporterPlugin.INSTANCE.getString("_UI_EcoreModelFileNameMustEndWithEcore_message") :↵
|
11 | packageName);↵ | | 13 | ImporterPlugin.INSTANCE.getString("_UI_EcoreModelFileNameForPackageMustEndWithEcore_message", new Object []{ packageName });↵
|
12 | }↵ | | 14 | }↵
|
13 | ↵ | | |
|
14 | if (message == null)↵ | | 15 | if (message == null)↵
|
15 | {↵ | | 16 | {↵
|
16 | return Diagnostic.OK_INSTANCE;↵ | | 17 | return Diagnostic.OK_INSTANCE;↵
|
17 | }↵ | | 18 | }↵
|
18 | else↵ | | 19 | else↵
|
19 | {↵ | | 20 | {↵
|
20 | return new BasicDiagnostic(Diagnostic.ERROR, ConverterPlugin.ID, ConverterUtil.ACTION_DEFAULT, message, null);↵ | | 21 | return new BasicDiagnostic(Diagnostic.ERROR, ConverterPlugin.ID, ConverterUtil.ACTION_DEFAULT, message, null);↵
|
21 | } | | 22 | }
|