Yiiclipse - Eclipse PDT extension for Yii Framework

Ubuntu 11.10 Installation failed (solved)

solution at bottom of this post

@KEo Thank you for putting the hard work into making Yiiclipse.

I hope to use it:-)

However, after following the instructions on your website and this post’s advice,

nothing is working for me. I cannot get Yiiclipse installed on Ubuntu 11.10.

Please see the below "description of the problem".

[b]

"Description of the problem"[/b]

First

I followed your websites instructions to install Yiiclipse.

http://yiiclipse.maziarz.org/#stepByStep

However, the install failed. The install would fail with the

following error message:

An error occurred while collecting items to be installed

session context was:(profile=epp.package.php, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).

Unable to read repository at http://yiiclipse.maziarz.org/updatesite/DEV/plugins/org.maziarz.yiiclipse_1.1.0.201111132221.jar.

Connection reset

Second

After the above failure, I then searched and found this post with your instructions.

So, I downloaded and installed the "Eclipse IDE for JavaScript Web Developers" package

as you recommended. Then, I tried to install Yiiclipse. But, I got the same error message

as before "Unable to read repository at http://yiiclipse.maziarz.org/updatesite/DEV/plugins/org.maziarz.yiiclipse_1.1.0.201111132221.jar".

Third

I tried to implement your "NOT RECOMMENDED:" option described above.

But, when I tried to download the file I got the below error message:

org.maziarz.yiiclipse_1.1.0.201111132221.jar.part could not be saved,

because the source file could not be read.

Try again later, or contact the server administrator.

So, I cannot download the file: yiiclipse_1.1.0.201111132221.jar

And, according to the error messages, Eclipse cannot get access to it either.

May there be something wrong with the file on your server?

Please advise. I am sure all the Ubuntu users would love to have

Yiiclipse working on their machine :slight_smile:

Regards.

[b]Solution:

Installed

eclipse-pde[/b]

Ubuntu requires you to install this module.

If you do not install it the Eclipse plug-in installations do not work.

After installing eclipse-pde the Yiiclipse installation worked.

I just made a project in Eclipse and tested Yiiclipse.

The ability to control click on a view name in the controller and then go to the

view file will save me tons of time.

Thank you KEo!

Hi,

I successfully installed Yiiclipse but when I click ‘toggle support for Yii’ for any of my projects, the Yiiclipse logo is not coming in the top-right corner and i couldn’t activate Yii support for any of my projects. Also the ‘Open perspectives’ menu don’t show the Yiiclipse support. Can anyone help me regarding this please?

Thanks

@maheshs60

After doing the install, your Eclipse application should have support for

the following perspectives:

1. PHP


2. <PHP>


3. Javascript


4. Debug


5. Web

If you open the PHP perspective, then go to

file->New and the "New Yii project" option should be seen.

It should be under the PHP Project option.

However, if you open "<PHP>" perspective the New Yii project option

is not seen under File->new. I do not know why Eclipse gives these

two perspectives "PHP" and "<PHP>". But, that is the way my setup is.

Note that Yiiclipse is not a new perspective in Eclipse.

You use Eclipse in the PHP perspective which will have Yii support

in that perspective :slight_smile:

If you want to test if Yii support is active, open a controller file

of an Yii project in Eclipse. Then, ctrl + click on a view file of an

Yii render() command. It should then open that view file in Eclipse.

For example, find a render command in one of your controller methods,

then hold the control button down,

mouse over the view file name (below example is "contact"),

when you rollover "contact" a line should appear below it,

click on "contact" and the contact view file will be openned.

#Render command below:

$this->render(‘contact’,array(‘model’=>$model));

If this functionality works you know Yiiclipse is working.:slight_smile:

I hope this helps.

it will be a nice feature if I have an easy access to Model | View | Controller

like a toolbar that have 3 button when clicked on of them the PHP Explorer will only expand the Model or view or the controller. Sometimes I like lost my focus cause searching from many of folder …

It just a good feature for easy access…

Is the source code of this plugin available somewhere?

I found a solution to a similar problem of ‘yiiclipse not working’, it turned out that the problem was not related to yiiclipse at all.

The story: I had yiiclipse installed and it was working great!

The problem started when I was using it with a project on git when we changed the file structure, to make the majority of files non web accessible. Suddenly yiiclipse started to not work and I could not figure out why because in my .gitignore file I had all the yiiclipse and project files ignored (not all of my co workers use eclipse). The built path was correct, I had the "toggle yiiclipse" button and everything. Holding the ctrl button I could navigate to files within $this->render() tags, so some of this plugin was working.

The fix: I created a new yii project using the right click function in php in a different folder and it added a new project, but curiously it added a bunch of files into my current project. Tested the code completion and it worked! The first time I had yiiclipse working I didn’t realize it had a ton of files associated for its script running. Deleting the files with ‘git clear -f -d’ confirmed that the code assist breaks again so 'type into git the status command ‘git status’ and copy all the new untracked files and add them to your .gitignore file!

