How to determine the size of a view in Eclipse

When we double-click on any view in eclipse or resize it, how to define a script in the code. Currently my code snippet extends ViewPart, now how can I determine the resizing in the view.

+3
source share
1 answer

Try the following:

@Override
public void createPartControl(final Composite parent) {

    parent.addControlListener(new ControlAdapter() {
        @Override
        public void controlResized(final ControlEvent e) {
            System.out.println("RESIZE");
        }
    });
}
+7
source

Source: https://habr.com/ru/post/1788958/


All Articles