Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Line editing commands are greyed out in menu(Line editing commands of eclipse (Join lines,Insert line above current and insert line below current line are greyed out.)
Line editing commands are greyed out in menu [message #1860944] Mon, 11 September 2023 10:40
Eclipse UserFriend
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.
Previous Topic:IntelOne Mono font incorrectly rendered
Next Topic:CXF/Jetty Rest API Not Working After Eclipse/Java/CXF/Jetty Upgrade
Goto Forum:
  


Current Time: Fri Feb 07 14:12:35 GMT 2025

Powered by FUDForum. Page generated in 0.16946 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top