Code Monkey home page Code Monkey logo

idea-php-typo3-plugin's Introduction

TYPO3 Plugins for IntelliJ IDEA / PhpStorm

Donate to this project using GitHub Sponsors Donate to this project using Paypal Donate to this project using Patreon

This repository contains IDE plugins for:

While these 3 plugins work together and may use each others' library functions and extension points, each may be used independently from the others - with a limited feature set.

The plugins in the JetBrains Plugin repository:

  • TYPO3 CMS - TYPO3 CMS Plugin for IntelliJ IDEA / PhpStorm in the JetBrains Plugin repository
  • TYPO3 Fluid - TYPO3 CMS Plugin for IntelliJ IDEA / PhpStorm in the JetBrains Plugin repository

Installation

On PhpStorm or IntelliJ:

  • open "File" -> "Settings"
  • select "Plugins"
  • select "Browse Plugins"
  • search "TYPO3 CMS Plugin"
  • choose the plugin in the left pane, click the install button in the right pane
  • hit apply, close the window
  • restart your IDE
  • profit!

TYPO3 CMS Plugin - Features

  • TypeProvider for GeneralUtility::makeInstance
  • TypeProvider for GeneralUtility::makeInstanceService
  • TypeProvider for ObjectManager::get
  • TypeProvider for $GLOBALS['TYPO3_DB'], $GLOBALS['TSFE'], $GLOBALS['BE_USER'] and $GLOBALS['TYPO3_REQUEST']
  • CompletionContributor for UriBuilder::buildUriFromRoute and BackendUtility::getAjaxUrl
  • CompletionContributor for IconFactory::getIcon
  • Annotator for both valid and invalid route references to make them distinguishable from normal strings
  • Annotator for both valid and invalid icon references to core-defined icons
  • LineMarkerProvider to allow quick navigation to the route definition
  • Inspection: Extbase @inject property injection + QuickFix
  • Experimental: Generate Fluid Styled Content Element (please report bugs!)
  • Generate ViewHelpers
  • Generate ActionControllers
  • Create TYPO3 Projects from sketch

Development and Contribution

Contributions are very welcome! 🎉

If you want to sustain further development, you can donate via PayPal, Patreon or Invoice.

Requirements

  • IntelliJ IDEA works best when developing the plugin (Community Edition should be sufficient), but in theory, every Java IDE or even your text-editor should work

QuickStart (*nix, please adjust to your platform)

  • git clone https://github.com/cedricziel/idea-php-typo3-plugin.git
  • cd idea-php-typo3-plugin
  • start the IDE:
    • TYPO3 CMS Plugin: ./gradlew :typo3-cms:runIde - gradlew.bat runIde for Windows
    • TYPO3 Fluid Plugin ./gradlew :lang-fluid:runIde - gradlew.bat runIde for Windows
    • TypoScript Plugin ./gradlew :lang-typoscript:runIde - gradlew.bat runIde for Windows
    • CTRL + C to terminate the execution
  • to begin development with IntelliJ, please import the build.gradle file as new project from existing sources
  • from IntelliJ run the Gradle task runIde (in debug mode), set break-points, profit!
  • run tests:
    • ./gradlew check
  • ideally: send your pull request from a feature branch

Credits

Thank you to Daniel Espendiller and Adrien Brault for providing their Symfony2 Plugin in the first place. It is a great inspiration for possible solutions and parts of the code.

Icons

Icons used in this project are provided by:

  • Göran Bodenschatz (@coding46)
  • TYPO3.Icons (MIT Licensed)

YourKit Java Profiler Sponsoring

We're glad, to have YourKit as a sponsor!

YourKit supports open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of YourKit Java Profiler and YourKit .NET Profiler, innovative and intelligent tools for profiling Java and .NET applications.

License

MIT

idea-php-typo3-plugin's People

Contributors

actions-user avatar bmack avatar cedricziel avatar coding46 avatar dependabot[bot] avatar ipf avatar neufeind avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

idea-php-typo3-plugin's Issues

NPE when creating content element

