/**********************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
- * Copyright (c) 2011, 2012 Ericsson.
- *
+ * Copyright (c) 2005, 2013 IBM Corporation, Ericsson
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM - Initial API and implementation
- * Bernd Hufmann - Updated for TMF
+ * IBM - Initial API and implementation
+ * Bernd Hufmann - Updated for TMF
**********************************************************************/
+
package org.eclipse.linuxtools.tmf.ui.views.uml2sd;
import java.text.MessageFormat;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.linuxtools.internal.tmf.ui.Activator;
import org.eclipse.linuxtools.internal.tmf.ui.ITmfImageConstants;
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BaseMessage;
import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.BasicExecutionOccurrence;
import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.Frame;
*/
protected String getPostfixForTooltip(boolean accessible) {
StringBuffer postfix = new StringBuffer();
-// String postfix = "";//$NON-NLS-1$
// Determine if the tooltip must show the time difference between the current mouse position and
// the last selected graphNode
if ((fCurrentGraphNode != null) &&
postfix.append(SDMessages._138);
postfix.append(" "); //$NON-NLS-1$
-// postfix = " -> " + fCurrentGraphNode.getName() + "\n" + SDMessages._138 + " "; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
//double delta = ((ITimeRange)toolTipNode).getLastTime()-((ITimeRange)currentGraphNode).getLastTime();
ITmfTimestamp firstTime = ((ITimeRange) fCurrentGraphNode).getEndTime();
ITmfTimestamp lastTime = ((ITimeRange) fToolTipNode).getEndTime();
- TmfTimestamp delta = (TmfTimestamp) lastTime.getDelta(firstTime);
+ ITmfTimestamp delta = lastTime.getDelta(firstTime);
postfix.append(delta.toString());
-// postfix += delta.toString();
} else {
if ((fToolTipNode instanceof ITimeRange) && ((ITimeRange) fToolTipNode).hasTimeInfo()) {
postfix.append("\n"); //$NON-NLS-1$
-// postfix = "\n";//$NON-NLS-1$
ITmfTimestamp firstTime = ((ITimeRange) fToolTipNode).getStartTime();
ITmfTimestamp lastTime = ((ITimeRange) fToolTipNode).getEndTime();
postfix.append("end: "); //$NON-NLS-1$
postfix.append(lastTime.toString());
postfix.append("\n"); //$NON-NLS-1$
-// postfix += "start: " + firstTime + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
-// postfix += "end: " + lastTime + "\n"; //$NON-NLS-1$ //$NON-NLS-2$
} else {
postfix.append(firstTime.toString());
-// postfix += firstTime.toString();
}
}
else if (lastTime != null) {
postfix.append(lastTime.toString());
-// postfix += lastTime.toString();
}
}
}