小平的回忆
BlogJava
首页
新随笔
新文章
管理
posts - 31, comments - 12, trackbacks - 0
2007年4月9日
eclipse插件StatusLine的使用
1、定义静态的StatusLine文本
WorkbenchWindowAdvisor 类中的preWindowOpen()方法加入
configurer.setShowStatusLine(true);//显示状态栏
ApplicationActionBarAdvisor类中增加
protected void fillStatusLine(IStatusLineManager statusLine) {
super.fillStatusLine(statusLine);
StatusLineContributionItem statusItem = new StatusLineContributionItem("DAStatus",50);
statusItem.setText("状态栏:测试");
statusLine.add(statusItem);
}
将在状态栏中显示:“状态栏:测试”
2、定义动态的StatusLine文本
WorkbenchWindowAdvisor 类中的preWindowOpen()方法加入
configurer.setShowStatusLine(true);
在要调用状态栏的class里加入下面方法
private void showStatusMessage(String msg) {
WorkbenchWindow workbenchWindow = (WorkbenchWindow)PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IStatusLineManager lineManager = workbenchWindow.getStatusLineManager();
StatusLineContributionItem statusItem = new StatusLineContributionItem("DAStatus",50);
statusItem.setText(msg);
lineManager.add(statusItem);
}
使用listener来调用showStatusMessage(String msg)即可。
posted @
2007-04-09 15:53
小平 阅读(209) |
评论 (1)
|
编辑
收藏
程序中获取spring配置文件中的hibernate数据库相关配置
<!--
前置数据源MCP Դ
-->
<
bean
id
="dataSourceMcp"
class
="org.apache.commons.dbcp.BasicDataSource"
destroy-method
="close"
>
<
property
name
="driverClassName"
>
<
value
>
com.informix.jdbc.IfxDriver
</
value
>
</
property
>
<
property
name
="url"
>
<
value
>
jdbc:informix-sqli://192.168.102.31:8888/csptestdb:informixserver=whcspdev;db_locale=zh_CN.gb
</
value
>
</
property
>
<
property
name
="username"
>
<
value
>
csptest
</
value
>
</
property
>
<
property
name
="password"
>
<
value
>
csptest
</
value
>
</
property
>
</
bean
>
程序
ClassPathResource resource
=
new
ClassPathResource(
"
resource/appcontextserver.xml
"
);
factory
=
new
XmlBeanFactory(resource);
BasicDataSource o
=
(BasicDataSource) factory.getBean(
"
dataSourceMcp
"
)
o就是存放数据库信息的实例
posted @
2007-04-09 15:41
小平 阅读(148) |
评论 (0)
|
编辑
收藏
<
2007年4月
>
日
一
二
三
四
五
六
25
26
27
28
29
30
31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
常用链接
我的随笔
我的评论
我的参与
最新评论
留言簿
(1)
给我留言
查看公开留言
查看私人留言
随笔分类
database(3)
eclipse plugIn(2)
hibernate(4)
iBATIS(1)
java(6)
spring(3)
web(1)
webwork
随笔(6)
随笔档案
2008年6月 (1)
2008年4月 (3)
2008年2月 (1)
2008年1月 (1)
2007年12月 (1)
2007年10月 (1)
2007年7月 (2)
2007年6月 (2)
2007年5月 (1)
2007年4月 (6)
2007年2月 (1)
2007年1月 (4)
2006年11月 (1)
2006年10月 (1)
2006年9月 (5)
framework
eclipse 帮助
ibm开发文档
spring中文论坛
webwork中文计划
中国eclipse社区
j2me
j2medev
j2me开发专题
nokia
wap之家
java
csdn
hibernate SessionFactory配置
java开源大全
j道
sun的java 社区
linux
linux伊甸园
web
javascript参考
w3schools
其他
IBM
MSDN
oracle
UML
w3china
友情链接
我的旅游笔记
我的旅游笔记
素材
最新评论
1. re: Spring+ibatis批量存储心得 2
请问一下,对多张表同时进行批量插入也可以用这种方法吗?
执行插入多少条时去调用 executor.executeBatch();效率快。
--菜虫
2. re: Apache服务器的WSASocket failed to open the inherited socket错误[未登录]
解决了 谢谢啊
--星
3. re: Spring+ibatis批量存储心得 2[未登录]
学习
--peter
4. re: 为org.eclipse.jface.text.TextViewer添加undo、redo 并添加Ctrl+z,与Ctrl+y功能
不错,学习了
--张凯
5. re: ibatis批量代码
不知道上面的仁兄是不是使用了spring,如果使用了spring的话,恐怕你这么调用事务有问题啊!
--小平
阅读排行榜
1. oracle 的ORA-01461错误(1332)
2. Spring+ibatis批量存储心得 2(1218)
3. ibatis +spring批量操作心得(1089)
4. Spring+ibatis批量处理心得3(848)
5. C3P0连接池详细配置 (转)(642)
评论排行榜
1. Spring+ibatis批量存储心得 2(3)
2. ibatis批量代码(3)
3. Spring+ibatis批量处理心得3(2)
4. 为org.eclipse.jface.text.TextViewer添加undo、redo 并添加Ctrl+z,与Ctrl+y功能(1)
5. C3P0连接池详细配置 (转)(1)