diff --git a/XSourceNote.xcodeproj/project.pbxproj b/XSourceNote.xcodeproj/project.pbxproj index 10161c2..9f8fc56 100644 --- a/XSourceNote.xcodeproj/project.pbxproj +++ b/XSourceNote.xcodeproj/project.pbxproj @@ -541,9 +541,10 @@ HEADER_SEARCH_PATHS = XSourceNote/MagicalRecord; INFOPLIST_FILE = XSourceNote/Info.plist; INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.10; PRODUCT_BUNDLE_IDENTIFIER = com.everettjf.XSourceNote; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; WRAPPER_EXTENSION = xcplugin; }; name = Debug; @@ -563,9 +564,10 @@ HEADER_SEARCH_PATHS = XSourceNote/MagicalRecord; INFOPLIST_FILE = XSourceNote/Info.plist; INSTALL_PATH = "/Library/Application Support/Developer/Shared/Xcode/Plug-ins"; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.10; PRODUCT_BUNDLE_IDENTIFIER = com.everettjf.XSourceNote; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; WRAPPER_EXTENSION = xcplugin; }; name = Release; diff --git a/XSourceNote.xcodeproj/project.xcworkspace/xcuserdata/everettjf.xcuserdatad/UserInterfaceState.xcuserstate b/XSourceNote.xcodeproj/project.xcworkspace/xcuserdata/everettjf.xcuserdatad/UserInterfaceState.xcuserstate index b355482..a40afff 100644 Binary files a/XSourceNote.xcodeproj/project.xcworkspace/xcuserdata/everettjf.xcuserdatad/UserInterfaceState.xcuserstate and b/XSourceNote.xcodeproj/project.xcworkspace/xcuserdata/everettjf.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/XSourceNote/XSourceNote.m b/XSourceNote/XSourceNote.m index c07675f..7373558 100755 --- a/XSourceNote/XSourceNote.m +++ b/XSourceNote/XSourceNote.m @@ -120,7 +120,7 @@ - (void)toggleNote // NSLog(@"code below = \n%@", codeOfLines); // length of "file://" is 7 - NSString *sourcePath = [[editor.sourceCodeDocument.fileURL absoluteString] substringFromIndex:7]; + NSString *sourcePath = [[[editor.sourceCodeDocument.fileURL absoluteString] substringFromIndex:7] stringByRemovingPercentEncoding]; XSourceNoteStorage *st = [XSourceNoteStorage sharedStorage]; if([st.rootPath isEqualToString:@""]){ diff --git a/XSourceNote/XSourceNoteStorage.m b/XSourceNote/XSourceNoteStorage.m index 0bf8db2..a2c90b9 100644 --- a/XSourceNote/XSourceNoteStorage.m +++ b/XSourceNote/XSourceNoteStorage.m @@ -64,9 +64,8 @@ - (NSURL *)notePath{ NSString *projectName = [workspaceFilePath lastPathComponent]; projectName = [projectName stringByDeletingPathExtension]; - NSString *settingFileName = [NSString stringWithFormat:@"%@_%lu.db", - projectName, - [workspaceFilePath hash] % 1000 + NSString *settingFileName = [NSString stringWithFormat:@"%@.db", + projectName ]; NSString *noteUrlString =[[XSourceNoteUtil notesDirectory] stringByAppendingPathComponent:settingFileName]; diff --git a/XSourceNote/XSourceNoteUtil.m b/XSourceNote/XSourceNoteUtil.m old mode 100644 new mode 100755 index 9e95e54..62aceef --- a/XSourceNote/XSourceNoteUtil.m +++ b/XSourceNote/XSourceNoteUtil.m @@ -90,7 +90,7 @@ +(NSString *)currentWorkspaceFilePath{ if(nil == document) return nil; DVTFilePath *workspacefilePath = document.workspace.representingFilePath; - return [workspacefilePath.fileURL absoluteString]; + return [[workspacefilePath.fileURL absoluteString] stringByRemovingPercentEncoding]; } + (void)highlightLine:(NSUInteger)lineNumber inTextView:(NSTextView*)textView