<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="it">
	<id>http://wiki.netsitech.com/index.php?action=history&amp;feed=atom&amp;title=Programmazione%3AJava%2FEclipse_RCP%2FOverride_tasti_funzione_nell%27applicazione</id>
	<title>Programmazione:Java/Eclipse RCP/Override tasti funzione nell'applicazione - Cronologia</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.netsitech.com/index.php?action=history&amp;feed=atom&amp;title=Programmazione%3AJava%2FEclipse_RCP%2FOverride_tasti_funzione_nell%27applicazione"/>
	<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php?title=Programmazione:Java/Eclipse_RCP/Override_tasti_funzione_nell%27applicazione&amp;action=history"/>
	<updated>2026-05-04T13:41:08Z</updated>
	<subtitle>Cronologia della pagina su questo sito</subtitle>
	<generator>MediaWiki 1.34.4</generator>
	<entry>
		<id>http://wiki.netsitech.com/index.php?title=Programmazione:Java/Eclipse_RCP/Override_tasti_funzione_nell%27applicazione&amp;diff=2837&amp;oldid=prev</id>
		<title>Rimondini il 13:16, 27 mag 2008</title>
		<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php?title=Programmazione:Java/Eclipse_RCP/Override_tasti_funzione_nell%27applicazione&amp;diff=2837&amp;oldid=prev"/>
		<updated>2008-05-27T13:16:00Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;it&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versione meno recente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Versione delle 13:16, 27 mag 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Riga 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Riga 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Programmazione:Java/Eclipse_RCP|&amp;lt;&amp;lt; Back to Eclipse RCP]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Per fare il binding dei tasti nell'applicazione bisogna utilizzare i seguenti ExtensionPoint, censendo il command, il keybinding e l'handler da richiamare&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Per fare il binding dei tasti nell'applicazione bisogna utilizzare i seguenti ExtensionPoint, censendo il command, il keybinding e l'handler da richiamare&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;code xml&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;code xml&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rimondini</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.netsitech.com/index.php?title=Programmazione:Java/Eclipse_RCP/Override_tasti_funzione_nell%27applicazione&amp;diff=2836&amp;oldid=prev</id>
		<title>Rimondini il 12:59, 27 mag 2008</title>
		<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php?title=Programmazione:Java/Eclipse_RCP/Override_tasti_funzione_nell%27applicazione&amp;diff=2836&amp;oldid=prev"/>
		<updated>2008-05-27T12:59:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;it&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versione meno recente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Versione delle 12:59, 27 mag 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l32&quot; &gt;Riga 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Riga 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;code xml&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;code xml&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;# &lt;/del&gt;esempio di limitazione dell'handler alla visibilità di una vista&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;!-- &lt;/ins&gt;esempio di limitazione dell'handler alla visibilità di una vista &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;--&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;extension&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;extension&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    point=&amp;quot;org.eclipse.ui.handlers&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    point=&amp;quot;org.eclipse.ui.handlers&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rimondini</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.netsitech.com/index.php?title=Programmazione:Java/Eclipse_RCP/Override_tasti_funzione_nell%27applicazione&amp;diff=2835&amp;oldid=prev</id>
		<title>Rimondini: Nuova pagina: Per fare il binding dei tasti nell'applicazione bisogna utilizzare i seguenti ExtensionPoint, censendo il command, il keybinding e l'handler da richiamare &lt;code xml&gt; &lt;plugin&gt;    &lt;exten...</title>
		<link rel="alternate" type="text/html" href="http://wiki.netsitech.com/index.php?title=Programmazione:Java/Eclipse_RCP/Override_tasti_funzione_nell%27applicazione&amp;diff=2835&amp;oldid=prev"/>
		<updated>2008-05-27T12:58:21Z</updated>

		<summary type="html">&lt;p&gt;Nuova pagina: Per fare il binding dei tasti nell&amp;#039;applicazione bisogna utilizzare i seguenti ExtensionPoint, censendo il command, il keybinding e l&amp;#039;handler da richiamare &amp;lt;code xml&amp;gt; &amp;lt;plugin&amp;gt;    &amp;lt;exten...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nuova pagina&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Per fare il binding dei tasti nell'applicazione bisogna utilizzare i seguenti ExtensionPoint, censendo il command, il keybinding e l'handler da richiamare&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
