JBoss Tools SVN: r28623 - branches/jbosstools-3.2.x/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-26 16:22:23 -0500 (Wed, 26 Jan 2011)
New Revision: 28623
Modified:
branches/jbosstools-3.2.x/build/aggregate/site/index-template.html
branches/jbosstools-3.2.x/build/aggregate/site/index.html
Log:
add extra / to birt site so it's seen as a DIFFERENT site from the default-listed one, and can be force-enabled by JBT update site
Modified: branches/jbosstools-3.2.x/build/aggregate/site/index-template.html
===================================================================
--- branches/jbosstools-3.2.x/build/aggregate/site/index-template.html 2011-01-26 21:21:09 UTC (rev 28622)
+++ branches/jbosstools-3.2.x/build/aggregate/site/index-template.html 2011-01-26 21:22:23 UTC (rev 28623)
@@ -43,7 +43,7 @@
Software Sites. Simply right-click the link(s) below from which you'd like to
install, copy the link, and paste it into Eclipse's Update or Install Manager:</p>
<ul>
- <li><a href="http://download.eclipse.org/birt/update-site/2.6/">BIRT 2.6 Update Site</a></li>
+ <li><a href="http://download.eclipse.org//birt/update-site/2.6/">BIRT 2.6 Update Site</a></li>
<li><a href="http://m2eclipse.sonatype.org/sites/m2e/">m2eclipse 0.10 Release</a></li>
<li><a href="http://m2eclipse.sonatype.org/sites/m2e-extras/">m2eclipse 0.10 Extras</a></li>
<li><a href="http://subclipse.tigris.org/update_1.6.x"/>Subclipse 1.6 Update Site </a></li>
Modified: branches/jbosstools-3.2.x/build/aggregate/site/index.html
===================================================================
--- branches/jbosstools-3.2.x/build/aggregate/site/index.html 2011-01-26 21:21:09 UTC (rev 28622)
+++ branches/jbosstools-3.2.x/build/aggregate/site/index.html 2011-01-26 21:22:23 UTC (rev 28623)
@@ -43,7 +43,7 @@
Software Sites. Simply right-click the link(s) below from which you'd like to
install, copy the link, and paste it into Eclipse's Update or Install Manager:</p>
<ul>
- <li><a href="http://download.eclipse.org/birt/update-site/2.6/">BIRT 2.6 Update Site</a></li>
+ <li><a href="http://download.eclipse.org//birt/update-site/2.6/">BIRT 2.6 Update Site</a></li>
<li><a href="http://m2eclipse.sonatype.org/sites/m2e/">m2eclipse 0.10 Release</a></li>
<li><a href="http://m2eclipse.sonatype.org/sites/m2e-extras/">m2eclipse 0.10 Extras</a></li>
<li><a href="http://subclipse.tigris.org/update_1.6.x"/>Subclipse 1.6 Update Site </a></li>
13 years, 5 months
JBoss Tools SVN: r28622 - trunk/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-26 16:21:09 -0500 (Wed, 26 Jan 2011)
New Revision: 28622
Modified:
trunk/build/aggregate/site/index-template.html
trunk/build/aggregate/site/index.html
Log:
add extra / to birt site so it's seen as a DIFFERENT site from the default-listed one, and can be force-enabled by JBT update site
Modified: trunk/build/aggregate/site/index-template.html
===================================================================
--- trunk/build/aggregate/site/index-template.html 2011-01-26 21:15:10 UTC (rev 28621)
+++ trunk/build/aggregate/site/index-template.html 2011-01-26 21:21:09 UTC (rev 28622)
@@ -43,7 +43,7 @@
Software Sites. Simply right-click the link(s) below from which you'd like to
install, copy the link, and paste it into Eclipse's Update or Install Manager:</p>
<ul>
- <li><a href="http://download.eclipse.org/birt/update-site/2.6/">BIRT 2.6 Update Site</a></li>
+ <li><a href="http://download.eclipse.org//birt/update-site/2.6/">BIRT 2.6 Update Site</a></li>
<li><a href="http://m2eclipse.sonatype.org/sites/m2e/">m2eclipse 0.10 Release</a></li>
<li><a href="http://m2eclipse.sonatype.org/sites/m2e-extras/">m2eclipse 0.10 Extras</a></li>
<li><a href="http://subclipse.tigris.org/update_1.6.x"/>Subclipse 1.6 Update Site </a></li>
Modified: trunk/build/aggregate/site/index.html
===================================================================
--- trunk/build/aggregate/site/index.html 2011-01-26 21:15:10 UTC (rev 28621)
+++ trunk/build/aggregate/site/index.html 2011-01-26 21:21:09 UTC (rev 28622)
@@ -43,7 +43,7 @@
Software Sites. Simply right-click the link(s) below from which you'd like to
install, copy the link, and paste it into Eclipse's Update or Install Manager:</p>
<ul>
- <li><a href="http://download.eclipse.org/birt/update-site/2.6/">BIRT 2.6 Update Site</a></li>
+ <li><a href="http://download.eclipse.org//birt/update-site/2.6/">BIRT 2.6 Update Site</a></li>
<li><a href="http://m2eclipse.sonatype.org/sites/m2e/">m2eclipse 0.10 Release</a></li>
<li><a href="http://m2eclipse.sonatype.org/sites/m2e-extras/">m2eclipse 0.10 Extras</a></li>
<li><a href="http://subclipse.tigris.org/update_1.6.x"/>Subclipse 1.6 Update Site </a></li>
13 years, 5 months
JBoss Tools SVN: r28621 - branches/jbosstools-3.2.x/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-26 16:15:10 -0500 (Wed, 26 Jan 2011)
New Revision: 28621
Modified:
branches/jbosstools-3.2.x/build/aggregate/site/aggregateSite.jbosstools.properties
Log:
add extra / to birt site so it's seen as a DIFFERENT site from the default-listed one, and can be force-enabled by JBT update site
Modified: branches/jbosstools-3.2.x/build/aggregate/site/aggregateSite.jbosstools.properties
===================================================================
--- branches/jbosstools-3.2.x/build/aggregate/site/aggregateSite.jbosstools.properties 2011-01-26 20:29:34 UTC (rev 28620)
+++ branches/jbosstools-3.2.x/build/aggregate/site/aggregateSite.jbosstools.properties 2011-01-26 21:15:10 UTC (rev 28621)
@@ -6,7 +6,7 @@
# associate sites to add to the resulting repo
associate.sites=http://download.jboss.org/jbosstools/updates/helios/,\
http://download.eclipse.org/eclipse/updates/3.6/,\
-http://download.eclipse.org/birt/update-site/2.6/,\
+http://download.eclipse.org//birt/update-site/2.6/,\
http://download.eclipse.org/tptp/updates/galileo/,\
http://m2eclipse.sonatype.org/sites/m2e/,\
http://m2eclipse.sonatype.org/sites/m2e-extras/,\
13 years, 5 months
JBoss Tools SVN: r28620 - trunk/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-01-26 15:29:34 -0500 (Wed, 26 Jan 2011)
New Revision: 28620
Modified:
trunk/build/aggregate/site/aggregateSite.jbosstools.properties
Log:
add extra / to birt site so it's seen as a DIFFERENT site from the default-listed one, and can be force-enabled by JBT update site
Modified: trunk/build/aggregate/site/aggregateSite.jbosstools.properties
===================================================================
--- trunk/build/aggregate/site/aggregateSite.jbosstools.properties 2011-01-26 19:39:38 UTC (rev 28619)
+++ trunk/build/aggregate/site/aggregateSite.jbosstools.properties 2011-01-26 20:29:34 UTC (rev 28620)
@@ -6,7 +6,7 @@
# associate sites to add to the resulting repo
associate.sites=http://download.jboss.org/jbosstools/updates/helios/,\
http://download.eclipse.org/eclipse/updates/3.6/,\
-http://download.eclipse.org/birt/update-site/2.6/,\
+http://download.eclipse.org//birt/update-site/2.6/,\
http://download.eclipse.org/tptp/updates/galileo/,\
http://m2eclipse.sonatype.org/sites/m2e/,\
http://m2eclipse.sonatype.org/sites/m2e-extras/,\
13 years, 5 months
JBoss Tools SVN: r28619 - trunk/common/plugins/org.jboss.tools.common.text.xml/META-INF.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-01-26 14:39:38 -0500 (Wed, 26 Jan 2011)
New Revision: 28619
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/META-INF/MANIFEST.MF
Log:
https://issues.jboss.org/browse/JBIDE-8225 Added org.eclipse.wst.xsd.ui, org.eclipse.wst.dtd.ui to dependency list.
Modified: trunk/common/plugins/org.jboss.tools.common.text.xml/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/META-INF/MANIFEST.MF 2011-01-26 19:01:43 UTC (rev 28618)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/META-INF/MANIFEST.MF 2011-01-26 19:39:38 UTC (rev 28619)
@@ -24,6 +24,8 @@
org.eclipse.wst.xml.ui,
org.eclipse.wst.sse.ui,
org.eclipse.wst.sse.core,
- org.eclipse.core.resources
+ org.eclipse.core.resources,
+ org.eclipse.wst.xsd.ui,
+ org.eclipse.wst.dtd.ui
Bundle-Version: 3.2.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
13 years, 5 months
JBoss Tools SVN: r28618 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-01-26 14:01:43 -0500 (Wed, 26 Jan 2011)
New Revision: 28618
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java
Log:
JBIDE-8224 - instances have no children
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java 2011-01-26 19:00:01 UTC (rev 28617)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudContentProvider.java 2011-01-26 19:01:43 UTC (rev 28618)
@@ -23,6 +23,7 @@
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudImage;
+import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
import org.jboss.tools.deltacloud.core.job.LoadCloudImagesJob;
import org.jboss.tools.deltacloud.core.job.LoadCloudInstancesJob;
@@ -196,6 +197,8 @@
public boolean hasChildren(Object element) {
if( element instanceof DelayObject )
return false;
+ if( element instanceof DeltaCloudInstance )
+ return false;
return true;
}
}
13 years, 5 months
JBoss Tools SVN: r28617 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-01-26 14:00:01 -0500 (Wed, 26 Jan 2011)
New Revision: 28617
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionUtil.java
Log:
JBIDE-8224 - util class changed for use in cnf-based cloud view
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionUtil.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionUtil.java 2011-01-26 15:52:31 UTC (rev 28616)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/cnf/CloudViewActionUtil.java 2011-01-26 19:00:01 UTC (rev 28617)
@@ -149,7 +149,7 @@
}
public static List<DeltaCloudInstance> getCloudInstances(ISelection selection) {
- if( selection instanceof DeltaCloudInstance ) {
+ if( selection instanceof IStructuredSelection ) {
IStructuredSelection s2 = (IStructuredSelection)selection;
List<DeltaCloudInstance> instances = UIUtils.adapt(s2.toList(),DeltaCloudInstance.class);
return instances;
13 years, 5 months
JBoss Tools SVN: r28616 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jlukas(a)redhat.com
Date: 2011-01-26 10:52:31 -0500 (Wed, 26 Jan 2011)
New Revision: 28616
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/Wizard.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java
Log:
adding tests for cdi wizards introduced in cr1
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java 2011-01-26 15:34:32 UTC (rev 28615)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/CDIWizard.java 2011-01-26 15:52:31 UTC (rev 28616)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * Copyright (c) 2010-2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -31,7 +31,11 @@
}
public CDIWizard setName(String name) {
- setText("Name:", name);
+ if (CDIWizardType.BEANS_XML == type) {
+ setText("File name:", name);
+ } else {
+ setText("Name:", name);
+ }
return this;
}
@@ -40,6 +44,15 @@
return this;
}
+ public CDIWizard setSourceFolder(String src) {
+ if (CDIWizardType.BEANS_XML == type) {
+ setText("Enter or select the parent folder:", src);
+ } else {
+ setText("Source folder:", src);
+ }
+ return this;
+ }
+
public CDIWizard setInherited(boolean set) {
setCheckbox("Add @Inherited", set);
return this;
@@ -121,6 +134,7 @@
public CDIWizard setNamed(boolean set) {
switch (type) {
case STEREOTYPE:
+ case BEAN:
setCheckbox("Add @Named", set);
break;
default:
@@ -129,6 +143,14 @@
return this;
}
+ public CDIWizard setNamedName(String name) {
+ if (CDIWizardType.BEAN != type) {
+ throw new UnsupportedOperationException();
+ }
+ setText("Bean Name:", name);
+ return this;
+ }
+
public boolean isNamed() {
switch (type) {
case STEREOTYPE:
@@ -157,6 +179,7 @@
public CDIWizard setScope(String scope) {
switch (type) {
case STEREOTYPE:
+ case BEAN:
setCombo("Scope:", scope);
break;
default:
@@ -210,6 +233,8 @@
public CDIWizard setPublic(boolean isPublic) {
switch (type) {
case DECORATOR:
+ case BEAN:
+ case ANNOTATION_LITERAL:
if (isPublic) {
bot().radio("public").click();
} else {
@@ -247,6 +272,7 @@
public CDIWizard addInterface(String intf) {
switch (type) {
case DECORATOR:
+ case BEAN:
bot().button("Add...", 0).click();
SWTBotShell sh = bot().activeShell();
sh.bot().text().setText(intf);
@@ -260,9 +286,30 @@
return this;
}
+ public CDIWizard addQualifier(String qualifier) {
+ switch (type) {
+ case BEAN:
+ bot().button("Add", 0).click();
+ break;
+ case ANNOTATION_LITERAL:
+ bot().button("Browse", 0).click();
+ break;
+ default:
+ throw new UnsupportedOperationException();
+ }
+ SWTBotShell sh = bot().activeShell();
+ sh.bot().text().setText(qualifier);
+ sh.bot().sleep(1000);
+ sh.bot().table().getTableItem(0).select();
+ sh.bot().button("OK").click();
+ return this;
+ }
+
public CDIWizard setAbstract(boolean isAbstract) {
switch (type) {
case DECORATOR:
+ case BEAN:
+ case ANNOTATION_LITERAL:
setCheckbox("abstract", isAbstract);
break;
default:
@@ -274,6 +321,8 @@
public CDIWizard setFinal(boolean isFinal) {
switch (type) {
case DECORATOR:
+ case BEAN:
+ case ANNOTATION_LITERAL:
setCheckbox("final", isFinal);
break;
default:
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/Wizard.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/Wizard.java 2011-01-26 15:34:32 UTC (rev 28615)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/wizards/Wizard.java 2011-01-26 15:52:31 UTC (rev 28616)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
+ * Copyright (c) 2010-2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
@@ -55,6 +55,10 @@
public void finish() {
clickButton("Finish");
}
+
+ public boolean canFinish() {
+ return canClick("Finish");
+ }
protected void clickButton(String text) {
bot().button(text).click();
@@ -66,4 +70,8 @@
t.setFocus();
t.setText(text);
}
+
+ protected boolean canClick(String button) {
+ return bot().button(button).isEnabled();
+ }
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java 2011-01-26 15:34:32 UTC (rev 28615)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/wizard/CdiATWizardTest.java 2011-01-26 15:52:31 UTC (rev 28616)
@@ -44,8 +44,7 @@
public class CdiATWizardTest extends SWTTestExt {
private static final String PROJECT_NAME = "CDIProject";
- private static final Logger L = Logger.getLogger(CdiATWizardTest.class
- .getName());
+ private static final Logger L = Logger.getLogger(CdiATWizardTest.class.getName());
@After
public void waitForJobs() {
@@ -323,6 +322,96 @@
assertTrue(code.contains("extends Date"));
}
+ @Test
+ public void testBeansXml() {
+ CDIWizard w = new NewCDIFileWizard(CDIWizardType.BEANS_XML).run();
+ w.setSourceFolder(PROJECT_NAME + "/WebContent/WEB-INF");
+ assertTrue(w.canFinish());
+ w.finish();
+ w = new NewCDIFileWizard(CDIWizardType.BEANS_XML).run();
+ assertFalse(w.canFinish());
+ w.cancel();
+ }
+
+ @Test
+ public void testBean() {
+ CDIWizard w = bean("cdi", "Bean1", true, true, false, false, null, null, null, null);
+ w.finish();
+ util.waitForNonIgnoredJobs();
+ SWTBotEditor ed = new SWTWorkbenchBot().activeEditor();
+ assertTrue(("Bean1.java").equals(ed.getTitle()));
+ String code = ed.toTextEditor().getText();
+ L.fine(code);
+ assertTrue(code.contains("package cdi;"));
+ assertTrue(code.contains("public abstract class Bean1 {"));
+ assertFalse(code.contains("@Named"));
+ assertFalse(code.contains("final"));
+ assertFalse(code.startsWith("/**"));
+
+ w = bean("cdi", "Bean2", false, false, true, true, "", null, "@Dependent", null);
+ w.finish();
+ util.waitForNonIgnoredJobs();
+ ed = new SWTWorkbenchBot().activeEditor();
+ assertTrue(("Bean2.java").equals(ed.getTitle()));
+ code = ed.toTextEditor().getText();
+ L.fine(code);
+ assertTrue(code.contains("package cdi;"));
+ assertTrue(code.contains("@Named"));
+ assertFalse(code.contains("@Named("));
+ assertTrue(code.contains("@Dependent"));
+ assertTrue(code.contains("final class Bean2 {"));
+ assertTrue(code.startsWith("/**"));
+
+ w = bean("cdi", "Bean3", true, false, false, true, "TestedBean", null, "@Scope2", "Q1");
+ w.finish();
+ util.waitForNonIgnoredJobs();
+ ed = new SWTWorkbenchBot().activeEditor();
+ assertTrue(("Bean3.java").equals(ed.getTitle()));
+ code = ed.toTextEditor().getText();
+ L.fine(code);
+ assertTrue(code.contains("package cdi;"));
+ assertTrue(code.contains("@Named(\"TestedBean\")"));
+ assertTrue(code.contains("@Scope2"));
+ assertTrue(code.contains("@Q1"));
+ assertTrue(code.contains("public class Bean3 {"));
+ assertFalse(code.contains("final"));
+ assertTrue(code.startsWith("/**"));
+ }
+
+ @Test
+ public void testAnnLiteral() {
+ CDIWizard w = annLiteral("cdi", "AnnL1", true, false, true, false, "cdi.Q1");
+ w.finish();
+ util.waitForNonIgnoredJobs();
+ SWTBotEditor ed = new SWTWorkbenchBot().activeEditor();
+ //https://issues.jboss.org/browse/JBIDE-8244
+// assertTrue(("AnnL1.java").equals(ed.getTitle()));
+ assertTrue(("Q1Literal.java").equals(ed.getTitle()));
+ String code = ed.toTextEditor().getText();
+ L.info(code);
+ assertTrue(code.contains("package cdi;"));
+ assertTrue(code.contains("public final class Q1Literal extends AnnotationLiteral<Q1> implements Q1"));
+ assertTrue(code.contains("public static final Q1 INSTANCE = new Q1Literal();"));
+ assertFalse(code.contains("abstract"));
+ assertFalse(code.startsWith("/**"));
+
+ w = annLiteral("cdi", "AnnL2", false, true, false, true, "Q2");
+ //https://issues.jboss.org/browse/JBIDE-8244
+ w.setName("AnnL2");
+ w.finish();
+ util.waitForNonIgnoredJobs();
+ ed = new SWTWorkbenchBot().activeEditor();
+ assertTrue(("AnnL2.java").equals(ed.getTitle()));
+ code = ed.toTextEditor().getText();
+ L.info(code);
+ assertTrue(code.contains("package cdi;"));
+ assertTrue(code.contains("abstract class AnnL2 extends AnnotationLiteral<Q2> implements Q2 {"));
+ assertTrue(code.contains("public static final Q2 INSTANCE = new AnnL2();"));
+ assertFalse(code.substring(code.indexOf("final") + 5).contains("final"));
+ assertTrue(code.contains("abstract"));
+ assertTrue(code.startsWith("/**"));
+ }
+
private static SWTBotMenu nodeContextMenu(final SWTBotTree tree,
SWTBotTreeItem item, final String... menu) {
assert menu.length > 0;
@@ -344,6 +433,7 @@
boolean comments) {
return create(CDIWizardType.QUALIFIER, pkg, name, inherited, comments);
}
+
private CDIWizard scope(String pkg, String name, boolean inherited,
boolean comments, boolean normalScope, boolean passivating) {
@@ -352,6 +442,7 @@
w = w.setNormalScope(normalScope);
return normalScope ? w.setPassivating(passivating) : w;
}
+
private CDIWizard binding(String pkg, String name, String target,
boolean inherited, boolean comments) {
@@ -359,6 +450,7 @@
inherited, comments);
return target != null ? w.setTarget(target) : w;
}
+
private CDIWizard stereotype(String pkg, String name, String scope,
String target, boolean inherited, boolean named,
@@ -370,6 +462,7 @@
}
return target != null ? w.setTarget(target) : w;
}
+
private CDIWizard decorator(String pkg, String name, String intf, String fieldName,
boolean isPublic, boolean isAbstract, boolean isFinal, boolean comments) {
@@ -378,6 +471,7 @@
return fieldName != null ? w.setFieldName(fieldName) : w;
}
+
private CDIWizard interceptor(String pkg, String name, String ibinding,
String superclass, String method, boolean comments) {
CDIWizard w = create(CDIWizardType.INTERCEPTOR, pkg, name, comments);
@@ -390,6 +484,37 @@
return w.addIBinding(ibinding);
}
+
+ private CDIWizard bean(String pkg, String name, boolean isPublic, boolean isAbstract,
+ boolean isFinal, boolean comments, String named,
+ String interfaces, String scope, String qualifier) {
+ CDIWizard w = create(CDIWizardType.BEAN, pkg, name, comments);
+ if (named != null) {
+ w.setNamed(true);
+ if (!"".equals(named.trim())) {
+ w.setNamedName(named);
+ }
+ }
+ w = w.setPublic(isPublic).setFinal(isFinal).setAbstract(isAbstract);
+ if (interfaces != null && !"".equals(interfaces.trim())) {
+ w.addInterface(interfaces);
+ }
+ if (scope != null && !"".equals(scope.trim())) {
+ w.setScope(scope);
+ }
+ if (qualifier != null && !"".equals(qualifier.trim())) {
+ w.addQualifier(qualifier);
+ }
+ return w;
+ }
+
+ private CDIWizard annLiteral(String pkg, String name, boolean isPublic, boolean isAbstract,
+ boolean isFinal, boolean comments, String qualifier) {
+ assert qualifier != null && !"".equals(qualifier.trim()) : "Qualifier has to be set";
+ CDIWizard w = create(CDIWizardType.ANNOTATION_LITERAL, pkg, name, comments);
+ return w.setPublic(isPublic).setFinal(isFinal).setAbstract(isAbstract).addQualifier(qualifier);
+ }
+
private CDIWizard create(CDIWizardType type, String pkg, String name,
boolean inherited, boolean comments) {
return create(type, pkg, name, comments).setInherited(inherited);
13 years, 5 months
JBoss Tools SVN: r28615 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2011-01-26 10:34:32 -0500 (Wed, 26 Jan 2011)
New Revision: 28615
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
Log:
https://issues.jboss.org/browse/JBIDE-8219 - fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2011-01-26 15:34:03 UTC (rev 28614)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2011-01-26 15:34:32 UTC (rev 28615)
@@ -59,13 +59,13 @@
ConsoleConfiguration consoleConfiguration = dbs.getConsoleConfiguration();
- try{
+ try {
DefaultDatabaseCollector db = readDatabaseSchema(monitor, consoleConfiguration, dbs.getReverseEngineeringStrategy());
List<TableContainer> result = new ArrayList<TableContainer>();
Iterator<Map.Entry<String, List<Table>>> qualifierEntries = db.getQualifierEntries();
- while ( qualifierEntries.hasNext() ) {
+ while (qualifierEntries.hasNext()) {
Map.Entry<String, List<Table>> entry = qualifierEntries.next();
result.add(new TableContainer(entry.getKey(), entry.getValue()));
}
@@ -77,7 +77,7 @@
}
});
- } catch (HibernateException e){
+ } catch (HibernateException e) {
HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_problems_while_reading_database_schema, e);
String out = NLS.bind(HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_reading_schema_error, e.getMessage());
return new Object[]{out};
@@ -115,11 +115,13 @@
JDBCReader reader = JDBCReaderFactory.newJDBCReader(configuration.getProperties(), settings, strategy);
db = new DefaultDatabaseCollector(reader.getMetaDataDialect());
reader.readDatabaseSchema(db, settings.getDefaultCatalogName(), settings.getDefaultSchemaName(), new ProgressListenerMonitor(monitor));
- } catch(HibernateException he) {
+ } catch (HibernateException he) {
throw he;
+ } catch (UnsupportedOperationException he) {
+ throw new HibernateException(he);
}
- finally {
- if (connectionProvider!=null) {
+ finally {
+ if (connectionProvider != null) {
connectionProvider.close();
}
}
13 years, 5 months
JBoss Tools SVN: r28614 - branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2011-01-26 10:34:03 -0500 (Wed, 26 Jan 2011)
New Revision: 28614
Modified:
branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
Log:
https://issues.jboss.org/browse/JBIDE-8219 - fixed
Modified: branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java
===================================================================
--- branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2011-01-26 14:17:32 UTC (rev 28613)
+++ branches/jbosstools-3.2.x/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/LazyDatabaseSchemaWorkbenchAdapter.java 2011-01-26 15:34:03 UTC (rev 28614)
@@ -59,13 +59,13 @@
ConsoleConfiguration consoleConfiguration = dbs.getConsoleConfiguration();
- try{
+ try {
DefaultDatabaseCollector db = readDatabaseSchema(monitor, consoleConfiguration, dbs.getReverseEngineeringStrategy());
List<TableContainer> result = new ArrayList<TableContainer>();
Iterator<Map.Entry<String, List<Table>>> qualifierEntries = db.getQualifierEntries();
- while ( qualifierEntries.hasNext() ) {
+ while (qualifierEntries.hasNext()) {
Map.Entry<String, List<Table>> entry = qualifierEntries.next();
result.add(new TableContainer(entry.getKey(), entry.getValue()));
}
@@ -77,7 +77,7 @@
}
});
- } catch (HibernateException e){
+ } catch (HibernateException e) {
HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_problems_while_reading_database_schema, e);
String out = NLS.bind(HibernateConsoleMessages.LazyDatabaseSchemaWorkbenchAdapter_reading_schema_error, e.getMessage());
return new Object[]{out};
@@ -115,11 +115,13 @@
JDBCReader reader = JDBCReaderFactory.newJDBCReader(configuration.getProperties(), settings, strategy);
db = new DefaultDatabaseCollector(reader.getMetaDataDialect());
reader.readDatabaseSchema(db, settings.getDefaultCatalogName(), settings.getDefaultSchemaName(), new ProgressListenerMonitor(monitor));
- } catch(HibernateException he) {
+ } catch (HibernateException he) {
throw he;
+ } catch (UnsupportedOperationException he) {
+ throw new HibernateException(he);
}
- finally {
- if (connectionProvider!=null) {
+ finally {
+ if (connectionProvider != null) {
connectionProvider.close();
}
}
13 years, 5 months