francodacosta / atom-php-getters-setters

automatically generate _Getters_ and _Setters_ for your php classes in the atom.io editor
MIT License
17 stars 10 forks source link

Default template value. #34

Open mtrobert opened 6 years ago

mtrobert commented 6 years ago

Hello there, I started to use php-getters-setters few days ago. I wanted to modify the template a little bit but Unfortunately I messed something up :( . Is there a way to come back to the default template value. I tried to uninstall and reinstall it but it did not work. I tried to copy and paste the code from github php-getter-setters and it did not work. I will appropriate any help. Kind Regards

snutij commented 6 years ago

Hi ! Try to delete all the template in the editor, it will reset the template as the first time :)

mtrobert commented 6 years ago

Hi there,  I tried deleting all template, I tried to uninstall and reinstall the package, I tried reinstalling atom (yes, whole thing ) and still I have not managed to get the template working as it was when I used it the first time. Any ideas how to fix it?? Regards Robert

Sent from my Samsung Galaxy smartphone. -------- Original message --------From: JustinRoclock notifications@github.com Date: 09/07/2018 11:24 (GMT+00:00) To: francodacosta/atom-php-getters-setters atom-php-getters-setters@noreply.github.com Cc: Robert Marczak robert.m.1305@gmail.com, Author author@noreply.github.com Subject: Re: [francodacosta/atom-php-getters-setters] Default template value. (#34) Hi ! Try to delete all the template in the editor, it will reset the template as the first time :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread. {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/francodacosta/atom-php-getters-setters","title":"francodacosta/atom-php-getters-setters","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/francodacosta/atom-php-getters-setters"}},"updates":{"snippets":[{"icon":"PERSON","message":"@JustinRoclock in #34: Hi ! Try to delete all the template in the editor, it will reset the template as the first time :)"}],"action":{"name":"View Issue","url":"https://github.com/francodacosta/atom-php-getters-setters/issues/34#issuecomment-403432920"}}} [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/francodacosta/atom-php-getters-setters/issues/34#issuecomment-403432920", "url": "https://github.com/francodacosta/atom-php-getters-setters/issues/34#issuecomment-403432920", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [francodacosta/atom-php-getters-setters] Default template value. (#34)", "sections": [ { "text": "", "activityTitle": "JustinRoclock", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@JustinRoclock", "facts": [

] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"francodacosta/atom-php-getters-setters\",\n\"issueId\": 34,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"francodacosta/atom-php-getters-setters\",\n\"issueId\": 34\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/francodacosta/atom-php-getters-setters/issues/34#issuecomment-403432920" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 353260006\n}" } ], "themeColor": "26292E" } ]

snutij commented 6 years ago

Hi dude, you can try to fix it like this :

If you have some problems again, try the last solution, delete your config.cson, reopen your atom like the first time. (Duplicate it before to be safe)

Bye ! Good luck :)

mtrobert commented 6 years ago

Hi there, thanks for your help.

I do not know why but it works. I mean, I uninstalled the package and I decided to work without it for a while. Today I read your email and decided to have one more go. After an instalation it worked straight away without doing anything to it. :) Happy days. :)

Take care

On Tue, Jul 24, 2018 at 9:09 AM JustinRoclock notifications@github.com wrote:

Hi dude, you can try to fix it like this :

  • Open config.cson Atom > File > Config... (or somethings like this depends of your support)

  • Edit your getterTemplate and setterTemplate directly here.

  • For example i have somethings like this

    "php-getters-setters": getterTemplate: ''' /**

    • Get the value of %description%
    • @return %type% */ %scope% function %methodName%() : %type% { return $this->%variable%; }

    ''' setterTemplate: ''' /**

    • Set the value of %description%
    • @param %type% %variable% */ %scope% function %methodName%(%type% $%variable%) { if (!empty($%variable%)) { $this->%variable% = $%variable%; } }

    '''

  • take care about \ and / it doesn't work perfectly.

  • Save your file

  • Quit/launch again your atom.

If you have some problems again, try the last solution, delete your config.cson, reopen your atom like the first time. (Duplicate it before to be safe)

Bye ! Good luck :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/francodacosta/atom-php-getters-setters/issues/34#issuecomment-407319951, or mute the thread https://github.com/notifications/unsubscribe-auth/ALbF_BUMhi2vOH6XqQijSz-_l7rpNzbmks5uJtY9gaJpZM4VDlHm .

-- Kind Regards Robert Marczak