Question

I can use the shared editing feature of ECF with Java fine perfectly fine. When I try to do it with Python files it also works, but there is no syntax highlighting.

I installed PyDev to get syntax highlighting, but then the context menu does not have the "share editor" option. I removed PyDev and the option came back. I installed Dynamic Languages Toolkit in hopes that its Python syntax highlighting was compatible and I got the same effect (context menu lacks the "share editor" option).

Is there a way to have a shared editing session with Python files and syntax highlighting?

Was it helpful?

Solution

You have to add the context menu into the PyDev editor manually.

You can do this by setting up a plugin with the following inplugin.xml:

<plugin>
   <extension point="org.eclipse.ui.menus">
  <menuContribution 
        locationURI="popup:org.python.pydev.editor.PythonEditor.EditorContext">
    <dynamic
        class="org.eclipse.ecf.docshare.menu.DocShareRosterMenuContributionItem"
        id="com.foo.MyVeryOwnEditorContextID.dynamic1">
    </dynamic>
  </menuContribution>
</extension>
</plugin>

Here, org.python.pydev.editor.PythonEditor.EditorContext is the context id of the PyDev Editor.
If you want to add the context menu item to another editor you'll have to change this id. It can be found by pressing Shift-Alt-F1 while using in editor you want to add it to.

com.foo.MyVeryOwnEditorContextID.dynamic1 simply has to be a unique id of your choice.

You then have to put the plugin .jar file into your plugins folder in the eclipse directory.

OTHER TIPS

There's a Github project called ECF4PyDev which provides a module to perform map the ECF menu commands into PyDev. The project also includes the necessary files in order for direct installation, which makes it easy to use with the Eclipse software installer.

Installation

in Eclipse, go to "Help" -> "Install New Softare..." then click the "Add" button. Add the following information:

  • Name

ECF for PyDev

  • Location

http://gilberterik.github.com/ECF4PyDev

The UI should then show a checkbox for ECFPyDev. Select it, then hit next. Continue to follow the wizard until the installation is complete. It may take a moment to finish the install - be patient. After installation, you should be prompted to restart Eclipse.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top