Révision 3721

TXM/trunk/bundles/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java (revision 3721)
1311 1311
	 */
1312 1312
	public static void dump(IScopeContext scope, String nodePath) {
1313 1313
		IEclipsePreferences preferences = scope.getNode(nodePath);
1314
		System.out.println("TXMPreferences.dump(): ***************************************************************");
1315
		System.out.println("TXMPreferences.dump(): node qualifier = " + nodePath);
1316
		System.out.println("TXMPreferences.dump():" + preferences.absolutePath());
1314
		System.out.println("TXMPreferences.dump(): ***************************************************************"); //$NON-NLS-1$
1315
		System.out.println("TXMPreferences.dump(): node qualifier = " + nodePath); //$NON-NLS-1$
1316
		System.out.println("TXMPreferences.dump():" + preferences.absolutePath()); //$NON-NLS-1$
1317 1317
		try {
1318 1318
			String[] keys = preferences.keys();
1319 1319
			for (int i = 0; i < keys.length; i++) {
......
1348 1348
		return preferences.keys();
1349 1349
	}
1350 1350
	
1351
	/**
1352
	 * 
1353
	 * @param nodePath
1354
	 * @return
1355
	 * @throws BackingStoreException
1356
	 */
1351 1357
	public static String[] getCommandScopeKeys(String nodePath) throws BackingStoreException {
1352 1358
		return getKeys(InstanceScope.INSTANCE, nodePath);
1353 1359
	}
1354 1360
	
1361
	/**
1362
	 * 
1363
	 * @param nodePath
1364
	 * @return
1365
	 * @throws BackingStoreException
1366
	 */
1355 1367
	public static String[] getDefaultScopeKeys(String nodePath) throws BackingStoreException {
1356 1368
		return getKeys(DefaultScope.INSTANCE, nodePath);
1357 1369
	}
1358 1370
	
1371
	/**
1372
	 * Gets the keys and values of the specified node path in the specified scope context as Map.
1373
	 * 
1374
	 * @param scope
1375
	 * @param nodePath
1376
	 * @return
1377
	 */
1359 1378
	public static HashMap<String, Object> getKeysAndValuesAsMap(IScopeContext scope, String nodePath) {
1360 1379
		
1361 1380
		HashMap<String, Object> str = new HashMap<>();
......
1377 1396
		return str;
1378 1397
	}
1379 1398
	
1399
	/**
1400
	 * Gets the keys and values of the specified node path as string.
1401
	 * 
1402
	 * @param nodePath
1403
	 * @return
1404
	 */
1380 1405
	public static String getKeysAndValues(String nodePath) {
1381 1406
		
1382 1407
		StringBuilder str = new StringBuilder();
......
1415 1440
		// result scope node
1416 1441
		if (result != null) {
1417 1442
			if (resultScopeNodeExists(result)) {
1418
				Log.finest("TXMPreferences.dump(): Result scope preferences for node " + result.getParametersNodePath() + ":");
1443
				Log.finest("TXMPreferences.dump(): Result scope preferences for node " + result.getParametersNodePath() + ":"); //$NON-NLS-1$ //$NON-NLS-2$
1419 1444
				dump(result.getParametersNodePath());
1420 1445
			}
1421 1446
			else {
1422
				Log.severe("TXMPreferences.dump(): No result scope preferences was found for node" + result.getParametersNodePath() + ".");
1447
				Log.severe("TXMPreferences.dump(): No result scope preferences was found for node" + result.getParametersNodePath() + "."); //$NON-NLS-1$ //$NON-NLS-2$
1423 1448
			}
1424 1449
		}
1425 1450
		// command scope node
1426 1451
		if (nodePath != null) {
1427
			Log.finest("TXMPreferences.dump(): Command scope preferences for node " + nodePath + ":");
1452
			Log.finest("TXMPreferences.dump(): Command scope preferences for node " + nodePath + ":"); //$NON-NLS-1$ //$NON-NLS-2$
1428 1453
			dump(nodePath);
1429 1454
		}
1430 1455
		else {
1431
			Log.finest("TXMPreferences.dump(): No Command scope was asked to dump.");
1456
			Log.finest("TXMPreferences.dump(): No Command scope was asked to dump."); //$NON-NLS-1$
1432 1457
		}
1433 1458
		
1434 1459
		// alternative global scope nodes
1435 1460
		for (int i = 0; i < alternativeNodesQualifiers.size(); i++) {
1436
			Log.finest("TXMPreferences.dump(): Alternative global scope preferences for node " + alternativeNodesQualifiers.get(i) + ":");
1461
			Log.finest("TXMPreferences.dump(): Alternative global scope preferences for node " + alternativeNodesQualifiers.get(i) + ":"); //$NON-NLS-1$ //$NON-NLS-2$
1437 1462
			dump(alternativeNodesQualifiers.get(i));
1438 1463
		}
1439 1464
	}
......
1447 1472
	 */
1448 1473
	public static void delete(TXMResult result) {
1449 1474
		delete(preferencesRootNode.node(result.getParametersNodePath()));
1450
		Log.finest("TXMPreferences.delete(): Local preferences node for object " + result.getParametersNodePath() + " deleted.");
1475
		Log.finest("TXMPreferences.delete(): Local preferences node for object " + result.getParametersNodePath() + " deleted."); //$NON-NLS-1$ //$NON-NLS-2$
1451 1476
	}
1452 1477
	
1453 1478
	

Formats disponibles : Unified diff