Source:
<code>public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) { if (adapterType.equals(ICSourceNotFoundDescription.class) && adaptableObject instanceof IFrameDMContext) { final IFrameDMContext frameDMC = (IFrameDMContext) adaptableObject; return (T) new ICSourceNotFoundDescription() { @Override public String getDescription() { Query<IStack.IFrameDMData> query = new Query<IStack.IFrameDMData>() { @Override protected void execute(DataRequestMonitor<IStack.IFrameDMData> rm) { createQuery(rm); } }; DsfSession session = DsfSession.getSession(frameDMC.getSessionId()); if (session != null && session.getExecutor() != null) { session.getExecutor().execute(query); try { IFrameDMData dmData = query.get(); return getFrameDescription(dmData)[0]; } catch (Exception e) { return frameDMC.toString(); } } return frameDMC.toString(); } @Override public boolean isAdress() { Query<IStack.IFrameDMData> query = new Query<IStack.IFrameDMData>() { @Override protected void execute(DataRequestMonitor<IStack.IFrameDMData> rm) { createQuery(rm); } }; DsfSession session = DsfSession.getSession(frameDMC.getSessionId()); if (session != null && session.getExecutor() != null) { session.getExecutor().execute(query); IFrameDMData dmData; try { dmData = query.get(); if (getFrameDescription(dmData)[1].equals("true")) { return true; } } catch (InterruptedException | ExecutionException e) { e.printStackTrace(); } } return false; } <START> private void createQuery(DataRequestMonitor<IFrameDMData> <END> rm) { DsfServicesTracker tracker = new DsfServicesTracker(DsfUIPlugin.getBundleContext(), frameDMC.getSessionId()); IStack stack = tracker.getService(IStack.class); if (stack != null) { stack.getFrameData(frameDMC, rm); } else { rm.setData(null); rm.done(); } tracker.dispose(); } }; } return null; }</code><technical_language>this is good progress sharing code, more of shared isAddress getDescription</technical_language>

Target:
public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) { if (adapterType.equals(ICSourceNotFoundDescription.class) && adaptableObject instanceof IFrameDMContext) { final IFrameDMContext frameDMC = (IFrameDMContext) adaptableObject; return (T) new ICSourceNotFoundDescription() { @Override public String getDescription() { ICSourceNotFoundDescription frameDescription = createQuery(); if(frameDescription != null) return frameDescription.getDescription(); return frameDMC.toString(); } @Override public boolean isAddress() { ICSourceNotFoundDescription frameDescription = createQuery(); if(frameDescription != null) return frameDescription.isAddress(); return false; } private ICSourceNotFoundDescription createQuery() { Query<IStack.IFrameDMData> query = new Query<IStack.IFrameDMData>() { @Override protected void execute(DataRequestMonitor<IStack.IFrameDMData> rm) { DsfServicesTracker tracker = new DsfServicesTracker(DsfUIPlugin.getBundleContext(), frameDMC.getSessionId()); IStack stack = tracker.getService(IStack.class); if (stack != null) { stack.getFrameData(frameDMC, rm); } else { rm.setData(null); rm.done(); } tracker.dispose(); } }; DsfSession session = DsfSession.getSession(frameDMC.getSessionId()); if (session != null && session.getExecutor() != null) { session.getExecutor().execute(query); try { IFrameDMData dmData = query.get(); return getFrameDescription(dmData); } catch (Exception e) { return null; } } return null; } }; } return null; }