小编Kev*_*ing的帖子

PHP preg_match介于字符串之间

我正在尝试获取字符串hello world.

这是我到目前为止所得到的:

$file = "1232#hello world#";

preg_match("#1232\#(.*)\##", $file, $match)
Run Code Online (Sandbox Code Playgroud)

php regex preg-match

15
推荐指数
2
解决办法
4万
查看次数

如何使用行编号创建JFace TreeViewer

我尝试为树中的每一行添加一个数字.树和它的编号工作但不是很好,那么有没有其他最好的方法来实现它?因为如果树节点扩展了,我必须获得所有扩展树节点并增加其编号.我还使用TreeViewer来创建树.

在此输入图像描述

// base container
Composite composite = new Composite( (Composite) parent, SWT.NONE );
composite.setLayout( new GridLayout( 2, false ) );
composite.setLayoutData( new GridData( SWT.FILL, SWT.FILL, true, true ) );

// The container for numbering in the tree
Composite numComposite = new Composite( composite, SWT.NONE );
numComposite.setLayout( new FillLayout( SWT.VERTICAL ) );
numComposite.setLayoutData( new GridData( GridData.VERTICAL_ALIGN_BEGINNING ) );

// the tree container
MyTree tree = new MyTree( composite );
tree.setContentProvider( new ContentProvider() );

Label test = new Label( numComposite, SWT.NONE ); …
Run Code Online (Sandbox Code Playgroud)

java swt eclipse-plugin jface

2
推荐指数
1
解决办法
194
查看次数

标签 统计

eclipse-plugin ×1

java ×1

jface ×1

php ×1

preg-match ×1

regex ×1

swt ×1