diff options
author | eutarass | 2010-06-14 22:20:20 +0000 |
---|---|---|
committer | eutarass | 2010-06-14 22:20:20 +0000 |
commit | 040588a0268dab4eb402d22b02a1adf583aca37e (patch) | |
tree | a78fa125435f3ba4108ce3bc3d8b219b3fc49aac /plugins/org.eclipse.tm.tcf.debug | |
parent | 45db01fd77787ce4f96031105447db160da6b742 (diff) | |
download | org.eclipse.tcf-040588a0268dab4eb402d22b02a1adf583aca37e.tar.gz org.eclipse.tcf-040588a0268dab4eb402d22b02a1adf583aca37e.tar.xz org.eclipse.tcf-040588a0268dab4eb402d22b02a1adf583aca37e.zip |
Fixed some of Eclipse 3.6 JDT warnings
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug')
5 files changed, 24 insertions, 14 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug/META-INF/MANIFEST.MF b/plugins/org.eclipse.tm.tcf.debug/META-INF/MANIFEST.MF index 8ff00cef8..a3eebd7e5 100644 --- a/plugins/org.eclipse.tm.tcf.debug/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.tm.tcf.debug/META-INF/MANIFEST.MF @@ -7,7 +7,8 @@ Bundle-Activator: org.eclipse.tm.internal.tcf.debug.Activator Bundle-Vendor: %providerName Require-Bundle: org.eclipse.core.runtime, org.eclipse.debug.core, - org.eclipse.core.resources + org.eclipse.core.resources, + org.eclipse.core.filesystem;bundle-version="1.2.0" Import-Package: org.eclipse.tm.tcf.core;version="0.3.0", org.eclipse.tm.tcf.protocol;version="0.3.0", org.eclipse.tm.tcf.services;version="0.3.0", diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java index bb46e881b..0c50b431b 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFLaunchDelegate.java @@ -206,19 +206,19 @@ public class TCFLaunchDelegate extends LaunchConfigurationDelegate { final ILaunch launch, final IProgressMonitor monitor) throws CoreException { String local_id = null; int task_cnt = 1; - if (configuration.getAttribute(TCFLaunchDelegate.ATTR_RUN_LOCAL_AGENT, true)) { + if (configuration.getAttribute(ATTR_RUN_LOCAL_AGENT, true)) { task_cnt++; if (monitor != null) monitor.beginTask("Starting TCF Agent", task_cnt); //$NON-NLS-1$ local_id = TCFLocalAgent.runLocalAgent(); } - else if (configuration.getAttribute(TCFLaunchDelegate.ATTR_USE_LOCAL_AGENT, true)) { + else if (configuration.getAttribute(ATTR_USE_LOCAL_AGENT, true)) { task_cnt++; if (monitor != null) monitor.beginTask("Searching TCF Agent", task_cnt); //$NON-NLS-1$ local_id = TCFLocalAgent.getLocalAgentID(); } if (monitor != null) monitor.beginTask("Launching TCF debugger session", task_cnt); //$NON-NLS-1$ final String id = - configuration.getAttribute(TCFLaunchDelegate.ATTR_USE_LOCAL_AGENT, true) ? + configuration.getAttribute(ATTR_USE_LOCAL_AGENT, true) ? local_id : configuration.getAttribute(ATTR_PEER_ID, ""); Protocol.invokeLater(new Runnable() { public void run() { diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java index 3aae53472..731ae9c83 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourceLookupParticipant.java @@ -11,15 +11,17 @@ package org.eclipse.tm.internal.tcf.debug.launch; import java.io.File; +import java.net.URI; import java.util.ArrayList; +import org.eclipse.core.filesystem.URIUtil; import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IStorage; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.debug.core.sourcelookup.AbstractSourceLookupParticipant; -import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage; import org.eclipse.tm.tcf.services.ILineNumbers; /** @@ -53,7 +55,8 @@ public class TCFSourceLookupParticipant extends AbstractSourceLookupParticipant if (name != null) { IPath path = new Path(name); if (path.isAbsolute()) { - IFile[] arr = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(path); + URI uri = URIUtil.toURI(path); + IFile[] arr = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(uri); if (arr != null && arr.length > 0) return arr; } } @@ -69,12 +72,15 @@ public class TCFSourceLookupParticipant extends AbstractSourceLookupParticipant } ArrayList<Object> list = new ArrayList<Object>(); for (Object o : res) { - if (o instanceof LocalFileStorage) { - IPath path = ((LocalFileStorage)o).getFullPath(); - IFile[] arr = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(path); - if (arr != null && arr.length > 0) { - for (Object x : arr) list.add(x); - continue; + if (o instanceof IStorage) { + IPath path = ((IStorage)o).getFullPath(); + if (path != null) { + URI uri = URIUtil.toURI(path); + IFile[] arr = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(uri); + if (arr != null && arr.length > 0) { + for (Object x : arr) list.add(x); + continue; + } } } list.add(o); diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java index c7c28e668..2b5b74776 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/launch/TCFSourcePathComputerDelegate.java @@ -10,6 +10,7 @@ *******************************************************************************/ package org.eclipse.tm.internal.tcf.debug.launch; +import java.net.URI; import java.util.ArrayList; import java.util.HashSet; @@ -19,6 +20,7 @@ import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Path; +import org.eclipse.core.filesystem.URIUtil; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.sourcelookup.ISourceContainer; import org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate; @@ -41,7 +43,8 @@ public class TCFSourcePathComputerDelegate implements ISourcePathComputerDelegat String program_name = configuration.getAttribute(TCFLaunchDelegate.ATTR_LOCAL_PROGRAM_FILE, (String)null); String path = TCFLaunchDelegate.getProgramPath(project_name, program_name); if (path != null) { - IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(new Path(path)); + URI uri = URIUtil.toURI(new Path(path)); + IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(uri); if (files != null && files.length > 0) { HashSet<IProject> projects = new HashSet<IProject>(); for (IFile file : files) projects.add(file.getProject()); diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java index 714c1bcb5..b2dd59118 100644 --- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java +++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java @@ -400,7 +400,7 @@ public class TCFLaunch extends Launch { } final String dir = cfg.getAttribute(TCFLaunchDelegate.ATTR_WORKING_DIRECTORY, ""); final String args = cfg.getAttribute(TCFLaunchDelegate.ATTR_PROGRAM_ARGUMENTS, ""); - final Map<String,String> env = cfg.getAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, (Map)null); + final Map<String,String> env = cfg.getAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, (Map<String,String>)null); // Start the process new LaunchStep() { @Override |