Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2014-12-15 07:20:55 +0000
committerTobias Schwarz2014-12-15 07:20:55 +0000
commit76137cb1cd62256e8fa078063a92f1480fcc8a71 (patch)
treef536817348f59f74f1f1687c037512004a382ccf
parentddf7b46b41101c806dde45ffe3455f146ded921c (diff)
downloadorg.eclipse.tcf-76137cb1cd62256e8fa078063a92f1480fcc8a71.tar.gz
org.eclipse.tcf-76137cb1cd62256e8fa078063a92f1480fcc8a71.tar.xz
org.eclipse.tcf-76137cb1cd62256e8fa078063a92f1480fcc8a71.zip
SM: extend simulator service interface to check projects
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java26
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/ISimulatorServiceUIDelegate.java26
2 files changed, 42 insertions, 10 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java
index 4a750bd44..b2ce60d0a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/BaseEditBrowseTextControl.java
@@ -1469,6 +1469,22 @@ public class BaseEditBrowseTextControl extends AbstractDecoratedDialogPageContro
if (isInitializing) {
return true;
}
+ boolean valid = internalIsValid();
+
+ if (getControlDecoration() != null) {
+ // Setup and show the control decoration if necessary
+ if (isEnabled() && (!valid || (getMessage() != null && getMessageType() != IMessageProvider.NONE))) {
+ // Update the control decorator
+ updateControlDecoration(getMessage(), getMessageType());
+ } else {
+ updateControlDecoration(null, IMessageProvider.NONE);
+ }
+ }
+
+ return valid;
+ }
+
+ protected boolean internalIsValid() {
boolean valid = super.isValid();
if (getEditFieldValidator() != null &&
@@ -1482,16 +1498,6 @@ public class BaseEditBrowseTextControl extends AbstractDecoratedDialogPageContro
setMessage(getEditFieldValidator().getMessage(), getEditFieldValidator().getMessageType());
}
- if (getControlDecoration() != null) {
- // Setup and show the control decoration if necessary
- if (isEnabled() && (!valid || (getMessage() != null && getMessageType() != IMessageProvider.NONE))) {
- // Update the control decorator
- updateControlDecoration(getMessage(), getMessageType());
- } else {
- updateControlDecoration(null, IMessageProvider.NONE);
- }
- }
-
return valid;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/ISimulatorServiceUIDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/ISimulatorServiceUIDelegate.java
index 34dfbd886..21264beca 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/ISimulatorServiceUIDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.controls/src/org/eclipse/tcf/te/ui/controls/interfaces/ISimulatorServiceUIDelegate.java
@@ -9,9 +9,12 @@
*******************************************************************************/
package org.eclipse.tcf.te.ui.controls.interfaces;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.swt.graphics.Image;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
import org.eclipse.tcf.te.runtime.services.interfaces.ISimulatorService;
+import org.eclipse.tcf.te.ui.controls.BaseControl;
import org.eclipse.tcf.te.ui.controls.BaseWizardConfigurationPanelControl;
/**
@@ -71,4 +74,27 @@ public interface ISimulatorServiceUIDelegate {
* @return
*/
public IWizardConfigurationPanel getConfigPanel(Object context, BaseWizardConfigurationPanelControl parentControl, String mode);
+
+ /**
+ * Check if a project can be used to get the kernel image.
+ * @param project The project to check.
+ * @return
+ */
+ public boolean isValidProjectForKernelImage(IProject project);
+
+ /**
+ * Check if a projects build target path is a valid kernel image.
+ * @param path The path to check.
+ * @return
+ */
+ public boolean isValidBuildTargetPathForKernelImage(IPath path);
+
+ /**
+ * Do additional validation for a given valid kernel image path.
+ * I.e. check for further needed files and set message to the messageProvider
+ * @param path
+ * @param messageProvider
+ * @return
+ */
+ public boolean validateKernelImage(IPath path, BaseControl messageProvider);
}

Back to the top