Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "NetBeans in Eclipse"

m (cat)
 
(13 intermediate revisions by one other user not shown)
Line 10: Line 10:
 
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 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:
+
The original proposal is available here: [[Google Summer of Code 2007 Ideas]]
[[Google_Summer_of_Code_2007_Ideas]]
+
 
+
  
 
== Goals ==
 
== Goals ==
Line 21: Line 19:
 
[[Image:Glass.gif]] Support running Netbeans plugins like Matisse.
 
[[Image: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. The life cycle of a NetBeans module within eclipse is divided in two phases. This two phases are the installation of a NetBeans module in Eclipse and the runtime of this module within Eclipse. As next is the implementation of this two phases explained.
 +
 +
* '''The installation phase'''
 +
 +
''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]]
 +
 +
* '''The runtime phase'''
 +
 +
''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 is the same generated during the transformation. 
 +
 +
''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 ==
 +
* '''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:[http://eclipse-incub.cvs.sourceforge.net/eclipse-incub/netbeans-in-eclipse/  org.eclipse.soc.netbeans].
 +
 +
* 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].
 +
 +
* 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 ==
 
== Deliverables ==
Line 35: Line 98:
  
 
[[Image:Ok_green.gif]] Bug fixed / Feature added
 
[[Image:Ok_green.gif]] Bug fixed / Feature added
 +
 +
[[Category:SOC]]

Latest revision as of 17:36, 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. The life cycle of a NetBeans module within eclipse is divided in two phases. This two phases are the installation of a NetBeans module in Eclipse and the runtime of this module within Eclipse. As next is the implementation of this two phases explained.

  • The installation phase

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

  • The runtime phase

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 is the same generated during the transformation.

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

Back to the top