~ubuntu-branches/ubuntu/utopic/eclipse-linuxtools/utopic

« back to all changes in this revision

Viewing changes to lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/parsers/custom/CustomEventContent.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2014-05-12 18:11:40 UTC
  • mfrom: (3.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140512181140-w237r3vsah1tmybz
Tags: 2.2.1-1
* New upstream release.
* Refreshed d/patches.
* Removed eclipse-cdt-valgrind-remote package, all its functionality
  is now provided by eclipse-cdt-profiling-framework-remote.
* Added remove-license-feature.patch.
* Bump Standards-Version to 3.9.5.
* Enable eclipse-changelog package.
* Enable eclipse-rpm-editor package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
 * Copyright (c) 2010, 2013 Ericsson
 
3
 *
 
4
 * All rights reserved. This program and the accompanying materials are
 
5
 * made available under the terms of the Eclipse Public License v1.0 which
 
6
 * accompanies this distribution, and is available at
 
7
 * http://www.eclipse.org/legal/epl-v10.html
 
8
 *
 
9
 * Contributors:
 
10
 *   Patrick Tassé - Initial API and implementation
 
11
 *******************************************************************************/
 
12
 
1
13
package org.eclipse.linuxtools.internal.tmf.ui.parsers.custom;
2
14
 
3
15
import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
4
16
import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
5
17
 
 
18
/**
 
19
 * Event content for custom text parsers
 
20
 *
 
21
 * @author Patrick Tassé
 
22
 */
6
23
public class CustomEventContent extends TmfEventField {
7
24
 
 
25
    /**
 
26
     * Constructor.
 
27
     *
 
28
     * @param parent
 
29
     *            Parent event
 
30
     * @param content
 
31
     *            Event content
 
32
     */
8
33
    public CustomEventContent(CustomEvent parent, StringBuffer content) {
9
 
        super(ITmfEventField.ROOT_FIELD_ID, content);
 
34
        super(ITmfEventField.ROOT_FIELD_ID, content, null);
10
35
    }
11
36
 
12
 
    /* (non-Javadoc)
13
 
     * @see java.lang.Object#hashCode()
 
37
    /**
 
38
     * Create a new event field with sub-fields.
 
39
     *
 
40
     * @param name
 
41
     *            Field name
 
42
     * @param content
 
43
     *            Event content
 
44
     * @param fields
 
45
     *            The array of sub-fields
14
46
     */
 
47
    public CustomEventContent(String name, Object content, ITmfEventField[] fields) {
 
48
        super(name, content, fields);
 
49
    }
 
50
 
15
51
    @Override
16
52
    public int hashCode() {
17
53
        return super.hashCode();
18
54
    }
19
55
 
20
 
    /* (non-Javadoc)
21
 
     * @see java.lang.Object#equals(java.lang.Object)
22
 
     */
23
56
    @Override
24
57
    public boolean equals(Object obj) {
25
58
        if (this == obj) {
33
66
        }
34
67
        return true;
35
68
    }
36
 
 
37
 
    public void setFields(ITmfEventField[] fields) {
38
 
        super.setValue(getValue(), fields);
39
 
    }
40
 
 
41
69
}