import org.aspectj.ajde.ui.internal.UserPreferencesStore;
import org.aspectj.ajde.ui.swing.*;
import org.aspectj.asm.*;
+import org.aspectj.util.FileUtil;
//import org.aspectj.asm.internal.*;
/**
if (filePath.endsWith(".lst")) {
AjdeUIManager.getDefault().getBuildConfigEditor().openFile(filePath);
topFrame.setEditorPanel(AjdeUIManager.getDefault().getBuildConfigEditor());
- } else if (filePath.endsWith(".java") || filePath.endsWith(".aj")){
+ } else if (FileUtil.hasSourceSuffix(filePath)){
editorManager.showSourceLine(filePath, 0, false);
} else {
Ajde.getDefault().getErrorHandler().handleError("File: " + filePath
import org.aspectj.ajde.ui.*;
import org.aspectj.bridge.*;
import org.aspectj.util.ConfigParser;
+import org.aspectj.util.FileUtil;
/**
* @author Mik Kersten
private static final FilenameFilter SOURCE_FILE_FILTER = new FilenameFilter() {
public boolean accept(File dir, String name) {
- return name.endsWith(".java")
- || name.endsWith(".aj")
- || name.endsWith(".lst");
+ return FileUtil.hasSourceSuffix(name) || name.endsWith(".lst");
}
};
import java.util.*;
import org.aspectj.bridge.*;
+import org.aspectj.util.FileUtil;
/**
* @author Mik Kersten
}
public boolean isValidResource() {
- return name.endsWith(".java")
- || name.endsWith(".aj")
- || name.endsWith(".lst");
+ return FileUtil.hasSourceSuffix(name) || name.endsWith(".lst");
}
public boolean isActive() {
import org.aspectj.bridge.MessageHandler;
import org.aspectj.tools.ajc.Main;
import org.aspectj.tools.ajc.Main.MessagePrinter;
+import org.aspectj.util.FileUtil;
import java.io.File;
import java.util.Arrays;
String[] files = getDirectoryScanner(dir).getIncludedFiles();
for (int j = 0; j < files.length; j++) {
File file = new File(dir, files[j]);
- if (file.getName().endsWith(".java")
- || file.getName().endsWith(".aj")) {
+ if (FileUtil.hasSourceSuffix(file)) {
cmd.createArgument().setFile(file);
numfiles++;
}