Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324605 - Eclipse PDT doesn't respect my code template settings
Summary: Eclipse PDT doesn't respect my code template settings
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact: Ilina Stefanova CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-06 21:57 EDT by Timo A. Hummel CLA
Modified: 2020-05-14 11:17 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timo A. Hummel CLA 2010-09-06 21:57:01 EDT
I want to use custom code template settings, especially for methods.

So I'm setting up a custom pattern like this:


Window -> Preferences, then PHP -> Code Style -> Code Templates, then Comments -> Methods

I check "Automatically add comments for new methods and types". I then edit the pattern for "Methods" to something else, then click apply, then OK.

I create a new PHP file, and create a class:

<?php

class foo {

}

?>

I navigate to the bracket after foo, press return and type:

public function test () {

}

However, PDT doesn't create a comment. I can trigger the code template by typing /** above the new method, but it is a standard template, not the custom template I entered. I made sure that I don't have any project specific settings for my demo project.


-- Configuration Details --
Product: Eclipse 1.3.0.20100617-0520 (org.eclipse.epp.package.php.product)
Installed Features:
 org.eclipse.platform 3.6.0.v20100602-9gF78GpqFt6trOGhL60z0oEx3fz-JKNwxPY
Comment 1 Zhongwei Zhao CLA 2010-09-06 23:43:04 EDT
duplicate

*** This bug has been marked as a duplicate of bug 274992 ***
Comment 2 Timo A. Hummel CLA 2010-09-07 00:05:34 EDT
This is not really a duplicate. Please ignore the information regarding "Automatically add comments for new methods and types". Eclipse does completely ignore every setting I do in that dialog.

If I change the template, Eclipse does not respect the changed template.
Comment 3 Zhongwei Zhao CLA 2010-09-07 00:31:03 EDT
If I change the template, Eclipse does not respect the changed template.

this is already fixed in the latest code
Comment 4 Timo A. Hummel CLA 2010-09-07 00:32:40 EDT
Is a downloadable release already done, or do I need to wait until the next release?
Comment 5 Zhongwei Zhao CLA 2010-09-07 00:49:27 EDT
I am not sure when there will be a new release ,sorry for this.
Comment 6 Timo A. Hummel CLA 2010-12-18 01:19:00 EST
Is there any chance to test this fix without building PDT from source?
Comment 7 Kalin CLA 2011-07-27 03:43:03 EDT
Tested according required behavior described in Comment 2
Verified.
The requirement regarding to "Automatically add comments for new methods and types" is duplicate (bug 274992)
Closing...