これは、新しい人を静的リストに追加する Dialog クラスです
public class DialogInput extends Dialog{
public static List<Person> person = new LinkedList<Person>();
Text txtName;
@Override
protected Control createPartControl(Composite parent){
...
txtName = new Text(parent, SWT.NONE);
}
@Override
protected void okPressed(){
Person p = new Person();
p.setName(txtName.getText());
person.add(p);
}
}
// 別のファイル内の別のクラス。
public class MyView extends ViewPart{
public void createPartControl(Composite parent){
// HOW TO GET LIST ?
}
}