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.
Summary: | Regression: unable to customize user property | ||
---|---|---|---|
Product: | platform | Reporter: | m_potociar <m_potociar> |
Component: | Favorites | Assignee: | Jaroslav Tulach <jtulach> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | anebuzelsky, gsporar, hmichel, jpokorsky, jrechtacek, mpetras |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
m_potociar
2007-09-04 13:36:03 UTC
Jan, I think it would be great is there was a file general.freemarker that would be included by all templates, especially the Java one and which could user modify to contain user.name="...". This file would be visible in Tools/Templates and user could change it. Do you think this is good idea to create such file? It seems to be better than the present state. I just do not understand why you assign it to the java module. IMO the file should be registered by the FreeMarker integration module in order to be available to all FreeMarker clients. Have you considered possibility to read general.freemarker file content to the scripting environment directly without necessity to import the file? Later someone might also require to have certain properties project specific. The template manager will be unusable to edit such properties then. BTW is not this a duplicate of issue #107725 We agreed with Jarda he takes care of this. openide/templates could be the right place. Reassigning ... TM=6.0beta2 *** Issue 104358 has been marked as a duplicate of this issue. *** I'll fix it by changing core/favorites to read Templates/Properties/*.properties files with values define there. I'll change projects/projectui to define a file there with value for property user. IDE:------------------------------------------------- IDE: [25.9.07 17:32] Committing "Favorites" started Directory /shared/data/ccvs/repository/core/favorites/src/META-INF added to the repository Directory /shared/data/ccvs/repository/core/favorites/src/META-INF/services added to the repository cvs server: scheduling file `src/META-INF/services/org.openide.loaders.CreateFromTemplateAttributesProvider' for addition cvs server: scheduling file `test/unit/src/org/netbeans/modules/favorites/templates/PropertiesProviderTest.java' for addition cvs server: scheduling file `src/org/netbeans/modules/favorites/templates/PropertiesProvider.java' for addition cvs server: use 'cvs commit' to add these files permanently Checking in src/org/netbeans/modules/favorites/Bundle.properties; /shared/data/ccvs/repository/core/favorites/src/org/netbeans/modules/favorites/Bundle.properties,v <-- Bundle.properties new revision: 1.19; previous revision: 1.18 done RCS file: /shared/data/ccvs/repository/core/favorites/test/unit/src/org/netbeans/modules/favorites/templates/PropertiesProviderTest.java,v done Checking in test/unit/src/org/netbeans/modules/favorites/templates/PropertiesProviderTest.java; /shared/data/ccvs/repository/core/favorites/test/unit/src/org/netbeans/modules/favorites/templates/PropertiesProviderTest.java,v <-- PropertiesProviderTest.java initial revision: 1.1 done RCS file: /shared/data/ccvs/repository/core/favorites/src/META-INF/services/org.openide.loaders.CreateFromTemplateAttributesProvider,v done Checking in src/META-INF/services/org.openide.loaders.CreateFromTemplateAttributesProvider; /shared/data/ccvs/repository/core/favorites/src/META-INF/services/org.openide.loaders.CreateFromTemplateAttributesProvider,v <-- org.openide.loaders.CreateFromTemplateAttributesProvider initial revision: 1.1 done Checking in nbproject/project.xml; /shared/data/ccvs/repository/core/favorites/nbproject/project.xml,v <-- project.xml new revision: 1.16; previous revision: 1.15 done Checking in src/org/netbeans/modules/favorites/resources/layer.xml; /shared/data/ccvs/repository/core/favorites/src/org/netbeans/modules/favorites/resources/layer.xml,v <-- layer.xml new revision: 1.23; previous revision: 1.22 done Checking in src/org/netbeans/modules/favorites/templates/TemplatesAction.java; /shared/data/ccvs/repository/core/favorites/src/org/netbeans/modules/favorites/templates/TemplatesAction.java,v <-- TemplatesAction.java new revision: 1.6; previous revision: 1.5 done RCS file: /shared/data/ccvs/repository/core/favorites/src/org/netbeans/modules/favorites/templates/PropertiesProvider.java,v done Checking in src/org/netbeans/modules/favorites/templates/PropertiesProvider.java; /shared/data/ccvs/repository/core/favorites/src/org/netbeans/modules/favorites/templates/PropertiesProvider.java,v <-- PropertiesProvider.java initial revision: 1.1 done IDE: [25.9.07 17:32] Committing "Favorites" finished *** Issue 107725 has been marked as a duplicate of this issue. *** I'm reopening this issue as the new system will only affect newly created files. When editing an existing class an adding an initial Javadoc comment, NB still uses the current OS user when automatically adding the @author tag, and there is no way to change that (other than starting NB with -J-Duser.name=....) Jardo, will you set the system property 'user.name'? Otherwise I will look up the property in registered CreateFromTemplateAttributesProviders in JavaDataLoader in order to support old templates. Old templates use new template properties now. /cvs/java/source/src/org/netbeans/modules/java/JavaDataLoader.java,v <-- JavaDataLoader.java new revision: 1.8; previous revision: 1.7 still not working for case generating javadoc by hints: - set user property - create new java class (now @author is generated according to user property) - delete this javadoc - generate javadoc by hint (hints have to be enabled) -> @author is system user Open new bug please. This one was about templates. Javadoc is generated by completely different infrastructure. Ok, so setting user property by template works -Verified in 6.0 RC2. I'll file a new one for java/hints. Where can I define the user name property? There is any GUI? I can't find it... I've reached here while trying to set the $user parameter. My suggestion would be to create a more informative help file. Then you don't have to worry about how "discoverable" some features are It would be peace of cake to find them in the help file. How about adding a button on the pref/editor/codeTemplates area. This button is "showAllVariables" and it would show all variables allowed to be used, according to whatever file netbeans is currently using. If they are/not editable, then a button could be added to make them so. Where can I define the user name property? There is any GUI? I can't find it... hmichel: Tools->Templates->User Configuration Properties->User.properties and Open in Editor Thanks, work like a charm. |