sublime-php-getters-setters icon indicating copy to clipboard operation
sublime-php-getters-setters copied to clipboard

Getters and Setters Menu displays "Only available in PHP syntax buffer" although syntax is set to php

Open raresnv opened this issue 9 years ago • 14 comments

I've just installed PHP Getters and Setters and i cannot access it. Here's my console log:

startup, version: 3095 osx x64 channel: dev executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text working dir: / packages path: /Users/raresn/Library/Application Support/Sublime Text 3/Packages state path: /Users/raresn/Library/Application Support/Sublime Text 3/Local zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages zip path: /Users/raresn/Library/Application Support/Sublime Text 3/Installed Packages ignored_packages: ["Vintage"] pre session restore time: 0.247195 using gpu buffer for window first paint time: 0.300823 startup time: 0.321701 reloading plugin Default.block reloading plugin Default.comment reloading plugin Default.convert_syntax reloading plugin Default.copy_path reloading plugin Default.delete_word reloading plugin Default.detect_indentation reloading plugin Default.duplicate_line reloading plugin Default.echo reloading plugin Default.exec reloading plugin Default.fold reloading plugin Default.font reloading plugin Default.goto_line reloading plugin Default.history_list reloading plugin Default.indentation reloading plugin Default.kill_ring reloading plugin Default.mark reloading plugin Default.new_templates reloading plugin Default.open_context_url reloading plugin Default.open_file_settings reloading plugin Default.open_in_browser reloading plugin Default.pane reloading plugin Default.paragraph reloading plugin Default.paste_from_history reloading plugin Default.quick_panel reloading plugin Default.run_all_syntax_tests reloading plugin Default.save_on_focus_lost reloading plugin Default.scroll reloading plugin Default.set_unsaved_view_name reloading plugin Default.side_bar reloading plugin Default.sort reloading plugin Default.swap_line reloading plugin Default.switch_file reloading plugin Default.symbol reloading plugin Default.transform reloading plugin Default.transpose reloading plugin Default.trim_trailing_white_space reloading plugin CSS.css_completions reloading plugin Diff.diff reloading plugin HTML.encode_html_entities reloading plugin HTML.html_completions reloading plugin 0_package_control_loader.00-package_control reloading plugin 0_package_control_loader.02-bz2 reloading plugin AdvancedNewFile.AdvancedNewFile reloading plugin Colorsublime.colorsublime-plugin reloading plugin Package Control.1_reloader reloading plugin Package Control.2_bootstrap reloading plugin Package Control.Package Control reloading plugin PackageResourceViewer.package_resource_viewer reloading plugin PackageResourceViewer.package_resources reloading plugin PHP Companion.PHP Companion reloading plugin PHP Getters and Setters.php-getter-setter ['/Applications/Sublime Text.app/Contents/MacOS', '/Applications/Sublime Text.app/Contents/MacOS/python3.3.zip', '/Users/raresn/Library/Application Support/Sublime Text 3/Packages', '/Users/raresn/Library/Application Support/Sublime Text 3/Packages/bz2/st3_osx_x64'] ==== USER TEMPLATES === reloading plugin PHP Getters and Setters.user_templates ==== USER TEMPLATES === plugins loaded [PHP Getters and Setters] Registered template : 'camelCase' [PHP Getters and Setters] Registered template : 'camelCaseFluent' [PHP Getters and Setters] Registered template : 'snakeCase' [PHP Getters and Setters] Registered template : 'snakeCaseFluent' [PHP Getters and Setters] ignored type hinting var types ['mixed', 'int', 'integer', 'double', 'float', 'number', 'string', 'boolean', 'bool', 'numeric', 'unknown'] [PHP Getters and Setters] template is 'camelCaseFluent' [PHP Getters and Setters] register extra user templates [] [PHP Getters and Setters] ignoring visibility to getters and setters [PHP Getters and Setters] setterBeforeGetter is False Package Control: No updated packages ignored packages updated to: ["PHP Getters and Setters", "Vintage"] unloading plugin PHP Getters and Setters.php-getter-setter reloading Packages/PHP Getters and Setters/php-getters-setters.sublime-settings unloading plugin PHP Getters and Setters.user_templates reloading Packages/User/Package Control.sublime-settings reloading Packages/User/Preferences.sublime-settings Package Control: The package PHP Getters and Setters has been removed reloading Packages/User/Package Control.sublime-settings ignored packages updated to: ["Vintage"] reloading Packages/User/Package Control.sublime-settings reloading Packages/User/Preferences.sublime-settings reloading Packages/User/Preferences.sublime-settings ignored packages updated to: ["PHP Getters and Setters", "Vintage"] reloading Packages/User/Package Control.sublime-settings reloading Packages/User/Preferences.sublime-settings reloading Packages/User/Package Control.sublime-settings ignored packages updated to: ["Vintage"] reloading plugin PHP Getters and Setters.php-getter-setter ['/Applications/Sublime Text.app/Contents/MacOS', '/Applications/Sublime Text.app/Contents/MacOS/python3.3.zip', '/Users/raresn/Library/Application Support/Sublime Text 3/Packages', '/Users/raresn/Library/Application Support/Sublime Text 3/Packages/bz2/st3_osx_x64'] ==== USER TEMPLATES === [PHP Getters and Setters] Registered template : 'camelCase' [PHP Getters and Setters] Registered template : 'camelCaseFluent' [PHP Getters and Setters] Registered template : 'snakeCase' [PHP Getters and Setters] Registered template : 'snakeCaseFluent' [PHP Getters and Setters] ignored type hinting var types None [PHP Getters and Setters] template is 'None' [PHP Getters and Setters] register extra user templates [] [PHP Getters and Setters] ignoring visibility to getters and setters [PHP Getters and Setters] setterBeforeGetter is False reloading Packages/PHP Getters and Setters/php-getters-setters.sublime-settings reloading plugin PHP Getters and Setters.user_templates ==== USER TEMPLATES === reloading Packages/User/Package Control.sublime-settings reloading Packages/User/Preferences.sublime-settings reloading Packages/User/Preferences.sublime-settings Unable to open /Users/raresn/Library/Application Support/Sublime Text 3/Packages/PHP Getters and Setters/php-getters-setters.sublime-settings

