1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-03-28 14:56:28 +01:00

Bug 458771 - Cannot refresh an editor in standalone debugger

-Add Refresh command to File menu.
-Enable 'Refresh on Access' by default, like Eclipse for C/C++ package
-Reorder the File menu a bit so that Exit is last

Change-Id: I3636cd20da1a2523ca1574674cf6ebc59a124860
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
This commit is contained in:
Marc-Andre Laperle 2015-10-13 15:13:46 -04:00
parent 10ae5c9dea
commit 803bf0db80
3 changed files with 20 additions and 1 deletions

View file

@ -6,4 +6,5 @@ bin.includes = plugin.xml,\
plugin.properties,\
scripts/,\
about.html,\
icons/
icons/,\
plugin_customization.ini

View file

@ -0,0 +1,4 @@
org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = false
# lightweight auto-refresh on access by default
org.eclipse.core.resources/refresh.lightweight.enabled=true

View file

@ -60,6 +60,7 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
private IWorkbenchAction undoAction;
private IWorkbenchAction redoAction;
private IWorkbenchAction refreshAction;
public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
super(configurer);
@ -109,6 +110,9 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
redoAction = ActionFactory.REDO.create(window);
register(redoAction);
refreshAction = ActionFactory.REFRESH.create(window);
register(refreshAction);
aboutAction = ActionFactory.ABOUT.create(window);
aboutAction
.setImageDescriptor(IDEInternalWorkbenchImages
@ -149,6 +153,15 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
menu.add(new Separator());
// This is to make sure "Open File" gets added before Exit
menu.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));
ActionContributionItem refreshExecutableItem = new ActionContributionItem(refreshAction);
menu.add(refreshExecutableItem);
// This is to make sure "Convert line delimiters" gets added before Exit
menu.add(new GroupMarker(IWorkbenchActionConstants.SAVE_EXT));
// If we're on OS X we shouldn't show this command in the File menu. It
// should be invisible to the user. However, we should not remove it -
// the carbon UI code will do a search through our menu structure
@ -156,6 +169,7 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
// application menu.
ActionContributionItem quitItem = new ActionContributionItem(quitAction);
quitItem.setVisible(!Util.isMac());
menu.add(new Separator());
menu.add(quitItem);
menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));
return menu;