~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/internal/oprofile/core/opxml/checkevent/CheckEventAdapter.java

  • Committer: Package Import Robot
  • Author(s): tony mancill
  • Date: 2013-05-13 21:43:22 UTC
  • mfrom: (1.2.1) (2.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130513214322-6frgd9du1n0w2uo7
Tags: 1.2.1-1
* Team upload.
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
 *******************************************************************************/
11
11
package org.eclipse.linuxtools.internal.oprofile.core.opxml.checkevent;
12
12
 
13
 
import java.io.File;
14
13
import java.util.TreeSet;
15
14
 
16
15
import javax.xml.parsers.DocumentBuilder;
17
16
import javax.xml.parsers.DocumentBuilderFactory;
18
17
import javax.xml.parsers.ParserConfigurationException;
19
18
 
 
19
import org.eclipse.core.filesystem.IFileStore;
 
20
import org.eclipse.core.runtime.CoreException;
 
21
import org.eclipse.linuxtools.internal.oprofile.core.Oprofile;
20
22
import org.eclipse.linuxtools.internal.oprofile.core.opxml.AbstractDataAdapter;
21
23
import org.eclipse.linuxtools.internal.oprofile.core.opxml.EventIdCache;
22
24
import org.eclipse.linuxtools.internal.oprofile.core.opxml.info.InfoAdapter;
 
25
import org.eclipse.linuxtools.profiling.launch.IRemoteFileProxy;
 
26
import org.eclipse.linuxtools.profiling.launch.RemoteProxyManager;
23
27
import org.w3c.dom.Document;
24
28
import org.w3c.dom.Element;
25
29
import org.w3c.dom.NodeList;
133
137
                 * hard-coded in a list. This method may not be entirely correct,
134
138
                 * although much simpler.
135
139
                 */
136
 
                File file = new File(InfoAdapter.DEV_OPROFILE + cpuCounter);
137
 
                if (! file.exists()){
 
140
                IRemoteFileProxy proxy = null;
 
141
                try {
 
142
                        proxy = RemoteProxyManager.getInstance().getFileProxy(Oprofile.OprofileProject.getProject());
 
143
                } catch (CoreException e) {
 
144
                        e.printStackTrace();
 
145
                }
 
146
                IFileStore fileStore = proxy.getResource(InfoAdapter.DEV_OPROFILE + cpuCounter);
 
147
                if (! fileStore.fetchInfo().exists()){
138
148
                        return false;
139
149
                }
140
150
                return true;