Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java')
-rw-r--r--org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java400
1 files changed, 200 insertions, 200 deletions
diff --git a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java
index 02f70c4a3..167667c3e 100644
--- a/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java
+++ b/org.eclipse.debug.tests/src/org/eclipe/debug/tests/launching/LaunchConfigurationTests.java
@@ -66,7 +66,7 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
/**
* Identifier of test launch configuration type extension
*/
- public static final String ID_TEST_LAUNCH_TYPE = "org.eclipse.debug.tests.launch.type";
+ public static final String ID_TEST_LAUNCH_TYPE = "org.eclipse.debug.tests.launch.type"; //$NON-NLS-1$
/**
* The from/to handles during rename operations
@@ -93,9 +93,9 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
class Listener implements ILaunchConfigurationListener {
- private List addedList = new ArrayList();
- private List removedList = new ArrayList();
- private List changedList = new ArrayList();
+ private final List addedList = new ArrayList();
+ private final List removedList = new ArrayList();
+ private final List changedList = new ArrayList();
/* (non-Javadoc)
* @see org.eclipse.debug.core.ILaunchConfigurationListener#launchConfigurationAdded(org.eclipse.debug.core.ILaunchConfiguration)
@@ -141,12 +141,12 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
public static char[] getInputStreamAsCharArray(InputStream stream) throws IOException {
Charset charset = null;
try {
- charset = Charset.forName("UTF-8");
+ charset = Charset.forName("UTF-8"); //$NON-NLS-1$
} catch (IllegalCharsetNameException e) {
- System.err.println("Illegal charset name : " + "UTF-8"); //$NON-NLS-1$
+ System.err.println("Illegal charset name : " + "UTF-8"); //$NON-NLS-1$ //$NON-NLS-2$
return null;
} catch(UnsupportedCharsetException e) {
- System.err.println("Unsupported charset : " + "UTF-8"); //$NON-NLS-1$
+ System.err.println("Unsupported charset : " + "UTF-8"); //$NON-NLS-1$ //$NON-NLS-2$
return null;
}
CharsetDecoder charsetDecoder = charset.newDecoder();
@@ -222,7 +222,7 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
* @return
*/
protected IProject getProject() throws CoreException {
- return TestsPlugin.createProject("LaunchConfigurationTests");
+ return TestsPlugin.createProject("LaunchConfigurationTests"); //$NON-NLS-1$
}
/**
@@ -253,7 +253,7 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
protected ILaunchConfigurationWorkingCopy newEmptyConfiguration(IContainer container, String name) throws CoreException {
ILaunchConfigurationType type = getLaunchManager().getLaunchConfigurationType(ID_TEST_LAUNCH_TYPE);
ILaunchConfigurationWorkingCopy wc = type.newInstance(container, name);
- assertEquals("Should have no attributes", 0, wc.getAttributes().size());
+ assertEquals("Should have no attributes", 0, wc.getAttributes().size()); //$NON-NLS-1$
return wc;
}
@@ -309,7 +309,7 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
assertTrue("Configuration should exist", handle.exists()); //$NON-NLS-1$
// retrieve attributes
- assertEquals("Wrong name", handle.getName(), "localName"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ assertEquals("Wrong name", handle.getName(), "localName"); //$NON-NLS-1$ //$NON-NLS-2$
// cleanup
handle.delete();
@@ -325,7 +325,7 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
assertTrue("Configuration should exist", handle.exists()); //$NON-NLS-1$
// retrieve attributes
- assertEquals("Wrong name", handle.getName(), "sharedName"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ assertEquals("Wrong name", handle.getName(), "sharedName"); //$NON-NLS-1$ //$NON-NLS-2$
// cleanup
handle.delete();
@@ -960,12 +960,12 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
* @throws URISyntaxException
*/
public void testCreateDeleteEFS() throws CoreException, URISyntaxException {
- IFileSystem fileSystem = EFS.getFileSystem("debug");
- assertNotNull("Missing debug EFS", fileSystem);
+ IFileSystem fileSystem = EFS.getFileSystem("debug"); //$NON-NLS-1$
+ assertNotNull("Missing debug EFS", fileSystem); //$NON-NLS-1$
// create folder in EFS
- IFolder folder = getProject().getFolder("efs");
- folder.createLink(new URI("debug", Path.ROOT.toString(), null), 0, null);
+ IFolder folder = getProject().getFolder("efs"); //$NON-NLS-1$
+ folder.createLink(new URI("debug", Path.ROOT.toString(), null), 0, null); //$NON-NLS-1$
// create configuration
ILaunchConfigurationWorkingCopy wc = newConfiguration(folder, "efsConfig"); //$NON-NLS-1$
@@ -994,12 +994,12 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
* @throws URISyntaxException
*/
public void testCreateDeleteEFSLink() throws CoreException, URISyntaxException {
- IFileSystem fileSystem = EFS.getFileSystem("debug");
- assertNotNull("Missing debug EFS", fileSystem);
+ IFileSystem fileSystem = EFS.getFileSystem("debug"); //$NON-NLS-1$
+ assertNotNull("Missing debug EFS", fileSystem); //$NON-NLS-1$
// create folder in EFS
- IFolder folder = getProject().getFolder("efs2");
- folder.createLink(new URI("debug", Path.ROOT.toString(), null), 0, null);
+ IFolder folder = getProject().getFolder("efs2"); //$NON-NLS-1$
+ folder.createLink(new URI("debug", Path.ROOT.toString(), null), 0, null); //$NON-NLS-1$
// create configuration
ILaunchConfigurationWorkingCopy wc = newConfiguration(folder, "efsConfig"); //$NON-NLS-1$
@@ -1025,19 +1025,19 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
*/
public void testEFSProjectRename() throws Exception {
// create test project
- IProject pro = ResourcesPlugin.getWorkspace().getRoot().getProject("RenameEFS");
+ IProject pro = ResourcesPlugin.getWorkspace().getRoot().getProject("RenameEFS"); //$NON-NLS-1$
if (pro.exists()) {
pro.delete(true, true, null);
}
// create project
- IProject project = TestsPlugin.createProject("RenameEFS");
+ IProject project = TestsPlugin.createProject("RenameEFS"); //$NON-NLS-1$
- IFileSystem fileSystem = EFS.getFileSystem("debug");
- assertNotNull("Missing debug EFS", fileSystem);
+ IFileSystem fileSystem = EFS.getFileSystem("debug"); //$NON-NLS-1$
+ assertNotNull("Missing debug EFS", fileSystem); //$NON-NLS-1$
// create folder in EFS
- IFolder folder = project.getFolder("efs2");
- folder.createLink(new URI("debug", Path.ROOT.toString(), null), 0, null);
+ IFolder folder = project.getFolder("efs2"); //$NON-NLS-1$
+ folder.createLink(new URI("debug", Path.ROOT.toString(), null), 0, null); //$NON-NLS-1$
// create configuration
ILaunchConfigurationWorkingCopy wc = newConfiguration(folder, "efsConfig"); //$NON-NLS-1$
@@ -1052,19 +1052,19 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
// rename project
IProjectDescription description = project.getDescription();
- description.setName("SFEemaneR"); // reverse name
+ description.setName("SFEemaneR"); // reverse name //$NON-NLS-1$
project.move(description, IResource.SHALLOW, null);
// original configuration should no longer exist - handle out of date
assertTrue("Configuration should not exist", !handle.exists()); //$NON-NLS-1$
// get the new handle
- project = ResourcesPlugin.getWorkspace().getRoot().getProject("SFEemaneR");
- assertTrue("Project should exist", project.exists());
- IFile file = project.getFile(new Path("efs2/efsConfig.launch"));
- assertTrue("launch config file should exist", file.exists());
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject("SFEemaneR"); //$NON-NLS-1$
+ assertTrue("Project should exist", project.exists()); //$NON-NLS-1$
+ IFile file = project.getFile(new Path("efs2/efsConfig.launch")); //$NON-NLS-1$
+ assertTrue("launch config file should exist", file.exists()); //$NON-NLS-1$
handle = getLaunchManager().getLaunchConfiguration(file);
- assertTrue("launch config should exist", handle.exists());
+ assertTrue("launch config should exist", handle.exists()); //$NON-NLS-1$
// retrieve attributes
assertTrue("String1 should be String1", handle.getAttribute("String1", "Missing").equals("String1")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
@@ -1073,7 +1073,7 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
assertTrue("Boolean2 should be false", !handle.getAttribute("Boolean2", true)); //$NON-NLS-1$ //$NON-NLS-2$
// validate shared location
- assertEquals("Shared location should be updated", file, handle.getFile());
+ assertEquals("Shared location should be updated", file, handle.getFile()); //$NON-NLS-1$
// cleanup
project.delete(IResource.NONE, null);
@@ -1092,8 +1092,8 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
ILaunchConfiguration handle = wc.doSave();
assertTrue("Configuration should exist", handle.exists()); //$NON-NLS-1$
- File dir = TestsPlugin.getDefault().getFileInPlugin(new Path("test-import"));
- assertTrue("Import directory does not exist", dir.exists());
+ File dir = TestsPlugin.getDefault().getFileInPlugin(new Path("test-import")); //$NON-NLS-1$
+ assertTrue("Import directory does not exist", dir.exists()); //$NON-NLS-1$
LaunchManager manager = (LaunchManager) getLaunchManager();
Listener listener = new Listener();
@@ -1112,28 +1112,28 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
// should be one removed
List removed = listener.getRemoved();
- assertEquals("Should be one removed config", 1, removed.size());
- assertTrue("Import4 should be removed", removed.contains(handle));
+ assertEquals("Should be one removed config", 1, removed.size()); //$NON-NLS-1$
+ assertTrue("Import4 should be removed", removed.contains(handle)); //$NON-NLS-1$
// should be 5 added
List added = listener.getAdded();
- assertEquals("Should be 5 added configs", 5, added.size());
+ assertEquals("Should be 5 added configs", 5, added.size()); //$NON-NLS-1$
Set names = new HashSet();
Iterator iterator = added.iterator();
while (iterator.hasNext()) {
ILaunchConfiguration lc = (ILaunchConfiguration) iterator.next();
names.add(lc.getName());
}
- assertTrue("Missing Name", names.contains("Import1"));
- assertTrue("Missing Name", names.contains("Import2"));
- assertTrue("Missing Name", names.contains("Import3"));
- assertTrue("Missing Name", names.contains("Import4"));
- assertTrue("Missing Name", names.contains("Import5"));
+ assertTrue("Missing Name", names.contains("Import1")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Missing Name", names.contains("Import2")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Missing Name", names.contains("Import3")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Missing Name", names.contains("Import4")); //$NON-NLS-1$ //$NON-NLS-2$
+ assertTrue("Missing Name", names.contains("Import5")); //$NON-NLS-1$ //$NON-NLS-2$
// should be one changed
List changed = listener.getChanged();
- assertEquals("Should be 1 changed config", 1, changed.size());
- assertEquals("Wrong changed config", "Import4", ((ILaunchConfiguration)changed.get(0)).getName());
+ assertEquals("Should be 1 changed config", 1, changed.size()); //$NON-NLS-1$
+ assertEquals("Wrong changed config", "Import4", ((ILaunchConfiguration) changed.get(0)).getName()); //$NON-NLS-1$ //$NON-NLS-2$
} finally {
manager.removeLaunchConfigurationListener(listener);
}
@@ -1146,20 +1146,20 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
* @throws CoreException
*/
public void testWorkingCopyGetLocation() throws CoreException {
- ILaunchConfigurationWorkingCopy workingCopy = newConfiguration(null, "test-get-location");
+ ILaunchConfigurationWorkingCopy workingCopy = newConfiguration(null, "test-get-location"); //$NON-NLS-1$
IPath location = workingCopy.getLocation();
- assertEquals("Wrong path for local working copy", LaunchManager.LOCAL_LAUNCH_CONFIGURATION_CONTAINER_PATH.append("test-get-location.launch"), location);
+ assertEquals("Wrong path for local working copy", LaunchManager.LOCAL_LAUNCH_CONFIGURATION_CONTAINER_PATH.append("test-get-location.launch"), location); //$NON-NLS-1$ //$NON-NLS-2$
}
/**
* Tests that the framework adds time stamps to launch objects.
*/
public void testLaunchTimeStamp() throws CoreException {
- ILaunchConfigurationWorkingCopy workingCopy = newConfiguration(null, "test-time-stamp");
+ ILaunchConfigurationWorkingCopy workingCopy = newConfiguration(null, "test-time-stamp"); //$NON-NLS-1$
ILaunch launch = workingCopy.launch(ILaunchManager.DEBUG_MODE, null);
try {
String stamp = launch.getAttribute(DebugPlugin.ATTR_LAUNCH_TIMESTAMP);
- assertNotNull("missing time stamp", stamp);
+ assertNotNull("missing time stamp", stamp); //$NON-NLS-1$
Long.parseLong(stamp); // should be a long - will throw NumberFormatException if not
} finally {
if (launch != null) {
@@ -1174,74 +1174,74 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
* @throws CoreException
*/
public void testMapAttributePersistence() throws CoreException, IOException {
- ILaunchConfigurationWorkingCopy c1 = newEmptyConfiguration(getProject(), "testMapAttributes1");
+ ILaunchConfigurationWorkingCopy c1 = newEmptyConfiguration(getProject(), "testMapAttributes1"); //$NON-NLS-1$
HashMap map = new HashMap();
- map.put("Z", "z-value");
- map.put("Y", "y-value");
- map.put("X", "x-value");
- map.put("W", "w-value");
- map.put("V", "v-value");
- map.put("U", "u-value");
- map.put("T", "t-value");
- map.put("S", "s-value");
- map.put("R", "r-value");
- map.put("Q", "q-value");
- map.put("P", "p-value");
- map.put("O", "o-value");
- map.put("N", "n-value");
- map.put("M", "m-value");
- map.put("L", "l-value");
- map.put("K", "k-value");
- map.put("J", "j-value");
- map.put("I", "i-value");
- map.put("H", "h-value");
- map.put("G", "g-value");
- map.put("F", "f-value");
- map.put("E", "e-value");
- map.put("D", "d-value");
- map.put("C", "c-value");
- map.put("B", "b-value");
- map.put("A", "a-value");
- c1.setAttribute("Map-Attribute", map);
+ map.put("Z", "z-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("Y", "y-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("X", "x-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("W", "w-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("V", "v-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("U", "u-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("T", "t-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("S", "s-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("R", "r-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("Q", "q-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("P", "p-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("O", "o-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("N", "n-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("M", "m-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("L", "l-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("K", "k-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("J", "j-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("I", "i-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("H", "h-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("G", "g-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("F", "f-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("E", "e-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("D", "d-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("C", "c-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("B", "b-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("A", "a-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ c1.setAttribute("Map-Attribute", map); //$NON-NLS-1$
c1.doSave();
- ILaunchConfigurationWorkingCopy c2 = newEmptyConfiguration(getProject(), "testMapAttributes2");
+ ILaunchConfigurationWorkingCopy c2 = newEmptyConfiguration(getProject(), "testMapAttributes2"); //$NON-NLS-1$
map = new HashMap();
- map.put("A", "a-value");
- map.put("Z", "z-value");
- map.put("B", "b-value");
- map.put("Y", "y-value");
- map.put("C", "c-value");
- map.put("X", "x-value");
- map.put("D", "d-value");
- map.put("W", "w-value");
- map.put("E", "e-value");
- map.put("V", "v-value");
- map.put("F", "f-value");
- map.put("U", "u-value");
- map.put("G", "g-value");
- map.put("T", "t-value");
- map.put("H", "h-value");
- map.put("S", "s-value");
- map.put("I", "i-value");
- map.put("R", "r-value");
- map.put("J", "j-value");
- map.put("Q", "q-value");
- map.put("K", "k-value");
- map.put("P", "p-value");
- map.put("L", "l-value");
- map.put("M", "m-value");
- map.put("O", "o-value");
- map.put("N", "n-value");
- c2.setAttribute("Map-Attribute", map);
+ map.put("A", "a-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("Z", "z-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("B", "b-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("Y", "y-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("C", "c-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("X", "x-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("D", "d-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("W", "w-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("E", "e-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("V", "v-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("F", "f-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("U", "u-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("G", "g-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("T", "t-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("H", "h-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("S", "s-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("I", "i-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("R", "r-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("J", "j-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("Q", "q-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("K", "k-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("P", "p-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("L", "l-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("M", "m-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("O", "o-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ map.put("N", "n-value"); //$NON-NLS-1$ //$NON-NLS-2$
+ c2.setAttribute("Map-Attribute", map); //$NON-NLS-1$
c2.doSave();
// file contents should be the same
char[] chars1 = getInputStreamAsCharArray(c1.getFile().getContents());
char[] chars2 = getInputStreamAsCharArray(c2.getFile().getContents());
- assertEquals("Should be the same characters", chars1.length, chars2.length);
+ assertEquals("Should be the same characters", chars1.length, chars2.length); //$NON-NLS-1$
for (int i = 0; i < chars2.length; i++) {
- assertEquals("Should be the same character", chars1[i], chars2[i]);
+ assertEquals("Should be the same character", chars1[i], chars2[i]); //$NON-NLS-1$
}
}
@@ -1252,74 +1252,74 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
* @throws CoreException
*/
public void testSetAttributePersistence() throws CoreException, IOException {
- ILaunchConfigurationWorkingCopy c1 = newEmptyConfiguration(getProject(), "testSetAttributes1");
+ ILaunchConfigurationWorkingCopy c1 = newEmptyConfiguration(getProject(), "testSetAttributes1"); //$NON-NLS-1$
Set set = new HashSet();
- set.add("z-value");
- set.add("y-value");
- set.add("x-value");
- set.add("w-value");
- set.add("v-value");
- set.add("u-value");
- set.add("t-value");
- set.add("s-value");
- set.add("r-value");
- set.add("q-value");
- set.add("p-value");
- set.add("o-value");
- set.add("n-value");
- set.add("m-value");
- set.add("l-value");
- set.add("k-value");
- set.add("j-value");
- set.add("i-value");
- set.add("h-value");
- set.add("g-value");
- set.add("f-value");
- set.add("e-value");
- set.add("d-value");
- set.add("c-value");
- set.add("b-value");
- set.add("a-value");
- c1.setAttribute("Set-Attribute", set);
+ set.add("z-value"); //$NON-NLS-1$
+ set.add("y-value"); //$NON-NLS-1$
+ set.add("x-value"); //$NON-NLS-1$
+ set.add("w-value"); //$NON-NLS-1$
+ set.add("v-value"); //$NON-NLS-1$
+ set.add("u-value"); //$NON-NLS-1$
+ set.add("t-value"); //$NON-NLS-1$
+ set.add("s-value"); //$NON-NLS-1$
+ set.add("r-value"); //$NON-NLS-1$
+ set.add("q-value"); //$NON-NLS-1$
+ set.add("p-value"); //$NON-NLS-1$
+ set.add("o-value"); //$NON-NLS-1$
+ set.add("n-value"); //$NON-NLS-1$
+ set.add("m-value"); //$NON-NLS-1$
+ set.add("l-value"); //$NON-NLS-1$
+ set.add("k-value"); //$NON-NLS-1$
+ set.add("j-value"); //$NON-NLS-1$
+ set.add("i-value"); //$NON-NLS-1$
+ set.add("h-value"); //$NON-NLS-1$
+ set.add("g-value"); //$NON-NLS-1$
+ set.add("f-value"); //$NON-NLS-1$
+ set.add("e-value"); //$NON-NLS-1$
+ set.add("d-value"); //$NON-NLS-1$
+ set.add("c-value"); //$NON-NLS-1$
+ set.add("b-value"); //$NON-NLS-1$
+ set.add("a-value"); //$NON-NLS-1$
+ c1.setAttribute("Set-Attribute", set); //$NON-NLS-1$
c1.doSave();
- ILaunchConfigurationWorkingCopy c2 = newEmptyConfiguration(getProject(), "testSetAttributes2");
+ ILaunchConfigurationWorkingCopy c2 = newEmptyConfiguration(getProject(), "testSetAttributes2"); //$NON-NLS-1$
set = new HashSet();
- set.add("a-value");
- set.add("z-value");
- set.add("b-value");
- set.add("y-value");
- set.add("c-value");
- set.add("x-value");
- set.add("d-value");
- set.add("w-value");
- set.add("e-value");
- set.add("v-value");
- set.add("f-value");
- set.add("u-value");
- set.add("g-value");
- set.add("t-value");
- set.add("h-value");
- set.add("s-value");
- set.add("i-value");
- set.add("r-value");
- set.add("j-value");
- set.add("q-value");
- set.add("k-value");
- set.add("p-value");
- set.add("l-value");
- set.add("m-value");
- set.add("o-value");
- set.add("n-value");
- c2.setAttribute("Set-Attribute", set);
+ set.add("a-value"); //$NON-NLS-1$
+ set.add("z-value"); //$NON-NLS-1$
+ set.add("b-value"); //$NON-NLS-1$
+ set.add("y-value"); //$NON-NLS-1$
+ set.add("c-value"); //$NON-NLS-1$
+ set.add("x-value"); //$NON-NLS-1$
+ set.add("d-value"); //$NON-NLS-1$
+ set.add("w-value"); //$NON-NLS-1$
+ set.add("e-value"); //$NON-NLS-1$
+ set.add("v-value"); //$NON-NLS-1$
+ set.add("f-value"); //$NON-NLS-1$
+ set.add("u-value"); //$NON-NLS-1$
+ set.add("g-value"); //$NON-NLS-1$
+ set.add("t-value"); //$NON-NLS-1$
+ set.add("h-value"); //$NON-NLS-1$
+ set.add("s-value"); //$NON-NLS-1$
+ set.add("i-value"); //$NON-NLS-1$
+ set.add("r-value"); //$NON-NLS-1$
+ set.add("j-value"); //$NON-NLS-1$
+ set.add("q-value"); //$NON-NLS-1$
+ set.add("k-value"); //$NON-NLS-1$
+ set.add("p-value"); //$NON-NLS-1$
+ set.add("l-value"); //$NON-NLS-1$
+ set.add("m-value"); //$NON-NLS-1$
+ set.add("o-value"); //$NON-NLS-1$
+ set.add("n-value"); //$NON-NLS-1$
+ c2.setAttribute("Set-Attribute", set); //$NON-NLS-1$
c2.doSave();
// file contents should be the same
char[] chars1 = getInputStreamAsCharArray(c1.getFile().getContents());
char[] chars2 = getInputStreamAsCharArray(c2.getFile().getContents());
- assertEquals("Should be the same characters", chars1.length, chars2.length);
+ assertEquals("Should be the same characters", chars1.length, chars2.length); //$NON-NLS-1$
for (int i = 0; i < chars2.length; i++) {
- assertEquals("Should be the same character", chars1[i], chars2[i]);
+ assertEquals("Should be the same character", chars1[i], chars2[i]); //$NON-NLS-1$
}
}
@@ -1332,12 +1332,12 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
*/
public void testIllegalFileSepCharName() {
try {
- newConfiguration(null, new Path("some").append("nested").append("config").toOSString());
+ newConfiguration(null, new Path("some").append("nested").append("config").toOSString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} catch (CoreException e) {
// i.e. expected code path
return;
}
- assertTrue("Should be an illegal argument - cannot nest local configurations", false);
+ assertTrue("Should be an illegal argument - cannot nest local configurations", false); //$NON-NLS-1$
}
/**
@@ -1349,9 +1349,9 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
*/
public void testLegalFileSepCharName() {
try {
- newConfiguration(getProject(), new Path("some").append("nested").append("config").toOSString());
+ newConfiguration(getProject(), new Path("some").append("nested").append("config").toOSString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} catch (CoreException e) {
- assertTrue("Should *not* be an illegal argument - can nest shared cofigurations", false);
+ assertTrue("Should *not* be an illegal argument - can nest shared cofigurations", false); //$NON-NLS-1$
}
}
@@ -1362,12 +1362,12 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
*/
public void testIllegalCharName() {
try {
- newConfiguration(getProject(), "<config>");
+ newConfiguration(getProject(), "<config>"); //$NON-NLS-1$
} catch (CoreException e) {
// expected code path
return;
}
- assertTrue("Should be an illegal argument - illegal character used in name", false);
+ assertTrue("Should be an illegal argument - illegal character used in name", false); //$NON-NLS-1$
}
/**
@@ -1377,20 +1377,20 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
*/
public void testRenameAndMoveShared() throws CoreException {
IProject project = getProject();
- IFolder f1 = project.getFolder("f1");
- IFolder f2 = project.getFolder("f2");
+ IFolder f1 = project.getFolder("f1"); //$NON-NLS-1$
+ IFolder f2 = project.getFolder("f2"); //$NON-NLS-1$
f1.create(false, true, null);
f2.create(false, true, null);
- ILaunchConfigurationWorkingCopy wc = newConfiguration(f1, "start-here");
+ ILaunchConfigurationWorkingCopy wc = newConfiguration(f1, "start-here"); //$NON-NLS-1$
ILaunchConfiguration orig = wc.doSave();
wc = orig.getWorkingCopy();
wc.setContainer(f2);
- wc.rename("end-here");
+ wc.rename("end-here"); //$NON-NLS-1$
ILaunchConfiguration next = wc.doSave();
- assertFalse("Original should not exist", orig.exists());
- assertTrue("Renamed and moved config should exist", next.exists());
+ assertFalse("Original should not exist", orig.exists()); //$NON-NLS-1$
+ assertTrue("Renamed and moved config should exist", next.exists()); //$NON-NLS-1$
}
@@ -1401,9 +1401,9 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
* @throws Exception
*/
public void testGetTypeImageFromURI() throws Exception {
- ImageDescriptor descriptor = DebugUITools.getImageDescriptor("org.eclipse.debug.tests.launch.type1");
- assertNotNull("The image descriptior type.image.1 must exist", descriptor);
- assertNotSame("The image descriptor is not type.image.1", ImageDescriptor.getMissingImageDescriptor(), descriptor);
+ ImageDescriptor descriptor = DebugUITools.getImageDescriptor("org.eclipse.debug.tests.launch.type1"); //$NON-NLS-1$
+ assertNotNull("The image descriptior type.image.1 must exist", descriptor); //$NON-NLS-1$
+ assertNotSame("The image descriptor is not type.image.1", ImageDescriptor.getMissingImageDescriptor(), descriptor); //$NON-NLS-1$
}
/**
@@ -1411,9 +1411,9 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
* @throws Exception
*/
public void testGetTyeImage() throws Exception {
- ImageDescriptor descriptor = DebugUITools.getImageDescriptor("org.eclipse.debug.tests.launch.type");
- assertNotNull("The image descriptior type.image.2 must exist", descriptor);
- assertNotSame("The image descriptor is not type.image.2", ImageDescriptor.getMissingImageDescriptor(), descriptor);
+ ImageDescriptor descriptor = DebugUITools.getImageDescriptor("org.eclipse.debug.tests.launch.type"); //$NON-NLS-1$
+ assertNotNull("The image descriptior type.image.2 must exist", descriptor); //$NON-NLS-1$
+ assertNotSame("The image descriptor is not type.image.2", ImageDescriptor.getMissingImageDescriptor(), descriptor); //$NON-NLS-1$
}
/**
@@ -1424,14 +1424,14 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
* @since 3.9.0
*/
public void testGetProjectMappedResource1() throws Exception {
- ILaunchConfiguration lc = newConfiguration(null, "test.project.resource.mapping");
+ ILaunchConfiguration lc = newConfiguration(null, "test.project.resource.mapping"); //$NON-NLS-1$
try {
ILaunchConfigurationWorkingCopy wc = lc.getWorkingCopy();
- assertNotNull("Should have a working copy of the testig launch configuration", wc);
- setResourceMappings(wc, new ResourceItem[] {new ResourceItem("test.project", new Integer(IResource.PROJECT))});
+ assertNotNull("Should have a working copy of the testig launch configuration", wc); //$NON-NLS-1$
+ setResourceMappings(wc, new ResourceItem[] { new ResourceItem("test.project", new Integer(IResource.PROJECT)) }); //$NON-NLS-1$
IResource[] res = wc.getMappedResources();
- assertNotNull("There should be mapped resources", res);
- assertTrue("There should be one project", res.length == 1);
+ assertNotNull("There should be mapped resources", res); //$NON-NLS-1$
+ assertTrue("There should be one project", res.length == 1); //$NON-NLS-1$
}
finally {
lc.delete();
@@ -1446,13 +1446,13 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
* @since 3.9.0
*/
public void testGetProjectMappedResource2() throws Exception {
- ILaunchConfiguration lc = newConfiguration(null,"test.project.resource.mapping");
+ ILaunchConfiguration lc = newConfiguration(null, "test.project.resource.mapping"); //$NON-NLS-1$
try {
ILaunchConfigurationWorkingCopy wc = lc.getWorkingCopy();
- assertNotNull("Should have a working copy of the testig launch configuration", wc);
- setResourceMappings(wc, new ResourceItem[] {new ResourceItem("test/project", new Integer(IResource.PROJECT))});
+ assertNotNull("Should have a working copy of the testig launch configuration", wc); //$NON-NLS-1$
+ setResourceMappings(wc, new ResourceItem[] { new ResourceItem("test/project", new Integer(IResource.PROJECT)) }); //$NON-NLS-1$
IResource[] res = wc.getMappedResources();
- assertNull("There should be no mapped resources", res);
+ assertNull("There should be no mapped resources", res); //$NON-NLS-1$
}
finally {
lc.delete();
@@ -1467,17 +1467,17 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
* @since 3.9.0
*/
public void testGetProjectMappedResource3() throws Exception {
- ILaunchConfiguration lc = newConfiguration(null,"test.project.resource.mapping");
+ ILaunchConfiguration lc = newConfiguration(null, "test.project.resource.mapping"); //$NON-NLS-1$
try {
ILaunchConfigurationWorkingCopy wc = lc.getWorkingCopy();
- assertNotNull("Should have a working copy of the testig launch configuration", wc);
- setResourceMappings(wc, new ResourceItem[] {new ResourceItem("test\\project", new Integer(IResource.PROJECT))});
+ assertNotNull("Should have a working copy of the testig launch configuration", wc); //$NON-NLS-1$
+ setResourceMappings(wc, new ResourceItem[] { new ResourceItem("test\\project", new Integer(IResource.PROJECT)) }); //$NON-NLS-1$
IResource[] res = wc.getMappedResources();
if(Platform.OS_WIN32.equals(Platform.getOS())) {
- assertNull("There should be no mapped resources", res);
+ assertNull("There should be no mapped resources", res); //$NON-NLS-1$
}
else {
- assertNotNull("There should be mapped resources", res);
+ assertNotNull("There should be mapped resources", res); //$NON-NLS-1$
}
}
finally {
@@ -1493,13 +1493,13 @@ public class LaunchConfigurationTests extends AbstractLaunchTest implements ILau
* @since 3.9.0
*/
public void testGetProjectMappedResource4() throws Exception {
- ILaunchConfiguration lc = newConfiguration(null,"test.project.resource.mapping");
+ ILaunchConfiguration lc = newConfiguration(null, "test.project.resource.mapping"); //$NON-NLS-1$
try {
ILaunchConfigurationWorkingCopy wc = lc.getWorkingCopy();
- assertNotNull("Should have a working copy of the testig launch configuration", wc);
- setResourceMappings(wc, new ResourceItem[] {new ResourceItem("/project", new Integer(IResource.PROJECT))});
+ assertNotNull("Should have a working copy of the testig launch configuration", wc); //$NON-NLS-1$
+ setResourceMappings(wc, new ResourceItem[] { new ResourceItem("/project", new Integer(IResource.PROJECT)) }); //$NON-NLS-1$
IResource[] res = wc.getMappedResources();
- assertNotNull("There should be mapped resources", res);
+ assertNotNull("There should be mapped resources", res); //$NON-NLS-1$
}
finally {
lc.delete();

Back to the top