新增代码着色器
你好Blog新增Java代码着色器
方法:
1. IE浏览器在编辑器第二行最后一个J字的图标,如果没有请刷新编辑页面。鼠标选中一段代码,按下J字按钮,代码前-后自动追加[code]...[/code],目前非IE浏览器请在代码前后手动追加[code]...[/code]
2. 提交时选中提交按钮前的代码着色
代码着色效果测试如下:
第一段代码
/* * Created on 2005-4-19 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package com.cache; import com.exception.CacheException; /** * @author Administrator * * TODO To change the template for this generated type * comment go to Window -Preferences - Java - Code Style */ public interface Cache { /** * Get an item from the cache * * @param key * @return the cached object or <tt>null</tt> * @throws CacheException */ public Object getCacheObj(Object key) throws CacheException; /** * Get an item from the cache * * @param key * @return the cached object or <tt>null</tt> * @throws CacheException */ public Object get(Object key) throws CacheException; }
public void reset() {
this.cachedCounter = 1;
this.key="String Test";
this.cacheTimestamp = System.currentTimeMillis();
this.cacheObj = null;
}


06年热贴
