Jump to: navigation, search

Difference between revisions of "NetBeans in Eclipse"

(Design Goals after the analysis of the problem)
Line 23: Line 23:
 
=== Design Goals after the analysis of the problem ===
 
=== Design Goals after the analysis of the problem ===
  
* '''NetBeans Module running in Eclipse'''
+
A Netbeans module can be viewed as a component. It has required functionality, that is implemented from Netbeans. It has provided functionality to Netbeans.
  
A Netbeans module can be viewed as a component. It has required functionality, that is implemented from Netbeans. It has provided functionality to Netbeans. We decided to implement an Eclipse plugin named NetBeans APIs Adapter (see picture below), that implements this required functionality (required API). It will transform and forward the calls to Eclipse. This plugin will be able to emulate the NetBeans Platform. So Eclipse will communicate with the Netbeans module during wrapper plugin named NetBeans Module Wrapper (see picture below), and the Netbeans module will communicate with Eclipse during the NetBeans APIs Adapter. We also need to extend the plugin loader of Eclipse to be able to load Netbeans modules. This will be the work of NetBeans Module Loader (see picture below).
+
* '''Eclipse's NetBeans Module Installer'''
  
[[Image:runtime_plugin.png|700px]]
+
''Layer.xml -> Plugin.xml Transformer and Wrapper Genarator'': This plugin will be able to transform layer.xml to plugin.xml. It will generate the NetBeans Module Wrapper during the transformation.
  
* '''Eclipse's NetBeans Module Installer'''
+
''NetBeans Module Wrapper'': Will be the Plugin that wraps the Netbeans Module and will contain Eclipse extensions, that wrap NetBeans extensions e.g Netbeans editor wrapped from an Eclipse editor
Layer.xml -> Plugin.xml Transformer and Wrapper
+
Genarator: This plugin will be able to transform layer.xml to plugin.xml. It will generate the NetBeans Module Wrapper during the transformation. 
+
NetBeans Module Wrapper: Will be the Plugin that wraps the Netbeans Module and will contain Eclipse extensions, that wrap NetBeans extensions e.g Netbeans editor wrapped from an Eclipse editor
+
  
 
[[Image:installer_plugin.png|650px]]
 
[[Image:installer_plugin.png|650px]]
 +
 +
* '''NetBeans Module running in Eclipse'''
 +
 +
''NetBeans APIs Adapter'': This plugin implements the required functionality (required API). This plugin will be able to emulate the NetBeans Platform. It will adapt and forward the calls of a NetBeans module to Eclipse. The Netbeans module will communicate with Eclipse by the NetBeans APIs Adapter.
 +
 +
''NetBeans Module Wrapper'': This plugin will be the wrapper of a NetBeans module. So Eclipse will communicate with the Netbeans module by the wrapper plugin. 
 +
 +
''NetBeans Module Loader'': This plugin will extend the plugin loader of Eclipse to be able to load Netbeans modules.
 +
 +
[[Image:runtime_plugin.png|700px]]
  
 
== Terms ==
 
== Terms ==

Revision as of 16:09, 14 October 2007

The Project

Part of the Google Summer of Code 2007

Members

Student: Beyhan Veliev (IRC: beyhan)

Mentor: Philippe Ombredanne (IRC: pombreda)

About

The plugins models for Eclipse and NetBeans are very similar yet different. This project would provide the ability to run and embed a minimal NetBeans environment within Eclipse -- as Eclipse plugins-- , and support running NetBeans plugins like Matisse (Swing UI painter) or Coyote (dynamic languages toolkit).

The original proposal is available here: Google_Summer_of_Code_2007_Ideas


Goals

Primary Goals

Glass.gif Analyze what is needed to get a minimal NetBeans environment within Eclipse.

Glass.gif Support running Netbeans plugins like Matisse.

Design Goals after the analysis of the problem

