public void run() { CreateBPMDefineWizard w = new CreateBPMDefineWizard(model.getAllBPMNDefineCategory(), viewer.getSite().getShell()); int open = w.open(); if (WizardDialog.OK == open) { LoadJob loadJob = new LoadJob("新建BPM Define", w.getModel()); loadJob.schedule(); } }
@Override public void init() { TreeItem[] selection = viewer.getTreeViewer().getTree().getSelection(); if (selection.length > 0) { Object data = selection[0].getData(); if (data instanceof ServiceModel) { this.model = (ServiceModel) data; } } // boolean b2 = model instanceof BPMNDefineCategory; boolean b1 = model instanceof ServiceModel; if (model == null) return; this.setVisible(model.isLoaded() ? model instanceof ServiceModel : false); }