Line editing commands are greyed out in menu [message #1860944] |
Mon, 11 September 2023 10:40 |
Eclipse User |
|
|
|
I am trying to use eclipse line editing commands in my application. Out of all these commands Join lines, Insert line above current line and Insert line below current lines commands are greyed out when the file in editing mode. I tried manually enabling them using visibleWhen and activeWhen tags based on some condition but they are not getting enabled. I even tried reading the command from CommandService and called setEnabled(true) with that also it is not enabling the command in Menu
<menuContribution
locationURI="popup:com.editorMenu?after=com.editors.common.menu">
<menu
id="com.editors.common.line.editing"
label="%line.editing.label">
<visibleWhen>
<with
variable="activeEditor">
<not>
<test
property ="com.commons.isEditorInNotInEditMode">
</test>
</not>
</with>
</visibleWhen>
<command
commandId="org.eclipse.ui.edit.text.delete.line"
label="%command.deleteLine.label">
</command>
<command
commandId="org.eclipse.ui.edit.text.deleteNextWord"
label="%command.deleteNextWord.name">
</command>
<command
commandId="org.eclipse.ui.edit.text.deletePreviousWord"
label="%command.deletePreviousWord.name">
</command>
<command
commandId="org.eclipse.ui.edit.text.delete.line.to.end"
label="%command.deleteToEndOfLine.label">
</command>
<command
commandId="org.eclipse.ui.edit.text.copyLineUp"
label="%command.duplicateLines">
</command>
<command
commandId="org.eclipse.ui.edit.text.smartEnterInverse"
label="%command.insertLineAboveCurrentLine.label">
</command>
<command
commandId="org.eclipse.ui.edit.text.smartEnter"
label="%commad.insertLineBelowCurrentLine.label">
</command>
<command
commandId="org.eclipse.ui.edit.text.moveLineDown"
label="%command.moveLinesDown.label">
</command>
<command
commandId="org.eclipse.ui.edit.text.moveLineUp"
label="%command.movesLinesUp.label">
</command>
<command
commandId="org.eclipse.ui.edit.text.join.lines"
label="%command.joinLines">
</command>
</menu>
</menuContribution>
Can some one please help me , What I am missing here to enable the command in browser.
|
|
|
Powered by
FUDForum. Page generated in 0.16946 seconds