aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoraclement <aclement>2008-08-28 03:19:50 +0000
committeraclement <aclement>2008-08-28 03:19:50 +0000
commita728a0ea633eb81ef82b68e34e680ceb74845835 (patch)
treebb3c974dd4e12a3a21e24e7466924872a7dcd24c /org.aspectj.ajdt.core
parentf56eb37f77b3bd946ef567b2e018bd17b2965f20 (diff)
downloadaspectj-a728a0ea633eb81ef82b68e34e680ceb74845835.tar.gz
aspectj-a728a0ea633eb81ef82b68e34e680ceb74845835.zip
fixed eclipse warnings
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java4
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java2
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java1
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java26
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java9
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTMatcher.java2
-rw-r--r--org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java2
-rw-r--r--org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/JavadocTest.java101
-rw-r--r--org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjASTTest.java9
9 files changed, 78 insertions, 78 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java
index a645d3fd7..b4ccb53a4 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/ValidateAtAspectJAnnotationsVisitor.java
@@ -266,7 +266,7 @@ public class ValidateAtAspectJAnnotationsVisitor extends ASTVisitor {
int[] pcLoc = new int[2];
String perClause = getStringLiteralFor("value", aspectAnnotation, pcLoc);
- AspectDeclaration aspectDecl = new AspectDeclaration(typeDecl.compilationResult);
+ // AspectDeclaration aspectDecl = new AspectDeclaration(typeDecl.compilationResult);
try {
if (perClause != null && !perClause.equals("")) {
@@ -326,7 +326,7 @@ public class ValidateAtAspectJAnnotationsVisitor extends ASTVisitor {
int[] throwingLocation = new int[2];
String thrownFormal = getStringLiteralFor("throwing", ajAnnotations.adviceAnnotation, throwingLocation);
if (thrownFormal != null) {
- Argument[] arguments = methodDeclaration.arguments;
+ // Argument[] arguments = methodDeclaration.arguments;
if (!toArgumentNames(methodDeclaration.arguments).contains(thrownFormal)) {
methodDeclaration.scope.problemReporter().signalError(methodDeclaration.sourceStart,
methodDeclaration.sourceEnd,
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
index dfb1379cb..c56182eff 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java
@@ -603,7 +603,7 @@ public class EclipseSourceType extends AbstractReferenceTypeDelegate {
public AnnotationX convertEclipseAnnotation(Annotation eclipseAnnotation, World w) {
// TODO if it is sourcevisible, we shouldn't let it through!!!!!!!!! testcase!
ResolvedType annotationType = factory.fromTypeBindingToRTX(eclipseAnnotation.type.resolvedType);
- long bs = (eclipseAnnotation.bits & TagBits.AnnotationRetentionMASK);
+ // long bs = (eclipseAnnotation.bits & TagBits.AnnotationRetentionMASK);
boolean isRuntimeVisible = (eclipseAnnotation.bits & TagBits.AnnotationRetentionMASK) == TagBits.AnnotationRuntimeRetention;
AnnotationAJ annotationAJ = new AnnotationAJ(annotationType.getSignature(), isRuntimeVisible);
generateAnnotation(eclipseAnnotation, annotationAJ);
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
index c9043ffc5..600abfc37 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
@@ -350,7 +350,6 @@ public class AjProblemReporter extends ProblemReporter {
* the other methodMustOverride() method is used.
*/
public void methodMustOverride(AbstractMethodDeclaration method) {
- MethodBinding binding = method.binding;
// ignore ajc$ methods
if (new String(method.selector).startsWith("ajc$"))
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
index 9b0f93144..3a1c3a057 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
@@ -921,19 +921,19 @@ public class AjState {
// }
// }
- private void maybeDeleteResource(String resName, List oldResources) {
- if (resources.contains(resName)) {
- oldResources.remove(resName);
- List outputDirs = getOutputLocations(buildConfig);
- for (Iterator iterator = outputDirs.iterator(); iterator.hasNext();) {
- File dir = (File) iterator.next();
- File source = new File(dir, resName);
- if (source.exists() && (source.lastModified() >= lastSuccessfulBuildTime)) {
- resources.remove(resName); // will ensure it is re-copied
- }
- }
- }
- }
+ // private void maybeDeleteResource(String resName, List oldResources) {
+ // if (resources.contains(resName)) {
+ // oldResources.remove(resName);
+ // List outputDirs = getOutputLocations(buildConfig);
+ // for (Iterator iterator = outputDirs.iterator(); iterator.hasNext();) {
+ // File dir = (File) iterator.next();
+ // File source = new File(dir, resName);
+ // if (source.exists() && (source.lastModified() >= lastSuccessfulBuildTime)) {
+ // resources.remove(resName); // will ensure it is re-copied
+ // }
+ // }
+ // }
+ // }
// private void deleteResourcesFromDirectory(File dir, List oldResources) {
// File[] files = FileUtil.listFiles(dir, new FileFilter() {
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java
index 8e3e13587..586508bd7 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java
@@ -119,21 +119,22 @@ public class AspectJBuilder extends JavaBuilder implements ICompilerAdapterFacto
le.factory = eFactory;
forCompiler.lookupEnvironment = le;
- AjBuildNotifier ajNotifier = (AjBuildNotifier) notifier;
+ // AjBuildNotifier ajNotifier = (AjBuildNotifier) notifier;
if (fileNameProvider == null)
fileNameProvider = new OutputFileNameProvider(getProject());
// * the set of binary source entries for this compile -- from analyzing deltas, or everything if batch
// * the full set of binary source entries for the project -- from IAspectJProject
// TODO deal with inpath, injars here...
- IBinarySourceProvider bsProvider = new NullBinarySourceProvider();
- Map fullBinarySourceEntries = new HashMap();
+ // IBinarySourceProvider bsProvider = new NullBinarySourceProvider();
+ // Map fullBinarySourceEntries = new HashMap();
// * the intermediate result set from the last batch compile
if (isBatchBuild) {
unwovenResultCollector = new UnwovenResultCollector();
}
- Collection resultSetForFullWeave = unwovenResultCollector.getIntermediateResults();
+ // Collection resultSetForFullWeave =
+ unwovenResultCollector.getIntermediateResults();
throw new UnsupportedOperationException("Is anyone actually using the AspectJBuilder class??");
// return new AjCompilerAdapter(forCompiler,isBatchBuild,myBcelWorld,
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTMatcher.java b/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTMatcher.java
index 8ec7b29a1..822d80b6c 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTMatcher.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/org/eclipse/jdt/core/dom/AjASTMatcher.java
@@ -101,7 +101,7 @@ public class AjASTMatcher extends ASTMatcher {
if (!(other instanceof PerTypeWithin)) {
return false;
}
- PerTypeWithin o = (PerTypeWithin) other;
+ // PerTypeWithin o = (PerTypeWithin) other;
return true; // ajh02: stub, should look at the type pattern
}
diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java
index 6702208d1..d42ed6355 100644
--- a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java
+++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/ajc/AjdtCommandTestCase.java
@@ -193,7 +193,7 @@ public class AjdtCommandTestCase extends TestCase {
}
String text = byteArrayOut.toString();
- String text2 = byteArrayErr.toString();
+ // String text2 = byteArrayErr.toString();
assertTrue("version output does not include 'AspectJ Compiler', output was:\n'" + text + "'", text
.indexOf("AspectJ Compiler") != -1);
}
diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/JavadocTest.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/JavadocTest.java
index bd0a05a32..69ed7dd1e 100644
--- a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/JavadocTest.java
+++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/compiler/batch/JavadocTest.java
@@ -12,63 +12,60 @@ package org.aspectj.ajdt.internal.compiler.batch;
import java.io.File;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
-import org.aspectj.bridge.IMessage;
import org.aspectj.tools.ajc.AjcTestCase;
import org.aspectj.tools.ajc.CompilationResult;
-
public class JavadocTest extends AjcTestCase {
- public static final String PROJECT_DIR = "javadoc";
+ public static final String PROJECT_DIR = "javadoc";
+
+ private File baseDir;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ baseDir = new File("../org.aspectj.ajdt.core/testdata", PROJECT_DIR);
+ }
+
+ /**
+ * Aim: Check javadoc warning that appear are appropriate
+ *
+ * ajc -warn:allJavadoc World.java
+ *
+ */
+ public void testMissingJavadoc() {
+ String[] args = new String[] { "World.java", "-warn:allJavadoc" };
+
+ List warningMessages = new ArrayList();
+ // These warnings are against public textX() methods declared in the World.java
+ // type. These test methods are spread between AJ constructuts, meaning
+ // if someone messes up and the javadoc is not associated with the aspectj
+ // construct then it will associated by accident with one of the testX() methods.
+ // By checking we get a warning against every testX() method, we are verifying
+ // that the javadoc is being attached to the aspectj constructs.
+ warningMessages.add(new Message(10, "Missing comment for public declaration"));
+ warningMessages.add(new Message(18, "Missing comment for public declaration"));
+ warningMessages.add(new Message(28, "Missing comment for public declaration"));
+ warningMessages.add(new Message(36, "Missing comment for public declaration"));
+ warningMessages.add(new Message(44, "Missing comment for public declaration"));
+ warningMessages.add(new Message(53, "Missing comment for public declaration"));
+ warningMessages.add(new Message(61, "Missing comment for public declaration"));
+ warningMessages.add(new Message(69, "Missing comment for public declaration"));
+ MessageSpec spec = new MessageSpec(warningMessages, null);
+
+ CompilationResult result = ajc(baseDir, args);
+ assertMessages(result, spec);
+
+ // dump(result.getWarningMessages());
+ // System.err.println("-----------\n"+ajc.getLastCompilationResult().getStandardError());
+ // List l = result.getWarningMessages();
+ // IMessage m = ((IMessage)l.get(0));
+ }
- private File baseDir;
-
- protected void setUp() throws Exception {
- super.setUp();
- baseDir = new File("../org.aspectj.ajdt.core/testdata",PROJECT_DIR);
- }
-
- /**
- * Aim: Check javadoc warning that appear are appropriate
- *
- * ajc -warn:allJavadoc World.java
- *
- */
- public void testMissingJavadoc () {
- String[] args = new String[] {"World.java","-warn:allJavadoc"};
-
- List warningMessages = new ArrayList();
- // These warnings are against public textX() methods declared in the World.java
- // type. These test methods are spread between AJ constructuts, meaning
- // if someone messes up and the javadoc is not associated with the aspectj
- // construct then it will associated by accident with one of the testX() methods.
- // By checking we get a warning against every testX() method, we are verifying
- // that the javadoc is being attached to the aspectj constructs.
- warningMessages.add(new Message(10,"Missing comment for public declaration"));
- warningMessages.add(new Message(18,"Missing comment for public declaration"));
- warningMessages.add(new Message(28,"Missing comment for public declaration"));
- warningMessages.add(new Message(36,"Missing comment for public declaration"));
- warningMessages.add(new Message(44,"Missing comment for public declaration"));
- warningMessages.add(new Message(53,"Missing comment for public declaration"));
- warningMessages.add(new Message(61,"Missing comment for public declaration"));
- warningMessages.add(new Message(69,"Missing comment for public declaration"));
- MessageSpec spec = new MessageSpec(warningMessages,null);
-
- CompilationResult result = ajc(baseDir,args);
- assertMessages(result,spec);
-
-// dump(result.getWarningMessages());
-// System.err.println("-----------\n"+ajc.getLastCompilationResult().getStandardError());
-// List l = result.getWarningMessages();
-// IMessage m = ((IMessage)l.get(0));
- }
-
- private void dump(List l) {
- for (Iterator iter = l.iterator(); iter.hasNext();) {
- IMessage element = (IMessage) iter.next();
- System.err.println("Warning: "+element);
- }
- }
+ // private void dump(List l) {
+ // for (Iterator iter = l.iterator(); iter.hasNext();) {
+ // IMessage element = (IMessage) iter.next();
+ // System.err.println("Warning: "+element);
+ // }
+ // }
}
diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjASTTest.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjASTTest.java
index 298040112..7b32dad30 100644
--- a/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjASTTest.java
+++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/tools/ajc/AjASTTest.java
@@ -283,7 +283,8 @@ public class AjASTTest extends AjASTTestCase {
public void testPropertyDescriptorsForDefaultTypePattern() {
AjAST ajast = createAjAST();
- DefaultTypePattern d = ajast.newDefaultTypePattern();
+ // DefaultTypePattern d =
+ ajast.newDefaultTypePattern();
List props = DefaultTypePattern.propertyDescriptors(AST.JLS3);
assertEquals("there should be no properties for the DefaultTypePattern", 0, props.size());
}
@@ -314,7 +315,8 @@ public class AjASTTest extends AjASTTestCase {
public void testPropertyDescriptorsForSignaturePattern() {
AjAST ajast = createAjAST();
- SignaturePattern p = ajast.newSignaturePattern();
+ // SignaturePattern p =
+ ajast.newSignaturePattern();
List props = SignaturePattern.propertyDescriptors(AST.JLS3);
assertEquals("there should be no properties for the DefaultTypePattern", 0, props.size());
}
@@ -718,7 +720,8 @@ public class AjASTTest extends AjASTTestCase {
public void testPropertyDescriptorsForAjTypeDeclaration() {
AjAST ajast = createAjAST();
- AjTypeDeclaration d = ajast.newAjTypeDeclaration();
+ // AjTypeDeclaration d =
+ ajast.newAjTypeDeclaration();
List props = AjTypeDeclaration.propertyDescriptors(AST.JLS3);
boolean foundAspect = false;
for (Iterator iter = props.iterator(); iter.hasNext();) {