@Override public IStatus runInUIThread(IProgressMonitor monitor) { fUpdater.run(); return Status.OK_STATUS; }
@Override public boolean shouldRun() { return fUpdater.shouldRun(); } }
/** * Sub-classes may override this to determine whether the breakpoint is supported by the selection. * * @param ss the selection of the debug elements. * @param breakpoint the breakpoint. * @return true if supported. */ protected boolean supportsBreakpoint(IStructuredSelection ss, IBreakpoint breakpoint) { return supportsBreakpoint(getDebugTargets(ss), breakpoint); }
/** * Returns a new <code>Job</code> to update the specified labels. This method * is used to determine if a UI job is needed or not, in the event the request for an update * job has come from a non-UI thread. * @param updates an array of pending label updates * @return a new <code>Job</code> to update labels with. */ private Job newLabelJob(ILabelUpdate[] updates) { if (requiresUIJob(updates)) { return new UILabelJob(); } else { return new LabelJob(); } }
@Override protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException { return getElements(getAllChildren(parent, context, monitor), index, length); }
@Override protected boolean removeEldestEntry(java.util.Map.Entry<K, V> arg0) { InputData data = (InputData)arg0.getValue(); if (size() > getMaxInputsCache() && data.fProxies.isEmpty()) { data.dispose(); return true; } return false; } }
@Override protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException { return getAllChildren(element, context, monitor).length; }
@Override protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException { return getElements(getAllChildren(parent, context), index, length); }
@Override protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException { return getElements(getAllChildren(parent, context, monitor), index, length); }
@Override protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException { return getElements(getAllChildren(parent, context, monitor), index, length); }
@Override public synchronized void update(ILabelUpdate[] updates) { if (fLabelJob == null) { fLabelJob = newLabelJob(updates); } if (!((ILabelJob)fLabelJob).queue(updates)) { fLabelJob = newLabelJob(updates); ((ILabelJob)fLabelJob).queue(updates); } // TODO: rule fLabelJob.schedule(); }
@Override protected String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException { Object element = elementPath.getLastSegment(); if (element instanceof IMemoryBlock) return getLabel((IMemoryBlock)element); return super.getLabel(elementPath, presentationContext, columnId); }
@Override protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException { return getAllChildren(element, context, monitor).length; }
@Override protected ImageDescriptor getImageDescriptor(TreePath elementPath, IPresentationContext presentationContext, String columnId, int columnIndex) throws CoreException { if (columnIndex == 0) return super.getImageDescriptor(elementPath, presentationContext, columnId, columnIndex); else return null; }
public LabelJob() { super("Label Job"); //$NON-NLS-1$ setSystem(true); }
/** * Returns the label for the path in the given column with the current presentation. * @param elementPath * @param presentationContext * @param columnId * @param columnIndex * @return label * * @since 3.6 */ protected String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId, int columnIndex) throws CoreException { return getLabel(elementPath, presentationContext, columnId); }
@Override public void propertyChange(PropertyChangeEvent event) { // For any property changes in breakpoint organizers, refresh the containers. updateContainers(); } };
@Override protected IStatus run(IProgressMonitor monitor) { fUpdater.run(); return Status.OK_STATUS; }
@Override public boolean shouldRun() { return fUpdater.shouldRun(); }