Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » "String value(s) can't be resolved" error in table import("String value(s) can't be resolved" error in table import)
"String value(s) can't be resolved" error in table import [message #1828088] Mon, 01 June 2020 12:00 Go to next message
Ri Fr is currently offline Ri FrFriend
Messages: 134
Registered: July 2015
Senior Member
Hello I'm trying to import packages and their description (as owned comments) from a flat file that looks like this:

Ciccia Farm comment mud here aspgjp'jg
Pappa Farm comment mud here aspgjp'jg Farm comment mud here aspgjp...

The packages import but no comments are created and I get an error message on the table "String value(s) can't be resolved" . Could not find anything on Google, is this a bug or am I doing something wrong?

This happens with different import ways (paste, file import etc.)

My paste settings are in attached screenshot:
Thanks!

index.php/fa/38221/0/
Re: "String value(s) can't be resolved" error in table import [message #1828117 is a reply to message #1828088] Tue, 02 June 2020 06:38 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 273
Registered: May 2015
Location: Germany
Senior Member
Hi Ri,

to get a clue what happened: Can you please disclose the input file.

At a very first glance it looks like, the input file does not adhere to the XML's rules to escape special characters.
The following article gives a short overview on that topic.
http://xml.silmaril.ie/specials.html

/Carsten
Re: "String value(s) can't be resolved" error in table import [message #1828132 is a reply to message #1828117] Tue, 02 June 2020 08:51 Go to previous messageGo to next message
Ri Fr is currently offline Ri FrFriend
Messages: 134
Registered: July 2015
Senior Member
Hello Carsten, thank you very much for your help as always!
Here is the file I am trying to import, the attached one is tab separated with " for text marker, but I tried many different formats (including import file to table or paste onto table; including comma separated, no " quotes etc.), the result is the same.
  • Attachment: Ciccia.txt
    (Size: 0.12KB, Downloaded 24 times)
Re: "String value(s) can't be resolved" error in table import [message #1828133 is a reply to message #1828132] Tue, 02 June 2020 09:08 Go to previous messageGo to next message
Carsten Pitz is currently offline Carsten PitzFriend
Messages: 273
Registered: May 2015
Location: Germany
Senior Member
s/'/'/g
and try again
/Carsten

PS
so try importing

"Ciccia" "Farm comment mud here aspgjp'jg"
"Pappa" "Farm comment mud here aspgjp'jg Farm comment mud here aspgjp..."

[Updated on: Tue, 02 June 2020 09:23]

Report message to a moderator

Re: "String value(s) can't be resolved" error in table import [message #1828136 is a reply to message #1828088] Tue, 02 June 2020 10:01 Go to previous messageGo to next message
vincent lorenzo is currently offline vincent lorenzoFriend
Messages: 153
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hi Ri,
you won't succeed with a such configuration. The paste is not able to create the Comment in the same time than it creates the Package.
In order to be able to create Package and Owned comments in the same time, you need to use the TreeTable showing the Package at the first level and the comment as child of the Package.
The column of the table must be NamedElement#name and Comment#body

So you need to configure the Generic Tree Table for the display AND to configure it for the paste. (Right-Click -> Menu Configure Categories And Paste).

From this configuration, your Excel must be structured too.
First column of your Excel is a row header label column. This column will give the structure of the table: a space allows to define the depth, so for you:
Package
Comment
Package
Comment

The label set in this column is not used, only the space is important (if I remember well).

Then you will have 2 others columns : one for the name of the package and one for the body of the comment.

Please, find in attachment a Papyrus model with a configured table and an excel with data to paste.


There are documentation in the Eclipse Help Content -> Papyrus guide -> Toolsmith Guide -> Using Table -> General -> Paste And Insert

Hoping it will help you.
Regards
/Vincent
Re: "String value(s) can't be resolved" error in table import [message #1828137 is a reply to message #1828133] Tue, 02 June 2020 10:13 Go to previous messageGo to next message
Ri Fr is currently offline Ri FrFriend
Messages: 134
Registered: July 2015
Senior Member
Thank Carsten but nope, I get the same error with just the aspgjp'jg" text added
If I double click on the OwnedCOmment cell to edit it I can't edit it, a dialog opens asking me to select a comment from the element catalog... maybe I'm doing it wrong. Back to study the user manual!
Re: "String value(s) can't be resolved" error in table import [message #1828139 is a reply to message #1828137] Tue, 02 June 2020 11:19 Go to previous messageGo to next message
Ri Fr is currently offline Ri FrFriend
Messages: 134
Registered: July 2015
Senior Member
Thank you Vincent and Carsten - Vincent I'll try your solution right away! Thanks!
p.s. My next challenge will be to import a few thousand classes and their attributes from csv file, including table comments and attribute comments. Should I use a tree table with the classes and attributes as Vincent explained?
Re: "String value(s) can't be resolved" error in table import [message #1828144 is a reply to message #1828139] Tue, 02 June 2020 14:28 Go to previous messageGo to next message
Ri Fr is currently offline Ri FrFriend
Messages: 134
Registered: July 2015
Senior Member
Thank you Vincent it really works! I would have never figured it out without the example zip file so thanks for sending it over. The last thing that got me (thanks to your Excel example) - need an empty space before the Comment in column 1 - wow!! All good now - cheers
Re: "String value(s) can't be resolved" error in table import [message #1828231 is a reply to message #1828144] Thu, 04 June 2020 14:18 Go to previous messageGo to next message
Ri Fr is currently offline Ri FrFriend
Messages: 134
Registered: July 2015
Senior Member
Sorry Vincent I'm back trying to import Classes, attributes and definitions for both.
I can import classes and attributes in Class tree Table, but the definitions (comments) do not import:
The columns in the table are name and owned comment, the configure paste categories are depth 0 Class, Depth 1 owned attribute, depth 3 comment
In short I was able to change your template to import classes and their definitions, but I'm making a mistake in either the table structure (columns and hierarchy) or in the paste category setup. WOuld you be so kind to explain how to import classes + their definitions and their attributes + the attribute definition? Thanks!

[Updated on: Thu, 04 June 2020 15:03]

Report message to a moderator

[Solved]: "String value(s) can't be resolved" error in table import [message #1828346 is a reply to message #1828088] Mon, 08 June 2020 07:28 Go to previous message
Ri Fr is currently offline Ri FrFriend
Messages: 134
Registered: July 2015
Senior Member
Thanks everyone so this works for me for importing classes, attributes and attribute descriptions from Excel (I haven't done class descriptions yet).

I'm posting in case others may need the solution. Credit to Vincent and Carsten for showing me the way!

Use Generic Tree table

Right click on the table to not show any Categories, then Hide all Categories, then Hierarchic style Tree single column

Right click on table rows - configure categories as follows: level 0, 1 and 2 are all ownedElement.

On next window, configure paste element id and containment feature as follows:
Level 0: Class - packagedElement
Level 1: Property - ownedAtribute
Level 2: Comment - ownedComment

The Excel import structure must look like this (no space before Class, 1 space before Property, 2 spaces before Comment):

Class	TESTclass 3	
 Property	TESTattribute3	
  Comment		TESTattribute description3


Imported a few dozen classes with thousands of attributes and their descriptions in a few seconds. Thanks everyone!

[Updated on: Mon, 08 June 2020 08:20]

Report message to a moderator

Previous Topic:Adding a Profile to a Plugin
Next Topic:Class diagram and state diagram
Goto Forum:
  


Current Time: Wed Jan 20 04:54:11 GMT 2021

Powered by FUDForum. Page generated in 0.02484 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top