开发者

display a text in a view and edit it

开发者 https://www.devze.com 2023-01-12 05:53 出处:网络
I\'ve added a view to my plugin and I want to first, read and display a file content and second, have the possibility to modify the content . In other w开发者_开发知识库ords I want to have an editable

I've added a view to my plugin and I want to first, read and display a file content and second, have the possibility to modify the content . In other w开发者_开发知识库ords I want to have an editable zone in my view , a sort of an editor . I didn't know what steps to follow to implement my class . here is the class :

public class LabelView extends ViewPart {
 private Label label;


 public LabelView() {
  super();
 }

 public void setFocus() {
  label.setFocus();
 }

 public void createPartControl(Composite parent) {
  label = new Label(parent, 0);
 }
}

thank you so much for your help


Create a Text object in the parent composite would be the simplest way.

0

精彩评论

暂无评论...
验证码 换一张
取 消