This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 94666 - Improve Template Manager to allow "subtemplates"
Summary: Improve Template Manager to allow "subtemplates"
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks: 13250
  Show dependency tree
 
Reported: 2007-02-06 16:45 UTC by Jaroslav Tulach
Modified: 2008-12-22 11:42 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
One can use "simple" property to hide things from template manager (6.67 KB, patch)
2007-02-13 10:30 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2007-02-06 16:45:29 UTC
TN: Why not generate from one template multiple files? 
JT: As inception review said it is not needed.
TN: Still it might be useful.
PP: CRUD application is our usecase.
JT: You can always call for (DataObject obj : ...) 
obj.createFromTemplate(....);
JT: Enough?
RK: Let's solve in another phase and in another review.
PP: Enough to have multiple small templates, but it is necessary to show and 
edit them
    in Template Manager.
*TCA*: necessary to show and edit them in Template Manager meaninfully.
Comment 1 Jaroslav Tulach 2007-02-13 10:28:57 UTC
I think I have a fix, I'll attach a diff.
Comment 2 Jaroslav Tulach 2007-02-13 10:30:02 UTC
Created attachment 38423 [details]
One can use "simple" property to hide things from template manager
Comment 3 Jiri Rechtacek 2007-02-13 12:35:09 UTC
Looks good to me.
Comment 4 Jesse Glick 2007-02-13 16:58:50 UTC
Can you explain the connection between the requirement ("enough to have multiple
small templates, but it is necessary to show and edit them in Template Manager")
and the fix (hide some folders from Template Manager)? There is no explanation
here of how you expect compound templates to work.
Comment 5 Jaroslav Tulach 2007-02-14 08:02:02 UTC
I see, sorry, I was talking to Martin A. and did not realize that others do 
not know the details of our discussion.

> Enough to have multiple small templates, but it is necessary to show and 
> edit them
> in Template Manager.

With this fix you can create a Templates/EJB3.0 folder and put there all the 
small templates you need, and then you can create on "big" template 
Templates/EntityJavaBean.instance that delegates to all the small templates in 
the EJB3.0 folder and tell that it is "simple"=Boolean.FALSE. That way 
this "big" template is not going to be visible in Template Manager, just in 
New File wizard. Imho, this is the needed enhancement that 
allows "subtemplates".
Comment 6 Jaroslav Tulach 2007-02-22 07:34:57 UTC
No more comments? Then I integrate tomorrow...
Comment 7 Jaroslav Tulach 2007-02-27 14:43:36 UTC
arch/arch-openide-datasystems.xml;
/shared/data/ccvs/repository/openide/arch/arch-openide-datasystems.xml,v  <--  
arch-openide-datasystems.xml
new revision: 1.36; 

core/favorites/src/org/netbeans/modules/favorites/templates/TemplatesPanel.java,v  
<--  TemplatesPanel.java
new revision: 1.13; previous revision: 1.12
done
Checking in 
core/favorites/test/unit/src/org/netbeans/modules/favorites/templates/TemplatesPanelTest.java;
/shared/data/ccvs/repository/core/favorites/test/unit/src/org/netbeans/modules/favorites/templates/TemplatesPanelTest.java,v  
<--  TemplatesPanelTest.java
new revision: 1.4;