Issue
I did what it said here: Extbase and Fluid Autocompletion
In NetBeans right-click your Extension project and choose Properties in the opened context menu to edit the project properties. Select the category PHP Include Path and use Add Folder... to add the directories of Extbase and Fluid.
So I added the Fluid and Extbase Folders which I previously copied onto my computer from the Server at /var/www/typo3_src/typo3_src-6.2.25/typo3/sysext:
but it didn't work - here's my Project:
And here is fluid stuff that the editor still doesn't recognize:
What am I doing or thinking wrong?
Solution
Found info here, works for me:
It's an old topic but I have a trick so that you can add Auto-complete function for fluid, vhs, flux.
First of all, download the XSD schema files from here : https://fluidtypo3.org/viewhelpers/fluid/master.html put them somewhere locally.
Next step, in Netbeans, go to menu Tools > DTD and XML Schemas, add your 3 DTD in user catalog :
Flux : Public ID = http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers URI = path to your flux XDS file
Fluid : Public ID = http://typo3.org/ns/TYPO3/Fluid/ViewHelpers URI = path to your fluid XDS file
Vhs : Public ID = http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers URI = path to your flux VHS file
Next, in project properties, go to 'testing' menu and add the folder where you stored your DTD.
Now, in your Project > Test Files, add a new XML Document and choose "XML Schema-Constrained Document" on next step, click the button 'Browse' and By File > Your Project > Test Files and select import for all the xsd schema files.
Then, change the prefix f for fluid, flux for flux and vhs for vhs choose fluid as primary and finish.
A file is created with this content : And into the section <f:alias>, you have the auto-completion for fluid, vhs and flux.
<f:alias
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:f='http://typo3.org/ns/TYPO3/Fluid/ViewHelpers'
xmlns:vhs='http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers'
xmlns:flux='http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers'
xsi:schemaLocation='http://typo3.org/ns/TYPO3/Fluid/ViewHelpers file:/home/florian/Documents/Docs/Netbeans/Autocomplete%20Fluid/Schemas/Fluid.xsd
http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers file:/home/florian/Documents/Docs/Netbeans/Autocomplete%20Fluid/Schemas/Vhs.xsd
http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers file:/home/florian/Documents/Docs/Netbeans/Autocomplete%20Fluid/Schemas/Flux.xsd'>
Auto-completion here
</f:alias>
http://netbeans-org.1045718.n5.nabble.com/Schemas-for-code-completion-with-xsd-tt5752294.html#none
- take files from https://fluidtypo3.org/schemas/
Some more info Use Netbeans to Create Sample XML from XSD
From a project that contains the .xsd
:
- Click
New File
on the tool bar orFile > New File
from the menu - Choose
XML > XML Document
- Name your file, click next
- Choose
XML Schema-Constrained Document
, click next - Click the
Browse
button and useBy File
to navigate to the.xsd
- Click the
Import
check box beside the file name, click next - Review the options available and click
Finish
to generate
You can use more than one .xsd
file to generate the .xml
. In this case it will use whichever .xsd
file you choose as Primary
to resolve any conflicts.
Answered By - Oleg V Karun
Answer Checked By - Timothy Miller (JavaFixing Admin)