<commit_before>import sublime_plugin
import sublime
import os

try: # Python 3
    from ..HaxeHelper import HaxeComplete_inst, isType
except (ValueError): # Python 2
    from HaxeHelper import HaxeComplete_inst, isType

print("hello")
class HaxeAddHxml( sublime_plugin.WindowCommand ):

    # add builds from hxml and append to project settings
    def run( self , paths = [] ) : 
        win = self.window

        for p in paths :
            if os.path.exists( p ) :
                HaxeComplete_inst().read_hxml( p );
                if( int(sublime.version()) > 3000 ) : 
                    proj = win.project_file_name()
                    if proj is not None :
                        proj_path = os.path.dirname( proj )
                        rel_path = os.path.relpath( p , proj_path )
                        data = win.project_data()
                        print(data)
                        if data['settings'] is None :
                            data['settings'] = {}
                        if data['settings']['haxe_build_files'] is None :
                            data['settings']['haxe_build_files'] = []

                        build_files = data['settings']['haxe_build_files'];
                        build_files.append( rel_path )

                        win.set_project_data( data )

                <commit_msg>store haxe_build_files even if not in a project<commit_after>import sublime_plugin
import sublime
import os

try: # Python 3
    from ..HaxeHelper import HaxeComplete_inst, isType
except (ValueError): # Python 2
    from HaxeHelper import HaxeComplete_inst, isType

print("hello")
class HaxeAddHxml( sublime_plugin.WindowCommand ):

    # add builds from hxml and append to project settings
    def run( self , paths = [] ) : 
        win = self.window

        for p in paths :
            if os.path.exists( p ) :
                HaxeComplete_inst().read_hxml( p );
                if( int(sublime.version()) > 3000 ) : 
                    proj = win.project_file_name()
                    if proj is not None :
                        proj_path = os.path.dirname( proj )
                        rel_path = os.path.relpath( p , proj_path )
                    else :
                        rel_path = p

                    data = win.project_data()
                    
                    if data['settings'] is None :
                        data['settings'] = {}
                    if data['settings']['haxe_build_files'] is None :
                        data['settings']['haxe_build_files'] = []

                    build_files = data['settings']['haxe_build_files'];
                    build_files.append( rel_path )

                    win.set_project_data( data )

                
{'fraction_non_alphanumeric': 0.08885651857246904, 'fraction_numerical': 0.004369992716678805, 'mean_word_length': 1.4483065953654188, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1173774', 'n_tokens_mistral': 781, 'n_tokens_neox': 711, 'n_words': 183}