Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamed Hussein2012-10-15 20:18:55 -0400
committerMike Rennie2012-10-15 20:18:55 -0400
commit231ef131428719fb986eaa67511186dd9ec341fb (patch)
tree03487c5f5692283e236d4cff92c44a3e48a15164 /org.eclipse.debug.examples.ui
parentb55a4bb203803a86d0792de5f9f17103c6cc09a0 (diff)
downloadeclipse.platform.debug-231ef131428719fb986eaa67511186dd9ec341fb.tar.gz
eclipse.platform.debug-231ef131428719fb986eaa67511186dd9ec341fb.tar.xz
eclipse.platform.debug-231ef131428719fb986eaa67511186dd9ec341fb.zip
Bug 386673 - Show warning messages in launch configuration dialogv20121016-001855I20121016-0800
Diffstat (limited to 'org.eclipse.debug.examples.ui')
-rw-r--r--org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java11
2 files changed, 10 insertions, 3 deletions
diff --git a/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF b/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
index 1aef3d1ad..862a5550e 100644
--- a/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.debug.examples.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.debug.examples.ui;singleton:=true
-Bundle-Version: 1.4.0.qualifier
+Bundle-Version: 1.4.100.qualifier
Bundle-Activator: org.eclipse.debug.examples.ui.pda.DebugUIPlugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java
index 27b3a2fcc..ea854dad9 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/launcher/PDAMainTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Bjorn Freeman-Benson - initial API and implementation
+ * Mohamed Hussein (Mentor Graphics) - Added s/getWarningMessage (Bug 386673)
*******************************************************************************/
package org.eclipse.debug.examples.ui.pda.launcher;
@@ -168,6 +169,7 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
*/
public boolean isValid(ILaunchConfiguration launchConfig) {
setErrorMessage(null);
+ setWarningMessage(null);
setMessage(null);
String text = fProgramText.getText();
//#ifdef ex1
@@ -176,9 +178,14 @@ public class PDAMainTab extends AbstractLaunchConfigurationTab {
//#else
if (text.length() > 0) {
IPath path = new Path(text);
- if (ResourcesPlugin.getWorkspace().getRoot().findMember(path) == null) {
+ IResource member = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
+ if (member == null) {
setErrorMessage("Specified program does not exist");
return false;
+ } else {
+ if (member.getType() != IResource.FILE) {
+ setWarningMessage("Specified program is not a file.");
+ }
}
} else {
setMessage("Specify a program");

Back to the top