eclipse pdt 和 drupal:代码完成问题
我对 eclipse ptd 和 drupal 很陌生;我正在努力完成代码。
我正在使用 Suse 11.3,eclipse pdt 2.2.0,安装了 xdebug 2.1.2。
在我的 drupal 安装目录中,我添加了以下 php 脚本文件:
<?php
define('DRUPAL_ROOT', getcwd());
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$body_text = 'This is the body text I want entered with the node';
$node = new stdClass();
$node->type = 'article';
node_object_prepare($node);
$node->title = 'Node Created Programmatically on ' . date('c');
$node->language = LANGUAGE_NONE;
$node->body[$node->language][0]['value'] = $body_text;
$node->body[$node->language][0]['summary'] = text_summary($body_text);
$node->body[$node->language][0]['format'] = 'filtered_html';
$path = 'content/programmatically_created_node_' . date('YmdHis');
$node->path = array('alias' => $path);
node_save($node);
?>
所以 - 这是一个来自网络的示例,允许以编程方式添加节点。 这个对我来说效果很好 - 执行时添加一个新节点。
问题是当我开始输入时看不到代码完成提示 例如:“$node->” (没有可用的完成。)
这应该有效吗?我的设置可能做错了什么而无法正常工作?
感谢您的帮助!
I'm quite new to eclipse ptd and drupal; I'm struggling with code completion..
I'm using Suse 11.3, eclipse pdt 2.2.0, installed xdebug 2.1.2.
Inside of my drupal installation directory I have added following php script file:
<?php
define('DRUPAL_ROOT', getcwd());
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$body_text = 'This is the body text I want entered with the node';
$node = new stdClass();
$node->type = 'article';
node_object_prepare($node);
$node->title = 'Node Created Programmatically on ' . date('c');
$node->language = LANGUAGE_NONE;
$node->body[$node->language][0]['value'] = $body_text;
$node->body[$node->language][0]['summary'] = text_summary($body_text);
$node->body[$node->language][0]['format'] = 'filtered_html';
$path = 'content/programmatically_created_node_' . date('YmdHis');
$node->path = array('alias' => $path);
node_save($node);
?>
So - this an example from web that allows to add a node programatically.
This one works fine for me - adds a new node when executed.
The problem is that I cannot see code completion hints when I start to type
for example: "$node->" (No completions available.)
Should that work? What could I do wrong with my setup that I don't get it working ?
thanks for help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目前还不可能完成这样的工作。
顺便说一句,您可以使用这个 Drupal 模块来实现更好的 Ecliipse / Drupal 集成:
http://drupal.org/project/eclipse
Currently there is no possibility to get such completition.
BTW, You could use this Drupal module for better Ecliipse / Drupal integration :
http://drupal.org/project/eclipse