aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authoraclement <aclement>2007-01-11 11:29:50 +0000
committeraclement <aclement>2007-01-11 11:29:50 +0000
commit41fefd58f8b716468b2bdba2335eb921e5eb3a7b (patch)
tree76209eb2c50bc3d701a1974e6e7396fee60abaf6 /asm
parentf80944e47e6318c9f2c0e54412b67b6ae00eae57 (diff)
downloadaspectj-41fefd58f8b716468b2bdba2335eb921e5eb3a7b.tar.gz
aspectj-41fefd58f8b716468b2bdba2335eb921e5eb3a7b.zip
patches from 148190 #22
Diffstat (limited to 'asm')
-rw-r--r--asm/src/org/aspectj/asm/AsmManager.java6
-rw-r--r--asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java10
2 files changed, 12 insertions, 4 deletions
diff --git a/asm/src/org/aspectj/asm/AsmManager.java b/asm/src/org/aspectj/asm/AsmManager.java
index 4a972c8b8..ba2894469 100644
--- a/asm/src/org/aspectj/asm/AsmManager.java
+++ b/asm/src/org/aspectj/asm/AsmManager.java
@@ -244,7 +244,11 @@ public class AsmManager {
}
private String genExternFilePath(String configFilePath) {
- return configFilePath.substring(0, configFilePath.lastIndexOf(".lst")) + ".ajsym";
+ // sometimes don't have ".lst"
+ if (configFilePath.lastIndexOf(".lst") != -1) {
+ configFilePath = configFilePath.substring(0,configFilePath.lastIndexOf(".lst"));
+ }
+ return configFilePath + ".ajsym";
}
// public void setShouldSaveModel(boolean shouldSaveModel) {
diff --git a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
index eb9ae4b5b..712356e59 100644
--- a/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
+++ b/asm/src/org/aspectj/asm/internal/JDTLikeHandleProvider.java
@@ -59,9 +59,13 @@ public class JDTLikeHandleProvider implements IElementHandleProvider {
String configFile = AsmManager.getDefault().getHierarchy().getConfigFile();
int start = configFile.lastIndexOf(File.separator);
int end = configFile.lastIndexOf(".lst");
- String fileName = configFile.substring(start + 1,end);
- ipe.setHandleIdentifier(fileName);
- return fileName;
+ if (end != -1) {
+ configFile = configFile.substring(start+1,end);
+ } else {
+ configFile = configFile.substring(start+1);
+ }
+ ipe.setHandleIdentifier(configFile);
+ return configFile;
}
IProgramElement parent = ipe.getParent();
if (parent != null &&