--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.linuxtools.tmf.ui" version="2">
+ <resource path="src/org/eclipse/linuxtools/tmf/ui/editors/UnsortedPropertySheetPage.java" type="org.eclipse.linuxtools.tmf.ui.editors.UnsortedPropertySheetPage">
+ <filter comment="The Eclipse platform still mistakingly marks PropertySheetPage as @noextend. See bug 109617. " id="571473929">
+ <message_arguments>
+ <message_argument value="PropertySheetPage"/>
+ <message_argument value="UnsortedPropertySheetPage"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
}
}
}
- if (! processed) {
+ if (!processed && currentInput != null) {
final Matcher matcher = currentInput.getPattern().matcher(line);
if (matcher.find()) {
event.processGroups(currentInput, matcher);
selectedLine.dispose();
}
if (!(event.getSelection().isEmpty()) && event.getSelection() instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- InputLine inputLine = (InputLine) selection.getFirstElement();
+ IStructuredSelection sel = (IStructuredSelection) event.getSelection();
+ InputLine inputLine = (InputLine) sel.getFirstElement();
selectedLine = new Line(lineContainer, getName(inputLine), inputLine);
lineContainer.layout();
lineScrolledComposite.setMinSize(lineContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, lineContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT).y - 1);
private String getSelectionText() {
if (this.selection instanceof IStructuredSelection) {
- Object selection = ((IStructuredSelection)this.selection).getFirstElement();
- if (selection instanceof IFile) {
- IFile file = (IFile)selection;
+ Object sel = ((IStructuredSelection) this.selection).getFirstElement();
+ if (sel instanceof IFile) {
+ IFile file = (IFile)sel;
BufferedReader reader = null;
try {
reader = new BufferedReader(new InputStreamReader(file.getContents()));
}
}
}
- if (! processed) {
+ if (!processed && currentInput != null) {
matcher = currentInput.getPattern().matcher(log);
if (matcher.find()) {
inputText.setStyleRange(new StyleRange(rawPos, length,
}
inputLine.columns = new ArrayList<InputData>(inputs.size());
for (int i = 0; i < inputs.size(); i++) {
- InputGroup group = inputs.get(i);
+ InputGroup grp = inputs.get(i);
InputData inputData = new InputData();
- if (group.tagCombo.getText().equals(CustomTraceDefinition.TAG_OTHER)) {
- inputData.name = group.tagText.getText().trim();
+ if (grp.tagCombo.getText().equals(CustomTraceDefinition.TAG_OTHER)) {
+ inputData.name = grp.tagText.getText().trim();
} else {
- inputData.name = group.tagCombo.getText();
- if (group.tagCombo.getText().equals(CustomTraceDefinition.TAG_TIMESTAMP)) {
- inputData.format = group.tagText.getText().trim();
+ inputData.name = grp.tagCombo.getText();
+ if (grp.tagCombo.getText().equals(CustomTraceDefinition.TAG_TIMESTAMP)) {
+ inputData.format = grp.tagText.getText().trim();
}
}
- inputData.action = group.actionCombo.getSelectionIndex();
+ inputData.action = grp.actionCombo.getSelectionIndex();
inputLine.columns.add(inputData);
}
}
super.dispose();
}
- private void loadDefinition(final CustomTxtTraceDefinition definition) {
- for (final OutputColumn outputColumn : definition.outputs) {
+ private void loadDefinition(final CustomTxtTraceDefinition def) {
+ for (final OutputColumn outputColumn : def.outputs) {
final Output output = new Output(outputsContainer, outputColumn.name);
outputs.add(output);
}
}
@Override
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.selection = selection;
+ public void init(IWorkbench workbench, IStructuredSelection sel) {
+ this.selection = sel;
}
}
selectedElement.dispose();
}
if (!(event.getSelection().isEmpty()) && event.getSelection() instanceof IStructuredSelection) {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- InputElement inputElement = (InputElement) selection.getFirstElement();
+ IStructuredSelection sel = (IStructuredSelection) event.getSelection();
+ InputElement inputElement = (InputElement) sel.getFirstElement();
selectedElement = new ElementNode(elementContainer, inputElement);
elementContainer.layout();
elementScrolledComposite.setMinSize(elementContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT).x,
private String getSelectionText() {
InputStream inputStream = null;
if (this.selection instanceof IStructuredSelection) {
- Object selection = ((IStructuredSelection) this.selection).getFirstElement();
- if (selection instanceof IFile) {
- IFile file = (IFile) selection;
+ Object sel = ((IStructuredSelection) this.selection).getFirstElement();
+ if (sel instanceof IFile) {
+ IFile file = (IFile) sel;
try {
inputStream = file.getContents();
} catch (CoreException e) {
}
}
- private void updatePreviews() {
- updatePreviews(false);
- }
-
private void initValues() {
timeStampValue = null;
timeStampFormat = null;
logEntryFound = false;
}
- private void updatePreviews(boolean updateAll) {
+ private void updatePreviews() {
if (inputText == null) {
// early update during construction
return;
@Override
public void widgetSelected(SelectionEvent e) {
- InputElement parent = ElementNode.this.inputElement.parentElement;
- while (parent != null) {
- parent.logEntry = false;
- parent = parent.parentElement;
+ InputElement parentElem = ElementNode.this.inputElement.parentElement;
+ while (parentElem != null) {
+ parentElem.logEntry = false;
+ parentElem = parentElem.parentElement;
}
}
});
super.dispose();
}
- private void loadDefinition(final CustomTraceDefinition definition) {
- for (final OutputColumn outputColumn : definition.outputs) {
+ private void loadDefinition(final CustomTraceDefinition def) {
+ for (final OutputColumn outputColumn : def.outputs) {
final Output output = new Output(outputsContainer, outputColumn.name);
outputs.add(output);
}
}
@Override
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.selection = selection;
+ public void init(IWorkbench workbench, IStructuredSelection sel) {
+ this.selection = sel;
}
}
return false;
}
- String sourceDirPath;
try {
- sourceDirPath = sourceDir.getCanonicalPath();
+ sourceDir.getCanonicalPath();
} catch (IOException e) {
MessageDialog.openInformation(getContainer().getShell(), Messages.ImportTraceWizard_Information,
Messages.ImportTraceWizard_InvalidTraceDirectory);
}
if (fileSystemObjects.size() > 0) {
- boolean ok = importResources(sourceDirPath, fileSystemObjects);
+ boolean ok = importResources(fileSystemObjects);
String traceBundle = null;
String traceTypeId = null;
String traceIcon = null;
return false;
}
- private boolean importResources(String rootDirectory, Map<String, File> fileSystemObjects) {
+ private boolean importResources(Map<String, File> fileSystemObjects) {
// Determine the sorted canonical list of items to import
List<File> fileList = new ArrayList<File>();
final int index = current * fCache.length;
class DataRequest extends TmfDataRequest {
- ITmfFilter fFilter;
- int fRank;
- int fIndex;
+ ITmfFilter requestFilter;
+ int requestRank;
+ int requestIndex;
- DataRequest(Class<? extends ITmfEvent> dataType, ITmfFilter filter, int start, int nbRequested) {
+ DataRequest(Class<? extends ITmfEvent> dataType, ITmfFilter reqFilter, int start, int nbRequested) {
super(dataType, start, nbRequested);
- fFilter = filter;
- fRank = start;
- fIndex = index;
+ requestFilter = reqFilter;
+ requestRank = start;
+ requestIndex = index;
}
@Override
if (isCancelled()) {
return;
}
- if (fRank >= rank) {
+ if (requestRank >= rank) {
cancel();
return;
}
- fRank++;
- if (fFilter.matches(event)) {
- fIndex++;
+ requestRank++;
+ if (requestFilter.matches(event)) {
+ requestIndex++;
}
}
public int getFilteredIndex() {
- return fIndex;
+ return requestIndex;
}
}
if (fHeaderState == HeaderState.SEARCH) {
stopSearchThread();
final TmfFilterAndNode filter = new TmfFilterAndNode(null);
- for (final TableColumn column : fTable.getColumns()) {
- final Object filterObj = column.getData(Key.SEARCH_OBJ);
+ for (final TableColumn col : fTable.getColumns()) {
+ final Object filterObj = col.getData(Key.SEARCH_OBJ);
if (filterObj instanceof ITmfFilterTreeNode) {
filter.addChild((ITmfFilterTreeNode) filterObj);
}
}
} else if (fHeaderState == HeaderState.FILTER) {
final TmfFilterAndNode filter = new TmfFilterAndNode(null);
- for (final TableColumn column : fTable.getColumns()) {
- final Object filterObj = column.getData(Key.FILTER_OBJ);
+ for (final TableColumn col : fTable.getColumns()) {
+ final Object filterObj = col.getData(Key.FILTER_OBJ);
if (filterObj instanceof ITmfFilterTreeNode) {
filter.addChild((ITmfFilterTreeNode) filterObj);
}
private class ItemizeThread extends Thread {
private final TimeChartAnalysisEntry fTimeAnalysisEntry;
- private final long fStartTime;
- private final long fStopTime;
+ private final long startTime;
+ private final long stopTime;
private final long fMaxDuration;
private ItemizeThread(TimeChartAnalysisEntry timeAnalysisEntry, long startTime, long stopTime) {
super("Itemize Thread:" + timeAnalysisEntry.getName()); //$NON-NLS-1$
fTimeAnalysisEntry = timeAnalysisEntry;
- fStartTime = startTime;
- fStopTime = stopTime;
- fMaxDuration = 3 * (fStopTime - fStartTime) / fDisplayWidth;
+ this.startTime = startTime;
+ this.stopTime = stopTime;
+ fMaxDuration = 3 * (stopTime - startTime) / fDisplayWidth;
}
@Override
boolean hasNext = true;
while (hasNext) {
synchronized (timeAnalysisEntry) {
- while (hasNext = iterator.hasNext()) {
+ while ((hasNext = iterator.hasNext()) == true) {
event = (TimeChartEvent) iterator.next();
- if (event.getTime() + event.getDuration() > fStartTime && event.getTime() < fStopTime && event.getDuration() > fMaxDuration
+ if (event.getTime() + event.getDuration() > startTime && event.getTime() < stopTime && event.getDuration() > fMaxDuration
&& event.getNbEvents() > 1) {
break;
}
}
}
- if (hasNext) {
+ if (hasNext && event != null) {
if (event.getItemizedEntry() == null) {
itemizeEvent(event);
} else {
boolean hasNext = true;
while (!interrupted && hasNext) {
synchronized (timeAnalysisEntry) {
- while (hasNext = iterator.hasNext()) {
+ while ((hasNext = iterator.hasNext()) == true) {
event = (TimeChartEvent) iterator.next();
break;
}
}
- if (hasNext) {
+ if (hasNext && event != null) {
// TODO possible concurrency problem here with ItemizeJob
event.setColorSettingPriority(ColorSettingsManager.PRIORITY_NONE);
if (event.getItemizedEntry() != null) {
boolean hasNext = true;
while (!interrupted && hasNext) {
synchronized (timeAnalysisEntry) {
- while (hasNext = iterator.hasNext()) {
+ while ((hasNext = iterator.hasNext()) == true) {
event = (TimeChartEvent) iterator.next();
break;
}
}
- if (hasNext) {
+ if (hasNext && event != null) {
// TODO possible concurrency problem here with ItemizeJob
if (event.getItemizedEntry() == null) {
decorateEvent(event);
_time1_extSynch = _time1;
}
- @Override
- @Deprecated
- public boolean isCalendarFormat() {
- return timeFormat == TimeFormat.CALENDAR;
- }
-
/**
* @since 2.0
*/
*/
int getTimeSpace();
- /**
- * @return If the time format is calendar (true) or relative (false)
- * @deprecated replaced by {@link #getTimeFormat()}
- */
- @Deprecated
- boolean isCalendarFormat();
-
/**
* @return the time format, one of:
* <ul>
redraw();
_dragState = DRAG_NONE;
} else if (e.button == 3 && DRAG_ZOOM == _dragState) {
- Point size = getCtrlSize();
int nameWidth = _timeProvider.getNameSpace();
- int x = e.x - nameWidth;
if (Math.max(_dragX, _dragX0) > nameWidth && _dragX != _dragX0) {
long time0 = getTimeAtX(_dragX0);
long time1 = getTimeAtX(_dragX);
private void calcTimeDelta(int width, double pixelsPerNanoSec) {
double minDelta = (pixelsPerNanoSec == 0) ? YEAR_IN_NS : width / pixelsPerNanoSec;
long unit = 1;
- if (_timeProvider != null && _timeProvider.isCalendarFormat()) {
+ if (_timeProvider != null && _timeProvider.getTimeFormat().equals(TimeFormat.CALENDAR)) {
if (minDelta > 6 * MONTH_IN_NS) {
unit = YEAR_IN_NS;
} else if (minDelta > 3 * MONTH_IN_NS) {
_rect0.width = labelWidth;
long time;
- if (_timeProvider != null && _timeProvider.isCalendarFormat()) {
+ if (_timeProvider != null && _timeProvider.getTimeFormat().equals(TimeFormat.CALENDAR)) {
time = floorToCalendar(time0, _timeDelta);
} else {
time = (time0 / _timeDelta) * _timeDelta;
int y = _rect0.y + _rect0.height;
- if (_timeProvider != null && _timeProvider.isCalendarFormat()) {
+ if (_timeProvider != null && _timeProvider.getTimeFormat().equals(TimeFormat.CALENDAR)) {
timeDraw.drawAbsHeader(gc, time, absHeaderRect);
}
if (pixelsPerNanoSec == 0 || time > Long.MAX_VALUE - _timeDelta || _timeDelta == 0) {
break;
}
- if (_timeProvider != null && _timeProvider.isCalendarFormat()) {
+ if (_timeProvider != null && _timeProvider.getTimeFormat().equals(TimeFormat.CALENDAR)) {
if (_timeDelta >= YEAR_IN_NS) {
long millis = time / 1000000L;
GREGORIAN_CALENDAR.setTime(new Date(millis));
int numDigits = 5;
long timeRange = time1 - time0;
- if (_timeProvider.isCalendarFormat()) {
+ if (_timeProvider.getTimeFormat().equals(TimeFormat.CALENDAR)) {
// Calculate the number of digits to represent the minutes provided
// 11:222
// HH:mm:ss