Modify violation for Prevent : iCheck null return.
Change-Id: I84eaa9809c20f7541523bbbefd580f072a088eb4
Signed-off-by: YongHwan <yonghwan82.jeon@samsung.com>
*/
public static void openEditor(IFile file) {
IWorkbenchPage workbenchPage = getActivePage();
- logger.info(workbenchPage.getClass().toString());
+ if (workbenchPage == null) {
+ logger.info("Workbench is null");
+ return;
+ } else {
+ logger.info(workbenchPage.getClass().toString());
+ }
+
try {
IEditorPart editorPart = IDE.openEditor(workbenchPage, file, true);
if (editorPart == null) { // if an external editor was opened