org.eclipse.ui.model.AdaptableList Java Examples
The following examples show how to use
org.eclipse.ui.model.AdaptableList.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ResourceCloseManagement.java From birt with Eclipse Public License 1.0 | 6 votes |
private static boolean showSaveDirtyFileDialog( List<IEditorPart> dirtyEditors ) { AdaptableList input = new AdaptableList( dirtyEditors ); ListDialog dlg = new ListDialog( PlatformUI.getWorkbench( ) .getActiveWorkbenchWindow( ) .getShell( ) ); dlg.setContentProvider( new BaseWorkbenchContentProvider( ) ); dlg.setLabelProvider( new WorkbenchPartLabelProvider( ) ); dlg.setInput( input ); dlg.setMessage( Messages.getString( "renameChecker.saveResourcesMessage" ) ); //$NON-NLS-1$ dlg.setTitle( Messages.getString( "renameChecker.saveResourcesTitle" ) ); //$NON-NLS-1$ // Just return false to prevent the operation continuing return dlg.open( ) == IDialogConstants.OK_ID; }
Example #2
Source File: TraceFileSystemElement.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
@Override public AdaptableList getFiles() { if (!fIsPopulated) { populateElementChildren(); } return super.getFiles(); }
Example #3
Source File: TraceFileSystemElement.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
@Override public AdaptableList getFolders() { if (!fIsPopulated) { populateElementChildren(); } return super.getFolders(); }
Example #4
Source File: TraceFileSystemElement.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
/** * Get all the TraceFileSystemElements recursively. * * @param result * the list accumulating the result */ public void getAllChildren(List<TraceFileSystemElement> result) { AdaptableList files = getFiles(); for (Object file : files.getChildren()) { result.add((TraceFileSystemElement) file); } AdaptableList folders = getFolders(); for (Object folder : folders.getChildren()) { TraceFileSystemElement traceElementFolder = (TraceFileSystemElement) folder; traceElementFolder.getAllChildren(result); } }
Example #5
Source File: SaveAndLaunchPromptDialog.java From APICloud-Studio with GNU General Public License v3.0 | 4 votes |
public SaveAndLaunchPromptDialog(Shell parentShell, Set<IResource> input, IStructuredContentProvider contentProvider, ILabelProvider labelProvider, String message) { super(parentShell, new AdaptableList(input), contentProvider, labelProvider, message); this.dirtyResources = new ArrayList<IResource>(input); }