diff options
3 files changed, 80 insertions, 10 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen/src/template/GMFFragmentTemplate.xpt b/plugins/org.eclipse.emf.cdo.dawn.codegen/src/template/GMFFragmentTemplate.xpt index fc0bd58d97..e92944b61b 100644 --- a/plugins/org.eclipse.emf.cdo.dawn.codegen/src/template/GMFFragmentTemplate.xpt +++ b/plugins/org.eclipse.emf.cdo.dawn.codegen/src/template/GMFFragmentTemplate.xpt @@ -422,7 +422,7 @@ public class «this.dawnCreationWizardClassName» extends «this.GMFGenEditorGenera { if (e.getTargetException() instanceof CoreException) { - ErrorDialog.openError(getContainer().getShell(), "Error while creating diagram", null, + ErrorDialog.openError(getContainer().getShell(), Messages.«this.GMFGenEditorGenerator.diagram.creationWizardClassName»CreationError, null, ((CoreException)e.getTargetException()).getStatus()); } else @@ -445,7 +445,7 @@ public class «this.dawnCreationWizardClassName» extends «this.GMFGenEditorGenera dawnDiagramModelFilePage.setCreateAutomaticResourceName(true); addPage(dawnDiagramModelFilePage); - dawnDomainModelFilePage = new DawnCreateNewResourceWizardPage("", true, view) + dawnDomainModelFilePage = new DawnCreateNewResourceWizardPage("«this.GMFGenEditorGenerator.domainFileExtension»", true, view) { @Override public void setVisible(boolean visible) diff --git a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreCreationWizard.java b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreCreationWizard.java index 21bd369a14..5ec882cd07 100644 --- a/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreCreationWizard.java +++ b/plugins/org.eclipse.emf.cdo.dawn.examples.acore.diagram.dawn/src/org/eclipse/emf/cdo/dawn/examples/acore/diagram/part/DawnAcoreCreationWizard.java @@ -52,11 +52,6 @@ public class DawnAcoreCreationWizard extends AcoreCreationWizard @Override public boolean performFinish() { - AcoreDiagramEditorPlugin.getInstance().logInfo( - "Notational Model: " + dawnDiagramModelFilePage.getURI().lastSegment()); - AcoreDiagramEditorPlugin.getInstance().logInfo("Notational Model URI: " + dawnDiagramModelFilePage.getURI()); - AcoreDiagramEditorPlugin.getInstance().logInfo("Domain Model: " + dawnDomainModelFilePage.getURI().lastSegment()); - AcoreDiagramEditorPlugin.getInstance().logInfo("Domain Model URI: " + dawnDomainModelFilePage.getURI()); IRunnableWithProgress op = new WorkspaceModifyOperation(null) { @Override @@ -75,8 +70,8 @@ public class DawnAcoreCreationWizard extends AcoreCreationWizard } catch (PartInitException e) { - ErrorDialog.openError(getContainer().getShell(), Messages.AcoreCreationWizardOpenEditorError, null, e - .getStatus()); + ErrorDialog.openError(getContainer().getShell(), Messages.AcoreCreationWizardOpenEditorError, null, + e.getStatus()); } } } @@ -114,7 +109,7 @@ public class DawnAcoreCreationWizard extends AcoreCreationWizard dawnDiagramModelFilePage.setCreateAutomaticResourceName(true); addPage(dawnDiagramModelFilePage); - dawnDomainModelFilePage = new DawnCreateNewResourceWizardPage("", true, view) + dawnDomainModelFilePage = new DawnCreateNewResourceWizardPage("acore", true, view) { @Override public void setVisible(boolean visible) diff --git a/plugins/org.eclipse.emf.cdo.dawn.tests/src/org/eclipse/emf/cdo/dawn/tests/bugzillas/Bugzilla_321024_Test.java b/plugins/org.eclipse.emf.cdo.dawn.tests/src/org/eclipse/emf/cdo/dawn/tests/bugzillas/Bugzilla_321024_Test.java new file mode 100644 index 0000000000..0faa4f12eb --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.dawn.tests/src/org/eclipse/emf/cdo/dawn/tests/bugzillas/Bugzilla_321024_Test.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Martin Fluegge - initial API and implementation + */ +package org.eclipse.emf.cdo.dawn.tests.bugzillas; + +import org.eclipse.emf.cdo.dawn.tests.AbstractDawnUITest; +import org.eclipse.emf.cdo.dawn.tests.ui.util.DawnSWTBotUtil; + +import org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot; +import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor; +import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner; +import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell; + +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; + +/** + * @author Martin Fluegge + */ +@RunWith(SWTBotJunit4ClassRunner.class) +public class Bugzilla_321024_Test extends AbstractDawnUITest +{ + private static SWTGefBot bot; + + @BeforeClass + public static void beforeClass() throws Exception + { + bot = new SWTGefBot(); + DawnSWTBotUtil.initTest(bot); + } + + @Override + @Before + public void setUp() throws Exception + { + super.setUp(); + } + + @Override + @After + public void tearDown() throws Exception + { + super.tearDown(); + } + + @Test + public void createNewDawnDiagramEmptySemanticResourceName() throws Exception + { + bot.menu("File").menu("New").menu("Other...").click(); + + SWTBotShell shell = bot.shell("New"); + shell.activate(); + bot.tree().expandNode("Dawn Examples").select("Dawn Acore Diagram"); + bot.button("Next >").click(); + bot.button("Finish").click(); + + SWTBotGefEditor editor = bot.gefEditor("default.acore_diagram"); + assertNotNull(editor); + editor.close(); + { + assertEquals(true, resourceExists("/default.acore")); + assertEquals(true, resourceExists("/default.acore_diagram")); + } + } +} |