Bug 328739 - Code generation does not work for classes created in list view
Summary: Code generation does not work for classes created in list view
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Steyn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-12 22:49 UTC by Joris Steyn
Modified: 2013-12-13 07:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joris Steyn 2013-12-12 22:49:58 UTC
The UMLListView creates UMLObjects but the creation is never signalled resulting in potentially many problems. One resulting issue is code generation which does not work for classes created in the list view (only after reloading the file). 

The slot handling the popup menu (new ...) actions should not create UMLListViewItems or UMLObjects but use the Object_Factory instead.

Reproducible: Always

Steps to Reproduce:
1. Create a new class in the list view
2. Menu Code -> Code Gen. Wizard
3. Next -> Next -> Generate
Actual Results:  
No code is generated for the new class.
Comment 1 Joris Steyn 2013-12-13 07:45:10 UTC
Git commit 792a0babd5317e333322daa7089fca868341a53f by Joris Steyn.
Committed on 12/12/2013 at 18:46.
Pushed by jorissteyn into branch 'master'.

Refactor UMLListView to use Object_Factory

The createItem, createUMLObject and createChildUMLObject methods are replaced
by calls to Object_Factory. The only changes to Object_Factory involve
pre-setting a name on classifier list items so there's no behavioural change
(item creation in the list view is 'quick' - no dialog popping up).

Related code cleanup:
* unused diagram creation code
* unused itemRenamed method (UMListViewItem handles that)
* unused lines in createChildUMLObject handling renaming of classifier list
  items, which was also handled by the UMLListViewItem (e.g. determining the
  return type of an operation based on the new text of a list item)

M  +6    -3    umbrello/classifier.cpp
M  +0    -41   umbrello/listpopupmenu.cpp
M  +0    -1    umbrello/listpopupmenu.h
M  +10   -9    umbrello/object_factory.cpp
M  +3    -1    umbrello/object_factory.h
M  +42   -445  umbrello/umllistview.cpp
M  +0    -8    umbrello/umllistview.h

http://commits.kde.org/umbrello/792a0babd5317e333322daa7089fca868341a53f