Jump to: navigation, search

Difference between revisions of "NetBeans in Eclipse"

Line 55: Line 55:
 
** an main menu bar action (Window->Open TestEditor Window), 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.
 
** The required API for the Netbeans module.
 +
Here ist the source code of this example:
 +
[http://eclipse-incub.cvs.sourceforge.net/eclipse-incub/netbeans-in-eclipse/  org.eclipse.soc.netbeans].
  
 
* Migrate an more complex Netbeans module to Eclipse.  
 
* Migrate an more complex Netbeans module to Eclipse.  
 
** We migrated a module called paint-application. The source code can be found here in project [http://eclipse-incub.cvs.sourceforge.net/eclipse-incub/netbeans-in-eclipse/  org.eclipse.soc.netbeans.paint.editor].
 
** We migrated a module called paint-application. The source code can be found here in project [http://eclipse-incub.cvs.sourceforge.net/eclipse-incub/netbeans-in-eclipse/  org.eclipse.soc.netbeans.paint.editor].
  
Here ist the source code of this example:
+
* Required API was extended, but the extension is still in progress.
[http://eclipse-incub.cvs.sourceforge.net/eclipse-incub/netbeans-in-eclipse/  org.eclipse.soc.netbeans].
+
  
=== Work to be done ===
 
1. Migrate an more complex Netbeans module to Eclipse.
 
  
1.1 Extend the wrapper actions and the required API.
+
=== Work to be done ===
 +
1. Migrate Matisse in Eclipse
  
 
2. Find a way to translate the layer.xml to plugin.xml.  
 
2. Find a way to translate the layer.xml to plugin.xml.  
  
3. During the translation automatically creation of the standard action wrappers.
+
3. During the translation automatically creation of the Action-Wrappers and Editor-Wrappers.
  
 
== Deliverables ==
 
== Deliverables ==

Revision as of 13:34, 5 August 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. We decided to implement an Eclipse plugin, that implements this required functionality (required API). It will transform and forward the calls to Eclipse. This plugin will implement standard wrapper actions, that will be able to run the provided functionality of the Netbeans module. So Eclipse will communicate with the Netbeans module during our wrapper actions, and the Netbeans module will communicate with Eclipse during our required API.

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