At the moment you cannot configure Yiiclipse to use arbitrary folder outsite the webapp structure. But theoretically you should be able to use Eclipse’s links to mimic your application (“protected”) folder as is in webapp main folder, but that is only my guess, and not sure will work for yes.
I have a bit similar situation in my own case (just starting to code with yii for the first time).
I managed to get project created with protected-folder elsewhere by linking under webapp main folder as you hinted above. I actually did this by:
-Created first an empty project
-Closed Ecplise
-Filled the project folder by creating default webapp with yiic
-Moved protected folder elsewhere and
-Refreshed project in Eclipse plus created link for protected-folder.
I have to still see whether above works OK. However, I was wondering whether yiiclipse would still work by using above approach and having below directory structure visible under project:
protected
<webroot>
|
–<webapp>
|
--assets
--...
I managed to create also above structure under Ecplise-project, but didn’t try anything with it yet. But does yiiclipse simply broke down with it?
And thanks about plugin, definitely a good addition to Eclipse.
I get an error when trying to open a view from another proyect.
this is the error:
java.lang.RuntimeException: Folder not found (/var/www/projectA/protected/models/views)
at org.maziarz.yiiclipse.utils.YiiPathResolver.resolveViewPath(YiiPathResolver.java:79)
at org.maziarz.yiiclipse.hyperlinks.YiiHyperlinkASTVisitor2.selectFileAndRegion(YiiHyperlinkASTVisitor2.java:273)
at org.maziarz.yiiclipse.hyperlinks.YiiHyperlinkASTVisitor2.endvisit(YiiHyperlinkASTVisitor2.java:92)
at org.eclipse.dltk.ast.declarations.TypeDeclaration.traverse(TypeDeclaration.java:160)
at org.eclipse.dltk.ast.statements.Block.traverse(Block.java:43)
at org.eclipse.dltk.ast.declarations.ModuleDeclaration.traverse(ModuleDeclaration.java:70)
at org.maziarz.yiiclipse.hyperlinks.YiiHyperlinkDetector.detectHyperlinks(YiiHyperlinkDetector.java:59)
at org.eclipse.ui.texteditor.HyperlinkDetectorRegistry$HyperlinkDetectorDelegate.detectHyperlinks(HyperlinkDetectorRegistry.java:80)
at org.eclipse.php.internal.ui.editor.configuration.PHPStructuredTextViewerConfiguration$1.detectHyperlinks(PHPStructuredTextViewerConfiguration.java:274)
at org.eclipse.jface.text.hyperlink.HyperlinkManager.findHyperlinks(HyperlinkManager.java:263)
at org.eclipse.jface.text.hyperlink.HyperlinkManager.mouseMove(HyperlinkManager.java:439)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:199)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.aptana.ide.rcp.IDEApplication.start(IDEApplication.java:121)
at com.aptana.ide.desktop.integration.Application.start(Application.java:56)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Here is how to reproduce the error:
[list=1]
[*]Right click on projet A
[*]select "Go Into"
[*]Click "Up" in the bar
[*]Double click on project’s B php view file
[/list]
The error rises when trying to open a view in project B, the plugin tries to find a “views” folder, inside the last opened file’s folder of project A
In the adobe stack trace.
I was in project A, I opened a model (/var/www/projectA/protected/models/XModel.php), and then moved to project B and tried to open a view there (/var/www/projectB/protected/views/myview.php), there the plugin tries to find myview.php inside "/var/www/projectA/protected/models/views" which of course doesnt exists.
That error causes Eclipse/Aptana to crash when attempting to autocomplete something after.
I too have a Java error each and everytime I go over a keyword with CTRL + mouseover
LogFilter.isLoggable threw a non-fatal unchecked exception as follows:
java.lang.NullPointerException
at org.eclipse.core.internal.runtime.Log.isLoggable(Log.java:101)
at org.eclipse.equinox.log.internal.ExtendedLogReaderServiceFactory.safeIsLoggable(ExtendedLogReaderServiceFactory.java:59)
at org.eclipse.equinox.log.internal.ExtendedLogReaderServiceFactory.logPrivileged(ExtendedLogReaderServiceFactory.java:164)
at org.eclipse.equinox.log.internal.ExtendedLogReaderServiceFactory.log(ExtendedLogReaderServiceFactory.java:150)
at org.eclipse.equinox.log.internal.ExtendedLogServiceFactory.log(ExtendedLogServiceFactory.java:65)
at org.eclipse.equinox.log.internal.ExtendedLogServiceImpl.log(ExtendedLogServiceImpl.java:87)
at org.eclipse.equinox.log.internal.LoggerImpl.log(LoggerImpl.java:54)
at org.eclipse.core.internal.runtime.Log.log(Log.java:60)
at org.eclipse.dltk.core.index.sql.SqlIndex.error(SqlIndex.java:74)
at org.eclipse.dltk.internal.core.index.sql.SqlSearchEngine.search(SqlSearchEngine.java:161)
at org.eclipse.dltk.core.index2.search.ModelAccess.findElements(ModelAccess.java:285)
at org.eclipse.dltk.core.index2.search.ModelAccess.findElements(ModelAccess.java:263)
at org.eclipse.dltk.core.index2.search.ModelAccess.findTypes(ModelAccess.java:203)
at org.eclipse.dltk.internal.core.hierarchy.HierarchyResolver.findTypes(HierarchyResolver.java:63)
at org.eclipse.dltk.internal.core.hierarchy.HierarchyResolver.searchTypes(HierarchyResolver.java:307)
at org.eclipse.dltk.internal.core.hierarchy.HierarchyResolver.searchTypes(HierarchyResolver.java:286)
at org.eclipse.dltk.internal.core.hierarchy.HierarchyResolver.computeSupertypesFor(HierarchyResolver.java:257)
at org.eclipse.dltk.internal.core.hierarchy.HierarchyResolver.computeSupertypes(HierarchyResolver.java:243)
at org.eclipse.dltk.internal.core.hierarchy.HierarchyResolver.resolve(HierarchyResolver.java:56)
at org.eclipse.dltk.internal.core.hierarchy.HierarchyBuilder.buildSupertypes(HierarchyBuilder.java:123)
at org.eclipse.dltk.internal.core.hierarchy.IndexBasedHierarchyBuilder.build(IndexBasedHierarchyBuilder.java:168)
at org.eclipse.dltk.internal.core.hierarchy.TypeHierarchy.compute(TypeHierarchy.java:338)
at org.eclipse.dltk.internal.core.hierarchy.TypeHierarchy.refresh(TypeHierarchy.java:1207)
at org.eclipse.dltk.internal.core.CreateTypeHierarchyOperation.executeOperation(CreateTypeHierarchyOperation.java:89)
at org.eclipse.dltk.internal.core.ModelOperation.run(ModelOperation.java:698)
at org.eclipse.dltk.internal.core.ModelOperation.runOperation(ModelOperation.java:764)
at org.eclipse.dltk.internal.core.SourceType.newSupertypeHierarchy(SourceType.java:404)
at org.eclipse.dltk.internal.core.SourceType.newSupertypeHierarchy(SourceType.java:369)
at org.eclipse.php.internal.ui.corext.util.SuperTypeHierarchyCache.getTypeHierarchy(SuperTypeHierarchyCache.java:140)
at org.eclipse.php.internal.ui.corext.util.SuperTypeHierarchyCache.getTypeHierarchy(SuperTypeHierarchyCache.java:91)
at org.eclipse.php.internal.ui.corext.util.SuperTypeHierarchyCache.getMethodOverrideTester(SuperTypeHierarchyCache.java:101)
at org.eclipse.php.ui.OverrideIndicatorLabelDecorator.getOverrideIndicators(OverrideIndicatorLabelDecorator.java:175)
at org.eclipse.php.ui.OverrideIndicatorLabelDecorator.computeAdornmentFlags(OverrideIndicatorLabelDecorator.java:132)
at org.eclipse.php.ui.OverrideIndicatorLabelDecorator.decorate(OverrideIndicatorLabelDecorator.java:259)
at org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate(LightweightDecoratorDefinition.java:269)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunnable.run(LightweightDecoratorManager.java:81)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate(LightweightDecoratorManager.java:365)
at org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations(LightweightDecoratorManager.java:347)
at org.eclipse.ui.internal.decorators.DecorationScheduler$1.ensureResultCached(DecorationScheduler.java:370)
at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run(DecorationScheduler.java:330)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
While looking at the issue, I found https://bugs.eclipse.org/bugs/show_bug.cgi?id=357199 which you might be interested in. My conclusion is that the issue might not directly come from your extension but that a workaround is possible.
First of all thanks for the great plugin, its really useful.
I managed to install this plugin on zend studio 9.0.1, windows 7. it worked perfect and I liked it but there was an annoying side effect that made me uninstall it.
It seems like Yiiclipse plugin breaks the zend studio source validation mechanism. after installing Yiiclipse, zend studio marks all the native php functions as “undefined function” with a yellow warning mark in front of each line! I tried creating new project from source but didn’t work out.
I think the source validation is too big to ignore. Is there any workarounds or any way to fix this?
However, I still can’t use it, as I don’t see create new yii project in the file->new menu, although I installed the extension and enabled it!! I am using Mac 10.5.8 though.
It would be nice if you create an Aptana Stuido 3 version that has built-in PHP support, and doesn’t use PDT which is currently a requisite for this plugin.
with this plugin i’ve installed yii 1.1.8 package. in the “hello world” example project, the SiteController extends “CController” instead of “Controller” class.
<?php
/**
* SiteController is the default controller to handle user requests.
*/
class SiteController extends CController {
And when I change it to "Controller" it shows this error:
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?
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 …
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!