|
#installing smartypdt. InstallationThis page describes the installation steps for smartypdt (Thanks to matei.dragu for his comments!) RequirementsDownload PDT 2.2 / Studio 7.1 all-in-one from Zend's site InstallYou requested info about how to install SmartyPDT 0.9.0 on Galileo, so i will try to explain the steps: - Download latest SmartyPDT package (currently 0.9.0) from http://code.google.com/p/smartypdt/
- Be sure that the .TPL files are not associated with any content type (file type). In Eclipse, go to Window->Preferences->General->Content Types and under the Text section check HTML and PHP Content Type If you see that the .TPL is associated with anything, just delete those entries.
- Go to Help-> Install New Software
- At the Work With section click on the Add... button. Give the new "Site" a name and click on Archive... and select the downloaded .ZIP archive with smartypdt. Go back to the Install New Software window and select the newly added "site". If the "Group items by category" check-box is checked, uncheck it. Now you should be able to see 1 item in the software list named "Smarty Feature"
- Select the Smarty Feature, click Next> and from here afterwards it shouldn't be a problem.
- If you are prompted that this is an unsigned package, just ignore the warning and install it anyway.
- After the installation completes, restart Eclipse and it should be working.
- Define a default PHP executable of type 'Zend Debugger' (only if you install vanilla Eclipse PDT):
- In Eclipse go to Window->Preferences->PHP->PHP Executables Click on the Add button. Enter a name for that executable definition, for example "PHP localhost", complete the 2 fields which ask you for the PHP executable path (the PHP binary CLI executable) and php.ini path. Be sure that the PHP debugger is the Zend Debugger.
|
Thank you so much for this plugin! keep up the good work!
Max
Thank you, it is very useful.
You are cool.
brrrrr not working for me...
if u want to give it a try... for all in one pack go to http://downloads.zend.com/pdt/all-in-one/ plug still not working for me... if You know how to install this plugin correcly i wound be thankfull for some info.. mmazur.mm@gmail.com
It doesnt work for templates with .html, looks like only for .tpl. I had try to enable it for .html files, but unsuccessfully.
This is excellent work, and has helped me significantly. Thank you.
You have to unzip the file in the parent folder of eclipse, the ZIP file has the eclipse folder inside as include path.
ROLA. (from Chile.. so sorry my english :S)
Has anyone got this to work with anything more than code colouring? Has anyone got it to actually work as it's described? By which i mean, open and closed tags, code completion, without html syntax warnings for every line of smarty code in the .tpl, etc.
Couldn't get it working, in the problems tab it keeps giving me the strangest error message - "2". Tried different combinations: PDT 1.0.1 20071209, PDT 1.0.1 20071210k, PDT 1.0.2 20080102 Smarty Feature 0.5.2 20071109, Smarty Feature 0.5.2 20080205 I suppose the code breaks due to conflicts with another Eclipse plugin from the ones which this one depends on.
However, the idea is great, I hope I will soon be able to run the PHP debugger at least ;).
Can somebody please post working configuration versions set.
I couldnt even get it to install in:
Eclipse Version: 3.3.1.1
ensure you have jre5 not jre6, it will not work with jre6
Ensure .tpl is not registered with any other edit content type => window->preferences->general->content types->text check: "html" and "php content type" remove tpl from both of these.
Thanks, the feature is very useful for me
Eclipse PDT 1.0.2 (last stable) JRE 1.6 update 5 (last stable) SmartyPDT 1.0.4 (last)
Not work. I open .tpl file in "Smarty Editor". If I type text "{" fnd press Alt+Space that dropdown html tags (no Smarty syntax)!
On startup Eclipse IDE I see the error message, and string "Building worckspase" always show on screen.
Please - release First stable release this Plugin.
THis message show on startup Eclipse: "Unknown(): (null): Unable to initialize module Module compiled with API=20060613, debug=0, thread-safety=1 PHP compiled with module API=10020429, debug=0, thread-safety=1 These options need to match"
If file opened on preview session, I see next message: "Severity and Description Path Resource Location Creation Time Id A JSONObject text must begin with '{' at character 1 of Status: 404 dev.cms.com/application/cms.com/www/templates/page three_columns.html.tpl line 1 1211374078076 2022"
Let me explain how it did work for me in Zend Studio for Eclipse 6 in Windows XP.
All were installed on instructions... And - open .tpl file in "Smarty Editor" - ERROR:
java.lang.IllegalAccessError?: tried to access field org.eclipse.php.internal.ui.editor.PHPStructuredEditor.isExternal from class org.eclipse.php.smarty.ui.editor.SmartyStructuredEditor?
that to do?
I have the same problem. I have Smarty Feature 0.5.4 installed and enabled in Eclipse 3.3.2, but when I tried to open a .tpl file, an error message shown up; "Error opening the editor. Reason: tried to access field org.eclipse.php.internal.ui.editor.PHPStructuredEditor.isExternal from class org.eclipse.php.smarty.ui.editor.SmartyStructuredEditor?"
If you have the problem that azov and btnguyen2k have (the two posts just above this one), simply associate .tpl with the PHP editor instead of the Smarty template editor. For some reason this works.
Credit for this one goes to a friend of mine, Dirk.
Thanks dosperios for the tip. It seems to work. However, I uninstall SmartyPDT and associate .tpl files with PHP editor and it still works the same. It looks like we are in fact using PHP editor not SmartyPDT (which is still not really working for me).
Here's newer version which works with jre 1.6
http://code.google.com/p/smartypdt/issues/detail?colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&q=31&can=1&id=31#c11
(It's not in download section, dunno why)
then i got this "Error: A JSONObject text must begin with '{' at character 1 of Status: 404 "
solution posted here:
http://groups.google.com/group/smarty-pdt/browse_thread/thread/aa38531c2ecefd3e
finally i got it to "work" by which i mean opening tpl files in smarty editor and syntax highlight, thou every phrase is marked as warning and got no code completition
I'll be happy to see it working, but assuming from lack of activity in this project i think creators just got tired from constant complaints and let go ;]
Do not highlight such code <option value="box" {if 'box' == $des->event_module}selected{/if}>Box Border</option>
just get an error
Comment by azov...@ukr.net, Jul 06, 2008
have the same problem.. :(
Comment by ben.kelada, May 07, 2008
10x, works now =)
No possibility to change the delimiters and the file extensions to use .htm and .html?
My problem is the following:
Error opening the editor. tried to access field org.eclipse.php.internal.ui.editor.PHPStructuredEditor.isExternal from class org.eclipse.php.smarty.ui.editor.SmartyStructuredEditor?
Even when opening the tpl with the PHP Editor I can't get the template within the Smarty editor, it just shows up the template within the PHP Editor.
Any solutions for this issue? I also tried the 0.5.5 version but still no change in that.
Thanks for your help!
Please renew this plugin to Eclipse Genymede 3.4 and PDT 2.0 and JRE 1.6u7. I have use this plugin! Thanks!
How can we install this in Eclipse Ganymede 3.4? Worked great for me in Europa and would like to use it again!
Was able to get it to work in 3.4 with some help from #eclipse. Just paste the unzipped "eclipse" folder into $ECLIPSEPATH/dropins/ Restart Eclipse
Great stuff man :) Keep up good work :) Thx for this :)
Not working: java.lang.IllegalAccessError?: tried to access field org.eclipse.php.internal.ui.editor.PHPStructuredEditor.isExternal from class org.eclipse.php.smarty.ui.editor.SmartyStructuredEditor?
I'm using zend studio for eclipse 6.0.1. The plugin status in "configured properly" but not working.
Thanks, works great, all i had to do was remove ".tpl" from window->preferences->general->content types->text->PHP (Thus leaving it only to smarty Template, were it's "locked")
Working great! thanks for doc.
Who have success with .htm and .html association with this editor ?
There are instructions on how to get this working with .html files (or any other) under PDT 1.0.3 in this post:
Getting SmartyPDT working with PDT 1.0.3 and .html file extensions
When installing the smarty file using Unzip the smartypdt_X.zip (from http://code.google.com/p/smartypdt) file into the eclipse folder Go to Help->Software Updates->Manage Configuration Tick the icon to 'Show disabled Features' Find the "Smarty Feature nnnnn" entry and select it Click the "Enable" option from the Available tasks Restart Eclipse when prompted
Using this way I am facing one error. Selected location does not contain a product extension.An extension should consist of a directory named eclipse which contain a marker file called .eclipseextension and the features and plugin folders. Please select another another.
Please help me to integrate smarty with eclipse
Hello, thanks for this great plugIn ! It would be nice to put the 0.5.5 version on the project home page :) Because the 0.5.4 doesnt' work with eclipse pdt 1.0.3. I found this version in an issue answer. Thanks
And what about eclipse 3.4.1 and PDT 2.0? I have download it in all-in-one package, and i don't have Manage Configuration in Help->Software Updates, so I don't know how to instal that plugin.
>eclipse 3.4.1 and PDT 2.0
I unpack archive (0.5.5 version) and run eclipse with option -clean:
vova@sam:~> /opt/eclipse/eclipse -clean
it works :)
I have: Window->Preferens->General->Content Types Text->
File association
Is tpl associated with SmartyPDT? I use eclipse 3.4.1 and PDT 2.0. For .tpl Code completion works only for html, runtime Smarty errors and debug capabilities don't work... Or how I can use it?
voooova@gmail.com
"I unpack archive (0.5.5 version) and run eclipse with option -clean: " Ok, thanks now it works. But I have problem. When I'm opening a tpl file, code colorizng does not work, I need to click right on the file name in navigator and select Open In->Smarty Editor. What should I do to make it work right?
I seem it works only for html code.
it doesn't work for me it gives me
Error opening the editor. tried to access field org.eclipse.php.internal.ui.editor.PHPStructuredEditor.isExternal from class org.eclipse.php.smarty.ui.editor.SmartyStructuredEditor? what i can do tamer.solieman@gmail.com
Thanks all it's working when i'm try the new plug in http://smartypdt.googlecode.com/issues/attachment?aid=-4286508249986580739&name=Smarty-PDT_0.5.5.zip
When I try 0.5.5 and Eclipse 3.4 I don't have highlighted smarty code, just HTML, any solution on this? 0.5.4 with 3.3 works fine... (smarty highlighted)
I've installed pdt-all-in-one-linux-gtk-2.0.0GA.tar.gz on an Ubuntu 8.10, I've tried all the suggestion on this page, but I can't make the plugin work. It's the project alive?
To view if the plugin is even active, click on Help, About, Plugins.
does project die?
Is this project still active?
I am already using Zend PDT v2 all-in-one without issue. I have downloaded and tried 0.5.2, 0.5.4, and 0.5.5 and when I attempt to edit a .tpl file I receive the following error message:
I managed to install the plugin into eclipse 3.4.1 but it doesn't seem to do anything with my tpl files. :( I hope this project will continue...
Anybody can use eclipse 3.4.x + PDT 2.0 + SmartyPDT 0.55 without any warning message on Smarty tags? Let me know how to setup please.
RIP smarty PDT i would guess
Eclipse 3.4.2, PDT 2.0, SmartyPDT 0.5.5 I've just copied the extracted files into my plugins folder and started Eclipse. Now I can open my .tpl files in the Smarty Editor without making any changes on the configuration. Syntax highlighting also works fine. I don't know if anything else is missing. I'm satisfied with this solution. Hope I could help somebody...
Thanks guys, I just downloaded the latest release and it works in Ganymede!
I have tried with Galileo RC2 and Smarty 0.5.5 but it doesn't work here the error when i try to open a tpl file:
same error as piero.. tried with Galileo and 0.5.5
anybody got this working with eclipse 3.5?
It doesn't work for me too :(
My configuration: community jre 6u14-1
Eclipse for PHP Developers Build id: 20090619-0625
anybody got this working with eclipse 3.5?
I tried installing both smartypdt-0_5_4.zip and smartypdt.zip on Eclipse 3.5, but with no success, I got errors similar to those above.
Was anybody able to install smarty pdt on Eclipse 3.5 ?
the smartypdt.zip which is announced as 0.6 is not, in fact you found inside 0.5.5 version jar dated on 19.05.2009 and the feature folder is missing.
Can someone knows how to get sources and try to recompile them ( a real how-to for newbies ) against galileo ?
I'm with friedmann.bruno on this, a smartypdt compatible with Eclipse Galileo is necessary
I would like too a smartypdt compatible with Galileo :)
@Friedmann. Right, seems that the source (in the SVN) actually seems modified to work with new version of PDT.
So did anyone either compile or have instructions how to compile it?
I echo the comments above, please post instructions on how to compile this from source or better, post the updated compiled plugin on the downloads page. Thanks!
The compiled plug-in would be the best choice.
Was able to compile the project and install it into Eclipse 3.5 Needed to install PDE (plugin development) and the dltk library from (http://download.eclipse.org/technology/dltk/downloads/) under the R2 release. Needed to modify a few lines in the manifest to remove bundle dependencies in the core and ui packages...didn't bother getting the test package to run.
Modified in (SmartyTokenizer.java) private AbstractPhpLexer getPhpLexer() { final PHPVersion phpVersion = ProjectOptions.getDefaultPhpVersion();exported core and ui as plugin package and copied to plugin folder.
Thank you sam bossen
For some reason, I spent an entire Saturday messing with this trying to get it to work. Eventually, I gave up (for the day). I ended up uninstalling and re-installing ZendStudio? 7.0 clean. Then followed your instructions ... worked like a champ!
Part of my problem was selecting the right DLTK. I guess the only packaged needed is the DLTK Core.
I also retrieved the source by creating a New Project in eclipse as follows:
I then made the changes you described and exported the packages. After placing the jar files in the eclipse plugin directory and restarting eclipse, everything seems to be working.
Thanks again Sam, I never would have figured this out!
Do you can share your packages with the others users please ?
Thanks !
Yes, it would be very helpful if you can share it..
I can't post files here since I am not a member of the project, but if someone is willing to host the compiled plugin, post the access information and I will be happy to share my compiled plugin.
You can make a .zip file and host it on rapidshare.com or megaupload.com ?
Or you can upload it to http://www.getdropbox.com/
Thanks
It will be very appreciated :)
Thanks for your work
Try this https://dl.getdropbox.com/u/477489/SmartyPDT%200.6x%20plugin.zip
enjoy
Thanks a lot, it works so good!
Thanks! Great work! It works just perfect! Hello world! ;)
after some initial problems i finally got your version working sam.bossen. Thanks for the effort!
Thx Sam Bossen, it works perfectly !
After I copied the jar files to the plugins folder and start Eclipse 3.5 Smarty PDT does not get add to the list of plugins. Does it start as disabled? If so in 3.5 how do you enable it?
Smartypdt 0.5.5 was installed previously on Eclipse 3.3 then I added Eclipse 3.5. In order for smartypdt 0.6.x to work I need to rename the 0.6.x files to 0.5.5 then overwrite the files in the plugins folder. This go smarty to work for me on Eclipse 3.5.
I am up and running thank for the smartypdt 0.6.x code and if anyone could still answer the previous question I am sure it would help others.
It seems you have to move the two .jar files in the zip-archive into the folder eclipse\dropins\eclipse\plugins If you then restart Eclipse and click Help -> "About Eclipse Platform" -> "Installation Details" -> "Plug-ins" there should appear "Smarty Core Plug-in" in the list (its shows Version 0.5.5)
I associated the Smarty Editor with HTML Content Types but I don't get any syntax highlighting for smarty code. It seems it doesn't work yet.
How did others manage to get it work?
Thx Sam Bossen for your work!
i copied the 0.6.x files to: \galileo install\dropins\plugins\.jar
nils: you must remove all tpl associations. window->preferences->general->editors->file associations (remove .tpl) window->preferences->general->content types->text->html (remove .tpl)
like ben i copied the 0.6.x files to: \galileo install\dropins\plugins\.jar
i removed all tpl associations except in TEXT -> PHP Content Type -> Smarty Template because it's locked and that doesn't work. When i load a file.tpl eclipse said to me "Unsupported content type in editor"
Can anyone help me.
PS: excuse me for my bad english.
ERRATUM, i copied files into \galileo\plugins\.jar
I copied the files provided by sam.bossen to my %eclipse%/plugins folder. I had to rename the files to 5.5 from 6.x so that the plug-in would show up at all in the installed plugins (as "Smarty Core Plug-in"). It shows up with the locked association under the Preferences > Editors > File Associations section. When I try to open a .tpl with the smarty editor, I get the following error:
Could not open the editor: The editor class could not be instantiated. This usually indicates a missing no-arg constructor or that the editor's class name was mistyped in plugin.xml.
It would be nice to have syntax highlighting when working with smarty templates, so any suggestions would be appreciated.
Can some one create a complete build and upload somewhere on the net for Galileo 3.5 , Smarty pdt ver 0.6.0
Regards Amit
Use the build below , it works for 3.5 Galileo.
http://rapidshare.com/files/292848225/smarty.rar Amit
Hi, it is still difficult to get started: I use
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/SR1/eclipse-php-galileo-SR1-macosx-cocoa.tar.gz
copied the 5.5 mentioned by amkhullar and restarted. When I try to open a Template(.tpl) then the following error occurs:
java.lang.NoClassDefFoundError?: org/eclipse/php/internal/core/phpModel/PHPModelUtil
Has anybody a working constellation on macos 10.5? Thanks, Stoff
It works well for me with http://rapidshare.com/files/292848225/smarty.rar (thanks amkhullar)
Eclipse Build id: 20090920-1017
Great thanks, amkhullar! Note that you should restart Eclipse with "-clean" option (as voooova says before) after you put files from archive into "plugins" directory.
Great.. I'm trying to update the Eclipse to latest build .. out of interest, could you please let us know how to restart Eclipse with "-clean" option ??
Cheers
SmartyPDT works for Eclipse PDT 2.1-SR1 (Galileo) using the steps below. These steps are a full clean installation so you can jump to the section you need.
(Note: The link http://rapidshare.com/files/292848225/smarty.rar produced a file that did not work for me after trying twice. It also creates 2 smarty editors options when right clicking on a file in eclipse and choosing open with. The link listed higher up in the postings does so I have pasted it here.)
Thanks a lot Justin. It works for me now :)
I'm a complete newbie. I downloaded and installed eclipse-php-galileo-SR1-macosx-cocoa.tar.gz now I am trying to get this smarty plugin going, but am completely lost. can someone spell it out from the beginning? I don't know which version to use - don't know how to install it - don't know how to configure it. help!
Is the only thing this plugin provides is the coloring of syntax?
Zend Studio 7.0 error message: Could not open the editor: The editor class could not be instantiated. This usually indicates a missing no-arg constructor or that the editor's class name was mistyped in plugin.xml.
Hey hey, how to install 0.9 on Galileo?
Ishelper, is there a 0.9 version of smartypdt? if so, where could it be downloaded ? Thanks!
Look here: http://code.google.com/p/smartypdt/updates/list
I saw it now, I didn't look at the downloads section, my mistake. Just as a suggestion: shouldn't this new version be put at the Featured Downloads section on the project homepage? I mean... I suppose that more people will think, as I did, that nothing new happened new version? regarding this project.
You requested info about how to install SmartyPDT 0.9.0 on Galileo, so i will try to explain the steps:
1. Download smartypdt 0.9.0 from http://smartypdt.googlecode.com/files/smartypdt-0_9_0.zip 2. Be shure that the .TPL files are not associated with any content type (file type).
3. Go to Help-> Install New Software 4. Select the Smarty Feature, click Next> and from here afterwards it shouldn't be a problem. 5. After the installation completes, restart Eclipse and it should be working.I hope this helped.
Hi,
I install SmartyPDT from the matei.dragu 's method.
It's good, but in tpl files, eclipse say : "Didn't find the default PHP executable, please define a default PHP executable of type 'Zend Debugger'"
Can you help me ?
Thanks.
Great instructions. And do you know if it is possible to change the delimiter?
Oh, i totally forgot to explain how to get rid of the notice about "Didn't find the default PHP executable, please define a default PHP executable of type 'Zend Debugger'", my bad.
So, as far as I know, in order to get rid of that notice you should have PHP installed on your local computer.
In Eclipse go to Window->Preferences->PHP->PHP Executables Click on the Add button. Enter a name for that executable definition, for example "PHP localhost", complete the 2 fields which ask you for the PHP executable path (the PHP binary CLI executable) and php.ini path. Be sure that the PHP debugger is the Zend Debugger.
If this will be the first definition (the first record in the list), it will be set as the default one.
After you add this, close the Preferences window and everything should be OK and the notice gone.
Did it help ?
Thank for the new plugin - it works propertly well
but like "h.vorragend" I will ask after about posibility to change the delimiter How can we do that?
I looked into the Eclipse preferences/settings after installing PDT and didn't find anything regarding the delimiters. Maybe one of the developers could tell us if the option is there or not, and if it isn't, if there are plans to include such a feature in a future release of smartypdt. By the way, is there a roadmap regarding this project ?
Anyway, great job with this plugin!
hi,h.vorragend, s.krause, matei.dragu
i am the developer of this project,but i know little about smarty. do you want to define a delimiters instead of the inner "{}"? and what is the scope of the user defined delimiters. all php project? some php project? or a special tpl file?
and thanks for your attentions for smartypdt!
The plugin looks great,
but I cannot figure out, how to enable the plugin for another filetypes, then .tpl or .template (for example .phtml).
If I try to add new Content Type to Smarty Template and File association for .phtml, icons in File View shows Smarty filetype. But syntax highlighting or code completion doesn't work. The file is opened as ordinary HTML file.
Oh, and thanks for developing this plugin. I was really missing this feature in PDT.
hi, xapeiron
thanks for your comment i will fix this then:)
Hello zhaozhongwei1984!
The basic ideea is that Smarty allows you to change the start and end delimiters of it's template tags.
For example { -> ((* } -> ;;^]`
So
{assign var='value'}would become
That is just a silly example, but it demonstrates my idea. And the scope would basically be all the php projects and a certain php project, but I think it would be best if there would be an option to change the default start/end delimiters even for individual files... who knows, maybe someone just has to open once a template file to edit a few lines, or some other related scenario. So, to state this more clearly, the more flexible the scope, the better.
Thank you very much for developing this plugin.
I am a developer of the Zikula Application Framework. And we are using the following delimiter:
It would be absolutely great, if the template designer now could use with your plugin Eclipse. So far, it failed in the delimiters and the highlighting.
thanks to matei.dragu and h.vorragend. i think the delimiters must be configured somewhere to let smarty to know you have change the default delimiters,if so where is it?this is a question about smarty:) so mabye i could use that configuration instead users reconfigure the delimiters once more.
ok, I will try to explain this the best I can:
the Smarty Template Engine (at least the 2.6.x branch) is designed as a big PHP Class, and as all the PHP classes it has members(variables) and methods(functions).
The left and right delimiters are configured using 2 public members of the Smarty base class (in this example I am using the default values):
$smartyInstanceObject = new Smarty(); $smartyInstanceObject->left_delimiter = '{'; $smartyInstanceObject->right_delimiter = '}';Now, there are 2 potential issues: 1. The smarty class can be extended in order to create a personalized configuration for that class, and this is explained in this page from the Smarty official documentation: http://www.smarty.net/manual/en/installing.smarty.extended.php
2. The Smarty initialization could be made anywhere, so the smartypdt should be able to find that initialization/configuration....
If you could make this automated configuration for smartypdt it would be great, BUT I still think that manual setup should be available, as I said in an earlier comment: who knows, maybe someone just has to open once a template file to edit a few lines, or some other related scenario.
If anybody else has the problem with php editor hijacking smarty templates (.tpl files), here is how I solved it: Reason:
zhaozhongwei1984, thank you for this plugin. Perhaps you could introduce the above into your instalation procedure?
hi,vbaroff you do not need to reinstall the smartypdt:) just right click on the php project,select the menu 'configure' -> 'Add Smarty Nature'.the problem is gone.
this step is in another wiki.
i have just updated to aptana studio 2 and added pdt as plugin and then installed smartypdt. i noticed that smartypdt plugin does not keep syntax colors in <a> anchor link.
have a look at screenshots.
aptana smarty plugin http://yfrog.com/0xaptanasmartyj smartypdt plugin http://yfrog.com/0xsmartypdtj
I finally managed to make the smarty plugin work for
Eclipse for PHP Developers Build id: 20090920-1017
Clearly if you had already copy all the files to eclipse folder by mistake as I did then you need to delete those files and follow the instruction.