Aptana Studio Code Assist for WordPress is incomplete - wordpress

I installed the WordPress bundle/ruble for Aptana Studio, but it's only providing code assistance for a subset of WordPress functions. I'd like code assistance for all WordPress core functions (or as many as possible). My projects have PHP as their nature, and are connected via SFTP to remote WordPress installations.
After the bundle (which hasn't been updated in over a year) didn't provide everything I was looking for, I tried using a local copy of WordPress as an external library, then adding it as an external directory to the PHP Buildpath. Neither one added any more functions than the bundle provided. These actions were suggested in Aptana Studio Support and WordPress Answers.
Am I doing something wrong, or is the level of code assistance I'm looking for not available?

It's true that the WordPress bundle offers just some limited auto-completion support. Though including the local copy of another WordPress installation as a PHP external library seemed to solve this in the latest Aptana Studio version (3.4.0,) as you already mention to have tried, and as it is suggested in this one of the links that you pointed out.
Here are all the specific steps I took, so you can check if there was something different in the procedure you followed.
Open the Preferences menu going to Window > Preferences
Select Aptana Studio > Editors > PHP > Libraries
Click "New user library"
Add the path to another local WordPress installation (not the same WordPress files in the current project,) selecting the root folder of a freshly extracted WordPress download (e.g.: C:\wordpress-3.5.1\wordpress)
Make sure the new library is selected in the user libraries list (marking it with a checkmark next to the library icon.)
Apply the changes and press OK
Make sure your project is a PHP project. Right click the project folder, select Properties > Project Natures and mark the PHP checkbox.
Now, inside PHP code, I get autocompletion suggestions for all core WordPress functions - and I can even go to check their source by pressing F3 on their function name.

I followed the steps of E. Serrano and it works perfectly. What is silly is that if you want autocompletion for, say, add_action('wp_print_footer_scripts', 'scripts.js', 1); the moment that you type the quote, autocompletion is lost... if you try add_action( wp_ you get all WP commands. Hope it helps...

Related

Which folders to commit when using Github with CMS systems

Probably a silly question, but I cannot find any good advice on the internet so far, so hopefully you guys have some good advice. I would like to use GIT for version control and use it to deploy changes to my websites to the server(s). It's easy when I use NodeJS, but a bit more complicated when using a CMS system, to my opinion.
When I use NodeJS
When I use NodeJS it's quite easy to have a node_modules folder which contains all the external libraries which I will install on deployment. The rest(my own files) will be saved on Github and deployed to my server if changed. Obviously I will not store the node_modules folder on my Github account or send it to my server (node modules will be installed on the server, on deployment). So it's pretty easy to keep those two (third-party an my own files) seperated.
When I use Wordpress, Magento or something similar
Now it gets complicated. Mostly because CMS systems like Wordpress have a folder structure like wp_content/themes/theme_name/, so your own theme files are more or less entangled with the core structure, instead of separated like NodeJS. And it doesn't seem right to commit all my core files to my Github account as well or send all those core files to my server on every deploy (I would prefer to install them using composer or something, serverside), because I'll never touch the core files, obviously.
So is there any advice? Is there a better whey to handle this? Maybe change a configuration file with the path to my theme folder or something?
The best way to do this is to move your wp-content folder outside of your standard installation. I tend to have a folder called "wp" with the basic WordPress installation in it and a folder called "wp-content" at the same level for my content files. You can then tell WordPress that your content folder is elsewhere with the following:
define('WP_CONTENT_DIR', dirname(__FILE__) . '/content');
That goes into wp-content.php which you can also take out of the main WordPress install (and thus add to git) and place at the same level as your folders.
To make things even better consider looking at composer https://getcomposer.org/ and using that to bring in WordPress core and plugins https://wpackagist.org/ is your friend here. This guide got me started on using composer with WordPress and its a good start https://roots.io/using-composer-with-wordpress/ you can pull in your theme from git as well via composer which is great for when you deploy etc... Capistrano for example can run composer on a server :)

Aptana Studio 3.6.0 - Fuzzy File Finder

Back in the early versions of Aptana 3 we had a plugin to add fuzzy finding capability to files search.
It was called Muermann GoTo File, and the shortcut was CTRL+Alt+N.
We could just drop the plugin inside Aptana's plugins folder, and the fuzzy search would be enabled:
Example:
Search Term: profcontsp
Results:
profiles_controller_spec.rb
...
Now, updating to Aptana 3.6.0, I tried adding that same plugin on the plugins folder without success.
Tried the dropins folder as well...no deal. Tried putting only the .jar inside those folders.. no good.
That would be amazing if there was a way to use the same plugin or even another one to add the same feature. I've got kind of addicted to it.
Any suggestions?

PHPStorm - Link external SFTP-folders into project

the issue i am fighting through is a bit complicated. Ill explain the setup envoironment to you first.
I am using PHPStorm to work on a Symony2 Project.
My Apache is hosted on a Debian-VM connected to PHPStorm via "Deployment Tool".
/* So far: I can edit code and update the server automaticaly on save. Works*/
My problem now is, that i am using the composer, which is ment do get me the right bundles into the vendor folder.
I WANT to create kind of a symlink from the server directly into the project.
I DONT WANT to download the vendor folder from the server hard into the project.
COMPACT:
I want to create a symbolic link within a PHPStorm project. Linking a folder from a server into the Project. The linked in folder should be unidirectional updated on source change. The Classes and Namespaces should be known to the Project.
Is there any native way to get this done?
Or does anyone know a plugin which could handle such affairs?
I hope i expressed my point clearly :/ Please ask, if anything is unclear.
Greetings and thanks upfront.
It's not possible to do directly from PhpStorm, see the related issue. You can use some third-party tool like ExpanDrive to map a server directory to the drive letter by SFTP and then add this local directory as a content root to your PhpStorm project. Note that it may affect the performance dramatically.

Manually Extract Theme From Forge Theme Source Code?

For instance, the yet-to-be-released Twenty Twelve theme is available on GitHub, but it's a Forge build.
And in order to retrieve the actual theme with the normal directory structure, I'd have to install Ruby, RubyGems, Forge and some configuration to go with it.
I am no developer and I just want to use the theme. Is there a way to manually pull out the theme files from the build?
This is what I am thinking:
All the required template, JS and CSS files are in the build directory.
Add html5.js to the javascripts directory inside build directory. Then rename javascripts directory to js (<= compared its directory structure to that on WordPress.com SVN)
Now rename build directory to twentytwelve—the theme is ready.
Is that all, or am I missing the whole point?
PS: I am sure that some of you'd suggest me to download the theme directly from the WP.com SVN repo., but the reason why I don't want to is that on GitHub I can easily track the changes to the theme.
If you really want to just get the latest, ready-to-go version of the theme, use SVN. They push updates over when it's in a stable form, so you don't need to worry so much about whether or not there's broken functions in the version you're grabbing - or any number of weird issues when using an alpha build of the theme.
While that will kind of work, you should really either:
Use the GitHub repository the way it was meant to (clone it, and use Forge to build the theme).
Wait for the theme to actually be released.
While you might be able to extract the theme as-is from the /build directory, there's no real way for you "track the changes to the theme" since the changes will be made in the /source directory. There's no guarantee the committers will build the theme before pushing (which is how the /build directory is currently kept in sync.
Update
If you've been following active development, Twenty Twelve was just rolled into WordPress trunk for the upcoming (late 2012) release of version 3.5:
Changeset 21261
Timestamp: 07/12/12 04:20:46 (14 hours ago)
Author: nacin
Message: The Twenty Twelve for WordPress.
props drewstrojny, lancewillett.
also props corvannoorloos, jeffsebring, kobenland, iandstewart, mfields,
mtdesign, op12no2, philiparthurmoore, sixhours, mamaduka.
So rather than playing around with extracting the theme via GitHub, just use Subversion to check out WordPress trunk and look at the /wp-content/themes/twentytwelve directory.
There's nothing 'easy' about the way you're suggesting going about it. Certainly not easier than installing SVN, pointing it to the repo, and tracking changes there (you know, when they're actually done). It's still version controlled, still easy to see the diff, and still the latest version. Also, note that in github, the theme files do point to /javascripts, so if you're renaming the directory you'll have to manually catch it in the files themselves as well.
If you really want to just get the latest, ready-to-go version of the theme, use SVN. They push updates over when it's in a stable form, so you don't need to worry so much about whether or not there's broken functions in the version you're grabbing - or any number of weird issues when using an alpha build of the theme.

Dotnetnuke Module Development roadblocks, where is my module?

I've been trying to wrap my head around module development for DotNetNuke for the past day and I keep running into roadblocks. Prior to this, being the *NIX/OSX grognard that I am, I have managed to create a Skin and a few Widgets "The Hard Way" by creating the manifest file myself with a python script, coding everything in Textmate and using a Makefile to create the packages anytime I update it, then installing it onto a remote development site on some shared hosting. However, I want to try things the "DotNetNuke way", so I've been looking around for instructions now that I've got a Windows VM up and running.
From what I've found, this is what you're actually supposed to do:
Create a local dotnetnuke website.
When the dotnetnuke website has been created, go to Host -> Extensions -> Create Extension
Select Module and fill out all the forms.
Open up the website in Visual Studio.
Find your module in the <site>/DesktopModules and start hacking away at it
When you want to redistribute your package, go to Host -> Extensions -> Edit Module -> Create Package.
There are a couple of problems with this, however. I get as far as step 5, and for some reason I can't seem to find my module in DesktopModules. I have tried looking elsewhere in the directory tree for my test module and I can't find it anywhere. In addition, when I try editing a package, I can't see any "Create Package" button.
Any ideas where I'm going wrong? I'm using the absolute latest DotNetNuke as of this writing (5.6.0), by the way.
Update: Okay, feeling a little foolish I first have to create the module in Visual Studio, then create the module in the website and attach it to the manifest of my module. However, when I do this, my site blows up because it seems to assume that I'm using a company name of "YourCompany". Fine. I revert, delete the module and try again but creating my module with a namespace of my company name doesn't seem to change any "YourCompany" names, they're still all over the created files. What in the heck is going on here?
You need to do a search and replace in the entire project as well as the settings in the Projects settings. Also here is a link that may help link
Have a look in the project/solution properties under application make sure root namespace is not YourCompany

Resources