Esempio n. 1
0
    /** @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int) */
    public String getColumnText(Object element, int columnIndex) {
      ResolveStatus flagged = (ResolveStatus) element;

      switch (columnIndex) {
        case 0:
          return flagged.getStatus();
        case 1:
          // TODO: this is wrong when hgroot not at project root
          return ((IFile) flagged.getAdapter(IFile.class)).getProjectRelativePath().toString();
      }

      throw new IllegalStateException();
    }
Esempio n. 2
0
 private static void openMergeEditor(ResolveStatus flagged) {
   IFile file = (IFile) flagged.getAdapter(IFile.class);
   CompareAction compareAction = new CompareAction(file);
   compareAction.setEnableMerge(true);
   compareAction.run(null);
 }
Esempio n. 3
0
 private static IFile getFile(ResolveStatus adaptable) {
   if (adaptable != null) {
     return (IFile) adaptable.getAdapter(IFile.class);
   }
   return null;
 }