【发布时间】:2011-09-13 11:57:02
【问题描述】:
我对 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->”(没有可用的补全。)
这应该有效吗?如果我的设置无法正常工作,我该怎么做?
感谢您的帮助!
【问题讨论】:
标签: eclipse drupal eclipse-pdt