Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2015-05-30 05:00:50 -0400
committerEike Stepper2015-05-30 05:00:50 -0400
commitc483f6c4ccad12436dab3f049b0a39c9cc81f071 (patch)
treec62386162563127c59225639b06b4c37214ffd8e
parent71afa7d92daaa92ec5c56fd1e9161031653b60de (diff)
downloadorg.eclipse.oomph-c483f6c4ccad12436dab3f049b0a39c9cc81f071.tar.gz
org.eclipse.oomph-c483f6c4ccad12436dab3f049b0a39c9cc81f071.tar.xz
org.eclipse.oomph-c483f6c4ccad12436dab3f049b0a39c9cc81f071.zip
[468871] eclipse-installer looks awkward on win64
https://bugs.eclipse.org/bugs/show_bug.cgi?id=468871
-rw-r--r--plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleInstallerDialog.java5
-rw-r--r--plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleInstallerPage.java5
-rw-r--r--plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleVariablePage.java26
3 files changed, 27 insertions, 9 deletions
diff --git a/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleInstallerDialog.java b/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleInstallerDialog.java
index 0e07745cc..359d7ba17 100644
--- a/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleInstallerDialog.java
+++ b/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleInstallerDialog.java
@@ -518,6 +518,11 @@ public final class SimpleInstallerDialog extends AbstractSimpleDialog implements
switchToPage(variablePage);
}
+ public SimpleInstallerPage getTopPage()
+ {
+ return (SimpleInstallerPage)stackLayout.topControl;
+ }
+
private void doSwitch(final SimpleInstallerPage oldPage, final SimpleInstallerPage newPage)
{
if (oldPage != null)
diff --git a/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleInstallerPage.java b/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleInstallerPage.java
index b73fca4eb..34b1f2ba2 100644
--- a/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleInstallerPage.java
+++ b/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleInstallerPage.java
@@ -159,6 +159,11 @@ public abstract class SimpleInstallerPage extends Composite
protected abstract void createContent(Composite container);
+ public boolean isTop()
+ {
+ return dialog.getTopPage() == this;
+ }
+
public void aboutToShow()
{
// Subclasses may override.
diff --git a/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleVariablePage.java b/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleVariablePage.java
index 9cbd25bf0..0f9e019c6 100644
--- a/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleVariablePage.java
+++ b/plugins/org.eclipse.oomph.setup.installer/src/org/eclipse/oomph/setup/internal/installer/SimpleVariablePage.java
@@ -991,15 +991,16 @@ public class SimpleVariablePage extends SimpleInstallerPage
errorMessage = validateFolderText(folderText.getText());
}
- if (errorMessage != null)
+ if (isTop())
{
- // TODO it would also be possible to add an action which
- // will trigger the same action as the folderButton
- dialog.showMessage(errorMessage, Type.ERROR, false, null);
- }
- else
- {
- dialog.clearMessage();
+ if (errorMessage != null)
+ {
+ dialog.showMessage(errorMessage, Type.ERROR, false, null);
+ }
+ else
+ {
+ dialog.clearMessage();
+ }
}
installButton.setEnabled(errorMessage == null);
@@ -1010,6 +1011,7 @@ public class SimpleVariablePage extends SimpleInstallerPage
{
super.aboutToShow();
keepInstallerButton.setVisible(KeepInstallerUtil.canKeepInstaller());
+ validatePage();
}
private String validateJREs()
@@ -1042,7 +1044,13 @@ public class SimpleVariablePage extends SimpleInstallerPage
File parentFolder = folder.getParentFile();
if (parentFolder == null || !parentFolder.canWrite() || folder.isFile() || folder.isDirectory() && !folder.canWrite())
{
- return "Folder " + folder.getName() + " cannot be created.";
+ String name = folder.getName();
+ if (StringUtil.isEmpty(name))
+ {
+ name = dir;
+ }
+
+ return "Folder " + name + " cannot be created.";
}
installRoot = parentFolder.getAbsolutePath();

Back to the top