Hopefully this helps someone else!

Best wishes.

Maybe someone can update the news item so it points to the right url? (http://yiiclipse.maziarz.org/)

http://www.yiiframework.com/news/49/yii-support-for-eclipse-pdt/

Done.

Hello, Using the console I have this error on $this->render(‘view’, …


!ENTRY org.maziarz.yiiclipse 2 0 2012-12-21 01:31:57.020

!MESSAGE File does not exists: L/mmsystem/protected/views/changenotice/view.php

YDEBUG: Found file: \mmsystem\protected\views\changenotice\view.php

The file exists on the path.

What could be missing?

Eclipse for PHP Developers

Version: Helios Service Release 2

Build id: 20110218-0911

Windows 7

Entry "YDEBUG: Found file: /path/to/view.php" - can be misleading, as only means expected view location, which in fact can not exist.

Your case seems very regular one. The only comes to mine mind is possible case-sensitivness. Actually I have no Win7 to test this, and not quite sure if "\mmsystem\protected\views\changenotice\view.php" and "\mmsystem\protected\views\changeNotice\view.php" are equivalent. Can you check this?

The correct path is "\mmsystem\protected\views\changeNotice\view.php" but even changing "\mmsystem\protected\views\changenotice\view.php" I have the same error.

Is this extension (current version) working at all?

When trying to install stable version (http://yiiclipse.maz…atesite/STABLE/) I’m getting following error (Installing Software item):


An error occurred while collecting items to be installed

session context was:(profile=epp.package.php, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).

Comparison method violates its general contract!

Comparison method violates its general contract![size=2]

[size=“2”]When trying DEV version ([/size]http://yiiclipse.maz…updatesite/DEV/[size=“2”]) I’m getting same error as above ([/size]Installing Software[size=“2”] item[/size][size=“2”]) plus additional one ([/size]Install download3 [size=“2”]item):[/size]

[size="2"]


An internal error occurred during: "Install download3".

Comparison method violates its general contract!

[/size][size=“2”]I’m very new to Eclipse, so I have no idea, when has it come from? I tried to install this plugin on brand new Eclipse installation, freshly extracted from ZIP file [/size]acquired[size=“2”] from [/size]official[size=“2”] website, with no other plugins installed or no configuration changes made.[/size]

Please tell me what platform do you use (linux/windows etc.) and what eclipse release have you tried?

KEo, forgive me making inproper noise. It was Eclipse problem, not your plugin. Since I installed Helios SR version over JRE 7 version, I was affected with a known Eclipse bug, that prevented me from installing or updating anything. I’ve sent SR to hell and installed SR 2 instead and now everything seems to be fine. I managed to install your plugin without any extra problems.

The thing is, that I don’t see much addition, your plugin brings to the Eclipse and I’m wondering, if I’m getting this wrong or if something failed during install?

I can start a new Yii project, thats OK. I can use option "Configure > Toggle Yii Support", but when I use it I see not much difference.

After toggling Yii support on, I’ve opened my default controller and I was able to go to components/Controller by Ctrl+Click on “extends Controller” line. But this is something, that comes AFAIK from base Eclipse. I wasn’t able to do the same in Controller to display CController. I can’t even hover it with Ctrl pressed. I’ve scrolled few of my classes and views with Ctrl button hold down all the time and I can clearly see, that I can hover or click only class names and functions from current project. I can’t use this functionality for anything that comes from Yii. For example, in standard, auto-generated Yii application, in LoginForm.php model, in authenticate() function I can use Ctrl+hover to display UserIdentity class contents, because this class is part of current project. But I can’t use the same technique to display ERROR_USERNAME_INVALID constant value, because it is part of CUserIdentity (base Yii class), from which UserIdentity, which is unreachable by my Eclipse.

You’re writing about being able to switch between actions and views using Ctrl + hover, but how to use this feature? I’m trying to do this view name in render() function, without any effect.

What should I expect? Maybe I’m expecting too much?

Hello Keo,

Thank you for this plugin. I copied contents of my existing Yii project to a new project I created in Eclipse PDT and added Yiiclipse nature. I can use the navigation feature but not the autocomplete. Is there any setting I’m missing?

I am new to using Eclipse for PHP development. I also cannot use the autocomplete feature for PHP functions… But I can view the function details by control+click or hover. Please help.

Thanks.

Thank you KEo :)

Hello!

I’ve got some remarks, but not here in the right place.

Please check! Thanks!

Your site is down.

I thinks needed to renew domain maziarz.org

seems the domain was renewed.

but now:

http://maziarz.org/yiiclipse/

Error 404

http://blog.maziarz.org/p/yiiclipse.html

404 Not Found

The request /p/yiiclipse.html was not found on this server.

Try http://yiiclipse.maziarz.org/intro/