aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwgalanciak2014-01-20 17:59:18 (EST)
committerGerrit Code Review @ Eclipse.org2014-01-23 14:46:12 (EST)
commit0b0f5c96578746aa3675845cc19d71cc66b2b8de (patch)
treea3b51dadff0400c4a7fe37d0f980b6d3449ecd0a
parent8ded8ec3eb833a14eddad73a158679070fbb563e (diff)
downloadorg.eclipse.pdt-0b0f5c96578746aa3675845cc19d71cc66b2b8de.zip
org.eclipse.pdt-0b0f5c96578746aa3675845cc19d71cc66b2b8de.tar.gz
org.eclipse.pdt-0b0f5c96578746aa3675845cc19d71cc66b2b8de.tar.bz2
Bug 425619 - Warning messages are shown as info in PHP server and PHPrefs/changes/45/20845/2
executable dialogs Change-Id: I4543887551f4e6e6d96bfdfee86ea476e3dcc50d Signed-off-by: wgalanciak <wojciech.galanciak@gmail.com>
-rw-r--r--plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PHPExeCompositeFragment.java2
-rw-r--r--plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PHPExeEditDialog.java12
-rw-r--r--plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PathMapperCompositeFragment.java2
-rw-r--r--plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/PathMapperCompositeFragment.java2
-rw-r--r--plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/ServerCompositeFragment.java2
-rw-r--r--plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/ServerEditDialog.java21
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/CompositeFragment.java5
7 files changed, 11 insertions, 35 deletions
diff --git a/plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PHPExeCompositeFragment.java b/plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PHPExeCompositeFragment.java
index 48236d3..e8efa28 100644
--- a/plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PHPExeCompositeFragment.java
+++ b/plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PHPExeCompositeFragment.java
@@ -312,7 +312,7 @@ public class PHPExeCompositeFragment extends CompositeFragment implements
fDebuggersLabel.setVisible(false);
}
- protected void validate() {
+ public void validate() {
PHPexeItem phpExeItem = getPHPExeItem();
// Check whether we can edit this item
diff --git a/plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PHPExeEditDialog.java b/plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PHPExeEditDialog.java
index 6226ddd..2141164 100644
--- a/plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PHPExeEditDialog.java
+++ b/plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PHPExeEditDialog.java
@@ -16,7 +16,6 @@ import java.util.Iterator;
import java.util.List;
import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.php.internal.debug.core.preferences.PHPexeItem;
@@ -97,6 +96,7 @@ public class PHPExeEditDialog extends TitleAreaDialog implements
CompositeFragment fragment = (CompositeFragment) item
.getControl();
setTitle(fragment.getTitle());
+ fragment.validate();
}
});
return tabs;
@@ -133,14 +133,4 @@ public class PHPExeEditDialog extends TitleAreaDialog implements
}
}
- public void setMessage(String newMessage, int newType) {
- // Override the WARNING with an INFORMATION.
- // We have a bug that cause the warning to be displayed in all the tabs
- // and not
- // only in the selected one. (TODO - Fix this)
- if (newType == IMessageProvider.WARNING) {
- newType = IMessageProvider.INFORMATION;
- }
- super.setMessage(newMessage, newType);
- }
}
diff --git a/plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PathMapperCompositeFragment.java b/plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PathMapperCompositeFragment.java
index 8faeb2d..297106c 100644
--- a/plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PathMapperCompositeFragment.java
+++ b/plugins/org.eclipse.php.debug.ui/src/org/eclipse/php/internal/debug/ui/wizards/PathMapperCompositeFragment.java
@@ -86,7 +86,7 @@ public class PathMapperCompositeFragment extends CompositeFragment {
}
}
- protected void validate() {
+ public void validate() {
setMessage(getDescription(), IMessageProvider.NONE);
setComplete(true);
controlHandler.update();
diff --git a/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/PathMapperCompositeFragment.java b/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/PathMapperCompositeFragment.java
index dd13460..83c8967 100644
--- a/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/PathMapperCompositeFragment.java
+++ b/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/PathMapperCompositeFragment.java
@@ -85,7 +85,7 @@ public class PathMapperCompositeFragment extends CompositeFragment {
}
}
- protected void validate() {
+ public void validate() {
setMessage(getDescription(), IMessageProvider.NONE);
setComplete(true);
diff --git a/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/ServerCompositeFragment.java b/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/ServerCompositeFragment.java
index 8148a7f..2562aee 100644
--- a/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/ServerCompositeFragment.java
+++ b/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/ServerCompositeFragment.java
@@ -202,7 +202,7 @@ public class ServerCompositeFragment extends CompositeFragment {
controlHandler.setTitle(getTitle());
}
- protected void validate() {
+ public void validate() {
if (getServer() == null) {
setMessage("", IMessageProvider.ERROR); //$NON-NLS-1$
return;
diff --git a/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/ServerEditDialog.java b/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/ServerEditDialog.java
index 873f4e5..af37d7d 100644
--- a/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/ServerEditDialog.java
+++ b/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/ServerEditDialog.java
@@ -15,7 +15,6 @@ import java.util.ArrayList;
import java.util.Iterator;
import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.php.internal.server.PHPServerUIMessages;
@@ -189,24 +188,6 @@ public class ServerEditDialog extends TitleAreaDialog implements
* (non-Javadoc)
*
* @see
- * org.eclipse.jface.dialogs.TitleAreaDialog#setMessage(java.lang.String,
- * int)
- */
- public void setMessage(String newMessage, int newType) {
- // Override the WARNING with an INFORMATION.
- // We have a bug that cause the warning to be displayed in all the tabs
- // and not
- // only in the selected one. (TODO - Fix this)
- if (newType == IMessageProvider.WARNING) {
- newType = IMessageProvider.INFORMATION;
- }
- super.setMessage(newMessage, newType);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
* org.eclipse.php.internal.server.apache.ui.IControlHandler#getServer()
*/
public Server getServer() {
@@ -234,7 +215,7 @@ public class ServerEditDialog extends TitleAreaDialog implements
CTabItem item = (CTabItem) e.item;
CompositeFragment fragment = (CompositeFragment) item.getControl();
setTitle(fragment.getTitle());
- setDescription(fragment.getDescription());
+ fragment.validate();
}
}
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/CompositeFragment.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/CompositeFragment.java
index 6ed8400..7fe54c2 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/CompositeFragment.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/wizards/CompositeFragment.java
@@ -203,6 +203,11 @@ public abstract class CompositeFragment extends Composite {
}
/**
+ * Validate data values in current composite.
+ */
+ public abstract void validate();
+
+ /**
* Sets the completeness state of this composite.
*
* @param isComplete