Home » Eclipse Projects » Eclipse Platform » Checking Smart Insert Mode with menuContribution
| |
Re: Checking Smart Insert Mode with menuContribution [message #331393 is a reply to message #331382] |
Thu, 04 September 2008 15:41 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Nick Sandonato![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=nsand.dev%40gmail.com) Messages: 126 Registered: July 2009 |
Senior Member |
|
|
Thanks for the reply.
Are you saying that this is not possible without using an
ActionContributor? Originally, we had the code in contributeToMenu that
would add the fToggleInsertModeAction to the edit menu, like the JDT.
But in the process of moving our menus into the plugin.xml using
menuContributions, we removed the code from the ActionContributor. This
is when we noticed that Smart Insert Mode was added to the menu and
enabled, just not checked off.
Thanks,
Nick
Daniel Megert wrote:
> Nick Sandonato wrote:
>> Hi,
>>
>> I am trying to figure out how to make my editor have the Smart Insert
>> Mode menu item initially checked when the editor is opened.
>>
>> Currently, I have an editor extending AbstractTextEditor that
>> configures the insert mode to allow SMART_INSERT. To add the menu
>> item, I use a menuContribution whose
>> commandId="org.eclipse.ui.edit.text.toggleInsertMode" and
>> style="toggle". When I launch my editor, Smart Insert Mode is enabled,
>> but it is not checked off. If I click on the menu item, Smart Insert
>> Mode is disabled, but now the item is checked.
>>
>> Is there any way to set up the menu item so that Smart Insert Mode is
>> checked initially?
> Take a look at
> org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor ActionContributor.fToggleInsertModeAction
> and how it's done there.
>
> Dani
>>
>> Thank you,
>> Nick
|
|
|
Re: Checking Smart Insert Mode with menuContribution [message #331394 is a reply to message #331393] |
Thu, 04 September 2008 16:11 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Dani Megert![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=Daniel_Megert%40ch.ibm.com) Messages: 3802 Registered: July 2009 |
Senior Member |
|
|
Nick Sandonato wrote:
> Thanks for the reply.
>
> Are you saying that this is not possible without using an
> ActionContributor?
I neither said nor tried that ;-)
Dani
> Originally, we had the code in contributeToMenu that would add the
> fToggleInsertModeAction to the edit menu, like the JDT. But in the
> process of moving our menus into the plugin.xml using
> menuContributions, we removed the code from the ActionContributor.
> This is when we noticed that Smart Insert Mode was added to the menu
> and enabled, just not checked off.
>
> Thanks,
> Nick
>
> Daniel Megert wrote:
>> Nick Sandonato wrote:
>>> Hi,
>>>
>>> I am trying to figure out how to make my editor have the Smart
>>> Insert Mode menu item initially checked when the editor is opened.
>>>
>>> Currently, I have an editor extending AbstractTextEditor that
>>> configures the insert mode to allow SMART_INSERT. To add the menu
>>> item, I use a menuContribution whose
>>> commandId="org.eclipse.ui.edit.text.toggleInsertMode" and
>>> style="toggle". When I launch my editor, Smart Insert Mode is
>>> enabled, but it is not checked off. If I click on the menu item,
>>> Smart Insert Mode is disabled, but now the item is checked.
>>>
>>> Is there any way to set up the menu item so that Smart Insert Mode
>>> is checked initially?
>> Take a look at
>> org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor ActionContributor.fToggleInsertModeAction
>> and how it's done there.
>>
>> Dani
>>>
>>> Thank you,
>>> Nick
|
|
|
Goto Forum:
Current Time: Sat Aug 24 03:59:55 GMT 2024
Powered by FUDForum. Page generated in 0.03521 seconds
|