ide/src/wombat/util/Options.java
private static void loadSyntax() {
		try {
	        ClassLoader loader = Options.class.getClassLoader();
			final Scanner s = new Scanner(new File(loader.getResource("lib/syntax.csv").toURI()));
			String line;
			String[] parts;
			while (s.hasNextLine()) {
				line = s.nextLine().trim();
				if ("".equals(line) || line.charAt(0) == ';') continue;
				
				parts = line.split(",");
				if (parts.length == 2) { // old style: keyword,indent
					Keywords.put(parts[0], Integer.parseInt(parts[1]));
				} else if (parts.length == 4) { // new style: keyword,kind,indent,help URL
					Keywords.put(parts[0], Integer.parseInt(parts[2]));
					if (!parts[3].trim().isEmpty())
						KeywordHelpURLs.put(parts[0], parts[3]);
				}
			}
			s.close();
		} catch(FileNotFoundException ex) {
			ErrorManager.logError("Unable to find syntax file.");
			return;
		} catch (URISyntaxException e) {
			ErrorManager.logError("Unable to find syntax file.");
			return;
		}
	}
/**
     * Load syntax options from file.
     */
Load syntax options from file.
Load syntax options from file .
private static void loadSyntax() {
		try {
	        ClassLoader loader = Options.class.getClassLoader();
			final Scanner s = new Scanner(new File(loader.getResource("lib/syntax.csv").toURI()));
			String line;
			String[] parts;
			while (s.hasNextLine()) {
				line = s.nextLine().trim();
				if ("".equals(line) || line.charAt(0) == ';') continue;
				parts = line.split(",");
				if (parts.length == 2) { 
					Keywords.put(parts[0], Integer.parseInt(parts[1]));
				} else if (parts.length == 4) { 
					Keywords.put(parts[0], Integer.parseInt(parts[2]));
					if (!parts[3].trim().isEmpty())
						KeywordHelpURLs.put(parts[0], parts[3]);
				}
			}
			s.close();
		} catch(FileNotFoundException ex) {
			ErrorManager.logError("Unable to find syntax file.");
			return;
		} catch (URISyntaxException e) {
			ErrorManager.logError("Unable to find syntax file.");
			return;
		}
	}
private static void loadSyntax ( ) { try { ClassLoader loader = Options . class . getClassLoader ( ) ; final Scanner s = new Scanner ( new File ( loader . getResource ( "lib/syntax.csv" ) . toURI ( ) ) ) ; String line ; String [ ] parts ; while ( s . hasNextLine ( ) ) { line = s . nextLine ( ) . trim ( ) ; if ( "" . equals ( line ) || line . charAt ( 0 ) == ';' ) continue ; parts = line . split ( "," ) ; if ( parts . length == 2 ) { Keywords . put ( parts [ 0 ] , Integer . parseInt ( parts [ 1 ] ) ) ; } else if ( parts . length == 4 ) { Keywords . put ( parts [ 0 ] , Integer . parseInt ( parts [ 2 ] ) ) ; if ( ! parts [ 3 ] . trim ( ) . isEmpty ( ) ) KeywordHelpURLs . put ( parts [ 0 ] , parts [ 3 ] ) ; } } s . close ( ) ; } catch ( FileNotFoundException ex ) { ErrorManager . logError ( "Unable to find syntax file." ) ; return ; } catch ( URISyntaxException e ) { ErrorManager . logError ( "Unable to find syntax file." ) ; return ; } }
Load syntax options from file.
Load syntax options from file .
// old style: keyword,indent // new style: keyword,kind,indent,help URL