The following happens, when I try to create a new content element in Idea 2017.1:

java.lang.NullPointerException
	at java.lang.String.replace(String.java:2240)
	at com.cedricziel.idea.typo3.util.ExtensionFileGenerationUtil.readTemplateToString(ExtensionFileGenerationUtil.java:29)
	at com.cedricziel.idea.typo3.util.ExtensionFileGenerationUtil.fromTemplate(ExtensionFileGenerationUtil.java:43)
	at com.cedricziel.idea.typo3.generation.action.GenerateFscElementForm.generate(GenerateFscElementForm.java:151)
	at java.lang.Thread.run(Thread.java:745)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1023)
	at com.cedricziel.idea.typo3.generation.action.GenerateFscElementForm.onGenerate(GenerateFscElementForm.java:104)
	at com.cedricziel.idea.typo3.generation.action.GenerateFscElementForm.lambda$new$1(GenerateFscElementForm.java:58)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.Component.processMouseEvent(Component.java:6541)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6306)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4897)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:827)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:651)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
	at java.awt.Dialog.show(Dialog.java:1084)
	at java.awt.Component.show(Component.java:1679)
	at java.awt.Component.setVisible(Component.java:1631)
	at java.awt.Window.setVisible(Window.java:1014)
	at java.awt.Dialog.setVisible(Dialog.java:1005)
	at com.cedricziel.idea.typo3.generation.action.GenerateFscElementForm.create(GenerateFscElementForm.java:94)
	at com.cedricziel.idea.typo3.generation.action.GenerateFscElementAction.actionPerformed(GenerateFscElementAction.java:65)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:215)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:232)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.a(ActionMenuItem.java:309)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:929)
	at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:136)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:299)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.a(ActionMenuItem.java:116)
	at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:86)
	at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:109)
	at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:118)
	at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:116)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:513)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45)
	at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533)
	at java.awt.Component.processMouseEvent(Component.java:6541)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6306)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4897)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:827)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:651)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)null
