Bug 150805 - Simultanous entry of multiple attributes
Summary: Simultanous entry of multiple attributes
Status: RESOLVED DUPLICATE of bug 380266
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-13 21:45 UTC by Einar Petersen
Modified: 2018-05-23 12:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.22.80 (KDE Applications 17.07.80)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Einar Petersen 2007-10-13 21:45:39 UTC
Version:            (using KDE KDE 3.5.8)
Installed from:    Ubuntu Packages
OS:                Linux

Simultanous entry of multiple attributes:

Inserting multiple attributes af any kind simultanously when working in the properties menu.

Imagine having to create say 10-15 Strings only with different ending numbers for error messages or what say you.

Creating these one by one is a painstaking effort, yes you could hop into a text editor and create a java file make a bunch of copy n'paste and then import it, but that would kind of defeat the purpose of a modeler.

Implementing a feature like this could increase development speed with several factors.

Creating an option like the above mentioned could be as simple as having an extra button, or by simply adding a checkbox to the current interface, that if ticked opens a window looking something like the below example (hope the formatting holds when pasting this wish.

	AtNa:	AtTy:	InVa:	StNa:	ClSc	Select
 1:	XXXXX	XXXXX	XXXXX	XXXXX	[ ]	Pu(O) Pr(O) Pt(O) Im(O) 	
 2	XXXXX	XXXXX	XXXXX	XXXXX	[ ]	Pu(O) Pr(O) Pt(O) Im(O) 	
 3	XXXXX	XXXXX	XXXXX	XXXXX	[ ]	Pu(O) Pr(O) Pt(O) Im(O) 	
 4	XXXXX	XXXXX	XXXXX	XXXXX	[ ]	Pu(O) Pr(O) Pt(O) Im(O) 	
 5	XXXXX	XXXXX	XXXXX	XXXXX	[ ]	Pu(O) Pr(O) Pt(O) Im(O) 	
 6	XXXXX	XXXXX	XXXXX	XXXXX	[ ]	Pu(O) Pr(O) Pt(O) Im(O) 	
 etc. etc.

AtNa: = Attribute name - Textfield 
AtTy: Attribute type - Dropdown
InVa: Initial value - Textfield
StNa: Stereotype name
ClSc: Classifier scope
Select: Radio buttons Pu(O) = Public - Pr(O) = Private - Pt(O) = Protected - Im(O) = Implementation

I'll be happy to provide an idea template layout, once I have finished my current project.


A parseable freetext window would also be a solution - See how that could be utilized below.


The quick fix for inputting multiple attributes from one document to another turning it into a java file during the process till one of the mentioned solutions are implemented is the following:

Create a "shell" of a java class then copy and paste the atributes that need to be created into the "shell" 

The example below is based on transferring from PDF and entering data from a standard into a java file.

In the PDF file the text is laid out as seen below:

**************************************************************************
5.13.6
Each lead measurement block shall consist of:

Byte 	Contents

1 to 2 	Lead ID

3 to 4 	Length of record

5 to 6 	P-duration (ms) (total P-duration, including P+ and P- components)

7 to 8 	PR-interval (ms)

9 to 10 QRS-duration (ms)

Imagine this goes on for 100 lines more or so...
**************************************************************************

This text is copied into a text document, the byte elements written into identificiable blocks

byte1To2LeadID
byte3To4LengthOfRecord
byte5To6PDuration
byte7To8PRInterval
byte9To10QRSDuration

...etc. 

The words private String are added in front of one, copied and pasted in front of the rest using hotkeys, ctrl+c ctrl+v and a semicolon ';' added behind every line, the above mentioned attributes are then enclosed in a "shell" class and then we're ready for the test.

Example:

/************************************************************************
LeadMeasurementBlock.java - Copyright ep
A test import
**************************************************************************/

/**
 * Class LeadMeasurementBlock
 */

public class LeadMeasurementBlock {

private String byte1To2LeadID;
private String byte3To4LengthOfRecord;
private String byte5To6PDuration;
private String byte7To8PRInterval;
private String byte9To10QRSDuration;

}


Boot up Umbrello if not already running, choose import class, select the newly created "java" file. Press OK and wait. 

Then go to Tree View and drag the class into the model and voila - Hours of input work reduced to minutes, however - It would be nicer being able to do all this within umbrello.

And it would be nice if I didn't have to drag the imported class into the model when I imported it.

A freetext window that could be parsed within umbrello would be an ideal solution for a problem like the quickfix mentioned above.
Comment 1 Fraser 2013-04-25 12:20:02 UTC
Signed up just because I started using umbrello and hit this immediately.

I have 48 attributes I have to add to a data class, very surprised there wasn't a way to add a list other than one by one manual input :(
Comment 2 Ralf Habacker 2018-05-23 12:43:59 UTC
With version 2.22.80 support for import classes from a simple text file has been added. See https://cgit.kde.org/umbrello.git/plain/test/import/diagrams/class/classes.txt for examples.

*** This bug has been marked as a duplicate of bug 380266 ***