public HistoryListAction(ViewHistory<E> history) { super(null, IAction.AS_RADIO_BUTTON); fHistory= history; fHistory.configureHistoryListAction(this); }
public Image getImage(Object element) { ImageDescriptor imageDescriptor= fHistory.getImageDescriptor(element); return getCachedImage(imageDescriptor); }
@Override public void run() { HistoryListDialog dialog= new HistoryListDialog(); if (dialog.open() == Window.OK) { fHistory.setHistoryEntries(dialog.getRemaining(), dialog.getResult()); fHistory.setMaxEntries(dialog.getMaxEntries()); } }
public HistoryDropDownAction(ViewHistory history) { fHistory= history; fMenu= null; setMenuCreator(new HistoryMenuCreator()); fHistory.configureHistoryDropDownAction(this); }
private void createHistoryList() { IListAdapter adapter= new IListAdapter() { public void customButtonPressed(ListDialogField field, int index) { doCustomButtonPressed(index); } public void selectionChanged(ListDialogField field) { doSelectionChanged(); } public void doubleClicked(ListDialogField field) { doDoubleClicked(); } }; String[] buttonLabels= new String[] { JavaUIMessages.HistoryListAction_remove, JavaUIMessages.HistoryListAction_remove_all }; LabelProvider labelProvider= new TestRunLabelProvider(); fHistoryList= new ListDialogField(adapter, buttonLabels, labelProvider); fHistoryList.setLabelText(fHistory.getHistoryListDialogMessage()); List historyEntries= fHistory.getHistoryEntries(); fHistoryList.setElements(historyEntries); Object currentEntry= fHistory.getCurrentEntry(); ISelection sel; if (currentEntry != null) { sel= new StructuredSelection(currentEntry); } else { sel= new StructuredSelection(); } fHistoryList.selectElements(sel); }
public HistoryAction(Object element, int accelerator) { super("", AS_RADIO_BUTTON); //$NON-NLS-1$ Assert.isNotNull(element); fElement= element; String label= fHistory.getText(element); if (accelerator < 10) { //add the numerical accelerator label= new StringBuffer().append('&').append(accelerator).append(' ').append(label).toString(); } setText(label); setImageDescriptor(fHistory.getImageDescriptor(element)); }
private HistoryListDialog() { super(fHistory.getShell()); setTitle(fHistory.getHistoryListDialogTitle()); createHistoryList(); createMaxEntriesField(); setHelpAvailable(false); }
public void run() { HistoryListDialog dialog= new HistoryListDialog(); if (dialog.open() == Window.OK) { fHistory.setHistoryEntries(dialog.getRemaining(), dialog.getResult()); fHistory.setMaxEntries(dialog.getMaxEntries()); } }
public HistoryDropDownAction(ViewHistory<E> history) { fHistory= history; fMenu= null; setMenuCreator(new HistoryMenuCreator()); fHistory.configureHistoryDropDownAction(this); }
@Override public void run() { HistoryListDialog dialog= new HistoryListDialog(); if (dialog.open() == Window.OK) { fHistory.setHistoryEntries(dialog.getRemaining(), dialog.getResult()); fHistory.setMaxEntries(dialog.getMaxEntries()); } }
public HistoryListAction(ViewHistory<E> history) { super(null, IAction.AS_RADIO_BUTTON); fHistory= history; fHistory.configureHistoryListAction(this); }
public HistoryDropDownAction(ViewHistory<E> history) { fHistory= history; fMenu= null; setMenuCreator(new HistoryMenuCreator()); fHistory.configureHistoryDropDownAction(this); }
public HistoryListAction(ViewHistory history) { super(null, IAction.AS_RADIO_BUTTON); fHistory= history; fHistory.configureHistoryListAction(this); }