Java中的constants.jsp_object[int i]是怎么定义呀

来源:百度知道 编辑:UC知道 时间:2024/06/07 17:33:37
我在看一本eclipse的书 在JFace这一部分有一个定义方式
在Eclipse上出错,
望高手指点。谢谢!

package JFace_JSP;

import java.util.ArrayList;
import java.util.Collections;

import org.eclipse.jface.text.TextAttribute;
import org.eclipse.jface.text.rules.EndOfLineRule;
import org.eclipse.jface.text.rules.IRule;
import org.eclipse.jface.text.rules.RuleBasedScanner;
import org.eclipse.jface.text.rules.SingleLineRule;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jface.text.rules.WordRule;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;

import com.sun.org.apache.bcel.internal.Constants;

public class JSPCodeScanner extends RuleBasedScanner
{
private TextAttribute keywords;
private TextAttribute string;
private TextAttribute comment;
public JSPCodeScanner()
{
keywords=new TextAttribute(new
Color(Display

看你的程序,Constants.JSP_OBJECT应该是Constants类的一个静态数组,你只要把Constants类的代码找到添加上就行了。或者自己编写一个Constants类,里面定义一个名字为JSP_OBJECT的静态数组测试一下。