Révision 1083

tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 1083)
114 114
	protected String lazyName;
115 115
	
116 116
	protected void computeForTheVeryFirstTime() throws Exception {
117
		if (!hasBeenComputedOnce) {
118
			compute();
117
		if (!this.hasBeenComputedOnce) {
118
			this.compute();
119 119
		}
120 120
	}
121 121

  
......
1388 1388
	public abstract String getName();
1389 1389

  
1390 1390
	/**
1391
	 * Gets the simple name of the result. Dedicated to be displayed in a small UI area.
1391
	 * Gets the simple name of the result.
1392
	 * Dedicated to be displayed in a small UI area.
1392 1393
	 * 
1393 1394
	 * @return
1394 1395
	 */
1395 1396
	public abstract String getSimpleName();
1396 1397

  
1397 1398
	/**
1398
	 * Gets some details about how the result has been computed  (eg. additional parameters, etc.). Dedicated to be displayed in a large UI area.
1399
	 * Gets some details about how the result has been computed (eg. additional parameters, etc.).
1400
	 * Dedicated to be displayed in a large UI area.
1399 1401
	 * 
1400 1402
	 * @return
1401 1403
	 */
......
1403 1405

  
1404 1406
	/**
1405 1407
	 * Gets the user name if exists otherwise, the lazy name if exists, otherwise the simple name.
1406
	 * @return the user name if exists otherwise, the lazy name if exists, otherwise the simple name
1408
	 * 
1409
	 * @return the current name
1407 1410
	 */
1408 1411
	public String getCurrentName() {
1409
		if(this.userName != null)	{
1412
		if (this.userName != null) {
1410 1413
			return this.userName;
1411 1414
		}
1412
		else if(this.lazyName != null) {
1415
		else if (this.lazyName != null) {
1413 1416
			return this.lazyName;
1414 1417
		}
1415 1418
		else {
1416
			return this.getSimpleName();	
1419
			return this.getSimpleName();
1417 1420
		}
1418 1421
	}
1419 1422

  
1420 1423
	
1421 1424
	/**
1422 1425
	 * Convenience method to get a shared name when the result is empty (not yet computed).
1423
	 * @return the String "*"
1426
	 * @return the string "..."
1424 1427
	 */
1425 1428
	public String getEmptyName()	{
1426 1429
		return "..."; //$NON-NLS-1$
......
1438 1441
	/**
1439 1442
	 * Gets a string representing the result that can be used as a file name (eg. for exporting in file).
1440 1443
	 * 
1441
	 * @return
1444
	 * @return a valid filename without unexpected characters
1442 1445
	 */
1443 1446
	// FIXME: to discuss and/or to move in export layer
1444 1447
	public String getValidFileName() {
......
1447 1450
		} catch (Exception e) {
1448 1451
			Log.printStackTrace(e);
1449 1452
		}
1450
		return "";
1453
		return ""; //$NON-NLS-1$
1451 1454
	}
1452 1455

  
1453 1456
	/**
1454 1457
	 * Gets a string representing the concatenation of the simple names of the branch of this result.
1455 1458
	 * 
1456
	 * @return
1459
	 * @return the full path
1457 1460
	 */
1458 1461
	synchronized public String getFullPathSimpleName() {
1459 1462

  
tmp/org.txm.statsengine.r.core/src/org/txm/statsengine/r/core/RWorkspace.java (revision 1083)
953 953
	 * @return the rEXP
954 954
	 * @throws RWorkspaceException the r workspace exception
955 955
	 */
956
	public REXP callFunction(String functionName, String argument)
957
			throws RWorkspaceException {
956
	public REXP callFunction(String functionName, String argument) throws RWorkspaceException {
958 957
		return callFunction(functionName, new String[] { argument });
959 958
	}
960 959

  
......
984 983
	 * @throws RWorkspaceException the r workspace exception
985 984
	 */
986 985
	public REXP callFunctionAndAffect(String functionName, String[] arguments, String symbol) throws RWorkspaceException {
987
		if (symbol.length() == 0)//symbol must be well formed
986
		//symbol must be well formed
987
		if (symbol.length() == 0) {
988 988
			symbol = "txmresult"; //$NON-NLS-1$
989
		}
989 990
		StringBuffer sb = new StringBuffer();
990 991
		sb.append(symbol);
991 992
		sb.append(RConstant.AFFECTATION);
......
1002 1003
	public void checkForDuplicateVariable(String variableName)
1003 1004
			throws RWorkspaceException {
1004 1005
		if (containsVariable(variableName)) {
1005
			throw new RObjectAlreadyExist(
1006
					"Duplicate variable name: " + variableName + ". Existing variables: " + Arrays.toString(getExistingVariableName())); //$NON-NLS-1$ //$NON-NLS-2$
1006
			throw new RObjectAlreadyExist("Duplicate variable name: " + variableName + ". Existing variables: " + Arrays.toString(this.getExistingVariableName())); //$NON-NLS-1$ //$NON-NLS-2$
1007 1007
		}
1008 1008
	}
1009 1009

  
tmp/org.txm.lexicaltable.core/src/org/txm/lexicaltable/core/functions/LexicalTable.java (revision 1083)
565 565
	@Override
566 566
	public String getSimpleName() {
567 567
		if (!hasBeenComputedOnce) {
568
			return getLazyName();
569
		} else {
568
			return this.getLazyName();
569
		}
570
		else {
570 571
			StringBuilder strb = new StringBuilder();
571 572
			if (property != null) {
572 573
				strb.append(property.getName()+" ");
tmp/org.txm.rcp/src/main/java/org/txm/rcp/adapters/TXMResultAdapter.java (revision 1083)
72 72

  
73 73
	@Override
74 74
    public RGB getBackground(Object element) {
75
		// FIXME: SJ: tests
75 76
//		if(element instanceof TXMResult && ((TXMResult)element).isUserPersistable())	{
76 77
//	    	Display display = Display.getCurrent();
77 78
//	    	Color color = display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);

Formats disponibles : Unified diff