Changeset 137 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java


Ignore:
Timestamp:
10/24/2017 07:24:45 PM (9 years ago)
Author:
bmcguffin
Message:

Commented out my previous attempts at finding the incident directory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java

    r136 r137  
    77import java.io.File; 
    88import java.io.FileFilter; 
     9import java.io.FileInputStream; 
    910import java.io.IOException; 
     11import java.io.InputStream; 
     12import java.net.URISyntaxException; 
     13import java.nio.file.Paths; 
    1014import java.text.SimpleDateFormat; 
    1115import java.time.LocalDate; 
     
    98102        String fs = System.getProperty("file.separator"); 
    99103 
    100         String propfilename = fs + "scriptbuilder" + fs + "gui" + fs + "application.properties"; 
    101         String propKey = "Incidents.directory"; 
    102         incDir = ""; 
    103         // Load the application properties (created by build.xml) 
     104//         
     105//        String srcPath = Paths.get(".").toAbsolutePath().normalize().toString(); 
     106//        
     107//         
     108//        String propfilename = srcPath + fs + "src" + fs + "scriptbuilder" + fs + "gui" + fs + "application.properties"; 
     109//        String propKey = "Incidents.directory"; 
     110//        incDir = ""; 
     111//        // Load the application properties (created by build.xml) 
     112//        try 
     113//        { 
     114//             
     115//            Properties props = new Properties(); 
     116//            
     117//            JOptionPane.showMessageDialog(this, 
     118//                    ""+srcPath, "Looking for Folder: \"" + propfilename + "\"", JOptionPane.INFORMATION_MESSAGE); 
     119//            
     120//            props.load(new FileInputStream(propfilename)); 
     121//             
     122//            JOptionPane.showMessageDialog(this, 
     123//                    ""+propfilename, "Locating Folder: \"" + incDir + "\"", JOptionPane.INFORMATION_MESSAGE); 
     124//             
     125//            incDir = (String) props.get(propKey); 
     126//             
     127//            JOptionPane.showMessageDialog(this, 
     128//                    ""+srcPath+fs+incDir, "Found Folder: \"" + incDir + "\"", JOptionPane.INFORMATION_MESSAGE); 
     129//        } 
     130//        catch (IOException ex) 
     131//        { 
     132//            Logger.getLogger("scriptbuilder.gui").log(Level.SEVERE, 
     133//                    "IncidentPaletteFrame.loadIncidentsFromFiles." 
     134//                    + " IOError reading " + propfilename); 
     135//            JOptionPane.showMessageDialog(this, 
     136//                    ""+propfilename, "Missing Folder: \"" + propfilename + "\"", JOptionPane.ERROR_MESSAGE); 
     137//        } 
     138         
    104139        Properties props = new Properties(); 
    105140        //props.load(this.getClass().getResourceAsStream(propfilename)); 
Note: See TracChangeset for help on using the changeset viewer.