Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 155335 Details for
Bug 69922
[Help Wanted] Introduce a "run last make target" key binding
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Bind Build Target dialog to a key
BuildLastTarget_69922_patch2.txt (text/plain), 3.67 KB, created by
Axel Mueller
on 2010-01-05 10:18:44 EST
(
hide
)
Description:
Bind Build Target dialog to a key
Filename:
MIME Type:
Creator:
Axel Mueller
Created:
2010-01-05 10:18:44 EST
Size:
3.67 KB
patch
obsolete
>Index: plugin.xml >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.make.ui/plugin.xml,v >retrieving revision 1.80 >diff -u -r1.80 plugin.xml >--- plugin.xml 11 Sep 2009 02:09:37 -0000 1.80 >+++ plugin.xml 5 Jan 2010 15:06:03 -0000 >@@ -134,6 +134,11 @@ > contextId="org.eclipse.cdt.make.ui.makefileEditorScope" > commandId="org.eclipse.cdt.make.ui.edit.text.makefile.uncomment" > schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> >+ <key >+ sequence="F9" >+ contextId="org.eclipse.ui.contexts.window" >+ commandId="org.eclipse.cdt.make.ui.targetBuildCommand" >+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/> > </extension> > <extension > point="org.eclipse.ui.commands"> >@@ -340,6 +345,9 @@ > name="org.eclipse.core.resources.IContainer"> > </objectClass> > <objectClass >+ name="org.eclipse.core.resources.IFile"> >+ </objectClass> >+ <objectClass > name="org.eclipse.cdt.core.model.ICContainer"> > </objectClass> > <objectClass >Index: src/org/eclipse/cdt/make/ui/actions/AbstractTargetAction.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt/all/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/AbstractTargetAction.java,v >retrieving revision 1.7 >diff -u -r1.7 AbstractTargetAction.java >--- src/org/eclipse/cdt/make/ui/actions/AbstractTargetAction.java 23 Jun 2006 17:52:06 -0000 1.7 >+++ src/org/eclipse/cdt/make/ui/actions/AbstractTargetAction.java 5 Jan 2010 15:06:03 -0000 >@@ -16,16 +16,22 @@ > import org.eclipse.cdt.make.core.MakeCorePlugin; > import org.eclipse.cdt.make.internal.ui.MakeUIPlugin; > import org.eclipse.core.resources.IContainer; >+import org.eclipse.core.resources.IFile; > import org.eclipse.core.resources.IResource; > import org.eclipse.jface.action.IAction; >+import org.eclipse.jface.text.ITextSelection; > import org.eclipse.jface.viewers.ISelection; > import org.eclipse.jface.viewers.IStructuredSelection; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.ui.IObjectActionDelegate; >+import org.eclipse.ui.IWorkbenchPage; > import org.eclipse.ui.IWorkbenchPart; > import org.eclipse.ui.IWorkbenchWindow; > import org.eclipse.ui.IWorkbenchWindowActionDelegate; > import org.eclipse.ui.actions.ActionDelegate; >+import org.eclipse.ui.editors.text.TextEditor; >+import org.eclipse.ui.part.EditorPart; >+import org.eclipse.ui.part.Page; > > public abstract class AbstractTargetAction > extends ActionDelegate >@@ -55,6 +61,7 @@ > fWindow = window; > } > >+ @Override > public void selectionChanged(IAction action, ISelection selection) { > boolean enabled = false; > if (selection instanceof IStructuredSelection) { >@@ -78,10 +85,19 @@ > } else { > fContainer = null; > } >- if (fContainer != null && MakeCorePlugin.getDefault().getTargetManager().hasTargetBuilder(fContainer.getProject())) { >- enabled = true; >+ } else if (selection instanceof ITextSelection) >+ { // key binding pressed inside active text editor >+ IWorkbenchPart part = fWindow.getActivePage().getActivePart(); >+ if ( part instanceof TextEditor ) { >+ IFile file = org.eclipse.ui.ide.ResourceUtil.getFile(((EditorPart) part).getEditorInput()); >+ fContainer = file.getParent(); >+ } else { >+ fContainer = null; > } > } >+ if (fContainer != null && MakeCorePlugin.getDefault().getTargetManager().hasTargetBuilder(fContainer.getProject())) { >+ enabled = true; >+ } > action.setEnabled(enabled); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 69922
:
152531
|
155335
|
155641
|
157353
|
157680
|
157846