Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ajdt-dev] small patch and questions

Hi!

I have imported all the "projects" under CVS AJDT_src into Eclipse and also the aspectj modules projects in an attempt to start a debugging session.

Unfortunately, it fails to compile correctly from the following reasons:

1/ org.eclipse.ajdt.build:

references from BuildClasspathResolver, ClasspathDirectory and ClasspathJar the class org.eclipse.jdt.internal.core.util.SimpleLookupTable. Eclipse resolves it against this class:
org.eclipse.jdt.internal.compiler.util.SimpleLookupTable.

2/ InputContextManager from org.eclipse.ajdt.ui project uses enum as a variable name, and this fails with a 1.5 compiler.

Attached is a patch for this 2nd problem (replacing enum vairable name with en, and fixing some more code formatting).

I was wondering if the aboves steps should allow me to debug an AJ weaving step.

I should probably be able to do this by modifying the ajc.bat to stat the JVM in debug mode and than attach to it.

thanks for any hints,

./alex
--
.w( the_mindstorm )p.

Index: InputContextManager.java
===================================================================
RCS file: /home/technology/org.eclipse.ajdt/AJDT_src/org.eclipse.ajdt.ui/src/org/eclipse/ajdt/pde/internal/ui/editor/context/InputContextManager.java,v
retrieving revision 1.2
diff -u -r1.2 InputContextManager.java
--- InputContextManager.java	24 Feb 2005 13:19:07 -0000	1.2
+++ InputContextManager.java	17 Nov 2005 00:23:40 -0000
@@ -54,9 +54,8 @@
 	public void dispose() {
 		PDEPlugin.getWorkspace().removeResourceChangeListener(this);
 		// dispose input contexts
-		for (Enumeration enum = inputContexts.elements(); enum
-				.hasMoreElements();) {
-			InputContext context = (InputContext) enum.nextElement();
+		for (Enumeration en = inputContexts.elements(); en.hasMoreElements();) {
+			InputContext context = (InputContext) en.nextElement();
 			unhookUndo(context);
 			context.dispose();
 		}
@@ -68,17 +67,15 @@
 	 * @param monitor
 	 */
 	public void save(IProgressMonitor monitor) {
-		for (Enumeration enum = inputContexts.elements(); enum
-				.hasMoreElements();) {
-			InputContext context = (InputContext) enum.nextElement();
+		for (Enumeration en = inputContexts.elements(); en.hasMoreElements();) {
+			InputContext context = (InputContext) en.nextElement();
 			if (context.mustSave())
 				context.doSave(monitor);
 		}
 	}
 	public IProject getCommonProject() {
-		for (Enumeration enum = inputContexts.elements(); enum
-		.hasMoreElements();) {
-			InputContext context = (InputContext) enum.nextElement();
+		for (Enumeration en = inputContexts.elements(); en.hasMoreElements();) {
+			InputContext context = (InputContext) en.nextElement();
 			IEditorInput input = context.getInput();
 			if (input instanceof IFileEditorInput) 
 				return ((IFileEditorInput)input).getFile().getProject();
@@ -89,18 +86,16 @@
 		return findContext(id) != null;
 	}
 	public InputContext findContext(String id) {
-		for (Enumeration enum = inputContexts.elements(); enum
-				.hasMoreElements();) {
-			InputContext context = (InputContext) enum.nextElement();
+		for (Enumeration en = inputContexts.elements(); en.hasMoreElements();) {
+			InputContext context = (InputContext) en.nextElement();
 			if (context.getId().equals(id))
 				return context;
 		}
 		return null;
 	}
 	public InputContext findContext(IResource resource) {
-		for (Enumeration enum = inputContexts.elements(); enum
-		.hasMoreElements();) {
-			InputContext context = (InputContext) enum.nextElement();
+		for (Enumeration en = inputContexts.elements(); en.hasMoreElements();) {
+			InputContext context = (InputContext) en.nextElement();
 			if (context.matches(resource))
 				return context;
 		}
@@ -117,9 +112,8 @@
 		fireContextChange(context, true);
 	}
 	public InputContext getPrimaryContext() {
-		for (Enumeration enum = inputContexts.elements(); enum
-				.hasMoreElements();) {
-			InputContext context = (InputContext) enum.nextElement();
+		for (Enumeration en = inputContexts.elements(); en.hasMoreElements();) {
+			InputContext context = (InputContext) en.nextElement();
 			if (context.isPrimary())
 				return context;
 		}
@@ -127,9 +121,8 @@
 	}
 	public InputContext [] getInvalidContexts() {
 		ArrayList result = new ArrayList();
-		for (Enumeration enum = inputContexts.elements(); enum
-				.hasMoreElements();) {
-			InputContext context = (InputContext) enum.nextElement();
+		for (Enumeration en = inputContexts.elements(); en.hasMoreElements();) {
+			InputContext context = (InputContext) en.nextElement();
 			if (context.isModelCorrect()==false)
 				result.add(context);
 		}
@@ -137,8 +130,8 @@
 	}
 	
 	public boolean isDirty() {
-		for (Enumeration enum=inputContexts.elements(); enum.hasMoreElements();) {
-			InputContext context = (InputContext)enum.nextElement();
+		for (Enumeration en = inputContexts.elements(); en.hasMoreElements();) {
+			InputContext context = (InputContext) en.nextElement();
 			if (context.mustSave())
 				return true;
 		}
@@ -202,9 +195,8 @@
 	}
 	
 	private void removeContext(IFile file) {
-		for (Enumeration enum = inputContexts.elements(); enum
-		.hasMoreElements();) {
-			InputContext context = (InputContext) enum.nextElement();
+		for (Enumeration en = inputContexts.elements(); en.hasMoreElements();) {
+			InputContext context = (InputContext) en.nextElement();
 			IEditorInput input = context.getInput();
 			if (input instanceof IFileEditorInput) {
 				IFileEditorInput fileInput = (IFileEditorInput)input;

Back to the top