Wednesday, September 2, 2015

Eclipse RCP : How to check a view is currenlty visible


If we need to check whether a view currently available or visible we can use following code :

Boolean result = false;

IViewReference viewReferene =  PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findViewReference("my_view_id");


if (viewReferene != null) {
result = true;
}





No comments:

Post a Comment

5 Strategies for Getting More Work Done in Less Time

Summary.    You’ve got more to do than could possibly get done with your current work style. You’ve prioritized. You’ve planned. You’ve dele...