-
-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for an Abstract Filesystem #269
Comments
thx, vagrant and external file are still an issue #14, #262, #244. since phpstorm7 we have vagrant in core. its just a plugin "vagrant.jar" with the help of "jd-gui" we can get the source code. if they provide some download api inside, we can also go this way. |
I've played around with creating a temp file to convert my IFile to an instance of an Virtualfile / PsiFile. it allows me use the routes from my rest service. from my point of view this ticket must not be related to vagrant. would be more interesting to allow the paths in the symfony2 plugin configuration to be loaded by different protocol drivers? like: rest isn't a good solution, especially in terms of security and performance. would be pain if intellij stops because you're in a xdebug breakpoint and the it can't load the files. |
ok, good point. all ideas to load external files are welcome. btw. try a look on |
thanks, searched for something like PhpPsiElementFactory.createPsiFileFromText() for a while [...]. i totally agree with you, blocking remote protocols would be pain. invalidating the remote file cache could be triggered by usage or using a button in the UI. the intellij api makes it impossible to implement pure async io. for example look at the FileBasedIndexExtension, methods like isValidForIndex force you to implement blocking requests. what do you think about mixing async io with blocking io for the initial file request. |
no, FileBasedIndexExtension is a background task. you see its working when "Indexing..." is shown in bottom toolbar. moreover its run on every file change (without u know it), so its complete in "non-blocking" mode and deactivate all intellij extensions on a long process eg on reindexing. we need to have a valid cache everytime when a request from an extension is coming. there so much traffic around there that we cant wait for an operation. therefore u dont see "synchronized" methods on list/collection generations. its faster to create a new instance. implemention of such a background task would be easy. just throw it into a scheduler; run it every x minutes and we are ready :) // com.intellij.openapi.progress.Task
new Task.Backgroundable(project, "Background Bottom Message", true) {
@Override
public void run(@NotNull ProgressIndicator indicator) {
try {
Thread.sleep(10000);
} catch (InterruptedException ignored) {
}
}
}.queue(); |
also related to #138 would be a good testcase |
Could this be achieved with the "add additional symfony xml container files" option? The appDevDebugProjectContainer.xml can be retrieved from the vagrant vm with something like rsync and the path to this file is added as an additional container file. |
u can add new container files in plugin settings. just rsync them. but target is to remove this step, however we can to this in a good way :) |
I've got same problem: we are using virtualbox for dev env and I should sync cache folder by hands. |
Same problem. I use vagrant + NFS. And I've moved the symfony2's cache/logs directory under /tmp/symfony/cache/dev/... (to make it faster inside vagrant). I am manually also doing a cache:clear on the host system to generate the appDevDebugProjectContainer.php + appDevDebugProjectContainer.xml files and then symlinking this to the /tmp/symfony/cache/dev... files on my system. This is the only way I've managed to get it to work with this plugin and got rid of the "Weak Service" notices. Why doesn't the adding additional XML Container files work? Does the plugin require the XML file or the appDevDebugProjectContainer.php to resolve all services? I'm confused. |
Same problem here....We use vagrant and the route to cache folder is /var/cache/symfony. Would be cool to setup the plugin, while having access to the vagrant file system to configure the paths. |
update: i have started a branch for resolve this. basically phpstorm provides a http-server which listens for data of external "boxes". |
i changed my mind on this topic. i think a good solution is the "deplyoment" feature of phpstorm. it's quite easy to sync a folder using this feature. |
add settings to enabled background scheduler add action to download Symfony dev files directly inside server browser add routing service remote storage to its collector add plugin webDeployment for testing environment support temporary psi files for routing of remote files add support for load container file on remote add remote ui also for container selection refactoring of webDeployment features add basic timer for loading remote files of routing on webDeployment plugin
in my case intellij isn't able to get the content of my cache directory (i use vagrant + rsync).
i played a bit with implementing an abstract filesystem to implement a way to fetch the container.
it's just a prototype i learned a bit about writing intellij applications.
https://github.com/timglabisch/idea-php-symfony2-plugin/commits/abstract_filehandling
I tryed to implement my own file handlers.
https://github.com/timglabisch/idea-php-symfony2-plugin/blob/abstract_filehandling/src/fr/adrienbrault/idea/io/FileFactory.java
but may it would be better to just use the VirtualFileSystem from intellij.
i don't know a lot about intellij and normal times don't program java so for now i wasn't able to find a way to parse the PSI Elements from my IFile interface to support routes.
https://github.com/timglabisch/idea-php-symfony2-plugin/blob/abstract_filehandling/src/fr/adrienbrault/idea/symfony2plugin/routing/RouteHelper.java#L144
what do you think about about supporting an abstract filesystem to work with "remote caches"?
The text was updated successfully, but these errors were encountered: