Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 4th, 2011  |  syntax: Java  |  size: 0.46 KB  |  views: 43  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.                                 IEditorReference[] editorrefs =
  2.                                         PlatformUI.getWorkbench().getActiveWorkbenchWindow().
  3.                                         getActivePage().getEditorReferences();
  4.                                
  5.                                 for(IEditorReference ref : editorrefs)
  6.                                 {
  7.                                         try
  8.                                         {
  9.                                             IEditorInput input = ref.getEditorInput();
  10.                                             IFile file = (IFile) input.getAdapter(IFile.class);
  11.                                             System.err.println(file.getLocation());
  12.                                         }
  13.                                         catch (Exception ex) {
  14.                                             ex.printStackTrace();
  15.                                         }
  16.                                 }
clone this paste RAW Paste Data