Ignore:
Timestamp:
2015-09-16T12:38:19+02:00 (9 years ago)
Author:
nkaragiannakis
Message:

check windows path

Location:
applications/editors/josm/plugins/OSMRecPlugin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/OSMRecPlugin/nbproject/private/private.xml

    r31554 r31564  
    44    <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
    55        <group>
    6             <file>file:/home/imis-nkarag/software/josm_svn/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/parsers/Mapper.java</file>
    7             <file>file:/home/imis-nkarag/software/josm_svn/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/osmrec/OSMRecPlugin.java</file>
    8             <file>file:/home/imis-nkarag/software/josm_svn/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/osmrec/OSMRecPluginHelper.java</file>
    9             <file>file:/home/imis-nkarag/software/josm_svn/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/osmrec/personalization/HistoryParser.java</file>
    10             <file>file:/home/imis-nkarag/software/josm_svn/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/osmrec/personalization/TrainByUser.java</file>
    11             <file>file:/home/imis-nkarag/software/josm_svn/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/core/TrainWorker.java</file>
    12             <file>file:/home/imis-nkarag/software/josm_svn/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/extractor/SampleModelsExtractor.java</file>
     6            <file>file:/C:/Users/pandaimonio/Documents/software/josm_svn/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/osmrec/OSMRecPlugin.java</file>
     7            <file>file:/C:/Users/pandaimonio/Documents/software/josm_svn/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/osmrec/OSMRecPluginHelper.java</file>
     8            <file>file:/C:/Users/pandaimonio/Documents/software/josm_svn/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/osmrec/personalization/TrainByUser.java</file>
     9            <file>file:/C:/Users/pandaimonio/Documents/software/josm_svn/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/osmrec/MenuExportAction.java</file>
     10            <file>file:/C:/Users/pandaimonio/Documents/software/josm_svn/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/core/TrainWorker.java</file>
    1311        </group>
    1412    </open-files>
  • applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/core/TrainWorker.java

    r31554 r31564  
    105105        this.frequency = frequency;
    106106        this.topKIsSelected = topKIsSelected;
    107        
    108         inputFileName = inputFilePath.substring(inputFilePath.lastIndexOf("/"));
     107        if(System.getProperty("os.name").contains("ux")){
     108            inputFileName = inputFilePath.substring(inputFilePath.lastIndexOf("/"));
     109        }
     110        else{
     111            inputFileName = inputFilePath.substring(inputFilePath.lastIndexOf("\\"));
     112        }
    109113        System.out.println("find parent directory, create osmrec dir for models: " + new File(inputFilePath).getParentFile());
    110114        modelDirectoryPath = new File(inputFilePath).getParentFile() + "/OSMRec_models";
  • applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/osmrec/OSMRecPluginHelper.java

    r31554 r31564  
    14951495                    String svmModelPath = fileChooser.getSelectedFile().getAbsolutePath();
    14961496                    String svmModelText;
    1497                     if(svmModelPath.contains("/")){
    1498                         svmModelText = svmModelPath.substring(svmModelPath.lastIndexOf("/"));
     1497                    if(System.getProperty("os.name").contains("ux")){
     1498                        if(svmModelPath.contains("/")){
     1499                            svmModelText = svmModelPath.substring(svmModelPath.lastIndexOf("/"));
     1500                        }
     1501                        else{
     1502                            svmModelText = svmModelPath;
     1503                        }
    14991504                    }
    15001505                    else{
    1501                         svmModelText = svmModelPath;
     1506                         if(svmModelPath.contains("\\")){
     1507                            svmModelText = svmModelPath.substring(svmModelPath.lastIndexOf("/"));
     1508                        }
     1509                        else{
     1510                            svmModelText = svmModelPath;
     1511                        }                       
    15021512                    }
    15031513                    combinationDefaultListModel.addElement(svmModelText);
  • applications/editors/josm/plugins/OSMRecPlugin/src/org/openstreetmap/josm/plugins/osmrec/personalization/TrainByUser.java

    r31554 r31564  
    100100        System.out.println("find parent directory, create osmrec dir for models: " + new File(inputFilePath).getParentFile());
    101101       
    102         inputFileName = inputFilePath.substring(inputFilePath.lastIndexOf("/"));
     102        if(System.getProperty("os.name").contains("ux")){
     103            inputFileName = inputFilePath.substring(inputFilePath.lastIndexOf("/"));
     104        }
     105        else{
     106            inputFileName = inputFilePath.substring(inputFilePath.lastIndexOf("\\"));
     107        }
     108       
    103109        modelDirectoryPath = new File(inputFilePath).getParentFile() + "/OSMRec_models";
    104110        //textualDirectoryPath = new File(inputFilePath).getParentFile() + "/OSMRec_models/textualList.txt";
Note: See TracChangeset for help on using the changeset viewer.