#NEWLINE# def shouldShowBookmark( window , activeView , bookmark , bookmarkMode ) : #NEWLINE# #INDENT# def isValidProject( currentProjectPath , bookmarkProjectPath ) : #NEWLINE# #INDENT# return ( ( currentProjectPath == NO_PROJECT ) or ( currentProjectPath == bookmarkProjectPath ) ) #NEWLINE# #UNINDENT# currentFilePath = activeView . file_name ( ) #NEWLINE# currentProjectPath = window . project_file_name ( ) #NEWLINE# if ( bookmarkMode == SHOW_ALL_BOOKMARKS ( ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( isValidProject == SHOW_ONLY_PROJECT_BOOKMARKS ( ) ) and isValidProject ( currentProjectPath , bookmark . getProjectPath ( ) ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( bookmarkMode == SHOW_ONLY_FILE_BOOKMARKS ( ) ) and ( bookmark . getFilePath ( ) == currentFilePath ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return False