I haven't seen anything suspicious in there, i'd really appreciate if someone could help.

Thanks

raresnv avatar Sep 25 '15 13:09 raresnv

+1

edigu avatar Nov 02 '15 11:11 edigu

+1

victorhramos avatar Nov 17 '15 13:11 victorhramos

+1 on ST3

geraldgassend avatar Dec 14 '15 07:12 geraldgassend

+1 on ST3

kenmulford avatar Dec 15 '15 15:12 kenmulford

In fact my file was displaying correct syntax coloration but incorrect file detection (in the lower right next to the tab size). Once I changed it, I could generate things but I think the problem is more on ST than the plugin.

hyptos avatar Dec 29 '15 13:12 hyptos

Note that this is broken in stable build 3083. I switched to the dev build instead so, no more issues for me.

lysender avatar Feb 04 '16 08:02 lysender

This is doing my nut in! How do I switch to the dev build? Thx

glennjacobs avatar Feb 04 '16 11:02 glennjacobs

@glennjacobs Just download the latest dev build: https://www.sublimetext.com/3dev

lysender avatar Feb 04 '16 11:02 lysender

@lysender oh! I was getting confused, I thought you meant the latest dev version of the package. Thanks :)

glennjacobs avatar Feb 04 '16 11:02 glennjacobs

I'm on the latest stable build for ST3 and it was still broken. The patch I PR'd yesterday (and @francodacosta merged) addresses the issue. Once I changed the file extension that this plug-in was looking for to the new sublime language extension, it worked fine. Uninstall PHP Getters and Setters in ST3 (cmd + shift + P > Remove Package) and then re-install it. As long as your syntax is set, this error should no longer occur.

kenmulford avatar Feb 04 '16 15:02 kenmulford

@francodacosta, ST3 stable (build 3083) still uses .tmLanguage extension, so seems like your package is not working on stable anymore... At least on my machine after upgrading to 2.0.14. Had to roll back to 2.0.13

iotch avatar Feb 06 '16 10:02 iotch

@iotch Thanks for a solution.

Sublime Text 3 stable has been updated to 3103 today, so everything should be fine and dandy once more..

Songworks avatar Feb 09 '16 07:02 Songworks

Sorry guys, I didn't check backwards compat. I will try to get another PR done today or tomorrow to cover both extension types.

kenmulford avatar Feb 09 '16 12:02 kenmulford

i have found the solution in my case language detection was : PHP.tmLanguage

but in plugin it was checking

line : 406 https://github.com/francodacosta/sublime-php-getters-setters/blob/master/php-getter-setter.py

return re.search(".*\PHP.sublime-syntax", self.view.settings().get('syntax')) is not None

so it was PHP.sublime-syntax

i have just replaced PHP.sublime-syntax with new one PHP.tmLanguage which i have find using debug.

and it started working :+1:

hardik-satasiya avatar May 16 '16 06:05 hardik-satasiya