java.lang.NullPointerException
	at java.lang.String.replace(String.java:2240)
	at com.cedricziel.idea.typo3.util.ExtensionFileGenerationUtil.readTemplateToString(ExtensionFileGenerationUtil.java:29)
	at com.cedricziel.idea.typo3.util.ExtensionFileGenerationUtil.fromTemplate(ExtensionFileGenerationUtil.java:43)
	at com.cedricziel.idea.typo3.generation.action.GenerateFscElementForm.generate(GenerateFscElementForm.java:151)
	at java.lang.Thread.run(Thread.java:745)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1023)
	at com.cedricziel.idea.typo3.generation.action.GenerateFscElementForm.onGenerate(GenerateFscElementForm.java:104)
	at com.cedricziel.idea.typo3.generation.action.GenerateFscElementForm.lambda$new$1(GenerateFscElementForm.java:58)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.Component.processMouseEvent(Component.java:6541)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6306)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4897)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:827)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:651)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
	at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
	at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
	at java.awt.Dialog.show(Dialog.java:1084)
	at java.awt.Component.show(Component.java:1679)
	at java.awt.Component.setVisible(Component.java:1631)
	at java.awt.Window.setVisible(Window.java:1014)
	at java.awt.Dialog.setVisible(Dialog.java:1005)
	at com.cedricziel.idea.typo3.generation.action.GenerateFscElementForm.create(GenerateFscElementForm.java:94)
	at com.cedricziel.idea.typo3.generation.action.GenerateFscElementAction.actionPerformed(GenerateFscElementAction.java:65)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:215)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:232)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.a(ActionMenuItem.java:309)
	at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:929)
	at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:136)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:299)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.a(ActionMenuItem.java:116)
	at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:86)
	at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:109)
	at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:118)
	at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:116)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.a(BegMenuItemUI.java:513)
	at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45)
	at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533)
	at java.awt.Component.processMouseEvent(Component.java:6541)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6306)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4897)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4719)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.d(IdeEventQueue.java:827)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:651)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)```

TCA code insights

This is the epic ticket for support of TCA related parsing of information.

Table related

  • parse table names
  • parse table columns
  • table name autocompletion (foreign_table, allowed)
  • table name inspection

FormEngine related

  • provide completion for standard core renderTypes (9ce3627)
  • provide inspections for standard core renderTypes (80406bd)
  • scrape available renderTypes from NodeRegistry (#63)
  • provide completion for TCA column types (#61)
  • provide inspections for TCA column types

Enable Fontawesome icon rendering

Either use local png copies or split the source svg int multiple svg and use IconUtil#svg2png on them?

Batik should also support rendering single glyphs from svg documents - but I've got no clue how.

Add "Generate Console Command"

Ask:

  • command name (ex. my-ext:products:index)
  • description (optional)
  • extension to place the command into
  • namespace (?)

Flow:

  • Add or update Configuration/Commands.php
  • Add Command class with some example code

TypoScript: index defined constants and provide insights for .txt / .ts files

If possible, it could be an awesome feature (for those of us not using TS specific plugins and who consider TS declarative only) if TS constants were scanned from files and strings (it would be possible to harvest these from ext_localconf.php and references to TS directories, I think).

The thinking is: constants in TYPO3 are defined in a way that lends itself to automatically parsing them without necessarily executing any code - and constant definitions contain some helpful labels and type declarations. If the available constant paths and their labels/types could be read, it could be possible to make a special auto-completion for .ts and .txt files to make them aware of {$path.to.constant} style references.

This could also allow inspections if undefined constants are used.

(obviously this feature would not be perfect since there are so many different ways to declare, condition, conditionally/recursively include these constants that I think it's reasonable to draw the line and say "all TS constant files are parsed and all are assumed included". Better provide one too many constants than start to recreate TS parsing ;)

Please migrate to PhpTypePriovider3

PhpTypePriovider2 is deprecated since 2016.3 and will be removed in 2017.3

Migration is pretty straightforward, but I can provide assistance if required.

Add type helpers for TSFE, BE_USER globals

These often-used globals, although we follow best practice and use getter methods to return instances and then annotate these getters, would be nice to gain introspection into - not least when you open one of those very old legacy projects that access these globals willy-nilly.

Propose assigning xlf files the XMLFileType

Maybe through a popup? Another way would be to notify on project-open and directly propose the assignage through the click of a button.

The luxury solution would be a XLIFF component.

CacheManager->getCache type helper aware of TYPO3_CONF_VARS

It would be pretty great if there was a way to read the relevant cache configuration based on the cache ID passed to getCache to use the frontend class defined in global TYPO3 configuration, so it understands the difference between VariableFrontend and StringFrontend and others automatically.

Note, this probably would need to parse ext_localconf.php files and global configuration as described in #29, but it would be a powerful little helper when dealing when cache API.

Exception: Must have called .setTargets() before calling create()

Windows: 7 (64bit)
PhpStorm: 2017.3
Extension: v0.2.27

I just got the following Exception:

Must have called .setTargets() before calling create()
java.lang.AssertionError: Must have called .setTargets() before calling create()
	at com.intellij.codeInsight.navigation.NavigationGutterIconBuilder.a(NavigationGutterIconBuilder.java:229)
	at com.intellij.codeInsight.navigation.NavigationGutterIconBuilder.createGutterIconRenderer(NavigationGutterIconBuilder.java:250)
	at com.intellij.codeInsight.navigation.NavigationGutterIconBuilder.createLineMarkerInfo(NavigationGutterIconBuilder.java:194)
	at com.cedricziel.idea.typo3.codeInsight.RouteLineMarkerProvider.lambda$collectNavigationMarkers$0(RouteLineMarkerProvider.java:42)
	at java.lang.Iterable.forEach(Iterable.java:75)
	at com.cedricziel.idea.typo3.codeInsight.RouteLineMarkerProvider.collectNavigationMarkers(RouteLineMarkerProvider.java:38)
	at com.intellij.codeInsight.daemon.RelatedItemLineMarkerProvider.collectNavigationMarkers(RelatedItemLineMarkerProvider.java:49)
	at com.intellij.codeInsight.daemon.RelatedItemLineMarkerProvider.collectSlowLineMarkers(RelatedItemLineMarkerProvider.java:40)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.a(LineMarkersPass.java:213)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.a(LineMarkersPass.java:112)
	at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:96)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:107)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:437)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1127)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:430)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:534)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:479)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:429)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.d(PassExecutorService.java:405)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:143)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:229)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:403)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:170)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

GeneralUtility::getFileAbsFileName has issues with trailing slashes

Hi,

I noticed that GeneralUtility::getFileAbsFileName has a few issues, if you want to specify a path to a directory that has a trailing slash at the end.

In the screenshot below the following example was used:

GeneralUtility::getFileAbsFileName("EXT:consumption_calculator/" . $relFilePath);

IDE Screenshot

which results in red marking under the string. It does work correctly if I remove the trailing slash. The behaviour is the same with or without the concatenated variable (trailing slash: error; no trailing slash: good).

Secondly, I think, even if it does try to resolve and doesn't find the resource, I do not think it should be marked with the heavy red, that's visible (and annoying) throughout the directory tree on the left side (see screenshot).

And lastly, to my opinion it does not make much sense to try to resolve the path when variables/dynamic content is involved, right?

Greetings
Nitori

Add user defined icons to index

Currently only icons that are provided by IconRegistry are added to the list of available icons. We should also index those defined in extensions' ext_localconf.php files.

Add insights/autocompletion for TYPO3_CONF_VARS, TCA

If possible it would be quite awesome if the plugin would collect and provide autocompletion for $GLOBALS['TYPO3_CONF_VARS'] by parsing LocalConfiguration, AdditionalConfiguration and ext_localconf.php files of extensions.

This is something that often bothers me; needing to look up the exact name of a global configuration variable. For bonus points, parse make $_EXTCONF serialized value available while processing ext_localconf.php since this both directly and indirectly can affect the resulting global config array.

ViewHelpers: inspection (low severity) about inefficient ViewHelpers

Applies to TYPO3v8 only (or needs different solution for 7.6 LTS and earlier)

If possible, it would be great with an inspection that checks if custom ViewHelper classes implement the renderStatic method / supports compiling. The check should be done by:

  • Analysing the ViewHelper class parent hierarchy to determine if the renderStatic method is inherited from the TYPO3Fluid base class (in which case the ViewHelper is less efficient). Not possible to check on LTS.
  • Checking the same way if compile() is inherited (for 7.6 LTS would need to check CompilableInterface preent; if present, all good).
  • Analysing if the ViewHelper class defines render method arguments - bonus points for making a refactoring that converts render method arguments to registerArgument.
  • Recommending that TYPO3Fluid Abstract****ViewHelper classes are used as parents if 1) no render method arguments are used, 2) $this->reflectionService is not being accessed by any parent except for the CMS abstract VH classes, 3) $this->controllerContext is not being accessed by any parent etc. etc. - when all these are fulfilled the parent class can be changed for a more efficient class instancing, rendering and so on. Not possible to do for LTS.

I think these could give some valuable hints to developers wishing to improve their Fluid ViewHelpers :)

New Inspection: FQN needs to be used on property injection

This may be obsolete with v9, so it may need a TYPO3 core version check (maybe also check extensions typo3 version requirement).

Bonus: A QuickFix that modifies the @var value to use a currently imported symbol.
Super-Bonus: Disable "import FQN" on the tags' value

Additional places for table name completion

Method name Argument
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable 2
\TYPO3\CMS\Core\Database\Query\QueryBuilder::delete 1
\TYPO3\CMS\Core\Database\Query\QueryBuilder::update 1
\TYPO3\CMS\Core\Database\Query\QueryBuilder::insert 1
\TYPO3\CMS\Core\Database\Query\QueryBuilder::join 2
\TYPO3\CMS\Core\Database\Query\QueryBuilder::innerJoin 2
\TYPO3\CMS\Core\Database\Query\QueryBuilder::leftJoin 2
\TYPO3\CMS\Core\Database\Query\QueryBuilder::rightJoin 2
\TYPO3\CMS\Core\Database\Query\QueryBuilder::quoteIdentifier 1
\TYPO3\CMS\Core\Database\ConnectionPool::getConnectionForTable 1
\TYPO3\CMS\Core\Database\ConnectionPool::getQueryBuilderForTable 1

If you would like other places to be included as well, you can answer on this issue.

Support custom project structure

There should be a settings where we can define custom extension directory. Currently only best-practices structures are supported.

Example:
Add <projectpath>/ext to extension root directories, so the plugin can look in these directory when resolving some EXT:* path

Inspection bug, UriBuilder + routes

I have a tiny issue to report - possibly only with the single method shown in this screenshot:

screen shot 2017-04-30 at 07 32 46

The first parameter is recognised as a route, so that's fine (the light bulb only contains the normal string conversion choices). The second parameter however is supposed to be an array of arbitrary URL parameters - but the keys in the array are both reported as "unresolved route" (the red underline, has Unresolved route as tooltip on mouse over).

The result is that the file is marked as containing errors although it doesn't.

Don't annotate a missing resource as error

Secondly, I think, even if it does try to resolve and doesn't find the resource, I do not think it should be marked with the heavy red, that's visible (and annoying) throughout the directory tree on the left side (see screenshot).

Ref: #89

Implement ExtensionScanner matchers

Inspections:

  • ClassConstantMatcher
  • ClassNameMatcherInspection
  • ConstantMatcherInspection
  • FunctionCallMatcher
  • MethodArgumentDroppedMatcher

Optional targets:

  • render rst files

Additional problems:

The matchers are most useful when used pre-upgrade. They document what's done in the current development state. Maybe we should vendor those in and let the user decide on a "platform-level"?

Check LLL strings for existence of target index

Would need to work with XLIFF and old translation files.

Goal:

  • annotate non-existing translation string

Bonus goals:

  • can we blend the translation phrase in autocompletion?
  • can we blend the translation phrase over the source code?

Exception while viewing \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController

Windows: 7 (64bit)
PhpStorm: 2017.2.4
Extension: v0.2.19

In my current project I just navigated into the TYPO3 core to the file \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController and this plugin threw an exception:

org/codehaus/plexus/util/DirectoryScanner
java.lang.NoClassDefFoundError: org/codehaus/plexus/util/DirectoryScanner
	at com.cedricziel.idea.typo3.annotation.PathResourceAnnotator.annotate(PathResourceAnnotator.java:43)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.a(DefaultHighlightVisitor.java:139)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:368)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:307)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:327)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:330)
	at com.intellij.codeInsight.daemon.RainbowVisitor.analyze(RainbowVisitor.java:50)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:330)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:330)
	at com.intellij.codeInsight.daemon.impl.analysis.XmlHighlightVisitor.analyze(XmlHighlightVisitor.java:634)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:330)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:330)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:330)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.a(GeneralHighlightingPass.java:298)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:238)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:83)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:438)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1160)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:431)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:548)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:493)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:430)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.d(PassExecutorService.java:406)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:142)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:249)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:404)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:165)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

Table name completion in strings?

I don't even know if this is possible, but I came up with this idea while working on a TCA-heavy project:

Would it be possible to auto-complete table names that are added to TCA, when writing strings?

This could be really helpful, even if it is for example limited to only happen in certain files, e.g. TCA files.

It could also make sense to target any argument named $table or $tableName and/or simply targeting the table-specific arguments on Doctrine QueryBuilder, e.g. all the select(), getConnectionForTable(), getQueryBuilderForTable(), and any alias-argument for field selection methods.

This could perhaps also be combined with inspections to report bad values in known table arguments in functions such as the ExtensionManagementUtility::addTCAcolumns function.

Something universal which triggers on argument name could be opt-in, but for people who write consistent variable names it would be very useful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.