|
Lines 48-53
Link Here
|
| 48 |
import org.eclipse.ui.internal.actions.HelpSearchAction; |
48 |
import org.eclipse.ui.internal.actions.HelpSearchAction; |
| 49 |
import org.eclipse.ui.internal.actions.NewEditorAction; |
49 |
import org.eclipse.ui.internal.actions.NewEditorAction; |
| 50 |
import org.eclipse.ui.internal.actions.OpenPerspectiveDialogAction; |
50 |
import org.eclipse.ui.internal.actions.OpenPerspectiveDialogAction; |
|
|
51 |
import org.eclipse.ui.internal.commands.ICommandImageService; |
| 51 |
import org.eclipse.ui.services.IServiceLocator; |
52 |
import org.eclipse.ui.services.IServiceLocator; |
| 52 |
|
53 |
|
| 53 |
/** |
54 |
/** |
|
Lines 1119-1128
Link Here
|
| 1119 |
if (window == null) { |
1120 |
if (window == null) { |
| 1120 |
throw new IllegalArgumentException(); |
1121 |
throw new IllegalArgumentException(); |
| 1121 |
} |
1122 |
} |
| 1122 |
RetargetAction action = new RetargetAction(getId(),WorkbenchMessages.Workbench_refresh); |
1123 |
|
| 1123 |
action.setToolTipText(WorkbenchMessages.Workbench_refreshToolTip); |
1124 |
WorkbenchCommandAction action=new WorkbenchCommandAction("org.eclipse.ui.file.refresh", window); //$NON-NLS-1$ |
| 1124 |
window.getPartService().addPartListener(action); |
1125 |
action.setText(WorkbenchMessages.Workbench_refresh); |
| 1125 |
action.setActionDefinitionId("org.eclipse.ui.file.refresh"); //$NON-NLS-1$ |
1126 |
action.setToolTipText(WorkbenchMessages.Workbench_refreshToolTip); |
|
|
1127 |
action.setId(getId()); |
| 1128 |
|
| 1129 |
ICommandImageService service = (ICommandImageService) window.getService(ICommandImageService.class); |
| 1130 |
action.setImageDescriptor(service.getImageDescriptor("org.eclipse.ui.file.refresh", ICommandImageService.TYPE_DEFAULT)); //$NON-NLS-1$ |
| 1131 |
action.setDisabledImageDescriptor(service.getImageDescriptor("org.eclipes.ui.file.refresh", ICommandImageService.TYPE_DISABLED)); //$NON-NLS-1$ |
| 1132 |
action.setDisabledImageDescriptor(service.getImageDescriptor("org.eclipes.ui.file.refresh", ICommandImageService.TYPE_HOVER)); //$NON-NLS-1$ |
| 1133 |
|
| 1126 |
return action; |
1134 |
return action; |
| 1127 |
} |
1135 |
} |
| 1128 |
}; |
1136 |
}; |