JBoss Tools SVN: r16838 - in workspace/yzhishko: org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: yzhishko
Date: 2009-07-28 08:02:10 -0400 (Tue, 28 Jul 2009)
New Revision: 16838
Added:
workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllTests.java
workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllTests.java
workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/ToggleCommentTest.java
workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/JBIDE4556Test.java
workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/
workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/CancelTagLibDefenitionTest.java
workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ImportTagsFromTLDFileTest.java
Removed:
workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/CSSDialogJBIDETests.java
workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3890Test.java
workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/JBIDE3197Test.java
Modified:
workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java
workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java
workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java
workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java
workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java
workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java
workspace/yzhishko/org.jboss.tools.ui.bot.test/src/org/jboss/tools/ui/bot/test/JBTSWTBotTestCase.java
workspace/yzhishko/org.jboss.tools.ui.bot.test/src/org/jboss/tools/ui/bot/test/WidgetVariables.java
workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/JBIDE4306Test.java
Log:
SWTBot tests were redesigned. Some new tests were written.
Deleted: workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/CSSDialogJBIDETests.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/CSSDialogJBIDETests.java 2009-07-28 09:17:02 UTC (rev 16837)
+++ workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/CSSDialogJBIDETests.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -1,33 +0,0 @@
-package org.jboss.tools.jsf.ui.bot.test;
-
-import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
-import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3148and4441Test;
-import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3577Test;
-import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3579Test;
-import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3890Test;
-import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3920Test;
-import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE4391Test;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-
-
-/**
- *
- * This is a sample swtbot testcase for an eclipse application.
- *
- */
-public class CSSDialogJBIDETests extends SWTBotTestCase{
- public static Test suite(){
- TestSuite suite = new TestSuite("CSS dialog JBIDE tests");
- suite.addTestSuite(JBIDE3148and4441Test.class);
- suite.addTestSuite(JBIDE4391Test.class);
- suite.addTestSuite(JBIDE3577Test.class);
- suite.addTestSuite(JBIDE3579Test.class);
- suite.addTestSuite(JBIDE3920Test.class);
- suite.addTestSuite(JBIDE3890Test.class);
- return new TestSetup(suite);
- }
-}
\ No newline at end of file
Copied: workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllTests.java (from rev 16678, workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/CSSDialogJBIDETests.java)
===================================================================
--- workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllTests.java (rev 0)
+++ workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllTests.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -0,0 +1,30 @@
+package org.jboss.tools.jsf.ui.bot.test;
+
+import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
+import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3148and4441Test;
+import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3577Test;
+import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3579Test;
+import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3920Test;
+import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE4391Test;
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+
+/**
+ *
+ * This is a sample swtbot testcase for an eclipse application.
+ *
+ */
+public class JSFAllTests extends SWTBotTestCase{
+ public static Test suite(){
+ TestSuite suite = new TestSuite("CSS dialog JBIDE tests");
+ suite.addTestSuite(JBIDE3148and4441Test.class);
+ suite.addTestSuite(JBIDE4391Test.class);
+ suite.addTestSuite(JBIDE3577Test.class);
+ suite.addTestSuite(JBIDE3579Test.class);
+ suite.addTestSuite(JBIDE3920Test.class);
+ return new TestSetup(suite);
+ }
+}
\ No newline at end of file
Modified: workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java 2009-07-28 09:17:02 UTC (rev 16837)
+++ workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -5,11 +5,15 @@
import org.eclipse.core.runtime.Platform;
import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
-public class JSFAutoTestCase extends VPEAutoTestCase{
+public abstract class JSFAutoTestCase extends VPEAutoTestCase{
@Override
protected String getPathToResources(String testPage) throws IOException{
return FileLocator.toFileURL(Platform.getBundle(Activator.PLUGIN_ID).getEntry("/")).getFile()+"resources/"+testPage ;
}
+
+ protected abstract void closeUnuseDialogs();
+ protected abstract boolean isUnuseDialogOpened();
+
}
Modified: workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java 2009-07-28 09:17:02 UTC (rev 16837)
+++ workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -12,7 +12,10 @@
private static String CSS_FILE_NAME = "JBIDE3148";
private static String CSS_CLASS_NAME = "cssclass";
- public void testCreateNewCSSFile(){
+ public void testJBIDE3148and4441() {
+
+ //Test create new CSS file
+
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
@@ -36,17 +39,17 @@
"background-color:green;\r}");
eclipseEditor.save();
eclipseEditor.contextMenu("Open CSS Dialog").click();
- }
-
- public void testEditAttrsOfFirstClass(){
+
+ //Test edit attrs of the first Class
+
bot.shell("CSS Class").activate();
bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME);
bot.tabItem("Text/Font").activate();
bot.comboBoxWithLabel("Text Decoration:").setSelection("underline");
bot.comboBoxWithLabel("Font Weight:").setSelection("bold");
- }
-
- public void testEditAttrsOfSecondClass(){
+
+ //Test edit attrs of the second class
+
bot.shell("CSS Class").activate();
bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME+"(2)");
bot.tabItem("Text/Font").activate();
@@ -54,15 +57,35 @@
bot.comboBoxWithLabel("Font Weight:").setSelection("lighter");
bot.button("Apply").click();
bot.button("OK").click();
- }
-
- public void testValidateCSSFile(){
+
+ //Test check css file content
+
String fileContainer = bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText();
assertEquals("cssclass{\r\tcolor: red;\r\tbackground-color: green;\r" +
"\tfont-weight: bold;\r\ttext-decoration: underline\r}\rcssclass" +
"{\r\tcolor: green;\r\tbackground-color: red;\r" +
"\tfont-weight: lighter;\r\ttext-decoration: overline\r}", fileContainer);
bot.editorByTitle(CSS_FILE_NAME+".css").close();
+
}
+
+ @Override
+ protected void closeUnuseDialogs() {
+ try {
+ bot.shell("CSS Class").close();
+ } catch (Exception e) {
+ }
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ boolean isOpened = false;
+ try {
+ bot.shell("CSS Class").activate();
+ isOpened = true;
+ } catch (Exception e) {
+ }
+ return isOpened;
+ }
}
Modified: workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java 2009-07-28 09:17:02 UTC (rev 16837)
+++ workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -12,7 +12,10 @@
private static String CSS_FILE_NAME = "JBIDE3577";
private static String CSS_CLASS_NAME = "cssclass";
- public void testCreateNewCSSFile(){
+ public void testJBIDE3577(){
+
+ //Test create new CSS file
+
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
@@ -34,9 +37,9 @@
"background-color:green;\r}");
eclipseEditor.save();
eclipseEditor.contextMenu("Open CSS Dialog").click();
- }
-
- public void testClearAttrs(){
+
+ //Test Clear all attributes
+
bot.shell("CSS Class").activate();
bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME);
bot.tabItem("Preview").activate();
@@ -45,6 +48,26 @@
bot.button("OK").click();
assertEquals("cssclass{\r\t\r}", bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText());
bot.editorByTitle(CSS_FILE_NAME+".css").close();
+
}
+
+ @Override
+ protected void closeUnuseDialogs() {
+ try {
+ bot.shell("CSS Class").close();
+ } catch (Exception e) {
+ }
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ boolean isOpened = false;
+ try {
+ bot.shell("CSS Class").activate();
+ isOpened = true;
+ } catch (Exception e) {
+ }
+ return isOpened;
+ }
}
Modified: workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java 2009-07-28 09:17:02 UTC (rev 16837)
+++ workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -12,7 +12,10 @@
private static String CSS_FILE_NAME = "JBIDE3579";
private static String CSS_CLASS_NAME = "newCSSclass";
- public void testCreateNewCSSFile(){
+ public void testJBIDE3579(){
+
+ //Test Create new CSS file
+
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
@@ -34,9 +37,9 @@
"background-color:green;\r}");
eclipseEditor.save();
eclipseEditor.contextMenu("Open CSS Dialog").click();
- }
-
- public void testCreateNewCSSClass(){
+
+ //Test Create new CSS class
+
bot.shell("CSS Class").activate();
bot.button("Add CSS Class").click();
bot.shell("Enter New CSS Class Name").activate();
@@ -45,6 +48,26 @@
bot.button("Apply").click();
bot.button("OK").click();
bot.editorByTitle(CSS_FILE_NAME+".css").close();
+
}
+
+ @Override
+ protected void closeUnuseDialogs() {
+ try {
+ bot.shell("CSS Class").close();
+ } catch (Exception e) {
+ }
+ }
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ boolean isOpened = false;
+ try {
+ bot.shell("CSS Class").activate();
+ isOpened = true;
+ } catch (Exception e) {
+ }
+ return isOpened;
+ }
+
}
Deleted: workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3890Test.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3890Test.java 2009-07-28 09:17:02 UTC (rev 16837)
+++ workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3890Test.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -1,36 +0,0 @@
-package org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide;
-
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
-import org.jboss.tools.ui.bot.test.SWTBotMultiPageEditor;
-import org.jboss.tools.ui.bot.test.WidgetVariables;
-
-public class JBIDE3890Test extends JSFAutoTestCase{
-
- public void testOpenVPE() throws Throwable{
- SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
- SWTBotTree tree = innerBot.tree();
- try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName"))
- .expandNode("WebContent").expandNode("pages").getNode("inputUserName.jsp").doubleClick();
- } catch (Exception e) {
- }
- try {
- bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).setFocus();
- tree.expandNode(projectProperties.getProperty("JSFProjectName"))
- .expandNode("WebContent").expandNode("pages").getNode("hello.jsp").doubleClick();
- } catch (Exception e) {
- }
- SWTBotEclipseEditor editor = bot.editorByTitle("hello.jsp").toTextEditor();
- editor.selectLine(10);
- editor.insertText("<body id=\"bodyId\">");
- waitForJobs();
- editor.save();
- waitForJobs();
- SWTBotMultiPageEditor multiPageEditor = bot.multiPageEditorByTitle("hello.jsp");
- performContentTest("test.xml", multiPageEditor);
- }
-
-}
Modified: workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java 2009-07-28 09:17:02 UTC (rev 16837)
+++ workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -12,7 +12,7 @@
private static String CSS_FILE_NAME = "JBIDE3920";
private static String CSS_CLASS_NAME = "cssclass";
- public void testCreateNewCSSClass(){
+ public void testJBIDE3920(){
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
@@ -41,4 +41,23 @@
bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().close();
}
+ @Override
+ protected void closeUnuseDialogs() {
+ try {
+ bot.shell("CSS Class").close();
+ } catch (Exception e) {
+ }
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ boolean isOpened = false;
+ try {
+ bot.shell("CSS Class").activate();
+ isOpened = true;
+ } catch (Exception e) {
+ }
+ return isOpened;
+ }
+
}
Modified: workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java 2009-07-28 09:17:02 UTC (rev 16837)
+++ workspace/yzhishko/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -12,7 +12,10 @@
private static String CSS_FILE_NAME = "JBIDE4391";
private static String CSS_CLASS_NAME = "cssclass";
- public void testCreateNewCSSFile(){
+ public void testJBIDE4391(){
+
+ //Test Create new CSS file
+
SWTBot innerBot= bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
@@ -34,9 +37,9 @@
"background-color:green;\r}");
eclipseEditor.save();
eclipseEditor.contextMenu("Open CSS Dialog").click();
- }
-
- public void testIncorrectAttr(){
+
+ //Test incorrect attribute
+
bot.shell("CSS Class").activate();
bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME);
bot.tabItem("Text/Font").activate();
@@ -46,6 +49,26 @@
assertEquals("cssclass{\r\tcolor:red;\r\t" +
"background-color:green;\r}", bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText());
bot.editorByTitle(CSS_FILE_NAME+".css").close();
+
}
+
+ @Override
+ protected void closeUnuseDialogs() {
+ try {
+ bot.shell("CSS Class").close();
+ } catch (Exception e) {
+ }
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ boolean isOpened = false;
+ try {
+ bot.shell("CSS Class").activate();
+ isOpened = true;
+ } catch (Exception e) {
+ }
+ return isOpened;
+ }
}
Modified: workspace/yzhishko/org.jboss.tools.ui.bot.test/src/org/jboss/tools/ui/bot/test/JBTSWTBotTestCase.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.ui.bot.test/src/org/jboss/tools/ui/bot/test/JBTSWTBotTestCase.java 2009-07-28 09:17:02 UTC (rev 16837)
+++ workspace/yzhishko/org.jboss.tools.ui.bot.test/src/org/jboss/tools/ui/bot/test/JBTSWTBotTestCase.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -78,7 +78,7 @@
}
openErrorLog();
openPackageExplorer();
- openProgressStatus();
+// openProgressStatus();
deleteLog();
setException(null);
Platform.addLogListener(this);
@@ -87,11 +87,11 @@
@Override
protected void tearDown() throws Exception {
+ Platform.removeLogListener(this);
+ deleteLog();
if (getException() != null) {
throw new Exception(getException());
}
- Platform.removeLogListener(this);
- deleteLog();
}
protected void delay() {
@@ -134,17 +134,17 @@
}
}
- protected void openProgressStatus() {
- try {
- bot.viewByTitle(WidgetVariables.PROGRESS_STATUS);
- } catch (WidgetNotFoundException e) {
- bot.menu("Window").menu("Show View").menu("Other...").click();
- SWTBotTree viewTree = bot.tree();
- delay();
- viewTree.expandNode("General").expandNode(WidgetVariables.PROGRESS_STATUS).select();
- bot.button("OK").click();
- }
- }
+// protected void openProgressStatus() {
+// try {
+// bot.viewByTitle(WidgetVariables.PROGRESS_STATUS);
+// } catch (WidgetNotFoundException e) {
+// bot.menu("Window").menu("Show View").menu("Other...").click();
+// SWTBotTree viewTree = bot.tree();
+// delay();
+// viewTree.expandNode("General").expandNode(WidgetVariables.PROGRESS_STATUS).select();
+// bot.button("OK").click();
+// }
+// }
protected void waitForJobs(){
delay();
Modified: workspace/yzhishko/org.jboss.tools.ui.bot.test/src/org/jboss/tools/ui/bot/test/WidgetVariables.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.ui.bot.test/src/org/jboss/tools/ui/bot/test/WidgetVariables.java 2009-07-28 09:17:02 UTC (rev 16837)
+++ workspace/yzhishko/org.jboss.tools.ui.bot.test/src/org/jboss/tools/ui/bot/test/WidgetVariables.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -6,5 +6,5 @@
public static final String PACKAGE_EXPLORER = "Package Explorer";
public static final String WELCOME = "Welcome";
public static final String PROGRESS_STATUS = "Progress";
-
+ public static final String PALETTE = "JBoss Tools Palette";
}
Added: workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllTests.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllTests.java (rev 0)
+++ workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllTests.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -0,0 +1,23 @@
+package org.jboss.tools.vpe.ui.bot.test;
+
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.eclipse.swtbot.swt.finder.SWTBotTestCase;
+import org.jboss.tools.vpe.ui.bot.test.editor.ToggleCommentTest;
+import org.jboss.tools.vpe.ui.bot.test.jbide.JBIDE4306Test;
+import org.jboss.tools.vpe.ui.bot.test.jbide.JBIDE4556Test;
+import org.jboss.tools.vpe.ui.bot.test.palette.CancelTagLibDefenitionTest;
+import org.jboss.tools.vpe.ui.bot.test.palette.ImportTagsFromTLDFileTest;
+
+public class VPEAllTests extends SWTBotTestCase{
+ public static Test suite(){
+ TestSuite suite = new TestSuite("VPE All Tests");
+ suite.addTestSuite(CancelTagLibDefenitionTest.class);
+ suite.addTestSuite(ImportTagsFromTLDFileTest.class);
+ suite.addTestSuite(ToggleCommentTest.class);
+ suite.addTestSuite(JBIDE4306Test.class);
+ suite.addTestSuite(JBIDE4556Test.class);
+ return new TestSetup(suite);
+ }
+}
Modified: workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2009-07-28 09:17:02 UTC (rev 16837)
+++ workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -7,6 +7,7 @@
import java.util.Properties;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
@@ -23,6 +24,7 @@
public abstract class VPEAutoTestCase extends JBTSWTBotTestCase{
protected static Properties projectProperties;
+ protected static final String TEST_PAGE = "inputUserName.jsp";
public static String PROJECT_PROPERTIES = "projectProperties.properties";
public static String JBOSS_EAP_HOME;
static {
@@ -40,6 +42,7 @@
protected void setUp() throws Exception {
super.setUp();
+ clearWorkbench();
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
@@ -49,6 +52,12 @@
}
}
+ @Override
+ protected void tearDown() throws Exception {
+ clearWorkbench();
+ super.tearDown();
+ }
+
protected void createJSFProject(String jsfProjectName){
bot.menu("File").menu("New").menu("Other...").click();
bot.tree().expandNode("JBoss Tools Web").expandNode("JSF").select("JSF Project");
@@ -64,7 +73,7 @@
bot.button("Yes").click();
openErrorLog();
openPackageExplorer();
- openProgressStatus();
+// openProgressStatus();
} catch (Exception e) {
}
} catch (Exception e) {
@@ -80,7 +89,7 @@
bot.button("Yes").click();
openErrorLog();
openPackageExplorer();
- openProgressStatus();
+// openProgressStatus();
} catch (Exception e2) {
}
}
@@ -174,4 +183,34 @@
}
}
+ protected void openPalette(){
+ try {
+ bot.viewByTitle(WidgetVariables.PALETTE);
+ } catch (WidgetNotFoundException e) {
+ bot.menu("Window").menu("Show View").menu("Other...").click();
+ SWTBotTree viewTree = bot.tree();
+ delay();
+ viewTree.expandNode("JBoss Tools Web").expandNode(
+ WidgetVariables.PALETTE).select();
+ bot.button("OK").click();
+ }
+ }
+
+ protected void clearWorkbench(){
+ while (isUnuseDialogOpened()) {
+ closeUnuseDialogs();
+ }
+ List<? extends SWTBotEditor> editors = bot.editors();
+ try {
+ for (int i = 0; i < editors.size(); i++) {
+ editors.get(i).close();
+ }
+ } catch (WidgetNotFoundException e) {
+ }
+ }
+
+ protected abstract void closeUnuseDialogs();
+
+ protected abstract boolean isUnuseDialogOpened();
+
}
Added: workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/ToggleCommentTest.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/ToggleCommentTest.java (rev 0)
+++ workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/ToggleCommentTest.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -0,0 +1,138 @@
+package org.jboss.tools.vpe.ui.bot.test.editor;
+
+import java.util.List;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.ui.bot.test.WidgetVariables;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
+
+public class ToggleCommentTest extends VPEAutoTestCase{
+
+ private static String textEditor;
+ private static SWTBotEclipseEditor editor;
+
+ public void testToggleComment() throws Throwable{
+
+ //Test open page
+
+ SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
+ SWTBotTree tree = innerBot.tree();
+ try {
+ List<? extends SWTBotEditor> editors = bot.editors();
+ for (int i = 0; i < editors.size(); i++) {
+ editors.get(i).close();
+ }
+
+ } catch (Exception e) {
+ }
+ try {
+ tree.expandNode(projectProperties.getProperty("JSFProjectName"))
+ .expandNode("WebContent").expandNode("pages").getNode(TEST_PAGE).doubleClick();
+ } catch (Exception e) {
+ }
+
+ //Test toggle comment from Source menu
+
+ editor = bot.editorByTitle(TEST_PAGE).toTextEditor();
+ textEditor = editor.getText();
+ editor.navigateTo(22,22);
+ bot.menu("Source").menu("Toggle Comment").click();
+ delay();
+ checkVPE("ToggleCommentTestToggle.xml");
+
+ //Test untoggle comment from Source menu
+
+ editor.navigateTo(22,22);
+ bot.menu("Source").menu("Toggle Comment").click();
+ delay();
+ checkVPE("ToggleCommentTestUntoggle.xml");
+
+ //Test toggle comment with CTRL+SHIFT+C hot keys
+
+ editor.navigateTo(22,22);
+ pressToggleCommentHotKeys();
+ delay();
+ checkVPE("ToggleCommentTestToggle.xml");
+
+ //Test untoggle comment with CTRL+SHIFT hot keys
+
+ editor.navigateTo(22,22);
+ pressToggleCommentHotKeys();
+ delay();
+ checkVPE("ToggleCommentTestUntoggle.xml");
+
+ }
+
+ private void checkVPE(String testPage) throws Throwable{
+ editor.selectLine(9);
+ if (!"<body id=\"bodyId\">".equals(editor.getTextOnCurrentLine().trim())) {
+ editor.insertText("<body id=\"bodyId\">");
+ }
+ editor.save();
+ waitForJobs();
+ performContentTest(testPage, bot.multiPageEditorByTitle(TEST_PAGE));
+ }
+
+ private void pressToggleCommentHotKeys(){
+ bot.getDisplay().syncExec(new Runnable() {
+ public void run() {
+ Display display = bot.getDisplay();
+ Event event = new Event();
+ event.type = SWT.KeyDown;
+ event.keyCode = SWT.CTRL;
+ display.post(event);
+ event = new Event();
+ event.type = SWT.KeyDown;
+ event.keyCode = SWT.SHIFT;
+ display.post(event);
+ event = new Event();
+ event.type = SWT.KeyDown;
+ event.character = 'c';
+ display.post(event);
+ event = new Event();
+ event.type = SWT.KeyUp;
+ event.character = 'c';
+ display.post(event);
+ event = new Event();
+ event.type = SWT.KeyUp;
+ event.keyCode = SWT.SHIFT;
+ display.post(event);
+ event = new Event();
+ event.type = SWT.KeyUp;
+ event.keyCode = SWT.CTRL;
+ display.post(event);
+ }
+ });
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ return false;
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+
+ //Restore page state before tests
+
+ editor.setFocus();
+ bot.menu("Edit").menu("Select All").click();
+ bot.menu("Edit").menu("Delete").click();
+ editor.setText(textEditor);
+ editor.save();
+ waitForJobs();
+ editor.close();
+ super.tearDown();
+ }
+
+}
Deleted: workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/JBIDE3197Test.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/JBIDE3197Test.java 2009-07-28 09:17:02 UTC (rev 16837)
+++ workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/JBIDE3197Test.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -1,34 +0,0 @@
-package org.jboss.tools.vpe.ui.bot.test.jbide;
-
-import java.util.List;
-
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.jboss.tools.ui.bot.test.WidgetVariables;
-import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
-
-public class JBIDE3197Test extends VPEAutoTestCase {
-
- public void testOpenPage(){
-
- SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
- SWTBotTree tree = innerBot.tree();
- try {
- List<? extends SWTBotEditor> editors = bot.editors();
- for (int i = 0; i < editors.size(); i++) {
- editors.get(i).close();
- }
-
- } catch (Exception e) {
- }
- try {
- tree.expandNode(projectProperties.getProperty("JSFProjectName"))
- .expandNode("WebContent").expandNode("pages").getNode("inputUserName.jsp").doubleClick();
- } catch (Exception e) {
- }
-
-
- }
-
-}
Modified: workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/JBIDE4306Test.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/JBIDE4306Test.java 2009-07-28 09:17:02 UTC (rev 16837)
+++ workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/JBIDE4306Test.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -8,29 +8,35 @@
public class JBIDE4306Test extends VPEAutoTestCase{
- public void testOpenPageOnVisualSourceTab(){
+ public void testJBIDE4306(){
+
+ //Test open page on visual/source tab
+
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
SWTBotTree tree = innerBot.tree();
try {
tree.expandNode(projectProperties.getProperty("JSFProjectName"))
- .expandNode("WebContent").expandNode("pages").getNode("inputUserName.jsp").doubleClick();
+ .expandNode("WebContent").expandNode("pages").getNode(TEST_PAGE).doubleClick();
} catch (Exception e) {
}
- }
-
- public void testSetDefaultTabSource(){
+
+ //Test set default source tab
+
bot.toolbarButtonWithTooltip("Preferences").click();
bot.shell("Preferences (Filtered)").activate();
- bot.comboBoxWithLabel("Default Editor Tab:").setSelection("Source");
+ bot.comboBoxWithLabel("Select the default active editor's tab\nfor files that haven't been previously\nopened in the VPE:").setSelection("Source");
bot.button("OK").click();
try {
- SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
- SWTBotTree tree = innerBot.tree();
+ innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
+ tree = innerBot.tree();
bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).setFocus();
tree.expandNode(projectProperties.getProperty("JSFProjectName"))
.expandNode("WebContent").expandNode("pages").getNode("hello.jsp").doubleClick();
} catch (Exception e) {
}
+
+ //Check if the tab changed
+
WidgetNotFoundException exception = null;
try {
bot.toolbarButtonWithTooltip("Preferences").click();
@@ -39,15 +45,34 @@
}
assertNotNull(exception);
bot.editorByTitle("hello.jsp").close();
- }
+ bot.editorByTitle(TEST_PAGE).setFocus();
- public void testSetDefaultTabVisualSource(){
- bot.editorByTitle("inputUserName.jsp").setFocus();
+ //Test set default visual/source tab
+
bot.toolbarButtonWithTooltip("Preferences").click();
bot.shell("Preferences (Filtered)").activate();
- bot.comboBoxWithLabel("Default Editor Tab:").setSelection("Visual/Source");
+ bot.comboBoxWithLabel("Select the default active editor's tab\nfor files that haven't been previously\nopened in the VPE:").setSelection("Visual/Source");
bot.button("OK").click();
- bot.editorByTitle("inputUserName.jsp").close();
+ bot.editorByTitle(TEST_PAGE).close();
}
+
+ @Override
+ protected void closeUnuseDialogs() {
+ try {
+ bot.shell("Preferences (Filtered)").close();
+ } catch (Exception e) {
+ }
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ boolean isOpened = false;
+ try {
+ bot.shell("Preferences (Filtered)").activate();
+ isOpened = true;
+ } catch (Exception e) {
+ }
+ return isOpened;
+ }
}
Added: workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/JBIDE4556Test.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/JBIDE4556Test.java (rev 0)
+++ workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/jbide/JBIDE4556Test.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -0,0 +1,7 @@
+package org.jboss.tools.vpe.ui.bot.test.jbide;
+
+import org.jboss.tools.vpe.ui.bot.test.palette.CancelTagLibDefenitionTest;
+
+public class JBIDE4556Test extends CancelTagLibDefenitionTest{
+
+}
Added: workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/CancelTagLibDefenitionTest.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/CancelTagLibDefenitionTest.java (rev 0)
+++ workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/CancelTagLibDefenitionTest.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -0,0 +1,67 @@
+package org.jboss.tools.vpe.ui.bot.test.palette;
+
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
+
+public class CancelTagLibDefenitionTest extends VPEAutoTestCase{
+
+ @Override
+ protected void createJSFProject(String jsfProjectName) {
+ super.createJSFProject(jsfProjectName);
+ openPalette();
+ }
+
+ public void testCancelTagLibDefenition(){
+
+ //Test open import dialog
+
+ bot.toolbarButtonWithTooltip("Import").click();
+ bot.shell("Import Tags from TLD File").activate();
+
+ //Test open edit TLD dialog
+
+ bot.button("Browse...").click();
+ bot.shell("Edit TLD").activate();
+
+ //Test cancel TLD
+ delay();
+ bot.tree().expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("x-1_0-rt.tld [x_rt]").select();
+ bot.button("Cancel").click();
+
+ //Test check fields
+
+ bot.shell("Import Tags from TLD File").activate();
+ assertEquals("", bot.textWithLabel("TLD File*").getText());
+ assertEquals("", bot.textWithLabel("Name*").getText());
+ assertEquals("", bot.textWithLabel("Default Prefix").getText());
+ assertEquals("", bot.textWithLabel("Library URI").getText());
+ bot.button("Cancel").click();
+ }
+
+ protected void closeUnuseDialogs(){
+ try {
+ bot.shell("Edit TLD").close();
+ } catch (WidgetNotFoundException e) {
+ }
+ try {
+ bot.shell("Import Tags from TLD File").close();
+ } catch (WidgetNotFoundException e) {
+ }
+ }
+
+ protected boolean isUnuseDialogOpened(){
+ boolean isOpened = false;
+ try {
+ bot.shell("Edit TLD").activate();
+ isOpened = true;
+ } catch (WidgetNotFoundException e) {
+ }
+ try {
+ bot.shell("Import Tags from TLD File").activate();
+ isOpened = true;
+ }catch (WidgetNotFoundException e) {
+ }
+ return isOpened;
+ }
+
+}
Added: workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ImportTagsFromTLDFileTest.java
===================================================================
--- workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ImportTagsFromTLDFileTest.java (rev 0)
+++ workspace/yzhishko/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/palette/ImportTagsFromTLDFileTest.java 2009-07-28 12:02:10 UTC (rev 16838)
@@ -0,0 +1,166 @@
+package org.jboss.tools.vpe.ui.bot.test.palette;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
+
+public class ImportTagsFromTLDFileTest extends VPEAutoTestCase{
+
+ private static final String GROUP_NAME = "NewGroup";
+
+ public void testImportTagsFromTLDFile(){
+
+ //Test clear group
+ bot.toolbarButtonWithTooltip("Palette Editor").click();
+ bot.shell("Palette Editor").activate();
+ try {
+ bot.getDisplay().syncExec(new Runnable() {
+
+ public void run() {
+ SWTBotTree tree = bot.tree();
+ delay();
+ try {
+ tree.expandNode("XStudio").expandNode("Palette").getNode(GROUP_NAME).select();
+ Display display = bot.getDisplay();
+ Event event = new Event();
+ event.type = SWT.KeyDown;
+ event.character = SWT.DEL;
+ display.post(event);
+ delay();
+ event = new Event();
+ event.type = SWT.KeyUp;
+ event.character = SWT.DEL;
+ display.post(event);
+ event = new Event();
+ event.type = SWT.KeyDown;
+ event.character = SWT.DEL;
+ display.post(event);
+ delay();
+ event = new Event();
+ event.type = SWT.KeyUp;
+ event.character = SWT.DEL;
+ display.post(event);
+ } catch (Exception e) {
+ }
+ }
+
+ });
+
+ bot.shell("Confirmation").activate();
+ bot.button("OK").click();
+ } catch (Exception e) {
+ }
+ bot.shell("Palette Editor").activate();
+ bot.button("OK").click();
+
+ //Test open import dialog
+
+ bot.toolbarButtonWithTooltip("Import").click();
+ bot.shell("Import Tags from TLD File").activate();
+
+ //Test set tag lib
+
+ bot.button("Browse...").click();
+ bot.shell("Edit TLD").activate();
+ bot.tree().expandNode(projectProperties.getProperty("JSFProjectName")).expandNode("c.tld [c]").select();
+ bot.button("OK").click();
+
+ //Test set group
+
+ bot.shell("Import Tags from TLD File").activate();
+ bot.radio(1).click();
+ bot.text(4).setText(GROUP_NAME);
+ bot.button("OK").click();
+
+ //Test if group is created
+
+ bot.toolbarButtonWithTooltip("Palette Editor").click();
+ bot.shell("Palette Editor").activate();
+ try {
+ bot.getDisplay().syncExec(new Runnable() {
+
+ public void run() {
+ SWTBotTree tree = bot.tree();
+ try {
+ tree.expandNode("XStudio").expandNode("Palette").getNode(GROUP_NAME).select();
+ Display display = bot.getDisplay();
+ Event event = new Event();
+ event.type = SWT.KeyDown;
+ event.character = SWT.DEL;
+ display.post(event);
+ delay();
+ event = new Event();
+ event.type = SWT.KeyUp;
+ event.character = SWT.DEL;
+ display.post(event);
+ event = new Event();
+ event.type = SWT.KeyDown;
+ event.character = SWT.DEL;
+ display.post(event);
+ delay();
+ event = new Event();
+ event.type = SWT.KeyUp;
+ event.character = SWT.DEL;
+ display.post(event);
+ } catch (WidgetNotFoundException e) {
+ setException(e);
+ }
+ }
+
+ });
+ bot.shell("Confirmation").activate();
+ bot.button("OK").click();
+ } catch (WidgetNotFoundException e) {
+ }
+ bot.shell("Palette Editor").activate();
+ bot.button("OK").click();
+
+ }
+
+ @Override
+ protected void createJSFProject(String jsfProjectName) {
+ super.createJSFProject(jsfProjectName);
+ openPalette();
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ boolean isOpened = false;
+ try {
+ bot.shell("Edit TLD").activate();
+ isOpened = true;
+ } catch (WidgetNotFoundException e) {
+ }
+ try {
+ bot.shell("Import Tags from TLD File").activate();
+ isOpened = true;
+ }catch (WidgetNotFoundException e) {
+ }
+ try {
+ bot.shell("Palette Editor").activate();
+ isOpened = true;
+ } catch (WidgetNotFoundException e) {
+ }
+ return isOpened;
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+ try {
+ bot.shell("Edit TLD").close();
+ } catch (WidgetNotFoundException e) {
+ }
+ try {
+ bot.shell("Import Tags from TLD File").close();
+ }catch (WidgetNotFoundException e) {
+ }
+ try {
+ bot.shell("Palette Editor").close();
+ } catch (WidgetNotFoundException e) {
+ }
+ }
+
+}
14 years, 10 months
JBoss Tools SVN: r16837 - trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/properties.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2009-07-28 05:17:02 -0400 (Tue, 28 Jul 2009)
New Revision: 16837
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/properties/PropertiesSection.java
Log:
revert latest changes
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/properties/PropertiesSection.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/properties/PropertiesSection.java 2009-07-28 08:22:08 UTC (rev 16836)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/properties/PropertiesSection.java 2009-07-28 09:17:02 UTC (rev 16837)
@@ -12,7 +12,6 @@
package org.jboss.tools.jst.css.properties;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyComposite;
import org.jboss.tools.jst.jsp.outline.cssdialog.tabs.BaseTabControl;
import org.jboss.tools.jst.jsp.outline.cssdialog.tabs.TabPropertySheetControl;
@@ -25,10 +24,7 @@
@Override
public BaseTabControl createSectionControl(Composite parent) {
- //quick fix to solve appearing 2 scrollbars
- ((TabbedPropertyComposite)getTabComposite()).getScrolledComposite().setExpandVertical(false);
return new TabPropertySheetControl(parent, getStyleAttributes(),
getBindingContext());
-
}
}
14 years, 10 months
JBoss Tools SVN: r16836 - in trunk/smooks/plugins: org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-07-28 04:22:08 -0400 (Tue, 28 Jul 2009)
New Revision: 16836
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv12/
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv12/Csv12ReaderBindingPropertyUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv12/Csv12ReaderMapBindingPropertyUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/DeleterUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/FlusherUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/InserterUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorExpressionParamUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorValueParamUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorWiringParamUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/UpdaterUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/rule10/
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/rule10/Rules10RulebaseUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/validation10/
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/validation10/RuleUICreator.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/ValueWiringBindingSelectionDialog.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/ClassFieldEditorValidator.java
Log:
JBIDE-4656
1.Create properties' GUI for Validation v1.0
1.Create properties' GUI for CSV reader v1.2
1.Create properties' GUI for Rules v1.0
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties 2009-07-28 08:10:40 UTC (rev 16835)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties 2009-07-28 08:22:08 UTC (rev 16836)
@@ -484,7 +484,7 @@
_UI_BeanType_type = Bean v1.2
_UI_DecodeParamType_type = Decode Param Type
_UI_Javabean12DocumentRoot_type = Document Root
-_UI_ExpressionType_type = Expression Type
+_UI_ExpressionType_type = Expression Binding
_UI_ResultType_type = Result Type
_UI_ValueType_type = Value Binding
_UI_WiringType_type = Bean Binding
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java 2009-07-28 08:10:40 UTC (rev 16835)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -15,6 +15,8 @@
import org.jboss.tools.smooks.configuration.editors.calc.CounterUICreator;
import org.jboss.tools.smooks.configuration.editors.csv.CsvReaderUICreator;
+import org.jboss.tools.smooks.configuration.editors.csv12.Csv12ReaderBindingPropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.csv12.Csv12ReaderMapBindingPropertyUICreator;
import org.jboss.tools.smooks.configuration.editors.datasource.DataSourceJndiUICreator;
import org.jboss.tools.smooks.configuration.editors.datasource.DirectUICreator;
import org.jboss.tools.smooks.configuration.editors.dbrouting.ExecutorUICreator;
@@ -56,6 +58,15 @@
import org.jboss.tools.smooks.configuration.editors.json.JsonReaderUICreator;
import org.jboss.tools.smooks.configuration.editors.json.KeyMapUICreator;
import org.jboss.tools.smooks.configuration.editors.json.KeyUICreator;
+import org.jboss.tools.smooks.configuration.editors.persistence12.DeleterUICreator;
+import org.jboss.tools.smooks.configuration.editors.persistence12.FlusherUICreator;
+import org.jboss.tools.smooks.configuration.editors.persistence12.InserterUICreator;
+import org.jboss.tools.smooks.configuration.editors.persistence12.LocatorExpressionParamUICreator;
+import org.jboss.tools.smooks.configuration.editors.persistence12.LocatorUICreator;
+import org.jboss.tools.smooks.configuration.editors.persistence12.LocatorValueParamUICreator;
+import org.jboss.tools.smooks.configuration.editors.persistence12.LocatorWiringParamUICreator;
+import org.jboss.tools.smooks.configuration.editors.persistence12.UpdaterUICreator;
+import org.jboss.tools.smooks.configuration.editors.rule10.Rules10RulebaseUICreator;
import org.jboss.tools.smooks.configuration.editors.smooks.ConditionTypeUICreator;
import org.jboss.tools.smooks.configuration.editors.smooks.ConditionsTypeUICreator;
import org.jboss.tools.smooks.configuration.editors.smooks.FeaturesTypeUICreator;
@@ -72,12 +83,15 @@
import org.jboss.tools.smooks.configuration.editors.smooks.SetOffTypeUICreator;
import org.jboss.tools.smooks.configuration.editors.smooks.SetOnTypeUICreator;
import org.jboss.tools.smooks.configuration.editors.smooks.SmooksResourceListTypeUICreator;
+import org.jboss.tools.smooks.configuration.editors.validation10.RuleUICreator;
import org.jboss.tools.smooks.configuration.editors.xsl.BindToUICreator;
import org.jboss.tools.smooks.configuration.editors.xsl.OutputToUICreator;
import org.jboss.tools.smooks.configuration.editors.xsl.TemplateUICreator;
import org.jboss.tools.smooks.configuration.editors.xsl.XslUICreator;
import org.jboss.tools.smooks.model.calc.impl.CounterImpl;
import org.jboss.tools.smooks.model.csv.impl.CsvReaderImpl;
+import org.jboss.tools.smooks.model.csv12.impl.BindingImpl;
+import org.jboss.tools.smooks.model.csv12.impl.MapBindingImpl;
import org.jboss.tools.smooks.model.datasource.impl.DataSourceJndiImpl;
import org.jboss.tools.smooks.model.datasource.impl.DirectImpl;
import org.jboss.tools.smooks.model.dbrouting.impl.ExecutorImpl;
@@ -116,6 +130,15 @@
import org.jboss.tools.smooks.model.medi.impl.SegmentImpl;
import org.jboss.tools.smooks.model.medi.impl.SegmentsImpl;
import org.jboss.tools.smooks.model.medi.impl.SubComponentImpl;
+import org.jboss.tools.smooks.model.persistence12.impl.DeleterImpl;
+import org.jboss.tools.smooks.model.persistence12.impl.ExpressionParameterImpl;
+import org.jboss.tools.smooks.model.persistence12.impl.FlusherImpl;
+import org.jboss.tools.smooks.model.persistence12.impl.InserterImpl;
+import org.jboss.tools.smooks.model.persistence12.impl.LocatorImpl;
+import org.jboss.tools.smooks.model.persistence12.impl.UpdaterImpl;
+import org.jboss.tools.smooks.model.persistence12.impl.ValueParameterImpl;
+import org.jboss.tools.smooks.model.persistence12.impl.WiringParameterImpl;
+import org.jboss.tools.smooks.model.rules10.impl.RuleBaseImpl;
import org.jboss.tools.smooks.model.smooks.impl.ConditionTypeImpl;
import org.jboss.tools.smooks.model.smooks.impl.ConditionsTypeImpl;
import org.jboss.tools.smooks.model.smooks.impl.FeaturesTypeImpl;
@@ -132,6 +155,7 @@
import org.jboss.tools.smooks.model.smooks.impl.SetOffTypeImpl;
import org.jboss.tools.smooks.model.smooks.impl.SetOnTypeImpl;
import org.jboss.tools.smooks.model.smooks.impl.SmooksResourceListTypeImpl;
+import org.jboss.tools.smooks.model.validation10.impl.RuleTypeImpl;
import org.jboss.tools.smooks.model.xsl.impl.BindToImpl;
import org.jboss.tools.smooks.model.xsl.impl.OutputToImpl;
import org.jboss.tools.smooks.model.xsl.impl.TemplateImpl;
@@ -272,6 +296,27 @@
// for JMS Router v1.2
map.put(JMS12RouterImpl.class, new JMSRouter12UICreator());
+
+ // for Persistence v1.2
+ map.put(DeleterImpl.class, new DeleterUICreator());
+ map.put(UpdaterImpl.class, new UpdaterUICreator());
+ map.put(InserterImpl.class, new InserterUICreator());
+ map.put(LocatorImpl.class, new LocatorUICreator());
+ map.put(FlusherImpl.class, new FlusherUICreator());
+
+ map.put(ValueParameterImpl.class, new LocatorValueParamUICreator());
+ map.put(WiringParameterImpl.class, new LocatorWiringParamUICreator());
+ map.put(ExpressionParameterImpl.class, new LocatorExpressionParamUICreator());
+
+ // for Validation v1.0
+ map.put(RuleTypeImpl.class, new RuleUICreator());
+
+ // for CSV Reader v1.2
+ map.put(BindingImpl.class, new Csv12ReaderBindingPropertyUICreator());
+ map.put(MapBindingImpl.class, new Csv12ReaderMapBindingPropertyUICreator());
+
+ // for Rules v1.0
+ map.put(RuleBaseImpl.class, new Rules10RulebaseUICreator());
}
public void registePropertyUICreator(Class<?> key, IPropertyUICreator creator) {
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv12/Csv12ReaderBindingPropertyUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv12/Csv12ReaderBindingPropertyUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv12/Csv12ReaderBindingPropertyUICreator.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.csv12;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.model.csv12.Csv12Package;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 8, 2009
+ */
+public class Csv12ReaderBindingPropertyUICreator extends PropertyUICreator {
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == Csv12Package.Literals.BINDING__CLASS) {
+ return false;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ ISmooksModelProvider formEditor, IEditorPart part) {
+ if (feature == Csv12Package.Literals.BINDING__CLASS) {
+ return createBeanClassTextWithButton(parent, toolkit, propertyDescriptor, model);
+ }
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor, part);
+ }
+
+ protected AttributeFieldEditPart createBeanClassTextWithButton(Composite composite, FormToolkit toolkit,
+ final IItemPropertyDescriptor propertyDescriptor, final Object model) {
+ return SmooksUIUtils.createJavaTypeSearchFieldEditor(composite, toolkit, propertyDescriptor, (EObject) model);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv12/Csv12ReaderBindingPropertyUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv12/Csv12ReaderMapBindingPropertyUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv12/Csv12ReaderMapBindingPropertyUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv12/Csv12ReaderMapBindingPropertyUICreator.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.csv12;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.model.csv12.Csv12Package;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 8, 2009
+ */
+public class Csv12ReaderMapBindingPropertyUICreator extends PropertyUICreator {
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == Csv12Package.Literals.BINDING__CLASS) {
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ ISmooksModelProvider formEditor, IEditorPart part) {
+ if (feature == Csv12Package.Literals.BINDING__CLASS) {
+ return createBeanClassTextWithButton(parent, toolkit, propertyDescriptor, model);
+ }
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor, part);
+ }
+
+ protected AttributeFieldEditPart createBeanClassTextWithButton(Composite composite, FormToolkit toolkit,
+ final IItemPropertyDescriptor propertyDescriptor, final Object model) {
+ return SmooksUIUtils.createJavaTypeSearchFieldEditor(composite, toolkit, propertyDescriptor, (EObject) model);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/csv12/Csv12ReaderMapBindingPropertyUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/ValueWiringBindingSelectionDialog.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/ValueWiringBindingSelectionDialog.java 2009-07-28 08:10:40 UTC (rev 16835)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/ValueWiringBindingSelectionDialog.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -169,7 +169,7 @@
});
- Hyperlink allunselectlink = toolkit.createHyperlink(linkComposite, "Diselect All", SWT.NONE);
+ Hyperlink allunselectlink = toolkit.createHyperlink(linkComposite, "Deselect All", SWT.NONE);
allunselectlink.setBackground(linkComposite.getBackground());
allunselectlink.addHyperlinkListener(new IHyperlinkListener() {
@@ -209,7 +209,7 @@
}
});
-
+ getShell().setText("Add Binding");
return composite;
}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/DeleterUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/DeleterUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/DeleterUICreator.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.persistence12;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.model.persistence12.Persistence12Package;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 8, 2009
+ */
+public class DeleterUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == Persistence12Package.Literals.DELETER__DELETE_ON_ELEMENT) {
+ return true;
+ }
+ if (feature == Persistence12Package.Literals.DELETER__DELETE_ON_ELEMENT_NS) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUIOnTop(AdapterFactoryEditingDomain editingdomain,
+ FormToolkit toolkit, Composite parent, Object model, ISmooksModelProvider formEditor, IEditorPart part) {
+ return createElementSelectionSection("Delete On Element", editingdomain, toolkit, parent, model, formEditor,
+ part, Persistence12Package.Literals.DELETER__DELETE_ON_ELEMENT,
+ Persistence12Package.Literals.DELETER__DELETE_ON_ELEMENT_NS);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/DeleterUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/FlusherUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/FlusherUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/FlusherUICreator.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.persistence12;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.model.persistence12.Persistence12Package;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 8, 2009
+ */
+public class FlusherUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == Persistence12Package.Literals.FLUSHER__FLUSH_ON_ELEMENT) {
+ return true;
+ }
+ if (feature == Persistence12Package.Literals.FLUSHER__FLUSH_ON_ELEMENT_NS) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUIOnTop(AdapterFactoryEditingDomain editingdomain,
+ FormToolkit toolkit, Composite parent, Object model, ISmooksModelProvider formEditor, IEditorPart part) {
+ return createElementSelectionSection("Flush On Element", editingdomain, toolkit, parent, model, formEditor,
+ part, Persistence12Package.Literals.FLUSHER__FLUSH_ON_ELEMENT,
+ Persistence12Package.Literals.FLUSHER__FLUSH_ON_ELEMENT_NS);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/FlusherUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/InserterUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/InserterUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/InserterUICreator.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.persistence12;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.model.persistence12.Persistence12Package;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 8, 2009
+ */
+public class InserterUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == Persistence12Package.Literals.INSERTER__INSERT_ON_ELEMENT) {
+ return true;
+ }
+ if (feature == Persistence12Package.Literals.INSERTER__INSERT_ON_ELEMENT_NS) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUIOnTop(AdapterFactoryEditingDomain editingdomain,
+ FormToolkit toolkit, Composite parent, Object model, ISmooksModelProvider formEditor, IEditorPart part) {
+ return createElementSelectionSection("Insert On Element", editingdomain, toolkit, parent, model, formEditor,
+ part, Persistence12Package.Literals.INSERTER__INSERT_ON_ELEMENT,
+ Persistence12Package.Literals.INSERTER__INSERT_ON_ELEMENT_NS);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/InserterUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorExpressionParamUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorExpressionParamUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorExpressionParamUICreator.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.persistence12;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.model.persistence12.Persistence12Package;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 8, 2009
+ */
+public class LocatorExpressionParamUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == Persistence12Package.Literals.EXPRESSION_PARAMETER__EXEC_ON_ELEMENT) {
+ return true;
+ }
+ if (feature == Persistence12Package.Literals.EXPRESSION_PARAMETER__EXEC_ON_ELEMENT_NS) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUIOnTop(AdapterFactoryEditingDomain editingdomain,
+ FormToolkit toolkit, Composite parent, Object model, ISmooksModelProvider formEditor, IEditorPart part) {
+ return createElementSelectionSection("Execute On Element", editingdomain, toolkit, parent, model, formEditor,
+ part, Persistence12Package.Literals.EXPRESSION_PARAMETER__EXEC_ON_ELEMENT,
+ Persistence12Package.Literals.EXPRESSION_PARAMETER__EXEC_ON_ELEMENT_NS);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorExpressionParamUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorUICreator.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.persistence12;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.model.persistence12.Persistence12Package;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 8, 2009
+ */
+public class LocatorUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == Persistence12Package.Literals.LOCATOR__LOOKUP_ON_ELEMENT) {
+ return true;
+ }
+ if (feature == Persistence12Package.Literals.LOCATOR__LOOKUP_ON_ELEMENT_NS) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUIOnTop(AdapterFactoryEditingDomain editingdomain,
+ FormToolkit toolkit, Composite parent, Object model, ISmooksModelProvider formEditor, IEditorPart part) {
+ return createElementSelectionSection("Lookup On Element", editingdomain, toolkit, parent, model, formEditor,
+ part, Persistence12Package.Literals.LOCATOR__LOOKUP_ON_ELEMENT,
+ Persistence12Package.Literals.LOCATOR__LOOKUP_ON_ELEMENT_NS);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorValueParamUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorValueParamUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorValueParamUICreator.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.persistence12;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.model.persistence12.Persistence12Package;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 8, 2009
+ */
+public class LocatorValueParamUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == Persistence12Package.Literals.VALUE_PARAMETER__DATA) {
+ return true;
+ }
+ if (feature == Persistence12Package.Literals.VALUE_PARAMETER__DATA_NS) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUIOnTop(AdapterFactoryEditingDomain editingdomain,
+ FormToolkit toolkit, Composite parent, Object model, ISmooksModelProvider formEditor, IEditorPart part) {
+ return createElementSelectionSection("Data", editingdomain, toolkit, parent, model, formEditor,
+ part, Persistence12Package.Literals.VALUE_PARAMETER__DATA,
+ Persistence12Package.Literals.VALUE_PARAMETER__DATA_NS);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorValueParamUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorWiringParamUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorWiringParamUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorWiringParamUICreator.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.persistence12;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.model.persistence12.Persistence12Package;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 8, 2009
+ */
+public class LocatorWiringParamUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == Persistence12Package.Literals.WIRING_PARAMETER__WIRE_ON_ELEMENT) {
+ return true;
+ }
+ if (feature == Persistence12Package.Literals.WIRING_PARAMETER__WIRE_ON_ELEMENT_NS) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUIOnTop(AdapterFactoryEditingDomain editingdomain,
+ FormToolkit toolkit, Composite parent, Object model, ISmooksModelProvider formEditor, IEditorPart part) {
+ return createElementSelectionSection("Wire On Element", editingdomain, toolkit, parent, model, formEditor,
+ part, Persistence12Package.Literals.WIRING_PARAMETER__WIRE_ON_ELEMENT,
+ Persistence12Package.Literals.WIRING_PARAMETER__WIRE_ON_ELEMENT_NS);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/LocatorWiringParamUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/UpdaterUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/UpdaterUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/UpdaterUICreator.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.persistence12;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.model.persistence12.Persistence12Package;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 8, 2009
+ */
+public class UpdaterUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == Persistence12Package.Literals.UPDATER__UPDATE_ON_ELEMENT) {
+ return true;
+ }
+ if (feature == Persistence12Package.Literals.UPDATER__UPDATE_ON_ELEMENT_NS) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUIOnTop(AdapterFactoryEditingDomain editingdomain,
+ FormToolkit toolkit, Composite parent, Object model, ISmooksModelProvider formEditor, IEditorPart part) {
+ return createElementSelectionSection("Update On Element", editingdomain, toolkit, parent, model, formEditor,
+ part, Persistence12Package.Literals.UPDATER__UPDATE_ON_ELEMENT,
+ Persistence12Package.Literals.UPDATER__UPDATE_ON_ELEMENT_NS);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/persistence12/UpdaterUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/rule10/Rules10RulebaseUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/rule10/Rules10RulebaseUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/rule10/Rules10RulebaseUICreator.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.rule10;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.model.rules10.Rules10Package;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 8, 2009
+ */
+public class Rules10RulebaseUICreator extends PropertyUICreator {
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ ISmooksModelProvider formEditor, IEditorPart part) {
+ if (feature == Rules10Package.Literals.RULE_BASE__PROVIDER) {
+ return createBeanClassTextWithButton(parent, toolkit, propertyDescriptor, model);
+ }
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor, part);
+ }
+
+ protected AttributeFieldEditPart createBeanClassTextWithButton(Composite composite, FormToolkit toolkit,
+ final IItemPropertyDescriptor propertyDescriptor, final Object model) {
+ return SmooksUIUtils.createJavaTypeSearchFieldEditor(composite, toolkit, propertyDescriptor, (EObject) model);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/rule10/Rules10RulebaseUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/validation10/RuleUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/validation10/RuleUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/validation10/RuleUICreator.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2009 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.validation10;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.model.validation10.Validation10Package;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 8, 2009
+ */
+public class RuleUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == Validation10Package.Literals.RULE_TYPE__EXECUTE_ON) {
+ return true;
+ }
+ if (feature == Validation10Package.Literals.RULE_TYPE__EXECUTE_ON_NS) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUIOnTop(AdapterFactoryEditingDomain editingdomain,
+ FormToolkit toolkit, Composite parent, Object model, ISmooksModelProvider formEditor, IEditorPart part) {
+ return createElementSelectionSection("Execute On Element", editingdomain, toolkit, parent, model, formEditor,
+ part, Validation10Package.Literals.RULE_TYPE__EXECUTE_ON,
+ Validation10Package.Literals.RULE_TYPE__EXECUTE_ON_NS);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/validation10/RuleUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/ClassFieldEditorValidator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/ClassFieldEditorValidator.java 2009-07-28 08:10:40 UTC (rev 16835)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/ClassFieldEditorValidator.java 2009-07-28 08:22:08 UTC (rev 16836)
@@ -17,14 +17,22 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.smooks.configuration.editors.uitls.ProjectClassLoader;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.csv12.Binding;
+import org.jboss.tools.smooks.model.csv12.Csv12Package;
import org.jboss.tools.smooks.model.javabean.BindingsType;
import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
+import org.jboss.tools.smooks.model.javabean12.BeanType;
+import org.jboss.tools.smooks.model.javabean12.Javabean12Package;
+import org.jboss.tools.smooks.model.rules10.RuleBase;
+import org.jboss.tools.smooks.model.rules10.Rules10Package;
/**
* @author Dart (dpeng(a)redhat.com)
@@ -34,6 +42,8 @@
private ProjectClassLoader classLoader;
+ private List<Object> validationTargetList = null;
+
/**
* @return the classLoader
*/
@@ -50,34 +60,123 @@
return classLoader;
}
+ protected void initValidationTargetList() {
+ ClassValidationTarget target = new ClassValidationTarget();
+ target.setFeature(JavabeanPackage.Literals.BINDINGS_TYPE__CLASS);
+ target.setSupportArrayClass(true);
+ target.setTarget(BindingsType.class);
+ validationTargetList.add(target);
+
+ ClassValidationTarget target1 = new ClassValidationTarget();
+ target1.setFeature(Javabean12Package.Literals.BEAN_TYPE__CLASS);
+ target1.setSupportArrayClass(true);
+ target1.setTarget(BeanType.class);
+ validationTargetList.add(target1);
+
+ ClassValidationTarget target2 = new ClassValidationTarget();
+ target2.setFeature(Csv12Package.Literals.BINDING__CLASS);
+ target2.setTarget(Binding.class);
+ validationTargetList.add(target2);
+
+ ClassValidationTarget target3 = new ClassValidationTarget();
+ target3.setFeature(Rules10Package.Literals.RULE_BASE__PROVIDER);
+ target3.setTarget(RuleBase.class);
+ validationTargetList.add(target3);
+ }
+
+ public List<Object> getValidationTargetList() {
+ if (validationTargetList == null) {
+ validationTargetList = new ArrayList<Object>();
+ initValidationTargetList();
+ }
+ return validationTargetList;
+ }
+
public List<Diagnostic> validate(Collection<?> selectionObjects) {
List<Diagnostic> list = new ArrayList<Diagnostic>();
for (Iterator<?> iterator = selectionObjects.iterator(); iterator.hasNext();) {
Object object = (Object) iterator.next();
- if (object instanceof BindingsType) {
- BindingsType bindings = (BindingsType) object;
- classLoader = getClassLoader(bindings);
- String clazz = bindings.getClass_();
- if (clazz != null) {
- clazz = clazz.trim();
- if (clazz.endsWith("[]")) {
- clazz = clazz.substring(0, clazz.length() - 2);
+ if ((object instanceof EObject)) {
+ List<?> targetList = getValidationTargetList();
+ for (Iterator<?> iterator2 = targetList.iterator(); iterator2.hasNext();) {
+ ClassValidationTarget target = (ClassValidationTarget) iterator2.next();
+ Class<?> targetClass = target.getTarget();
+ EStructuralFeature feature = target.getFeature();
+ if (targetClass.isAssignableFrom(object.getClass()) && feature != null) {
+ Object value = ((EObject) object).eGet(feature);
+ if (value == null)
+ break;
+ String classString = value.toString();
+ classLoader = getClassLoader((EObject) object);
+ if (classString != null) {
+ classString = classString.trim();
+ } else {
+ continue;
+ }
+ if (target.isSupportArrayClass()) {
+ if (classString.endsWith("[]")) {
+ classString = classString.substring(0, classString.length() - 2);
+ }
+ }
+ Class<?> clazz1 = null;
+ if (classString != null && classLoader != null) {
+ try {
+ clazz1 = classLoader.loadClass(classString);
+ } catch (ClassNotFoundException e) {
+ // ignore
+ }
+ }
+ String message = "Can't find class : \"" + classString + "\"";
+ if (clazz1 == null) {
+ list.add(newWaringDiagnostic(message, object,(EAttribute) feature));
+ }
+ break;
}
}
- Class<?> clazz1 = null;
- if (clazz != null && classLoader != null) {
- try {
- clazz1 = classLoader.loadClass(clazz);
- } catch (ClassNotFoundException e) {
- // ignore
- }
- }
- String message = "Can't find class : \"" + clazz + "\"";
- if (clazz1 == null) {
- list.add(newWaringDiagnostic(message, bindings, JavabeanPackage.Literals.BINDINGS_TYPE__CLASS));
- }
}
+ // if (object instanceof Binding) {
+ // String classString = ((Binding) object).getClass_();
+ // classLoader = getClassLoader((EObject) object);
+ // Class<?> clazz1 = null;
+ // if (classString != null && classLoader != null) {
+ // try {
+ // clazz1 = classLoader.loadClass(classString);
+ // } catch (ClassNotFoundException e) {
+ // // ignore
+ // }
+ // }
+ // String message = "Can't find class : \"" + classString + "\"";
+ // if (clazz1 == null) {
+ // list.add(newWaringDiagnostic(message, object,
+ // JavabeanPackage.Literals.BINDINGS_TYPE__CLASS));
+ // }
+ // }
+ // if (object instanceof BindingsType) {
+ // BindingsType bindings = (BindingsType) object;
+ // classLoader = getClassLoader(bindings);
+ // String clazz = bindings.getClass_();
+ // if (clazz != null) {
+ // clazz = clazz.trim();
+ // if (clazz.endsWith("[]")) {
+ // clazz = clazz.substring(0, clazz.length() - 2);
+ // }
+ // }
+ // Class<?> clazz1 = null;
+ // if (clazz != null && classLoader != null) {
+ // try {
+ // clazz1 = classLoader.loadClass(clazz);
+ // } catch (ClassNotFoundException e) {
+ // // ignore
+ // }
+ // }
+ // String message = "Can't find class : \"" + clazz + "\"";
+ // if (clazz1 == null) {
+ // list.add(newWaringDiagnostic(message, bindings,
+ // JavabeanPackage.Literals.BINDINGS_TYPE__CLASS));
+ // }
+ // }
+
if (object instanceof EObject) {
List<Diagnostic> dd = validate(((EObject) object).eContents());
if (dd != null) {
@@ -94,6 +193,37 @@
public void initValidator(Collection<?> selectedObjects, EditingDomain editingDomain) {
// TODO Auto-generated method stub
-
+
}
+
+ private class ClassValidationTarget {
+ private boolean supportArrayClass = false;
+ private EStructuralFeature feature;
+ private Class<?> target;
+
+ public EStructuralFeature getFeature() {
+ return feature;
+ }
+
+ public void setFeature(EStructuralFeature feature) {
+ this.feature = feature;
+ }
+
+ public Class<?> getTarget() {
+ return target;
+ }
+
+ public void setTarget(Class<?> target) {
+ this.target = target;
+ }
+
+ public boolean isSupportArrayClass() {
+ return supportArrayClass;
+ }
+
+ public void setSupportArrayClass(boolean supportArrayClass) {
+ this.supportArrayClass = supportArrayClass;
+ }
+
+ }
}
14 years, 10 months
JBoss Tools SVN: r16835 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context: java and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-07-28 04:10:40 -0400 (Tue, 28 Jul 2009)
New Revision: 16835
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/Parameter.java
Removed:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Parameter.java
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/GenericGenerator.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaParameter.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaParameter.java
Log:
Parameter interface moved to correct package.
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Parameter.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Parameter.java 2009-07-28 07:59:08 UTC (rev 16834)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Parameter.java 2009-07-28 08:10:40 UTC (rev 16835)
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007-2009 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,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributor:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.hibernate.jpt.core.internal.context;
-
-import org.eclipse.jpt.core.context.JpaContextNode;
-
-/**
- * @author Dmitry Geraskov
- *
- */
-public interface Parameter extends JpaContextNode {
-
- String getName();
- void setName(String value);
- String NAME_PROPERTY = "name"; //$NON-NLS-1$
-
- String getValue();
- void setValue(String value);
- String VALUE_PROPERTY = "value"; //$NON-NLS-1$
-
-}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/GenericGenerator.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/GenericGenerator.java 2009-07-28 07:59:08 UTC (rev 16834)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/GenericGenerator.java 2009-07-28 08:10:40 UTC (rev 16835)
@@ -13,7 +13,6 @@
import java.util.ListIterator;
import org.eclipse.jpt.core.context.Generator;
-import org.jboss.tools.hibernate.jpt.core.internal.context.Parameter;
/**
* @author Dmitry Geraskov
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaParameter.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaParameter.java 2009-07-28 07:59:08 UTC (rev 16834)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaParameter.java 2009-07-28 08:10:40 UTC (rev 16835)
@@ -13,7 +13,6 @@
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
import org.eclipse.jpt.core.utility.TextRange;
-import org.jboss.tools.hibernate.jpt.core.internal.context.Parameter;
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.ParameterAnnotation;
/**
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java 2009-07-28 07:59:08 UTC (rev 16834)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java 2009-07-28 08:10:40 UTC (rev 16835)
@@ -28,7 +28,6 @@
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaFactory;
import org.jboss.tools.hibernate.jpt.core.internal.context.Messages;
-import org.jboss.tools.hibernate.jpt.core.internal.context.Parameter;
import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnit.LocalMessage;
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.GenericGeneratorAnnotation;
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.ParameterAnnotation;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaParameter.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaParameter.java 2009-07-28 07:59:08 UTC (rev 16834)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaParameter.java 2009-07-28 08:10:40 UTC (rev 16835)
@@ -11,7 +11,6 @@
package org.jboss.tools.hibernate.jpt.core.internal.context.java;
import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
-import org.jboss.tools.hibernate.jpt.core.internal.context.Parameter;
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.ParameterAnnotation;
/**
Copied: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/Parameter.java (from rev 16283, trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Parameter.java)
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/Parameter.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/Parameter.java 2009-07-28 08:10:40 UTC (rev 16835)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.hibernate.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.context.JpaContextNode;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public interface Parameter extends JpaContextNode {
+
+ String getName();
+ void setName(String value);
+ String NAME_PROPERTY = "name"; //$NON-NLS-1$
+
+ String getValue();
+ void setValue(String value);
+ String VALUE_PROPERTY = "value"; //$NON-NLS-1$
+
+}
14 years, 10 months
JBoss Tools SVN: r16834 - trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-07-28 03:59:08 -0400 (Tue, 28 Jul 2009)
New Revision: 16834
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/plugin.xml
Log:
typo
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/plugin.xml 2009-07-28 07:58:32 UTC (rev 16833)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/plugin.xml 2009-07-28 07:59:08 UTC (rev 16834)
@@ -31,7 +31,7 @@
</include>
</validator>
</extension>
- <extension id="org.jboss.tools.flow.jpdl4.problem" point="org.eclipse.core.resources.markers" name="jPDL 4 Problem">
+ <extension id="org.jboss.tools.flow.jpdl4.problem" point="org.eclipse.core.resources.markers" name="jPDL4 Problem">
<super type="org.eclipse.core.resources.problemmarker"/>
</extension>
</plugin>
14 years, 10 months
JBoss Tools SVN: r16833 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage: META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-07-28 03:58:32 -0400 (Tue, 28 Jul 2009)
New Revision: 16833
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/xml/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/xml/Test.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/META-INF/MANIFEST.MF
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java
Log:
Validation problems show up as jPDL4 Problem
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/META-INF/MANIFEST.MF
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/META-INF/MANIFEST.MF 2009-07-28 07:24:49 UTC (rev 16832)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/META-INF/MANIFEST.MF 2009-07-28 07:58:32 UTC (rev 16833)
@@ -18,6 +18,7 @@
org.jboss.tools.flow.common;bundle-version="1.0.0",
org.eclipse.gef;bundle-version="3.4.1",
org.eclipse.wst.validation;bundle-version="1.2.6",
- org.jboss.tools.jbpm.common;bundle-version="1.0.0"
+ org.jboss.tools.jbpm.common;bundle-version="1.0.0",
+ org.eclipse.wst.xml.core;bundle-version="1.1.400"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/plugin.xml 2009-07-28 07:24:49 UTC (rev 16832)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/plugin.xml 2009-07-28 07:58:32 UTC (rev 16833)
@@ -31,5 +31,7 @@
</include>
</validator>
</extension>
-
+ <extension id="org.jboss.tools.flow.jpdl4.problem" point="org.eclipse.core.resources.markers" name="jPDL 4 Problem">
+ <super type="org.eclipse.core.resources.problemmarker"/>
+ </extension>
</plugin>
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java 2009-07-28 07:24:49 UTC (rev 16832)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/validator/Jpdl4Validator.java 2009-07-28 07:58:32 UTC (rev 16833)
@@ -90,7 +90,7 @@
}
ClassLoader cl = Thread.currentThread().getContextClassLoader();
try {
- Class problemClass = cl.loadClass("org.jbpm.api.Problem");
+ Class problemClass = cl.loadClass("org.jbpm.pvm.internal.xml.Problem");
Method getMsgMethod = problemClass.getMethod("getMsg", new Class[] {});
Method getLineMethod = problemClass.getMethod("getLine", new Class[] {});
Method getSeverityMethod = problemClass.getMethod("getSeverity", new Class[] {});
@@ -109,7 +109,7 @@
attNames[2] = IMarker.SEVERITY;
attValues[2] = new Integer("error".equals(severity) ? IMarker.SEVERITY_ERROR : IMarker.SEVERITY_WARNING);
ValidatorMessage validatorMessage = ValidatorMessage.create(msg, file);
- validatorMessage.setType(IMarker.PROBLEM);
+ validatorMessage.setType("org.jboss.tools.flow.jpdl4.problem");
validatorMessage.setAttributes(attNames, attValues);
validationResult.add(validatorMessage);
}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/xml/Test.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/xml/Test.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/xml/Test.java 2009-07-28 07:58:32 UTC (rev 16833)
@@ -0,0 +1,13 @@
+package org.jboss.tools.flow.jpdl4.multipage.xml;
+
+import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
+import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
+import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogElement;
+
+public class Test {
+
+ public static void main(String[] args) {
+ ICatalog catalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4.multipage/src/org/jboss/tools/flow/jpdl4/multipage/xml/Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 10 months
JBoss Tools SVN: r16832 - trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2009-07-28 03:24:49 -0400 (Tue, 28 Jul 2009)
New Revision: 16832
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java
Log:
JBIDE-4654: apply the patch rob attached
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java 2009-07-27 21:53:55 UTC (rev 16831)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java 2009-07-28 07:24:49 UTC (rev 16832)
@@ -11,7 +11,6 @@
package org.jboss.tools.esb.core.facet;
import java.io.ByteArrayInputStream;
-import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.eclipse.core.resources.IFile;
@@ -20,6 +19,7 @@
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
@@ -27,6 +27,7 @@
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jst.common.frameworks.CommonFrameworksPlugin;
import org.eclipse.jst.common.project.facet.WtpUtils;
import org.eclipse.jst.common.project.facet.core.ClasspathHelper;
import org.eclipse.wst.common.componentcore.ComponentCore;
@@ -45,12 +46,11 @@
public void execute(IProject project, IProjectFacetVersion fv,
Object config, IProgressMonitor monitor) throws CoreException {
model = (IDataModel) config;
+ final IJavaProject jproj = JavaCore.create(project);
createProjectStructure(project);
-
-
- final IJavaProject jproj = JavaCore.create(project);
+
// Add WTP natures.
WtpUtils.addNatures(project);
@@ -62,31 +62,26 @@
} catch (Exception e) {
c = ComponentCore.createComponent(project);
}
-
-
+
+ String outputLoc = jproj.readOutputLocation().removeFirstSegments(1).toString();
c.create(0, null);
- //String esbContent = model.getStringProperty(IJBossESBFacetDataModelProperties.ESB_CONTENT_FOLDER);
- c.setMetaProperty("java-output-path", "/build/classes/");
+ c.setMetaProperty("java-output-path", outputLoc);
final IVirtualFolder jbiRoot = c.getRootFolder();
- // Create directory structure
- /*String srcFolder = null;
- srcFolder = model
- .getStringProperty(IJBossESBFacetDataModelProperties.ESB_SOURCE_FOLDER);
- jbiRoot.createLink(new Path("/" + srcFolder), 0, null);*/
- String resourcesFolder = model
- .getStringProperty(IJBossESBFacetDataModelProperties.ESB_CONTENT_FOLDER);
+ // Map the esbcontent to root for deploy
+ String resourcesFolder = model.getStringProperty(
+ IJBossESBFacetDataModelProperties.ESB_CONTENT_FOLDER);
jbiRoot.createLink(new Path("/" + resourcesFolder), 0, null);
- final IVirtualFolder jsrc = c.getRootFolder().getFolder("/esbcontent"); //$NON-NLS-1$
- final IClasspathEntry[] cp = jproj.getRawClasspath();
- for (int i = 0; i < cp.length; i++) {
- final IClasspathEntry cpe = cp[i];
+ final IVirtualFolder jsrc = c.getRootFolder().getFolder("/"); //$NON-NLS-1$
+ final IClasspathEntry[] cp2 = jproj.getRawClasspath();
+ for (int i = 0; i < cp2.length; i++) {
+ final IClasspathEntry cpe = cp2[i];
if (cpe.getEntryKind() == IClasspathEntry.CPE_SOURCE) {
if( cpe.getPath().removeFirstSegments(1).segmentCount() > 0 )
- jsrc.createLink(cpe.getPath().removeFirstSegments(1), 0, null);
+ jsrc.createLink(new Path(outputLoc), 0, null);
}
}
@@ -102,11 +97,6 @@
ClasspathHelper.removeClasspathEntries(project, fv);
ClasspathHelper.addClasspathEntries(project, fv);
-
- //String prjName = model.getStringProperty(IFacetDataModelProperties.FACET_PROJECT_NAME);
- //IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(prjName);
-
-
}
private IFile createJBossESBXML(IFolder folder) throws CoreException{
14 years, 10 months
JBoss Tools SVN: r16831 - in workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui: META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-07-27 17:53:55 -0400 (Mon, 27 Jul 2009)
New Revision: 16831
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/META-INF/MANIFEST.MF
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/plugin.xml
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/Messages.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/messages.properties
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependenciesPropertyPage.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddModuleDependenciesPropertiesPage.java
Log:
cleaning up workspace, removing plugin dependencies, moving towards patch for eclipse
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/META-INF/MANIFEST.MF
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/META-INF/MANIFEST.MF 2009-07-27 21:11:27 UTC (rev 16830)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/META-INF/MANIFEST.MF 2009-07-27 21:53:55 UTC (rev 16831)
@@ -8,23 +8,20 @@
org.eclipse.core.runtime,
org.eclipse.core.resources;bundle-version="3.5.0",
org.eclipse.wst.common.modulecore;bundle-version="1.1.300",
- org.eclipse.jst.j2ee;bundle-version="1.1.300",
- org.eclipse.jst.j2ee.core;bundle-version="1.1.300",
- org.eclipse.jst.j2ee.ui;bundle-version="1.1.300",
org.eclipse.wst.common.core;bundle-version="1.1.201",
org.eclipse.wst.common.frameworks;bundle-version="1.1.300",
org.eclipse.wst.common.frameworks.ui;bundle-version="1.1.300",
org.eclipse.jst.common.frameworks;bundle-version="1.1.300",
org.eclipse.wst.common.project.facet.core;bundle-version="1.4.0",
+ org.eclipse.jst.j2ee;bundle-version="1.1.300",
org.eclipse.jdt;bundle-version="3.5.0",
org.eclipse.jdt.core;bundle-version="3.5.0",
- org.eclipse.jem.util;bundle-version="2.0.200",
- org.eclipse.jst.jee;bundle-version="1.0.200",
org.eclipse.jdt.ui;bundle-version="3.5.0",
org.eclipse.wst.server.ui;bundle-version="1.1.102",
org.eclipse.wst.server.core;bundle-version="1.1.101",
org.eclipse.wst.common.emfworkbench.integration;bundle-version="1.1.300",
+ org.eclipse.jem.util;bundle-version="2.0.200",
org.eclipse.emf.ecore;bundle-version="2.5.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Vendor: JBoss by Red Hat
+Bundle-Vendor: Eclipse.org
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/plugin.xml
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/plugin.xml 2009-07-27 21:11:27 UTC (rev 16830)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/plugin.xml 2009-07-27 21:53:55 UTC (rev 16831)
@@ -22,6 +22,8 @@
</enabledWhen>
</page>
</extension>
+
+<!--
<extension
point="org.eclipse.wst.common.componentcore.ui.moduleDependencyPropertyPage">
<dependencyPage
@@ -29,6 +31,8 @@
id="org.eclipse.wst.common.componentcore.ui.earDependencyPage">
</dependencyPage>
</extension>
+ -->
+
<extension
point="org.eclipse.wst.common.componentcore.ui.referenceWizardFragment">
<referenceFragment
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/Messages.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/Messages.java 2009-07-27 21:11:27 UTC (rev 16830)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/Messages.java 2009-07-27 21:53:55 UTC (rev 16831)
@@ -10,6 +10,7 @@
public static String ErrorNotVirtualComponent;
public static String DeployPathColumn;
public static String SourceColumn;
+ public static String InternalLibJarWarning;
public static String AddFolder;
public static String AddFolderElipses;
public static String AddReference;
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/messages.properties
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/messages.properties 2009-07-27 21:11:27 UTC (rev 16830)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/messages.properties 2009-07-27 21:53:55 UTC (rev 16831)
@@ -4,6 +4,7 @@
ErrorNotVirtualComponent=The given project is not a virtual component project
DeployPathColumn=Deploy Path
SourceColumn=Source
+InternalLibJarWarning=This library has been added to the project by using the project tree or the file system. If you want to move / remove it, use the same approach.
AddFolder=Add Folder
AddFolderElipses=Add Folder...
AddReference=Add Reference...
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependenciesPropertyPage.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependenciesPropertyPage.java 2009-07-27 21:11:27 UTC (rev 16830)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependenciesPropertyPage.java 2009-07-27 21:53:55 UTC (rev 16831)
@@ -10,22 +10,9 @@
******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.ear;
-import java.util.ArrayList;
-
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModelProvider;
-import org.eclipse.jst.j2ee.application.internal.operations.RemoveComponentFromEnterpriseApplicationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
-import org.eclipse.jst.jee.project.facet.EarCreateDeploymentFilesDataModelProvider;
-import org.eclipse.jst.jee.project.facet.ICreateDeploymentFilesDataModelProperties;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.ui.propertypage.internal.AddModuleDependenciesPropertiesPage;
import org.eclipse.wst.common.componentcore.ui.propertypage.internal.ModuleAssemblyRootPage;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
public class EarModuleDependenciesPropertyPage extends
AddModuleDependenciesPropertiesPage {
@@ -34,31 +21,31 @@
super(project, page);
}
- protected IDataModelOperation generateEARDDOperation() {
- IDataModel model = DataModelFactory.createDataModel(new EarCreateDeploymentFilesDataModelProvider());
- model.setProperty(ICreateDeploymentFilesDataModelProperties.GENERATE_DD, rootComponent);
- model.setProperty(ICreateDeploymentFilesDataModelProperties.TARGET_PROJECT, project);
- return model.getDefaultOperation();
- }
-
- public boolean postHandleChanges(IProgressMonitor monitor) {
- return true;
- }
-
- protected void handleRemoved(ArrayList<IVirtualComponent> removed) {
- super.handleRemoved(removed);
- J2EEComponentClasspathUpdater.getInstance().queueUpdateEAR(rootComponent.getProject());
- }
-
- protected IDataModelProvider getRemoveReferenceDataModelProvider(Object component) {
- return new RemoveComponentFromEnterpriseApplicationDataModelProvider();
- }
-
-// protected void postAddProjects(Set moduleProjects) throws CoreException {
-// EarFacetRuntimeHandler.updateModuleProjectRuntime(rootComponent.getProject(), moduleProjects, new NullProgressMonitor());
+// protected IDataModelOperation generateEARDDOperation() {
+// IDataModel model = DataModelFactory.createDataModel(new EarCreateDeploymentFilesDataModelProvider());
+// model.setProperty(ICreateDeploymentFilesDataModelProperties.GENERATE_DD, rootComponent);
+// model.setProperty(ICreateDeploymentFilesDataModelProperties.TARGET_PROJECT, project);
+// return model.getDefaultOperation();
// }
-
- protected IDataModelProvider getAddReferenceDataModelProvider(IVirtualComponent component) {
- return new AddComponentToEnterpriseApplicationDataModelProvider();
- }
+//
+// public boolean postHandleChanges(IProgressMonitor monitor) {
+// return true;
+// }
+//
+// protected void handleRemoved(ArrayList<IVirtualComponent> removed) {
+// super.handleRemoved(removed);
+// J2EEComponentClasspathUpdater.getInstance().queueUpdateEAR(rootComponent.getProject());
+// }
+//
+// protected IDataModelProvider getRemoveReferenceDataModelProvider(Object component) {
+// return new RemoveComponentFromEnterpriseApplicationDataModelProvider();
+// }
+//
+//// protected void postAddProjects(Set moduleProjects) throws CoreException {
+//// EarFacetRuntimeHandler.updateModuleProjectRuntime(rootComponent.getProject(), moduleProjects, new NullProgressMonitor());
+//// }
+//
+// protected IDataModelProvider getAddReferenceDataModelProvider(IVirtualComponent component) {
+// return new AddComponentToEnterpriseApplicationDataModelProvider();
+// }
}
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddModuleDependenciesPropertiesPage.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddModuleDependenciesPropertiesPage.java 2009-07-27 21:11:27 UTC (rev 16830)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddModuleDependenciesPropertiesPage.java 2009-07-27 21:53:55 UTC (rev 16831)
@@ -42,7 +42,6 @@
import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.jst.j2ee.internal.plugin.J2EEUIMessages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
@@ -319,8 +318,7 @@
label.setBackground(Display.getDefault()
.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
label.setData("_TABLEITEM", item); //$NON-NLS-1$
- label.setText(J2EEUIMessages
- .getResourceString(J2EEUIMessages.HOVER_HELP_FOR_DISABLED_LIBS));
+ label.setText( Messages.InternalLibJarWarning);
label.addListener(SWT.MouseExit, labelListener);
label.addListener(SWT.MouseDown, labelListener);
Point size = tip.computeSize(SWT.DEFAULT, SWT.DEFAULT);
14 years, 10 months
JBoss Tools SVN: r16830 - in workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui: propertypage and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-07-27 17:11:27 -0400 (Mon, 27 Jul 2009)
New Revision: 16830
Added:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependenciesPropertyPage.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependencyPageProvider.java
Removed:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependenciesPropertyPage.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependencyPageProvider.java
Modified:
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/ComponentCoreUIPlugin.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/Messages.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/messages.properties
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IDependencyPageProvider.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IModuleDependenciesControl.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddFolderDialog.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddModuleDependenciesPropertiesPage.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ComponentDependencyContentProvider.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/DependencyPageExtensionManager.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ExternalJarReferenceWizardFragment.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/JarReferenceWizardFragment.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ModuleAssemblyRootPage.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceRootWizardFragment.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceWizard.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ProjectReferenceWizardFragment.java
workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/VariableReferenceWizardFragment.java
Log:
cleaning up workspace = string externalization
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/ComponentCoreUIPlugin.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/ComponentCoreUIPlugin.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/ComponentCoreUIPlugin.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * 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:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui;
import org.eclipse.core.runtime.CoreException;
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/Messages.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/Messages.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/Messages.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -4,8 +4,29 @@
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.wst.common.componentcore.ui.messages"; //$NON-NLS-1$
- public static String AddModuleDependenciesPropertiesPage_DeployPathColumn;
- public static String AddModuleDependenciesPropertiesPage_SourceColumn;
+ public static String ModuleAssemblyRootPageDescription;
+ public static String ModuleAssembly;
+ public static String ErrorCheckingFacets;
+ public static String ErrorNotVirtualComponent;
+ public static String DeployPathColumn;
+ public static String SourceColumn;
+ public static String AddFolder;
+ public static String AddFolderElipses;
+ public static String AddReference;
+ public static String RemoveSelected;
+ public static String JarTitle;
+ public static String JarDescription;
+ public static String ExternalJarTitle;
+ public static String ExternalJarDescription;
+ public static String Browse;
+ public static String NewReferenceTitle;
+ public static String NewReferenceDescription;
+ public static String NewReferenceWizard;
+ public static String ProjectReferenceTitle;
+ public static String ProjectReferenceDescription;
+ public static String VariableReferenceTitle;
+ public static String VariableReferenceDescription;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/messages.properties
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/messages.properties 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/messages.properties 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,7 +1,22 @@
-AddModuleDependenciesPropertiesPage_AddProjectButton=Add Project...
-AddModuleDependenciesPropertiesPage_DeployPathColumn=Deploy Path
-AddModuleDependenciesPropertiesPage_RemoveSelectedButton=Remove selected...
-AddModuleDependenciesPropertiesPage_SelectAProjectTitle=Select a Project
-AddModuleDependenciesPropertiesPage_SourceColumn=Source
-J2EEDependenciesPage_Description=ModuleDependency Page Description
-J2EEDependenciesPage_ErrorCheckingFacets=Error Checking Project Facets
+ModuleAssemblyRootPageDescription=TODO Change this: Create and change packaging structure for this project
+ModuleAssembly=Module Assembly
+ErrorCheckingFacets=Error Checking Project Facets
+ErrorNotVirtualComponent=The given project is not a virtual component project
+DeployPathColumn=Deploy Path
+SourceColumn=Source
+AddFolder=Add Folder
+AddFolderElipses=Add Folder...
+AddReference=Add Reference...
+RemoveSelected=Remove selected
+ExternalJarTitle=Add an External Jar Reference
+ExternalJarDescription=Here you can reference a filesystem Jar\nThis is not a suggested use-case, but is here for backwards compatability.
+JarTitle=Add a Jar Reference
+JarDescription="Here you can reference a workspace Jar\nThis is not a suggested use-case, but is here for backwards compatability.
+Browse=Browse...
+NewReferenceTitle=Select a reference type
+NewReferenceDescription=Here you can select one of many types of references to add
+NewReferenceWizard=New Reference Wizard
+ProjectReferenceTitle=Add a Project Reference
+ProjectReferenceDescription=Here you can make a project into a reference.\nIf the project is not already a flexible project, it will be converted into one.
+VariableReferenceTitle=Add a Variable Reference
+VariableReferenceDescription="Here you can reference a variable which maps to a single jar.\nThis is not a suggested use-case, but is here for backwards compatability.
\ No newline at end of file
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IDependencyPageProvider.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IDependencyPageProvider.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IDependencyPageProvider.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,11 +1,55 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * 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:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.wst.common.componentcore.ui.propertypage.internal.DependencyPageExtensionManager;
import org.eclipse.wst.common.componentcore.ui.propertypage.internal.ModuleAssemblyRootPage;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+/**
+ * Suggested use case of this class is as follows:
+ *
+ * provider = DependencyPageExtensionManager.getManager().getProvider(facetedProject);
+ * if( provider != null ) {
+ * controls = provider.createPages(facetedProject, this);
+ * Composite root = provider.createRootControl(controls, parent);
+ * }
+ */
public interface IDependencyPageProvider {
+ /**
+ * Returns true if this page provider knows how to
+ * handle the given faceted project, false otherwise
+ * @param project a project
+ * @return true if this provider can handle it, false otherwise
+ */
public boolean canHandle(IFacetedProject project);
+
+ /**
+ * Returns a list of page control objects which should be
+ * presented to the user for this project type.
+ *
+ * @param project
+ * @param parent
+ * @return
+ */
public IModuleDependenciesControl[] createPages(IFacetedProject project, ModuleAssemblyRootPage parent);
+
+ /**
+ * Turn this array of pages / controls into one root control
+ * that can be returned to the Properties Page container.
+
+ * @param pages
+ * @param parent
+ * @return
+ */
public Composite createRootControl(IModuleDependenciesControl[] pages, Composite parent);
}
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IModuleDependenciesControl.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IModuleDependenciesControl.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/IModuleDependenciesControl.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * 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:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage;
import org.eclipse.swt.widgets.Composite;
@@ -2,2 +12,7 @@
+/**
+ * This represents one control which may be present on a page
+ * and requires to listen in to the specific lifecycle
+ * events of the page.
+ */
public interface IModuleDependenciesControl {
Copied: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependenciesPropertyPage.java (from rev 16828, workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependenciesPropertyPage.java)
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependenciesPropertyPage.java (rev 0)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependenciesPropertyPage.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * 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:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
+package org.eclipse.wst.common.componentcore.ui.propertypage.ear;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModelProvider;
+import org.eclipse.jst.j2ee.application.internal.operations.RemoveComponentFromEnterpriseApplicationDataModelProvider;
+import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
+import org.eclipse.jst.jee.project.facet.EarCreateDeploymentFilesDataModelProvider;
+import org.eclipse.jst.jee.project.facet.ICreateDeploymentFilesDataModelProperties;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.ui.propertypage.internal.AddModuleDependenciesPropertiesPage;
+import org.eclipse.wst.common.componentcore.ui.propertypage.internal.ModuleAssemblyRootPage;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
+
+public class EarModuleDependenciesPropertyPage extends
+ AddModuleDependenciesPropertiesPage {
+ public EarModuleDependenciesPropertyPage(IProject project,
+ ModuleAssemblyRootPage page) {
+ super(project, page);
+ }
+
+ protected IDataModelOperation generateEARDDOperation() {
+ IDataModel model = DataModelFactory.createDataModel(new EarCreateDeploymentFilesDataModelProvider());
+ model.setProperty(ICreateDeploymentFilesDataModelProperties.GENERATE_DD, rootComponent);
+ model.setProperty(ICreateDeploymentFilesDataModelProperties.TARGET_PROJECT, project);
+ return model.getDefaultOperation();
+ }
+
+ public boolean postHandleChanges(IProgressMonitor monitor) {
+ return true;
+ }
+
+ protected void handleRemoved(ArrayList<IVirtualComponent> removed) {
+ super.handleRemoved(removed);
+ J2EEComponentClasspathUpdater.getInstance().queueUpdateEAR(rootComponent.getProject());
+ }
+
+ protected IDataModelProvider getRemoveReferenceDataModelProvider(Object component) {
+ return new RemoveComponentFromEnterpriseApplicationDataModelProvider();
+ }
+
+// protected void postAddProjects(Set moduleProjects) throws CoreException {
+// EarFacetRuntimeHandler.updateModuleProjectRuntime(rootComponent.getProject(), moduleProjects, new NullProgressMonitor());
+// }
+
+ protected IDataModelProvider getAddReferenceDataModelProvider(IVirtualComponent component) {
+ return new AddComponentToEnterpriseApplicationDataModelProvider();
+ }
+}
Copied: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependencyPageProvider.java (from rev 16828, workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependencyPageProvider.java)
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependencyPageProvider.java (rev 0)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/ear/EarModuleDependencyPageProvider.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * 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:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
+package org.eclipse.wst.common.componentcore.ui.propertypage.ear;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.common.componentcore.ui.propertypage.IDependencyPageProvider;
+import org.eclipse.wst.common.componentcore.ui.propertypage.IModuleDependenciesControl;
+import org.eclipse.wst.common.componentcore.ui.propertypage.internal.ModuleAssemblyRootPage;
+
+public class EarModuleDependencyPageProvider implements IDependencyPageProvider {
+
+ public boolean canHandle(IFacetedProject project) {
+ boolean isEAR = project.hasProjectFacet(ProjectFacetsManager.getProjectFacet("jst.ear")); //$NON-NLS-1$
+ return isEAR;
+ }
+
+ public IModuleDependenciesControl[] createPages(IFacetedProject project,
+ ModuleAssemblyRootPage parent) {
+ return new IModuleDependenciesControl[] {
+ new EarModuleDependenciesPropertyPage(project.getProject(), parent)
+ };
+ }
+
+ public Composite createRootControl(IModuleDependenciesControl[] pages,
+ Composite parent) {
+ if( pages.length == 1 && pages[0] != null)
+ return pages[0].createContents(parent);
+ return null;
+ }
+}
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddFolderDialog.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddFolderDialog.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddFolderDialog.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * 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:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import org.eclipse.core.resources.IContainer;
@@ -21,6 +31,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.wst.common.componentcore.ui.Messages;
public class AddFolderDialog extends TitleAreaDialog {
private IProject project;
@@ -33,7 +44,7 @@
protected void configureShell(Shell shell) {
super.configureShell(shell);
- shell.setText("Add Folder");
+ shell.setText(Messages.AddFolder);
shell.setBounds(shell.getLocation().x, shell.getLocation().y, 400,300);
}
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddModuleDependenciesPropertiesPage.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddModuleDependenciesPropertiesPage.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/AddModuleDependenciesPropertiesPage.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,15 +1,13 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
* 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:
- * IBM Corporation - initial API and implementation
- * David Schneider, david.schneider(a)unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- * Stefan Dimov, stefan.dimov(a)sap.com - bugs 207826, 222651
- *******************************************************************************/
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
@@ -75,8 +73,8 @@
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
-import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.common.componentcore.ui.ComponentCoreUIPlugin;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.common.componentcore.ui.propertypage.IModuleDependenciesControl;
import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
@@ -139,7 +137,7 @@
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
ModuleAssemblyRootPage.createDescriptionComposite(composite,
- "TODO Change this: Create and change packaging structure for this project ");
+ Messages.ModuleAssemblyRootPageDescription);
createListGroup(composite);
refresh();
Dialog.applyDialogFont(parent);
@@ -160,7 +158,7 @@
availableModules = new Label(listGroup, SWT.NONE);
gData = new GridData(GridData.HORIZONTAL_ALIGN_FILL
| GridData.VERTICAL_ALIGN_FILL);
- availableModules.setText("Module Assembly"); //$NON-NLS-1$
+ availableModules.setText(Messages.ModuleAssembly);
availableModules.setLayoutData(gData);
createTableComposite(listGroup);
}
@@ -190,9 +188,9 @@
}
protected void createPushButtons() {
- addMappingButton = createPushButton("Add Folder...");
- addReferenceButton = createPushButton("Add Reference...");
- removeButton = createPushButton("Remove selected");
+ addMappingButton = createPushButton(Messages.AddFolderElipses);
+ addReferenceButton = createPushButton(Messages.AddReference);
+ removeButton = createPushButton(Messages.RemoveSelected);
}
protected Button createPushButton(String label) {
@@ -401,7 +399,7 @@
} else if( data instanceof ComponentResourceProxy) {
return ((ComponentResourceProxy)data).runtimePath.toString();
}
- return new Path("/");
+ return new Path("/"); //$NON-NLS-1$
}
public void modify(Object element, String property, Object value) {
@@ -435,7 +433,7 @@
IContainer c = afd.getSelected();
if( c != null ) {
IPath p = c.getProjectRelativePath();
- ComponentResourceProxy proxy = new ComponentResourceProxy(p, new Path("/"));
+ ComponentResourceProxy proxy = new ComponentResourceProxy(p, new Path("/")); //$NON-NLS-1$
resourceMappings.add(proxy);
refresh();
}
@@ -493,11 +491,11 @@
availableComponentsViewer.setSorter(null);
TableColumn bndColumn = new TableColumn(table, SWT.NONE, 0);
- bndColumn.setText(Messages.AddModuleDependenciesPropertiesPage_DeployPathColumn);
+ bndColumn.setText(Messages.DeployPathColumn);
bndColumn.setResizable(true);
TableColumn projectColumn = new TableColumn(table, SWT.NONE, 1);
- projectColumn.setText(Messages.AddModuleDependenciesPropertiesPage_SourceColumn);
+ projectColumn.setText(Messages.SourceColumn);
projectColumn.setResizable(true);
tableLayout.layout(table, true);
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ComponentDependencyContentProvider.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ComponentDependencyContentProvider.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ComponentDependencyContentProvider.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,14 +1,13 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
* 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:
- * IBM Corporation - initial API and implementation
- * Stefan Dimov, stefan.dimov(a)sap.com - bug 207826
- *******************************************************************************/
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/DependencyPageExtensionManager.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/DependencyPageExtensionManager.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/DependencyPageExtensionManager.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * 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:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
@@ -58,9 +68,9 @@
IConfigurationElement[] cf = registry.getConfigurationElementsFor(
ComponentCoreUIPlugin.PLUGIN_ID, "referenceWizardFragment"); //$NON-NLS-1$
for( int i = 0; i < cf.length; i++ ) {
- if( cf[i].getAttribute("id").equals(id))
+ if( cf[i].getAttribute("id").equals(id)) //$NON-NLS-1$
try {
- return (WizardFragment)cf[i].createExecutableExtension("class");
+ return (WizardFragment)cf[i].createExecutableExtension("class"); //$NON-NLS-1$
} catch( CoreException ce) {}
}
return null;
@@ -84,9 +94,9 @@
private Image image;
public ReferenceExtension(IConfigurationElement element) {
this.element = element;
- this.id = element.getAttribute("id");
- this.name = element.getAttribute("name");
- this.imageLoc = element.getAttribute("icon");
+ this.id = element.getAttribute("id"); //$NON-NLS-1$
+ this.name = element.getAttribute("name"); //$NON-NLS-1$
+ this.imageLoc = element.getAttribute("icon"); //$NON-NLS-1$
}
public String getId() { return this.id;}
public String getName() { return this.name; }
Deleted: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependenciesPropertyPage.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependenciesPropertyPage.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependenciesPropertyPage.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,52 +0,0 @@
-package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModelProvider;
-import org.eclipse.jst.j2ee.application.internal.operations.RemoveComponentFromEnterpriseApplicationDataModelProvider;
-import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
-import org.eclipse.jst.jee.project.facet.EarCreateDeploymentFilesDataModelProvider;
-import org.eclipse.jst.jee.project.facet.ICreateDeploymentFilesDataModelProperties;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider;
-
-public class EarModuleDependenciesPropertyPage extends
- AddModuleDependenciesPropertiesPage {
- public EarModuleDependenciesPropertyPage(IProject project,
- ModuleAssemblyRootPage page) {
- super(project, page);
- }
-
- protected IDataModelOperation generateEARDDOperation() {
- IDataModel model = DataModelFactory.createDataModel(new EarCreateDeploymentFilesDataModelProvider());
- model.setProperty(ICreateDeploymentFilesDataModelProperties.GENERATE_DD, rootComponent);
- model.setProperty(ICreateDeploymentFilesDataModelProperties.TARGET_PROJECT, project);
- return model.getDefaultOperation();
- }
-
- public boolean postHandleChanges(IProgressMonitor monitor) {
- return true;
- }
-
- protected void handleRemoved(ArrayList<IVirtualComponent> removed) {
- super.handleRemoved(removed);
- J2EEComponentClasspathUpdater.getInstance().queueUpdateEAR(rootComponent.getProject());
- }
-
- protected IDataModelProvider getRemoveReferenceDataModelProvider(Object component) {
- return new RemoveComponentFromEnterpriseApplicationDataModelProvider();
- }
-
-// protected void postAddProjects(Set moduleProjects) throws CoreException {
-// EarFacetRuntimeHandler.updateModuleProjectRuntime(rootComponent.getProject(), moduleProjects, new NullProgressMonitor());
-// }
-
- protected IDataModelProvider getAddReferenceDataModelProvider(IVirtualComponent component) {
- return new AddComponentToEnterpriseApplicationDataModelProvider();
- }
-}
Deleted: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependencyPageProvider.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependencyPageProvider.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/EarModuleDependencyPageProvider.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,29 +0,0 @@
-package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IDependencyPageProvider;
-import org.eclipse.wst.common.componentcore.ui.propertypage.IModuleDependenciesControl;
-
-public class EarModuleDependencyPageProvider implements IDependencyPageProvider {
-
- public boolean canHandle(IFacetedProject project) {
- boolean isEAR = project.hasProjectFacet(ProjectFacetsManager.getProjectFacet("jst.ear")); //$NON-NLS-1$
- return isEAR;
- }
-
- public IModuleDependenciesControl[] createPages(IFacetedProject project,
- ModuleAssemblyRootPage parent) {
- return new IModuleDependenciesControl[] {
- new EarModuleDependenciesPropertyPage(project.getProject(), parent)
- };
- }
-
- public Composite createRootControl(IModuleDependenciesControl[] pages,
- Composite parent) {
- if( pages.length == 1 && pages[0] != null)
- return pages[0].createContents(parent);
- return null;
- }
-}
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ExternalJarReferenceWizardFragment.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ExternalJarReferenceWizardFragment.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ExternalJarReferenceWizardFragment.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * 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:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
@@ -10,14 +20,14 @@
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
public class ExternalJarReferenceWizardFragment extends JarReferenceWizardFragment {
public Composite createComposite(Composite parent, IWizardHandle handle) {
Composite c = super.createComposite(parent, handle);
- handle.setTitle("Add an External Jar Reference");
- handle.setDescription("Here you can reference a filesystem Jar\n"
- + "This is not a suggested use-case, but is here for backwards compatability.");
+ handle.setTitle(Messages.ExternalJarTitle);
+ handle.setDescription(Messages.ExternalJarDescription);
return c;
}
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/JarReferenceWizardFragment.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/JarReferenceWizardFragment.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/JarReferenceWizardFragment.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * 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:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
@@ -24,6 +34,7 @@
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
@@ -41,10 +52,9 @@
public Composite createComposite(Composite parent, IWizardHandle handle) {
this.handle = handle;
- handle.setTitle("Add a Jar Reference");
- handle.setDescription("Here you can reference a workspace Jar\n"
- + "This is not a suggested use-case, but is here for backwards compatability.");
-
+ handle.setTitle(Messages.JarTitle);
+ handle.setDescription(Messages.JarDescription);
+
Composite c = new Composite(parent, SWT.NONE);
c.setLayout(new FormLayout());
viewer = new TreeViewer(c, SWT.SINGLE | SWT.BORDER);
@@ -53,7 +63,7 @@
viewer.setInput(ResourcesPlugin.getWorkspace());
browse = new Button(c, SWT.NONE);
- browse.setText("Browse...");
+ browse.setText(Messages.Browse);
FormData fd = new FormData();
fd.left = new FormAttachment(0, 5);
fd.bottom = new FormAttachment(100, -5);
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ModuleAssemblyRootPage.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ModuleAssemblyRootPage.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ModuleAssemblyRootPage.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,15 +1,13 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
* 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:
- * IBM Corporation - initial implementation as prop page heirarchy
- * rfrost(a)bea.com - conversion to single property page impl
- *******************************************************************************/
-
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import org.eclipse.core.resources.IProject;
@@ -24,13 +22,14 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.PropertyPage;
import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.common.componentcore.ui.propertypage.IDependencyPageProvider;
import org.eclipse.wst.common.componentcore.ui.propertypage.IModuleDependenciesControl;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
/**
- * Primary project property page for Module dependencies;
+ * Primary project property page for Module assembly;
*/
public class ModuleAssemblyRootPage extends PropertyPage {
@@ -42,12 +41,12 @@
}
private Composite getFacetErrorComposite(final Composite parent) {
- final String errorCheckingFacet = "Error Checking Project Facets";
+ final String errorCheckingFacet = Messages.ErrorCheckingFacets;
setErrorMessage(errorCheckingFacet);
return getErrorComposite(parent, errorCheckingFacet);
}
private Composite getVirtCompErrorComposite(final Composite parent) {
- final String errorCheckingFacet = "The given project is not a virtual component project";
+ final String errorCheckingFacet = Messages.ErrorNotVirtualComponent;
setErrorMessage(errorCheckingFacet);
return getErrorComposite(parent, errorCheckingFacet);
}
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceRootWizardFragment.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceRootWizardFragment.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceRootWizardFragment.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * 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:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
@@ -19,6 +29,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.common.componentcore.ui.propertypage.internal.DependencyPageExtensionManager.ReferenceExtension;
public class NewReferenceRootWizardFragment extends WizardFragment {
@@ -32,8 +43,8 @@
public Composite createComposite(Composite parent, IWizardHandle wizard) {
this.wizard = wizard;
- wizard.setTitle("Select a reference type");
- wizard.setDescription("Here you can select one of many types of references to add");
+ wizard.setTitle(Messages.NewReferenceTitle);
+ wizard.setDescription(Messages.NewReferenceDescription);
Composite c = new Composite(parent, SWT.NONE);
c.setLayout(new FillLayout());
viewer = new TreeViewer(c, SWT.SINGLE | SWT.BORDER);
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceWizard.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceWizard.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/NewReferenceWizard.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * 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:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.List;
@@ -4,18 +14,19 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbench;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.server.ui.internal.wizard.TaskWizard;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
public class NewReferenceWizard extends TaskWizard {
- public static final String COMPONENT = "dependency.component";
- public static final String COMPONENT_PATH = "dependency.component.path";
- public static final String PROJECT = "root.project";
- public static final String ROOT_COMPONENT = "root.component";
+ public static final String COMPONENT = "dependency.component"; //$NON-NLS-1$
+ public static final String COMPONENT_PATH = "dependency.component.path"; //$NON-NLS-1$
+ public static final String PROJECT = "root.project"; //$NON-NLS-1$
+ public static final String ROOT_COMPONENT = "root.component"; //$NON-NLS-1$
public NewReferenceWizard() {
- super("New Reference Wizard", new WizardFragment() {
+ super(Messages.NewReferenceWizard, new WizardFragment() {
protected void createChildFragments(List<WizardFragment> list) {
list.add(new NewReferenceRootWizardFragment());
}
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ProjectReferenceWizardFragment.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ProjectReferenceWizardFragment.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/ProjectReferenceWizardFragment.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * 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:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
@@ -28,6 +38,7 @@
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
@@ -44,9 +55,8 @@
}
public Composite createComposite(Composite parent, IWizardHandle handle) {
- handle.setTitle("Add a Project Reference");
- handle.setDescription("Here you can make a project into a reference.\n" +
- "If the project is not already a flexible project, it will be converted into one.");
+ handle.setTitle(Messages.ProjectReferenceTitle);
+ handle.setDescription(Messages.ProjectReferenceDescription);
Composite c = new Composite(parent, SWT.NONE);
c.setLayout(new FillLayout());
@@ -85,7 +95,7 @@
// TODO extension point? API? Something?!
//String extension = ComponentUtils.getDefaultProjectExtension(comp);
- path += ".jar"; //extension;
+ path += ".jar"; //extension; //$NON-NLS-1$
getTaskModel().putObject(NewReferenceWizard.COMPONENT, comp);
getTaskModel().putObject(NewReferenceWizard.COMPONENT_PATH, path);
Modified: workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/VariableReferenceWizardFragment.java
===================================================================
--- workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/VariableReferenceWizardFragment.java 2009-07-27 20:11:15 UTC (rev 16829)
+++ workspace/rstryker/wtpPropertyPageContrib/org.eclipse.wst.common.componentcore.ui/src/org/eclipse/wst/common/componentcore/ui/propertypage/internal/VariableReferenceWizardFragment.java 2009-07-27 21:11:27 UTC (rev 16830)
@@ -1,3 +1,13 @@
+/******************************************************************************
+ * Copyright (c) 2009 Red Hat
+ * 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:
+ * Rob Stryker - initial implementation and ongoing maintenance
+ ******************************************************************************/
package org.eclipse.wst.common.componentcore.ui.propertypage.internal;
import java.util.ArrayList;
@@ -12,14 +22,14 @@
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.ui.Messages;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
public class VariableReferenceWizardFragment extends JarReferenceWizardFragment {
public Composite createComposite(Composite parent, IWizardHandle handle) {
Composite c = super.createComposite(parent, handle);
- handle.setTitle("Add a Variable Reference");
- handle.setDescription("Here you can reference a variable which maps to a single jar.\n"
- + "This is not a suggested use-case, but is here for backwards compatability.");
+ handle.setTitle(Messages.VariableReferenceTitle);
+ handle.setDescription(Messages.VariableReferenceDescription);
return c;
}
14 years, 10 months