A Netbeans module can be viewed as a component. It has required functionality, that is implemented from Netbeans. It has provided functionality to Netbeans.

  • Eclipse's NetBeans Module Installer

Layer.xml -> Plugin.xml Transformer and Wrapper Genarator: This plugin will be able to transform layer.xml to plugin.xml. It will generate the NetBeans Module Wrapper during the transformation.

NetBeans Module Wrapper: Will be the Plugin that wraps the Netbeans Module and will contain Eclipse extensions, that wrap NetBeans extensions e.g Netbeans editor wrapped from an Eclipse editor

Installer plugin.png

  • NetBeans Module running in Eclipse

NetBeans APIs Adapter: This plugin implements the required functionality (required API). This plugin will be able to emulate the NetBeans Platform. It will adapt and forward the calls of a NetBeans module to Eclipse. The Netbeans module will communicate with Eclipse by the NetBeans APIs Adapter.

NetBeans Module Wrapper: This plugin will be the wrapper of a NetBeans module. So Eclipse will communicate with the Netbeans module by the wrapper plugin.

NetBeans Module Loader: This plugin will extend the plugin loader of Eclipse to be able to load Netbeans modules.

Runtime plugin.png

Terms

  • Module is always a NetBeans module
  • Plugin is always an Eclipse plugin
  • plugin.xml is the description of an Eclipse plugin called plug-in manifest file
  • layer.xml is the description of a NetBeans module
  • Reuired API the implementation of the functionality required by a NetBeans module
  • Action-Wrapper is an Eclipse-Action that has as attribute an NetBeans-Action and run this NetBeans-Action when it is invoked
  • Editor-Wrapper is an Eclipse-Editor that has as input an NetBeans Editor

Gained Experience

Editor-Wrapper

Creation of Editor-Wrappers is more complicated than creation of Action-Wrappers, because a NetBeans-Editor is opened from a NetBeans-Action that means the NetBeans module should call Eclipse-Framework. There must be implemented a register that maps the NetBeans-Editor to its Editor-Wrapper. The Editor-Wrapper will become its NetBeans-Editor as editor input. The dynamically mapping is needed here, because we don't want to change the code of the NetBeans module and we must be able to find dynamically the Editor-Wrapper of an NetBeans-Editor.

Action-Wrapper

The NetBeans-Action will be injected in its Action-Wrapper as attribute during the creation of the Action-Wrapper. Here is no register needed that maps the actions to each other because the Action-wrapper knows its NetBeans-Action and the NetBeans-Action don't need to know its Action-Wrapper.

Status

Work Done

  • A Netbeans module:
    • an very simple editor.
    • an main menu action (Window->Open TestEditor Window), that opens this editor.
    • an main toolbar action, that opens an message dialog. The button have an yellow icon.
  • I integrated the code of the Netbeans module in an Eclipse plugin.The Eclipse plugin has:
    • an very simple editor, that is the wrapper of the editor in the Netbeans module.
    • an main toolbar action, that is the wrapper of the equivalent Netbeans module action.
    • an main menu bar action (Window->Open TestEditor Window), that is the wrapper of the equivalent Netbeans module action.
    • The required API for the Netbeans module.
    • Here ist the source code of this example:org.eclipse.soc.netbeans.
  • Required API was extended, but the extension is still in progress.


Work to be done

1. Migrate Matisse in Eclipse

2. Find a way to translate the layer.xml to plugin.xml.

3. During the translation automatically creation of the Action-Wrappers and Editor-Wrappers.

Deliverables

I will try to implement a NetBeans environment plugin for Eclipse that have the following features:

  • Provide an Eclipse perspective.
  • Provide a Wizard to install Netbeans’ plugins.
  • Read and understand the plugin information of a Netbeans plugin.
  • Generate an Eclipse plugin that is able to run the Netbeans plugin within Eclipse.

Legend

Glass.gif Needs some investigation

Progress.gif Patch in progress

Ok green.gif Bug fixed / Feature added