From 55508643c4cf0f239e7afe23055e37fcbaf93e42 Mon Sep 17 00:00:00 2001 From: acolyer Date: Tue, 6 May 2003 12:46:55 +0000 Subject: [PATCH] "organized imports" to eliminate compiler warnings --- .../tools/ajbrowser/BrowserManager.java | 4 --- .../org/aspectj/tools/ajbrowser/TopFrame.java | 20 ++------------ .../ajde/internal/AspectJBuildManager.java | 20 ++------------ .../ajde/internal/BuildNotifierAdapter.java | 4 --- .../ajde/internal/LstBuildConfigManager.java | 7 +---- .../ui/swing/BrowserViewTreeListener.java | 3 ++- .../ajde/ui/swing/CompilerMessage.java | 1 - .../aspectj/ajde/ui/swing/GoToLineThread.java | 2 +- .../aspectj/ajde/BuildConfigurationTests.java | 17 ++++++------ .../aspectj/ajde/CompilerMessagesTest.java | 2 -- .../org/aspectj/ajde/StructureModelTest.java | 6 +++-- .../org/aspectj/asm/AdviceAssociation.java | 4 +-- .../aspectj/asm/InheritanceAssociation.java | 4 +-- .../aspectj/asm/IntroductionAssociation.java | 4 +-- .../org/aspectj/asm/ReferenceAssociation.java | 4 +-- .../org/aspectj/asm/StructureNodeFactory.java | 4 +-- .../org/aspectj/bridge/MessageHandler.java | 1 - .../internal/core/builder/AjBuildManager.java | 27 +++---------------- .../core/builder/AjBuildManagerTest.java | 3 --- 19 files changed, 33 insertions(+), 104 deletions(-) diff --git a/ajbrowser/src/org/aspectj/tools/ajbrowser/BrowserManager.java b/ajbrowser/src/org/aspectj/tools/ajbrowser/BrowserManager.java index df68d8019..65d113af7 100644 --- a/ajbrowser/src/org/aspectj/tools/ajbrowser/BrowserManager.java +++ b/ajbrowser/src/org/aspectj/tools/ajbrowser/BrowserManager.java @@ -14,7 +14,6 @@ package org.aspectj.tools.ajbrowser; -import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -24,7 +23,6 @@ import javax.swing.JFrame; import org.aspectj.ajde.Ajde; import org.aspectj.ajde.BuildConfigManager; import org.aspectj.ajde.BuildListener; -import org.aspectj.ajde.ProjectPropertiesAdapter; import org.aspectj.ajde.TaskListManager; import org.aspectj.ajde.ui.InvalidResourceException; import org.aspectj.ajde.ui.UserPreferencesAdapter; @@ -33,8 +31,6 @@ import org.aspectj.ajde.ui.swing.AjdeUIManager; import org.aspectj.ajde.ui.swing.BasicEditor; import org.aspectj.ajde.ui.swing.IconRegistry; import org.aspectj.ajde.ui.swing.MultiStructureViewPanel; -import org.aspectj.util.LangUtil; -import org.aspectj.util.Reflection; /** * IDE manager for standalone AJDE application. diff --git a/ajbrowser/src/org/aspectj/tools/ajbrowser/TopFrame.java b/ajbrowser/src/org/aspectj/tools/ajbrowser/TopFrame.java index 740c6053c..7e3afb82d 100644 --- a/ajbrowser/src/org/aspectj/tools/ajbrowser/TopFrame.java +++ b/ajbrowser/src/org/aspectj/tools/ajbrowser/TopFrame.java @@ -19,27 +19,11 @@ import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.event.ActionEvent; -import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.WindowEvent; import java.io.File; -import java.io.IOException; - -import javax.swing.AbstractAction; -import javax.swing.BorderFactory; -import javax.swing.ImageIcon; -import javax.swing.JButton; -import javax.swing.JFileChooser; -import javax.swing.JFrame; -import javax.swing.JLabel; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JPanel; -import javax.swing.JPopupMenu; -import javax.swing.JSplitPane; -import javax.swing.JToolBar; -import javax.swing.KeyStroke; + +import javax.swing.*; import javax.swing.border.BevelBorder; import javax.swing.border.Border; import javax.swing.filechooser.FileFilter; diff --git a/ajde/src/org/aspectj/ajde/internal/AspectJBuildManager.java b/ajde/src/org/aspectj/ajde/internal/AspectJBuildManager.java index 2fa636ccb..d4702fc9a 100644 --- a/ajde/src/org/aspectj/ajde/internal/AspectJBuildManager.java +++ b/ajde/src/org/aspectj/ajde/internal/AspectJBuildManager.java @@ -14,27 +14,11 @@ package org.aspectj.ajde.internal; -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.StringReader; import java.util.ArrayList; import java.util.Iterator; import java.util.Set; -import java.util.Vector; - -import org.aspectj.ajde.Ajde; -import org.aspectj.ajde.BuildListener; -import org.aspectj.ajde.BuildManager; -import org.aspectj.ajde.BuildOptionsAdapter; -import org.aspectj.ajde.BuildProgressMonitor; -import org.aspectj.ajde.ProjectPropertiesAdapter; -import org.aspectj.ajde.TaskListManager; -import org.aspectj.asm.StructureNode; -import org.aspectj.bridge.IMessage; -import org.aspectj.bridge.ISourceLocation; -import org.aspectj.bridge.Message; -import org.aspectj.bridge.SourceLocation; + +import org.aspectj.ajde.*; import org.aspectj.util.ConfigParser; /** diff --git a/ajde/src/org/aspectj/ajde/internal/BuildNotifierAdapter.java b/ajde/src/org/aspectj/ajde/internal/BuildNotifierAdapter.java index 1b309c5d2..95c490baa 100644 --- a/ajde/src/org/aspectj/ajde/internal/BuildNotifierAdapter.java +++ b/ajde/src/org/aspectj/ajde/internal/BuildNotifierAdapter.java @@ -16,10 +16,6 @@ package org.aspectj.ajde.internal; import org.aspectj.ajde.Ajde; import org.aspectj.ajde.BuildProgressMonitor; import org.aspectj.bridge.IProgressListener; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.OperationCanceledException; -import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; -import org.eclipse.jdt.internal.core.builder.BuildNotifier; public class BuildNotifierAdapter implements IProgressListener { diff --git a/ajde/src/org/aspectj/ajde/internal/LstBuildConfigManager.java b/ajde/src/org/aspectj/ajde/internal/LstBuildConfigManager.java index 8dacef516..f6e23cf61 100644 --- a/ajde/src/org/aspectj/ajde/internal/LstBuildConfigManager.java +++ b/ajde/src/org/aspectj/ajde/internal/LstBuildConfigManager.java @@ -17,11 +17,7 @@ package org.aspectj.ajde.internal; import java.io.File; import java.io.FileFilter; import java.io.FilenameFilter; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.Iterator; -import java.util.List; +import java.util.*; import org.aspectj.ajde.Ajde; import org.aspectj.ajde.BuildConfigListener; @@ -31,7 +27,6 @@ import org.aspectj.ajde.ui.BuildConfigNode; import org.aspectj.asm.StructureNode; import org.aspectj.bridge.IMessage; import org.aspectj.bridge.Message; -import org.aspectj.bridge.MessageUtil; import org.aspectj.bridge.SourceLocation; import org.aspectj.util.ConfigParser; diff --git a/ajde/src/org/aspectj/ajde/ui/swing/BrowserViewTreeListener.java b/ajde/src/org/aspectj/ajde/ui/swing/BrowserViewTreeListener.java index e42806bfc..2dbc95fa4 100644 --- a/ajde/src/org/aspectj/ajde/ui/swing/BrowserViewTreeListener.java +++ b/ajde/src/org/aspectj/ajde/ui/swing/BrowserViewTreeListener.java @@ -15,6 +15,7 @@ package org.aspectj.ajde.ui.swing; import java.awt.event.ActionEvent; +import java.awt.event.InputEvent; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.ArrayList; @@ -102,7 +103,7 @@ class BrowserViewTreeListener implements TreeSelectionListener, MouseListener { * has been clicked. */ private void maybeShowPopup(MouseEvent e) { - if (e.getModifiers() == e.BUTTON3_MASK && tree.getSelectionCount() > 0) { + if (e.getModifiers() == InputEvent.BUTTON3_MASK && tree.getSelectionCount() > 0) { TreePath[] selectionPaths = tree.getSelectionPaths(); final List signatures = new ArrayList(); for (int i = 0; i < selectionPaths.length; i++) { diff --git a/ajde/src/org/aspectj/ajde/ui/swing/CompilerMessage.java b/ajde/src/org/aspectj/ajde/ui/swing/CompilerMessage.java index 467abcdb5..9ca312d83 100644 --- a/ajde/src/org/aspectj/ajde/ui/swing/CompilerMessage.java +++ b/ajde/src/org/aspectj/ajde/ui/swing/CompilerMessage.java @@ -15,7 +15,6 @@ package org.aspectj.ajde.ui.swing; import org.aspectj.bridge.IMessage; -import org.aspectj.bridge.ISourceLocation; import org.aspectj.util.LangUtil; /** diff --git a/ajde/src/org/aspectj/ajde/ui/swing/GoToLineThread.java b/ajde/src/org/aspectj/ajde/ui/swing/GoToLineThread.java index b5976b80d..401b1650c 100644 --- a/ajde/src/org/aspectj/ajde/ui/swing/GoToLineThread.java +++ b/ajde/src/org/aspectj/ajde/ui/swing/GoToLineThread.java @@ -72,7 +72,7 @@ public class GoToLineThread extends Thread { private void shortPause() { try { - this.sleep(100); + Thread.sleep(100); } catch (InterruptedException e) { throw new RuntimeException(e.getMessage()); } diff --git a/ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java b/ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java index e65edea36..d6c7f1013 100644 --- a/ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java +++ b/ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java @@ -10,23 +10,22 @@ Adrian Colyer - initial version **********************************************************************/ package org.aspectj.ajde; -import org.aspectj.ajde.internal.CompilerAdapter; -import org.aspectj.ajde.ui.UserPreferencesAdapter; -import org.aspectj.ajde.ui.internal.AjcBuildOptions; -import org.aspectj.ajde.ui.internal.UserPreferencesStore; -import org.aspectj.ajdt.internal.core.builder.AjBuildConfig; -import org.aspectj.util.LangUtil; -import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; - import java.io.File; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; -import junit.framework.AssertionFailedError; import junit.framework.TestSuite; +import org.aspectj.ajde.internal.CompilerAdapter; +import org.aspectj.ajde.ui.UserPreferencesAdapter; +import org.aspectj.ajde.ui.internal.AjcBuildOptions; +import org.aspectj.ajde.ui.internal.UserPreferencesStore; +import org.aspectj.ajdt.internal.core.builder.AjBuildConfig; +import org.aspectj.util.LangUtil; +import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; + /** * Tests that a correctly populated AjBuildConfig object is created * in reponse to the setting in BuildOptionsAdapter and diff --git a/ajde/testsrc/org/aspectj/ajde/CompilerMessagesTest.java b/ajde/testsrc/org/aspectj/ajde/CompilerMessagesTest.java index 92174397a..35e1f46cf 100644 --- a/ajde/testsrc/org/aspectj/ajde/CompilerMessagesTest.java +++ b/ajde/testsrc/org/aspectj/ajde/CompilerMessagesTest.java @@ -12,8 +12,6 @@ package org.aspectj.ajde; -import org.aspectj.bridge.MessageUtil; - import java.io.IOException; import java.util.List; diff --git a/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java b/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java index fedc151be..11babe0c5 100644 --- a/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java +++ b/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java @@ -16,11 +16,13 @@ package org.aspectj.ajde; import java.io.File; import java.io.IOException; import java.util.Iterator; -import java.util.List; import junit.framework.TestSuite; -import org.aspectj.asm.*; +import org.aspectj.asm.ModelWalker; +import org.aspectj.asm.ProgramElementNode; +import org.aspectj.asm.StructureModel; +import org.aspectj.asm.StructureNode; /** * @author Mik Kersten diff --git a/asm/src/org/aspectj/asm/AdviceAssociation.java b/asm/src/org/aspectj/asm/AdviceAssociation.java index 842690ea2..0ff166783 100644 --- a/asm/src/org/aspectj/asm/AdviceAssociation.java +++ b/asm/src/org/aspectj/asm/AdviceAssociation.java @@ -14,8 +14,8 @@ package org.aspectj.asm; -import java.util.*; -import org.aspectj.asm.*; +import java.util.ArrayList; +import java.util.List; /** * @author Mik Kersten diff --git a/asm/src/org/aspectj/asm/InheritanceAssociation.java b/asm/src/org/aspectj/asm/InheritanceAssociation.java index fd3d446d9..dea4bd689 100644 --- a/asm/src/org/aspectj/asm/InheritanceAssociation.java +++ b/asm/src/org/aspectj/asm/InheritanceAssociation.java @@ -14,8 +14,8 @@ package org.aspectj.asm; -import java.util.*; -import org.aspectj.asm.*; +import java.util.ArrayList; +import java.util.List; /** * @author Mik Kersten diff --git a/asm/src/org/aspectj/asm/IntroductionAssociation.java b/asm/src/org/aspectj/asm/IntroductionAssociation.java index 2d55abb9d..867baa61c 100644 --- a/asm/src/org/aspectj/asm/IntroductionAssociation.java +++ b/asm/src/org/aspectj/asm/IntroductionAssociation.java @@ -14,8 +14,8 @@ package org.aspectj.asm; -import java.util.*; -import org.aspectj.asm.*; +import java.util.ArrayList; +import java.util.List; /** * @author Mik Kersten diff --git a/asm/src/org/aspectj/asm/ReferenceAssociation.java b/asm/src/org/aspectj/asm/ReferenceAssociation.java index 908f78d6e..abe53ace4 100644 --- a/asm/src/org/aspectj/asm/ReferenceAssociation.java +++ b/asm/src/org/aspectj/asm/ReferenceAssociation.java @@ -14,8 +14,8 @@ package org.aspectj.asm; -import java.util.*; -import org.aspectj.asm.*; +import java.util.ArrayList; +import java.util.List; /** * @author Mik Kersten diff --git a/asm/src/org/aspectj/asm/StructureNodeFactory.java b/asm/src/org/aspectj/asm/StructureNodeFactory.java index 3e5257960..40428739d 100644 --- a/asm/src/org/aspectj/asm/StructureNodeFactory.java +++ b/asm/src/org/aspectj/asm/StructureNodeFactory.java @@ -14,8 +14,8 @@ package org.aspectj.asm; -import java.util.*; -import org.aspectj.asm.*; +import java.util.Hashtable; +import java.util.List; /** * @author Mik Kersten diff --git a/bridge/src/org/aspectj/bridge/MessageHandler.java b/bridge/src/org/aspectj/bridge/MessageHandler.java index bc68a0a43..6882306e8 100644 --- a/bridge/src/org/aspectj/bridge/MessageHandler.java +++ b/bridge/src/org/aspectj/bridge/MessageHandler.java @@ -16,7 +16,6 @@ package org.aspectj.bridge; import java.util.ArrayList; import java.util.Collections; -import java.util.Comparator; import java.util.Iterator; import java.util.List; diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java index e5bb62aa7..09fef6dc4 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java @@ -15,16 +15,7 @@ package org.aspectj.ajdt.internal.core.builder; import java.io.File; import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Locale; -import java.util.Set; +import java.util.*; import java.util.jar.Attributes; import java.util.jar.JarFile; import java.util.jar.Manifest; @@ -37,26 +28,14 @@ import org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter; import org.aspectj.asm.ProgramElementNode; import org.aspectj.asm.StructureModel; import org.aspectj.asm.StructureModelManager; -import org.aspectj.bridge.AbortException; -import org.aspectj.bridge.CountingMessageHandler; -import org.aspectj.bridge.IMessage; -import org.aspectj.bridge.IMessageHandler; -import org.aspectj.bridge.IProgressListener; -import org.aspectj.bridge.Message; -import org.aspectj.bridge.MessageUtil; -import org.aspectj.bridge.Version; -import org.aspectj.weaver.ResolvedTypeX; +import org.aspectj.bridge.*; import org.aspectj.weaver.World; import org.aspectj.weaver.bcel.BcelWeaver; import org.aspectj.weaver.bcel.BcelWorld; import org.aspectj.weaver.bcel.UnwovenClassFile; import org.eclipse.jdt.core.compiler.CharOperation; import org.eclipse.jdt.core.compiler.IProblem; -import org.eclipse.jdt.internal.compiler.ClassFile; -import org.eclipse.jdt.internal.compiler.CompilationResult; -import org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies; -import org.eclipse.jdt.internal.compiler.ICompilerRequestor; -import org.eclipse.jdt.internal.compiler.IProblemFactory; +import org.eclipse.jdt.internal.compiler.*; import org.eclipse.jdt.internal.compiler.batch.CompilationUnit; import org.eclipse.jdt.internal.compiler.batch.FileSystem; import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; diff --git a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjBuildManagerTest.java b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjBuildManagerTest.java index 4c97612ca..9f65892a5 100644 --- a/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjBuildManagerTest.java +++ b/org.aspectj.ajdt.core/testsrc/org/aspectj/ajdt/internal/core/builder/AjBuildManagerTest.java @@ -16,9 +16,6 @@ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; import junit.framework.TestCase; -- 2.39.5