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 "JDT weaving features"

(Uninstalling)
Line 1: Line 1:
Starting with version 1.6.2, AJDT will be shipped with the '''JDT weaving plugin'''.  This plugin uses [http://www.eclipse.org/equinox/incubator/aspects/index.php Equinox Aspects] to weave into JDT (more specifically, the org.eclipse.jdt.core, org.eclipse.jdt.ui, and org.eclipse.jdt.debug.core plugins).
+
Starting with version 1.6.2, AJDT will be shipped with the '''JDT weaving plugin'''.  This plugin uses [http://www.eclipse.org/equinox/incubator/aspects/index.php Equinox Aspects] to weave into JDT.
  
This provides an opportunity for deep integration with Eclipse in ways that were not possible before.  This release introduces the following features:  
+
Through this weaving, AJDT is able to integrate with Eclipse more deeply and in ways that were not possible before.  This release introduces the following features:  
  
 
*ITD-aware reconciling/eager parsing (in both Java and AJ editors, this means that red squiggles will ''not'' appear when referencing ITDs)
 
*ITD-aware reconciling/eager parsing (in both Java and AJ editors, this means that red squiggles will ''not'' appear when referencing ITDs)
Line 12: Line 12:
 
==Installation==
 
==Installation==
  
Weaving AJDT is only available for Eclipse 3.4.  Use the standard AJDT 1.6 development update site:
+
AJDT with JDT weaving is only available for '''Eclipse 3.4'''The easiest way to install is through the standard AJDT 1.6 development update site:
  
 
  http://download.eclipse.org/tools/ajdt/34/dev/update
 
  http://download.eclipse.org/tools/ajdt/34/dev/update
Line 18: Line 18:
 
Installing from this update site will automatically install Equinox Aspects from a separate update site.  Additionally, the install will update your config.ini file to allow the weaving service to be enabled at startup.
 
Installing from this update site will automatically install Equinox Aspects from a separate update site.  Additionally, the install will update your config.ini file to allow the weaving service to be enabled at startup.
  
Due to [https://bugs.eclipse.org/bugs/show_bug.cgi?id=257178 Bug 257178], it is currently only possible to install Weaving AJDT in the same directory that Eclipse itself is installed in.
+
Due to [https://bugs.eclipse.org/bugs/show_bug.cgi?id=257178 Bug 257178], it is currently only possible to install AJDT with JDT weaving in the same directory that Eclipse itself is installed in.
  
 
Actually, this only applies to Equinox Aspects.  If you cannot install in the eclipse directory or want to install manually (i.e., from a zip file and not from an update site), see below.
 
Actually, this only applies to Equinox Aspects.  If you cannot install in the eclipse directory or want to install manually (i.e., from a zip file and not from an update site), see below.
Line 58: Line 58:
 
  Preferences -> JDT Weaving
 
  Preferences -> JDT Weaving
  
 
+
This page will notify you of the state of the weaving serviceIt will also allow you to enable/disable the service.
Alternatively:
+
 
+
#Create a new aspect in an AspectJ project and save.
+
#Open the ''Open Types'' dialog (Ctrl-Shift-t on Windows).
+
#Type the name of the new aspect.
+
#If it appears, rejoice! The JDT weaving plugin is now working.
+
  
 
==Uninstalling==
 
==Uninstalling==
  
Uninstall Weaving AJDT in the same way you uninstall any other Eclipse feature:
+
If AJDT was installed through the update site, then you can uninstall it in the same way you uninstall any other Eclipse feature:
  
 
  Help -> Software Updates -> Installed Software
 
  Help -> Software Updates -> Installed Software
  
Select AJDT, and click ''Uninstall...''.  This will also uninstall Equinox Aspects and reset your config.ini to its previous state.
+
Select AJDT, and click ''Uninstall...''.  This will also uninstall Equinox Aspects and undo the changes to your config.ini.
  
If you had originally installed Equinox Aspects manually, then you must also back out all the changes to the config.ini.
+
If either Equinox Aspects or AJDT were installed manually, then they must be uninstalled manually as well by deleting the appropriate plugins from the filesystem.
  
==Running Weaving AJDT without JDT Weaving==
+
If you had originally installed Equinox Aspects manually, then you must also manually back out all the changes to the config.ini.
 +
 
 +
==Running AJDT 1.6.2 without JDT Weaving==
  
 
It is possible to disable the weaving service and still run AJDT 1.6.2.  However, all the advanced features will be disabled.
 
It is possible to disable the weaving service and still run AJDT 1.6.2.  However, all the advanced features will be disabled.
Line 83: Line 79:
 
  Preferences -> JDT Weaving
 
  Preferences -> JDT Weaving
  
Click the button and restart the workbench.  The weaving service can be restarted in the same way.
+
Click the button ''Disable JDT Weaving'' button and restart the workbench.  Similarly, to re-enable the weaving service go back to the preference page and click ''Enable JDT Weaving''.
 
+
  
 
Alternatively, to disable manually, you can edit the file eclipse/configuration/config.ini.  Delete the line that looks something like this:
 
Alternatively, to disable manually, you can edit the file eclipse/configuration/config.ini.  Delete the line that looks something like this:

Revision as of 19:04, 15 December 2008

Starting with version 1.6.2, AJDT will be shipped with the JDT weaving plugin. This plugin uses Equinox Aspects to weave into JDT.

Through this weaving, AJDT is able to integrate with Eclipse more deeply and in ways that were not possible before. This release introduces the following features:

  • ITD-aware reconciling/eager parsing (in both Java and AJ editors, this means that red squiggles will not appear when referencing ITDs)
  • ITD-aware content assist (for now only in *.aj files in AJ editors)
  • ITD-aware type hierarchies (for now only super-type hierarchies can be calculated with ITD-awareness)
  • Ability to search for aspect elements using standard Java search and Open Java type

For information on how to use the JDT weaving plugin to provide deep integration with plugins and editors for other Java-like languages, see JDT weaving implementation.

Installation

AJDT with JDT weaving is only available for Eclipse 3.4. The easiest way to install is through the standard AJDT 1.6 development update site:

http://download.eclipse.org/tools/ajdt/34/dev/update

Installing from this update site will automatically install Equinox Aspects from a separate update site. Additionally, the install will update your config.ini file to allow the weaving service to be enabled at startup.

Due to Bug 257178, it is currently only possible to install AJDT with JDT weaving in the same directory that Eclipse itself is installed in.

Actually, this only applies to Equinox Aspects. If you cannot install in the eclipse directory or want to install manually (i.e., from a zip file and not from an update site), see below.

Manual Install

To do a manual install, first install Equinox Aspects (see below) and then download the desired zip file of AJDT from the downloads page and unzip into your eclipse dropins folder.

These zips do not include Equinox Aspects, which is required for the weaving to be installed. There are two ways to install Equinox Aspects: from the update site, or manually.

Installing Equinox Aspects from the update site

The Equinox Aspects is temporarily available here:

http://download.eclipse.org/tools/ajdt/34/dev/equinox-aspects

in the future, the update site will be moved to the Equinox name space.

Installing Equinox Aspects manually

  1. Download the latest release from http://www.eclipse.org/equinox/incubator/aspects/equinox-aspects-downloads.php
  2. Unzip into your Eclipse plugins directory (must be plugins and not dropins because of Bug 257178)
  3. Edit your config.ini file in your Eclipse configuration directory:
  • Add the following line:
osgi.framework.extensions=org.eclipse.equinox.weaving.hook
  • Look for the line that looks something like:
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.0.v20080604.jar@1\:start

and append:

,org.eclipse.equinox.weaving.aspectj@2\:start
  • Optionally, add the following lines in order to enable weave info messages:
aj.weaving.verbose=true
org.aspectj.weaver.showWeaveInfo=true
org.aspectj.osgi.verbose=true

Runtime

To see if the JDT Weaving plugin is properly configured, go to

Preferences -> JDT Weaving

This page will notify you of the state of the weaving service. It will also allow you to enable/disable the service.

Uninstalling

If AJDT was installed through the update site, then you can uninstall it in the same way you uninstall any other Eclipse feature:

Help -> Software Updates -> Installed Software

Select AJDT, and click Uninstall.... This will also uninstall Equinox Aspects and undo the changes to your config.ini.

If either Equinox Aspects or AJDT were installed manually, then they must be uninstalled manually as well by deleting the appropriate plugins from the filesystem.

If you had originally installed Equinox Aspects manually, then you must also manually back out all the changes to the config.ini.

Running AJDT 1.6.2 without JDT Weaving

It is possible to disable the weaving service and still run AJDT 1.6.2. However, all the advanced features will be disabled.

Go to

Preferences -> JDT Weaving

Click the button Disable JDT Weaving button and restart the workbench. Similarly, to re-enable the weaving service go back to the preference page and click Enable JDT Weaving.

Alternatively, to disable manually, you can edit the file eclipse/configuration/config.ini. Delete the line that looks something like this:

osgi.framework.extensions=org.eclipse.equinox.weaving.hook

Copyright © Eclipse Foundation, Inc. All Rights Reserved.