private void unhookCheckListener() { if (model.getType() != ItemType.CHECK) { return; } final Object obj = model.getTransientData().remove(DISPOSABLE_CHECK); if (obj == null) { return; } ((Runnable) obj).run(); }
private void unhookCheckListener() { if (getModel().getType() != ItemType.CHECK) { return; } final Object obj = getModel().getTransientData().remove(DISPOSABLE); if (obj == null) { return; } ((Runnable) obj).run(); }
private void hookCheckListener() { if (model.getType() != ItemType.CHECK) { return; } Object obj = model.getTransientData().get(ItemType.CHECK.toString()); if (obj instanceof IContextFunction) { IEclipseContext context = getContext(model); IEclipseContext staticContext = getStaticContext(null); staticContext.set(MPart.class, context.get(MPart.class)); staticContext.set(WW_SUPPORT, context.get(WW_SUPPORT)); IContextFunction func = (IContextFunction) obj; obj = func.compute(staticContext, null); if (obj != null) { model.getTransientData().put(DISPOSABLE_CHECK, obj); } } }
private void hookCheckListener() { if (getModel().getType() != ItemType.CHECK) { return; } Object obj = getModel().getTransientData().get(ItemType.CHECK.toString()); if (obj instanceof IContextFunction) { IEclipseContext context = getContext(getModel()); IEclipseContext staticContext = getStaticContext(null); staticContext.set(MPart.class, context.get(MPart.class)); staticContext.set(WW_SUPPORT, context.get(WW_SUPPORT)); IContextFunction func = (IContextFunction) obj; obj = func.compute(staticContext, null); if (obj != null) { getModel().getTransientData().put(DISPOSABLE, obj); } } }