Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fluegge2011-03-15 15:22:35 +0000
committerMartin Fluegge2011-03-15 15:22:35 +0000
commit9295711d8d9bf12a9376ba9bfd90aa7aaf80a6da (patch)
tree1799724f847f5ca7ef56af17b141cbbd407148d1 /plugins/org.eclipse.emf.cdo.dawn.ui
parent03697e8c38fb2d2102bdcd556f3f89a656c2def9 (diff)
downloadcdo-9295711d8d9bf12a9376ba9bfd90aa7aaf80a6da.tar.gz
cdo-9295711d8d9bf12a9376ba9bfd90aa7aaf80a6da.tar.xz
cdo-9295711d8d9bf12a9376ba9bfd90aa7aaf80a6da.zip
[333187] [Dawn] Provide integration for Ecore Tools
https://bugs.eclipse.org/bugs/show_bug.cgi?id=333187
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.dawn.ui')
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/composites/CDOResourceNodeChooserComposite.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/wizards/DawnCreateNewResourceWizardPage.java48
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/wizards/dialogs/CDOResourceNodeSelectionDialog.java10
3 files changed, 11 insertions, 52 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/composites/CDOResourceNodeChooserComposite.java b/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/composites/CDOResourceNodeChooserComposite.java
index df0ee28d69..70027442b2 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/composites/CDOResourceNodeChooserComposite.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/composites/CDOResourceNodeChooserComposite.java
@@ -289,7 +289,6 @@ public class CDOResourceNodeChooserComposite extends Composite
public void validate()
{
-
internalValidate();
if (validationListener != null)
{
@@ -324,12 +323,16 @@ public class CDOResourceNodeChooserComposite extends Composite
if (getResourceValidationType() == VALIDATION_WARN)
{
setMessage(Messages.DawnCreateNewResourceWizardPage_11, IMessageProvider.WARNING);
+ setMessageType(IMessageProvider.WARNING);
setValid(true);
+ return;
}
else if (getResourceValidationType() == VALIDATION_ERROR)
{
setMessage(Messages.DawnCreateNewResourceWizardPage_12, IMessageProvider.ERROR);
setValid(false);
+ setMessageType(IMessageProvider.ERROR);
+ return;
}
}
}
diff --git a/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/wizards/DawnCreateNewResourceWizardPage.java b/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/wizards/DawnCreateNewResourceWizardPage.java
index 3cf86d2b4b..bbcd4450b9 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/wizards/DawnCreateNewResourceWizardPage.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/wizards/DawnCreateNewResourceWizardPage.java
@@ -35,10 +35,10 @@ public class DawnCreateNewResourceWizardPage extends WizardPage
private final String fileExtension;
- private int resourceValidationType;
+ private int resourceValidationType = ResourceChooserValidator.VALIDATION_ERROR;
/**
- * left for backward compatibility with the generated editors. This field might sone be removed. Use
+ * left for backward compatibility with the generated editors. This field might soon be removed. Use
* <b>org.eclipse.emf.cdo.dawn.ui.composites.ResourceChooserValidator.VALIDATION_WARN</b> instead.
*/
@Deprecated
@@ -118,50 +118,6 @@ public class DawnCreateNewResourceWizardPage extends WizardPage
setPageComplete(valid);
}
- // private void validatePage()
- // {
- // boolean valid = false;
- // if (chooserComposite.getResourceName().length() != 0)
- // {
- // setPageComplete(true);
- // valid = true;
- // }
- // else
- // {
- // setErrorMessage(Messages.DawnCreateNewResourceWizardPage_10);
- // valid = false;
- // }
- // if (view != null && resourceValidationType != VALIDATION_NONE)
- // {
- // try
- // {
- // if (view.hasResource(getURI().path()))
- // {
- // if (resourceValidationType == VALIDATION_WARN)
- // {
- // setMessage(Messages.DawnCreateNewResourceWizardPage_11, IMessageProvider.WARNING);
- // valid = true;
- // }
- // else if (resourceValidationType == VALIDATION_ERROR)
- // {
- // setErrorMessage(Messages.DawnCreateNewResourceWizardPage_12);
- // valid = false;
- // }
- // }
- // }
- // catch (Exception e)
- // {
- // setErrorMessage(e.getMessage());
- // }
- // }
- // if (valid)
- // {
- // setErrorMessage(null);
- // }
- //
- // setPageComplete(valid);
- // }
-
public URI getURI()
{
return chooserComposite.getURI();
diff --git a/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/wizards/dialogs/CDOResourceNodeSelectionDialog.java b/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/wizards/dialogs/CDOResourceNodeSelectionDialog.java
index fee8cf03cc..5de97485ea 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/wizards/dialogs/CDOResourceNodeSelectionDialog.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.ui/src/org/eclipse/emf/cdo/dawn/ui/wizards/dialogs/CDOResourceNodeSelectionDialog.java
@@ -67,17 +67,17 @@ public class CDOResourceNodeSelectionDialog extends Dialog
@Override
protected Control createButtonBar(Composite parent)
{
- Control createButtonBar = super.createButtonBar(parent);
- GridData gd = new GridData(GridData.FILL_BOTH);
- createButtonBar.setLayoutData(gd);
+ Control buttonBar = super.createButtonBar(parent);
+ GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.VERTICAL_ALIGN_CENTER);
+ buttonBar.setLayoutData(gd);
getShell().pack();
- return createButtonBar;
+ return buttonBar;
}
@Override
protected void initializeBounds()
{
- getShell().setSize(300, 500);
+ getShell().setSize(300, 400);
}
public URI getResults()

Back to the top