&amp;lt;plugin&amp;gt;&lt;br /&gt;
   &amp;lt;extension&lt;br /&gt;
         point=&amp;quot;org.eclipse.ui.bindings&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;key&lt;br /&gt;
            commandId=&amp;quot;com.netsitech.sample.action.command.exit&amp;quot;&lt;br /&gt;
            contextId=&amp;quot;org.eclipse.ui.contexts.window&amp;quot;&lt;br /&gt;
            schemeId=&amp;quot;org.eclipse.ui.defaultAcceleratorConfiguration&amp;quot;&lt;br /&gt;
            sequence=&amp;quot;ESC&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/key&amp;gt;&lt;br /&gt;
   &amp;lt;/extension&amp;gt;&lt;br /&gt;
   &amp;lt;extension&lt;br /&gt;
         point=&amp;quot;org.eclipse.ui.commands&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;command&lt;br /&gt;
            categoryId=&amp;quot;org.eclipse.ui.category.views&amp;quot;&lt;br /&gt;
            id=&amp;quot;com.netsitech.sample.action.command.exit&amp;quot;&lt;br /&gt;
            name=&amp;quot;Esci&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/command&amp;gt;&lt;br /&gt;
   &amp;lt;/extension&amp;gt;&lt;br /&gt;
   &amp;lt;extension&lt;br /&gt;
         point=&amp;quot;org.eclipse.ui.handlers&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;handler&lt;br /&gt;
            class=&amp;quot;com.netsitech.sample.action.binding.InternalKeyBindingHandler&amp;quot;&lt;br /&gt;
            commandId=&amp;quot;com.netsitech.sample.action.command.exit&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;/handler&amp;gt;&lt;br /&gt;
   &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/plugin&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Utilizzando il tag '''enabledWhen''' è possibile limitare la visibilità del binding&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code xml&amp;gt;&lt;br /&gt;
# esempio di limitazione dell'handler alla visibilità di una vista&lt;br /&gt;
&amp;lt;extension&lt;br /&gt;
   point=&amp;quot;org.eclipse.ui.handlers&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;handler&lt;br /&gt;
      class=&amp;quot;com.netsitech.sample.action.binding.InternalKeyBindingHandler&amp;quot;&lt;br /&gt;
      commandId=&amp;quot;com.netsitech.sample.action.command.exit&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;enabledWhen&amp;gt;&lt;br /&gt;
         &amp;lt;with&lt;br /&gt;
            variable=&amp;quot;activePartId&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;equals&lt;br /&gt;
               value=&amp;quot;ID_DELLA_VISTA&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;/equals&amp;gt;&lt;br /&gt;
         &amp;lt;/with&amp;gt;&lt;br /&gt;
      &amp;lt;/enabledWhen&amp;gt;&lt;br /&gt;
   &amp;lt;/handler&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Nell'handler poi bisogna gestire il '''command''' definito&lt;br /&gt;
&amp;lt;code java&amp;gt;&lt;br /&gt;
import org.eclipse.core.commands.AbstractHandler;&lt;br /&gt;
import org.eclipse.core.commands.ExecutionEvent;&lt;br /&gt;
import org.eclipse.core.commands.ExecutionException;&lt;br /&gt;
&lt;br /&gt;
public class InternalKeyBindingHandler extends AbstractHandler {&lt;br /&gt;
   protected static String INTERNAL_COMMAND_EXIT = &amp;quot;com.netsitech.sample.action.command.exit&amp;quot;; //$NON-NLS-1$&lt;br /&gt;
&lt;br /&gt;
   public Object execute(ExecutionEvent event) throws ExecutionException {&lt;br /&gt;
      if (INTERNAL_COMMAND_EXIT.equals(event.getCommand().getId())) {&lt;br /&gt;
         // Gestione evento associato all'ESC&lt;br /&gt;
      }&lt;br /&gt;
      return null;&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rimondini</name></author>
		
	</entry>
</feed>