View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
BLOC - Automatic UML class diagram creator

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

2.4
2.4 | 6 ratings Rate this file 4 Downloads (last 30 days) File Size: 52.1 KB File ID: #31349 Version: 1.0

BLOC - Automatic UML class diagram creator

by

Thinh (view profile)

 

Used to create a UML class diagram from a MATLAB object oriented program.

| Watch this File

File Information
Description

Directions: open up BLOC.m, run the script, then follow the direction on the GUI.

REQUEST: please let me know if you find any bug, or have any suggestion, much appreciated.

NOTE:
the current version only includes inheritance and composition relationship, will update with more relationship later.

MATLAB release MATLAB 7.9 (R2009b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (15)
19 Aug 2016 Maxandre Jacqueline

Does not work. Even with only class m-files in the directory I open, I get the following error : Cell contents indices must be greater than 0

Error in UMLpanel/getinfo (line 942)
ischildof{ind{i}(j)}(end+1) = clssnmpar{i};

Error in UMLcreator>@(h,d)obj.Panel.getinfo (line 40)
'position', [20 10 90
60],'tag','Open','string','Open','callback',@(h,d)obj.Panel.getinfo);

Error while evaluating UIControl Callback

Undefined function or variable 'nodeList'.

Error in UMLpanel/gettier (line 22)
bottomnode = nodeList(bottomind);

Error in UMLpanel/runUML (line 16)
gettier(obj);

Error in UMLcreator>@(h,d)obj.Panel.runUML (line 43)
'tag','Start','string','Start','callback',@(h,d)obj.Panel.runUML);

Error while evaluating UIControl Callback

15 Aug 2016 Geoffrey

BLOC
Index exceeds matrix dimensions.

Error in UMLpanel/getinfo (line 160)
line1{d} = fcontent{d}{1};
%read the first line of each file

Error in UMLcreator>@(h,d)obj.Panel.getinfo (line 40)
'position', [20 10 90
60],'tag','Open','string','Open','callback',@(h,d)obj.Panel.getinfo);
Error while evaluating UIControl Callback

Undefined function or variable 'nodeList'.

Error in UMLpanel/gettier (line 22)
bottomnode = nodeList(bottomind);

Error in UMLpanel/runUML (line 16)
gettier(obj);

Error in UMLcreator>@(h,d)obj.Panel.runUML (line 43)
'tag','Start','string','Start','callback',@(h,d)obj.Panel.runUML);
Error while evaluating UIControl Callback

Index exceeds matrix dimensions.

Error in UMLpanel/getinfo (line 782)
obj.Propertylist = supList(:,4);
%PANEL'S

Error in UMLcreator>@(h,d)obj.Panel.getinfo (line 40)
'position', [20 10 90
60],'tag','Open','string','Open','callback',@(h,d)obj.Panel.getinfo);
Error while evaluating UIControl Callback

Undefined function or variable 'nodeList'.

Error in UMLpanel/gettier (line 22)
bottomnode = nodeList(bottomind);

Error in UMLpanel/runUML (line 16)
gettier(obj);

Error in UMLcreator>@(h,d)obj.Panel.runUML (line 43)
'tag','Start','string','Start','callback',@(h,d)obj.Panel.runUML);
Error while evaluating UIControl Callback

13 Aug 2016 Bogumila & Zbigniew MROZEK

Works fine with MATLAB R2016a. It is important that in the chosen folder there are m-file classes. Any MATLAB script in this folder may disturb work of the BLOC tool.

13 Aug 2016 Bogumila & Zbigniew MROZEK  
29 May 2015 sz

sz (view profile)

tried to run but got the following error message

Undefined function or variable "nodeList".

Comment only
05 Nov 2013 sanjeedha sanofer

Assignment has more non-singleton rhs dimensions than non-singleton
subscripts

Error in UMLpanel/getinfo (line 243)
supList(:,2) = Supname;

Error in UMLcreator>@(h,d)obj.Panel.getinfo (line 40)
'position', [20 10 90
60],'tag','Open','string','Open','callback',@(h,d)obj.Panel.getinfo);

Error while evaluating uicontrol Callback

Comment only
30 Apr 2013 Gerloi

Gerloi (view profile)

BLOC
Operands to the || and && operators
must be convertible to logical scalar
values.

Error in UMLpanel/getinfo (line 196)
if B{i} ~= 0 &&
~isempty(B{i})

Error in
UMLcreator>@(h,d)obj.Panel.getinfo
(line 40)
'position', [20 10 90
60],'tag','Open','string','Open','callback',@(h,d)obj.Panel.getinfo);
Error while evaluating uicontrol Callback

Undefined variable or function
nodeList might refer to the function
nodelist.

Error in UMLpanel/gettier (line 22)
bottomnode = nodeList(bottomind);

Error in UMLpanel/runUML (line 16)
gettier(obj);

Error in
UMLcreator>@(h,d)obj.Panel.runUML
(line 43)
'tag','Start','string','Start','callback',@(h,d)obj.Panel.runUML);
Error while evaluating uicontrol Callback

Comment only
13 Apr 2013 student

i'm getting this as error what should i do
"Assignment has more non-singleton rhs dimensions than non-singleton
subscripts"

Comment only
08 Mar 2013 Tim

Tim (view profile)

 
08 Mar 2013 Tim

Tim (view profile)

Good work, this saves a lot of time when not having to draw UML diagrams manually.

I have a small wishlist:
- Ability to search in multiple folders and subfolders.
- Maybe something like movable arrows to prevent overlap of arrow ends. When arrow ends overlap, it is not clear which end belongs to which relationship.

Are you still working on this project?

Comment only
04 Nov 2011 Regis Ruelland

very interesting work...but as you are in development, it seems not to be robust enough.
my feeback :

I have the same bug of Tarek. I have tried to modify your code by putting some piece of code :
compos1 = Compos(TipPos,TailPos);
patch(compos1.Shape{1},compos1.Shape{2},'k');
%create tirangles and diamonds
patch(compos1.Shape{3},compos1.Shape{4},'k');
inside one of your for block (at line 206).

After that I had another bug :

??? Subscript indices must either be real positive integers or logicals.

Error in ==> UMLpanel.getinfo at 942
ischildof{ind{i}(j)}(end+1) = clssnmpar{i};

then I just add a test on the value return by ind{i}(j)

11 Aug 2011 Thinh

Thinh (view profile)

This work is undergoing construction, it is inevitable that there are some (or a lot of) errors in it, thanks for letting me know, I will try and work on it ^^.

Comment only
08 Aug 2011 Tarek

Tarek (view profile)

Great work, but i had a problem.
??? Undefined function or variable "TipPos".

Error in ==> UMLpanel.runUML at 209
compos1 = Compos(TipPos,TailPos);

Error in ==> UMLcreator>@(h,d)obj.Panel.runUML at 43
'tag','Start','string','Start','callback',@(h,d)obj.Panel.runUML);

??? Error while evaluating uicontrol Callback

??? Error using ==> UMLpanel.runUML>arrow_scrolling
Too many input arguments.

??? Error while evaluating figure KeyPressFcn

Comment only
16 May 2011 Thinh

Thinh (view profile)

Thx mark, i'll try and work on it.

Comment only
16 May 2011 Mark Mikofski

Mark Mikofski (view profile)

This looks great, but I think some bugs still need to be worked out. I think a lot of people will be very happy when you get this working! Try regexpressions to look for variations of class names instead of ([' ' clsslist{k}]) and (['=' clsslist{k}]), etc. which takes a lot of space and limits the number of variations you can search for.

Comment only

Contact us