tusharjoshi / netbeans-php-drupal

Netbeans Drupal Development Tool
Apache License 2.0
107 stars 14 forks source link

Context menu Implementations for hooks, drush error?? #13

Closed rojosnow closed 12 years ago

rojosnow commented 12 years ago

PHP Version: 5.3.8 Drupal Version: 7.9 Drush Version: 4.5 Netbeans Version: 7.0.1 Java: 1.6.0_26 64bit OS & Version: OS X 10.6.8

Issue 1 I get the below error when selecting the Implementations content menu for a hook.

Drush Output: EXECUTE: /Users/robert/Applications/drush/drush -r "/Users/robert/Documents/jordanjr/sites/dev.jordanjr.com" --include="/Users/robert/.netbeans/7.0/NBDrush" -y nb-hook menu The drush command 'nb-hook menu' could not be found.      [ERROR] The directory      [ERROR] "/Users/robert/Documents/jordanjr/sites/dev.jordanjr.com" does not contain a valid Drupal installation Execution complete in 0.168388 seconds

When I run "st", I get: EXECUTE: /Users/robert/Applications/drush/drush -r "/Users/robert/Documents/jordanjr/sites/dev.jordanjr.com" --include="/Users/robert/.netbeans/7.0/NBDrush" -y st PHP configuration : Drush version : 4.5 Drush configuration : Drush alias files : /Users/robert/.drush/ryan.aliases.drushrc.php Execution complete in 0.168673 seconds At a command prompt, drush -r "/Users/robert/Documents/jordanjr/sites/dev.jordanjr.com" --include="/Users/robert/.netbeans/7.0/NBDrush" -y nb-hook menu runs without an issue when I am within my home directory. I've checked the drush, project, and drupal paths several times. I read the installation guide...did I miss something??

Issue 2 Notice the double == in the --uri switch. This fails at the command line. EXECUTE: /Users/robert/Applications/drush/drush -r "/Users/robert/Documents/jordanjr/sites/dev.jordanjr.com" --include="/Users/robert/.netbeans/7.0/NBDrush" --uri==http://dev.jordanjr.local -y pml Command pm-list needs a higher bootstrap level to run - you will need [ERROR] invoke drush from a more functional Drupal environment to run this command. The drush command 'pml' could not be executed. [ERROR] The directory [ERROR] "/Users/robert/Documents/jordanjr/sites/dev.jordanjr.com" does not contain a valid Drupal installation Execution complete in 0.16593 seconds

HollyIT commented 12 years ago

I'll have to dig into that this afternoon. Seems like there might be a permission issue with CommandProcessor in Java and executing Drush. What's really weird is that it appears to only be on OSx and not on regular flavors of Linux.

HollyIT commented 12 years ago

OK I got it working now it looks like, with one little catch. The click and goto source it outputs won't actually goto it. I'm waiting on Netbeans to get back with me on that one, since it appears to be something either in Netbeans or in Apple's JRE (which is where the other problem lied). At least you can get the output for now.

HollyIT commented 12 years ago

I uploaded the new NBM as a file, so you can grab it here:

https://github.com/downloads/HollyIT/NBDrupalDevel/NBDrupalDevelTool2beta.nbm

rojosnow commented 12 years ago

Great, I got the output.

In the drush window, I only have the option to clear the window when I right click. I lost the ability to copy the output. When I right click, I only see Clear. Related to your comment on click and goto source??

I use Zend Server CE. You are looking for /var/mysql/mysql.sock in environment.inc:1267. The default location for Zend is /usr/local/zend/mysql/tmp/mysql.sock (I'd copy the output but...). Not sure how you want to handle this but I thought I would bring it to your attention.

Last, I decided to see how things would work on Linux. I fired up the following config:

PHP Version: 5.3.5 Drupal Version: 7.9 Drush Version: 4.4 Netbeans Version: 7.0.1 Java: OpenJDK 1.6.0_22 OS & Version: Ubuntu 11.04 32bit

Everything except Netbeans 7.0.1 is apt-get'ed. Netbeans 7.0.1 in installed in /usr/local using root. When I try to enter the drush path, I get "Invalid Drush Path" under Tools, Options, PHP, Drupal. The drush 4.4 path is /usr/bin/drush. I then installed drush 4.5 within my account directory, set it to ~/drush and Netbeans was happy again.

Also, when I right click in the Netbeans drush window, I do see Copy, Select All, and Clear.

HollyIT commented 12 years ago

The linking is when you look up a hook implementation. It outputs a list of links to files and lines where that hook is implemented. Clicking on that should open that file in the editor and take you to that line. I just noticed it stopped working in Linux too, so I'm looking into that.

The right click, try restarting Netbeans. If that don't work, try uninstalling and reinstalling it. I get a lot of weird behavior in Netbeans on Mac like that and it's not just in this plugin. I actually had the dependencies library list disappear in a Java project and had to reinstall Netbeans to get it going again. Some really weird stuff happens in OS X Netbeans - that's for sure!

HollyIT commented 12 years ago

OK - the linking of hook sources should be working now. Another weird thing with how Java in Mac and *NIX takes input from from a shell command.

HollyIT commented 12 years ago

If you still have problems, go ahead and start a new ticket.

rojosnow commented 12 years ago

Ok, OS X version is working now...I did the uninstall/reinstall. Links to hooks in files are great!

HollyIT commented 12 years ago

Sweet. I don't know why OSx gets funky on modules sometimes. It seems to just do it randomly.