JBoss Tools SVN: r22124 - in trunk: jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-05-17 11:28:59 -0400 (Mon, 17 May 2010)
New Revision: 22124
Modified:
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java
trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/OpenDroolsPerspective.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java
Log:
Extends Guvnor Tests.
Modified: trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java
===================================================================
--- trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java 2010-05-17 15:18:28 UTC (rev 22123)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/GuvnorRepositoriesTest.java 2010-05-17 15:28:59 UTC (rev 22124)
@@ -11,21 +11,31 @@
package org.jboss.tools.drools.ui.bot.test.smoke;
+import static org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable.syncExec;
+
import java.awt.event.KeyEvent;
+import java.util.List;
import org.apache.log4j.Logger;
+import org.eclipse.swt.custom.StyledText;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory;
+import org.eclipse.swtbot.swt.finder.results.StringResult;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.hamcrest.Matcher;
import org.jboss.tools.drools.ui.bot.test.DroolsAllBotTests;
import org.jboss.tools.ui.bot.ext.config.requirement.PrepareViews;
import org.jboss.tools.ui.bot.ext.config.requirement.RequirementNotFulfilledException;
import org.jboss.tools.ui.bot.ext.config.requirement.StartServer;
import org.jboss.tools.ui.bot.ext.config.requirement.StopServer;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.GuvnorGuvnorResourceHistory;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.ext.helper.DragAndDropHelper;
import org.jboss.tools.ui.bot.ext.helper.KeyboardHelper;
@@ -50,6 +60,7 @@
private static final Logger log = Logger.getLogger(GuvnorRepositoriesTest.class);
private static final String GUVNOR_TEST_FILE = "Dummy rule.drl";
private static final String GUVNOR_REPOSITORY_IMPORT_TEST_FILE = "Underage.brl";
+ private static final String GUVNOR_REPOSITORY_HISTORY_TEST_FILE = "MortgageModel.model.drl";
private GuvnorRepositories guvnorRepositories = new GuvnorRepositories();
/**
* Tests Guvnor Repositories
@@ -61,10 +72,12 @@
deleteGuvnorRepository();
addGuvnorRepository();
openGuvnorConsole();
+ drillIntoFunctionalityCheck();
browseGuvnorRepository(GuvnorRepositoriesTest.GUVNOR_TEST_FILE);
- importFileFromGuvnorRepository(GuvnorRepositoriesTest.GUVNOR_TEST_FILE,
+ guvnorFunctionalityCheck(GuvnorRepositoriesTest.GUVNOR_TEST_FILE,
DroolsAllBotTests.SAMPLE_DROOLS_RULE_NAME,
GuvnorRepositoriesTest.GUVNOR_REPOSITORY_IMPORT_TEST_FILE);
+ repositoryHistoryCheck(GuvnorRepositoriesTest.GUVNOR_REPOSITORY_HISTORY_TEST_FILE);
stopGuvnor();
}
@@ -163,12 +176,12 @@
}
}
/**
- * Imports file with fileName to Drools project
+ * Imports file with fileName to Drools project and check update and commit Guvnor functionality
* @param fileName
* @param sampleFileName
* @param importFileName
*/
- private void importFileFromGuvnorRepository(String fileName, String sampleFileName, String importFileName){
+ private void guvnorFunctionalityCheck(String fileName, String sampleFileName, String importFileName){
eclipse.openPerspective(PerspectiveType.JAVA);
guvnorRepositories.show().bot();
SWTBotTreeItem tiGuvnorFile = guvnorRepositories.selectTreeItem(Timing.time3S(),fileName,
@@ -328,4 +341,168 @@
assertTrue("File " + importFileName + " was not disconnected from Guvnor Repository.",
tiImportRuleFile.getText().trim().equals(importFileName));
}
+ private void drillIntoFunctionalityCheck(){
+ SWTBotView guvnorReposioryView = guvnorRepositories.show();
+ guvnorRepositories.selectTreeItem(Timing.time2S(), IDELabel.GuvnorRepositories.PACKAGES_TREE_ITEM,
+ new String[]{IDELabel.GuvnorRepositories.GUVNOR_REPOSITORY_ROOT_TREE_ITEM});
+ SWTUtilExt.getViewToolbarButtonWithTooltip(guvnorReposioryView,
+ IDELabel.GuvnorRepositories.GO_INTO_GUVNOR_REPOSITORY_TOOLTIP)
+ .click();
+ SWTBot guvnorRepositoryBot = guvnorReposioryView.bot();
+ SWTBotTree guvnorRepositoryTree = guvnorRepositoryBot.tree();
+ guvnorRepositoryBot.sleep(Timing.time3S());
+ assertTrue("Guvnor repository Go Into functionality doesn't work properly.\n" +
+ "Expected First Tree Item in Guvnor Repository is " + IDELabel.GuvnorRepositories.DEFAULT_PACKAGE_TREE_ITEM +
+ "\nBut it was " + guvnorRepositoryTree.getAllItems()[0].getText(),
+ IDELabel.GuvnorRepositories.DEFAULT_PACKAGE_TREE_ITEM.equals(guvnorRepositoryTree.getAllItems()[0].getText()));
+
+ guvnorRepositories.selectTreeItem(Timing.time2S(), IDELabel.GuvnorRepositories.MORTGAGE_TREE_ITEM,
+ null);
+ SWTUtilExt.getViewToolbarButtonWithTooltip(guvnorReposioryView,
+ IDELabel.GuvnorRepositories.GO_INTO_GUVNOR_REPOSITORY_TOOLTIP)
+ .click();
+ guvnorRepositoryBot.sleep(Timing.time3S());
+ assertTrue("Guvnor repository Go Into functionality doesn't work properly.\n" +
+ "Expected First Tree Item in Guvnor Repository is " + IDELabel.GuvnorRepositories.APPLICANTDSL_DSL_TREE_ITEM +
+ "\nBut it was " + guvnorRepositoryTree.getAllItems()[0].getText(),
+ IDELabel.GuvnorRepositories.APPLICANTDSL_DSL_TREE_ITEM.equals(guvnorRepositoryTree.getAllItems()[0].getText()));
+
+ SWTUtilExt.getViewToolbarButtonWithTooltip(guvnorReposioryView,
+ IDELabel.GuvnorRepositories.BACK_GUVNOR_REPOSITORY_TOOLTIP)
+ .click();
+ guvnorRepositoryBot.sleep(Timing.time3S());
+ assertTrue("Guvnor repository Back functionality doesn't work properly.\n" +
+ "Expected First Tree Item in Guvnor Repository is " + IDELabel.GuvnorRepositories.DEFAULT_PACKAGE_TREE_ITEM +
+ "\nBut it was " + guvnorRepositoryTree.getAllItems()[0].getText(),
+ IDELabel.GuvnorRepositories.DEFAULT_PACKAGE_TREE_ITEM.equals(guvnorRepositoryTree.getAllItems()[0].getText()));
+
+ SWTUtilExt.getViewToolbarButtonWithTooltip(guvnorReposioryView,
+ IDELabel.GuvnorRepositories.HOME_GUVNOR_REPOSITORY_TOOLTIP)
+ .click();
+ guvnorRepositoryBot.sleep(Timing.time3S());
+ assertTrue("Guvnor repository Home functionality doesn't work properly.\n" +
+ "Expected First Tree Item in Guvnor Repository is " + IDELabel.GuvnorRepositories.GUVNOR_REPOSITORY_ROOT_TREE_ITEM +
+ "\nBut it was " + guvnorRepositoryTree.getAllItems()[0].getText(),
+ IDELabel.GuvnorRepositories.GUVNOR_REPOSITORY_ROOT_TREE_ITEM.equals(guvnorRepositoryTree.getAllItems()[0].getText()));
+ }
+ /**
+ * Check Repository History Functionality
+ * @param testFileName
+ */
+ private void repositoryHistoryCheck (String testFileName){
+ // Import File From Repository
+ eclipse.createNew(EntityType.RESOURCES_FROM_GUVNOR);
+ bot.button(IDELabel.Button.NEXT).click();
+ SWTEclipseExt.getTreeItemOnPath(
+ bot,
+ bot.tree(),
+ Timing.time3S(),
+ testFileName,
+ new String[] {
+ IDELabel.GuvnorRepositories.GUVNOR_REPOSITORY_ROOT_TREE_ITEM,
+ IDELabel.GuvnorRepositories.PACKAGES_TREE_ITEM,
+ IDELabel.GuvnorRepositories.MORTGAGE_TREE_ITEM }).select();
+ bot.button(IDELabel.Button.NEXT).click();
+ SWTEclipseExt.getTreeItemOnPath(bot,
+ bot.tree(),
+ Timing.time1S(),
+ "rules",
+ new String[] {DroolsAllBotTests.DROOLS_PROJECT_NAME,"src","main"}).select();
+ bot.button(IDELabel.Button.FINISH).click();
+ util.waitForJobs(Timing.time5S(),JobName.BUILDING_WS);
+ bot.sleep(Timing.time1S());
+ SWTBot packageExplorerBot = packageExplorer.show().bot();
+ SWTBotTree packageExplorerTree = packageExplorerBot.tree();
+ // File is renamed because there is appended Guvnor info to Tree Item Label
+ // So we need to get real label of Tree Item and use it later
+ SWTBotTreeItem tiTestRuleFile = SWTEclipseExt.getTreeItemOnPathStartsWith(packageExplorerBot,
+ packageExplorerTree,
+ Timing.time1S(),
+ testFileName,
+ new String[]{DroolsAllBotTests.DROOLS_PROJECT_NAME,
+ DroolsAllBotTests.SRC_MAIN_RULES_TREE_NODE});
+ SWTBotEditor editor = packageExplorer.openFile(DroolsAllBotTests.DROOLS_PROJECT_NAME,
+ DroolsAllBotTests.SRC_MAIN_RULES_TREE_NODE,
+ tiTestRuleFile.getText());
+ // change test file
+ String addedChange = "SWTBOT Change!@#$asdfghjkl)(*&^";
+ editor.toTextEditor().insertText(0,0,addedChange);
+ editor.save();
+ bot.sleep(Timing.time1S());
+ // commit changes
+ ContextMenuHelper.prepareTreeItemForContextMenu(packageExplorerTree, tiTestRuleFile);
+ ContextMenuHelper.clickContextMenu(packageExplorerTree,
+ IDELabel.Menu.GUVNOR,IDELabel.Menu.GUVNOR_COMMIT);
+ bot.sleep(Timing.time5S());
+ // check history
+ ContextMenuHelper.prepareTreeItemForContextMenu(packageExplorerTree, tiTestRuleFile);
+ ContextMenuHelper.clickContextMenu(packageExplorerTree,
+ IDELabel.Menu.GUVNOR,IDELabel.Menu.GUVNOR_SHOW_HISTORY);
+ bot.sleep(Timing.time5S());
+ SWTBotView guvnorResourceHistoryView = open.viewOpen(GuvnorGuvnorResourceHistory.LABEL);
+ SWTBot guvnorResourceHistoryBot = guvnorResourceHistoryView.bot();
+ SWTBotTable guvnorResourceHistoryTable = guvnorResourceHistoryView.bot().table();
+ assertTrue("Guvnor Resource History table for file " + testFileName +
+ " has to contain at least one record but is empty.",
+ guvnorResourceHistoryTable.rowCount() > 0);
+ // Compare Revisions
+ String secondAddedChange = "222222" + addedChange;
+ editor.toTextEditor().insertText(0,0,secondAddedChange);
+ editor.saveAndClose();
+ bot.sleep(Timing.time1S());
+ ContextMenuHelper.prepareTreeItemForContextMenu(packageExplorerTree, tiTestRuleFile);
+ ContextMenuHelper.clickContextMenu(packageExplorerTree,
+ IDELabel.Menu.GUVNOR,IDELabel.Menu.GUVNOR_COMPARE_WITH_VERSION);
+ eclipse.waitForShell("");
+ guvnorResourceHistoryBot.activeShell().bot().button(IDELabel.Button.OK).click();
+ SWTBotEditor compareEditor = bot.editorByTitle("Compare");
+ Matcher<StyledText> widgetOfTypeMatcher = WidgetMatcherFactory.widgetOfType(StyledText.class);
+ final List<?> styledTexts = compareEditor.bot().widgets(widgetOfTypeMatcher,compareEditor.getWidget());
+ String newVersionEditorText = syncExec(new StringResult() {
+ public String run() {
+ return ((StyledText)styledTexts.get(0)).getText();
+ }
+ });
+ String revisionEditorText = syncExec(new StringResult() {
+ public String run() {
+ return ((StyledText)styledTexts.get(1)).getText();
+ }
+ });
+ compareEditor.close();
+ assertTrue("Actual version of file opened within compare editor has wrong content.\n" +
+ "Content should start with " + secondAddedChange +
+ "\n but is " + newVersionEditorText,newVersionEditorText.startsWith(secondAddedChange));
+ assertTrue("File stored in Guvnor Repository opened within compare editor has wrong content.\n" +
+ "Content should start with " + addedChange +
+ "\n but is " + revisionEditorText,revisionEditorText.startsWith(addedChange));
+ // Open Revision
+ guvnorResourceHistoryView.show();
+ guvnorResourceHistoryTable.setFocus();
+ bot.sleep(Timing.time1S());
+ guvnorResourceHistoryTable.select(0);
+ bot.sleep(Timing.time1S());
+ KeyboardHelper.pressKeyCodeUsingAWT(KeyEvent.VK_ENTER);
+ KeyboardHelper.releaseKeyCodeUsingAWT(KeyEvent.VK_ENTER);
+ bot.sleep(Timing.time1S());
+ SWTBotEditor revisonFileEditor = eclipse.editorStartsWith(testFileName);
+ String revisionFileText = revisonFileEditor.toTextEditor().getText();
+ revisonFileEditor.close();
+ assertTrue("File stored in Guvnor Repository has wrong content.\n" +
+ "Content should start with " + addedChange +
+ "\n but is " + revisionFileText,revisionFileText.startsWith(addedChange));
+ // Switch to version
+ editor = packageExplorer.openFile(DroolsAllBotTests.DROOLS_PROJECT_NAME,
+ DroolsAllBotTests.SRC_MAIN_RULES_TREE_NODE,
+ tiTestRuleFile.getText());
+ ContextMenuHelper.prepareTreeItemForContextMenu(packageExplorerTree, tiTestRuleFile);
+ ContextMenuHelper.clickContextMenu(packageExplorerTree,
+ IDELabel.Menu.GUVNOR,IDELabel.Menu.GUVNOR_SWITCH_TO_VERSION);
+ eclipse.waitForShell("");
+ guvnorResourceHistoryBot.activeShell().bot().button(IDELabel.Button.OK).click();
+ bot.sleep(Timing.time3S());
+ String editorText = editor.toTextEditor().getText();
+ assertTrue("Switched version of file has wrong content.\n" +
+ "Content should start with " + addedChange +
+ "\n but is " + editorText,editorText.startsWith(addedChange));
+ }
}
\ No newline at end of file
Modified: trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/OpenDroolsPerspective.java
===================================================================
--- trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/OpenDroolsPerspective.java 2010-05-17 15:18:28 UTC (rev 22123)
+++ trunk/drools/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/OpenDroolsPerspective.java 2010-05-17 15:28:59 UTC (rev 22124)
@@ -26,7 +26,7 @@
* Test Opening Drools Rules
*/
@Test
- public void testManageDroolsProject() {
+ public void testOpenDroolsPerspective() {
openDroolsPerspective();
}
/**
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-05-17 15:18:28 UTC (rev 22123)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-05-17 15:28:59 UTC (rev 22124)
@@ -1124,7 +1124,28 @@
public void run() {
shell.setMaximized(true);
- }
- });
+ }
+ });
}
+ /**
+ * Returns SWTBotEditor with title starting with prefix
+ * @param prefix
+ * @return
+ */
+ public SWTBotEditor editorStartsWith (String prefix){
+ SWTBotEditor editor = null;
+ List<?> editors = bot.editors();
+ Iterator<?> iterator = editors.iterator();
+ boolean found = false;
+ while (iterator.hasNext() && !found){
+ editor = ((SWTBotEditor)iterator.next());
+ found = editor.getTitle().startsWith(prefix);
+ }
+ if (found){
+ return editor;
+ }
+ else{
+ return null;
+ }
+ }
}
\ No newline at end of file
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-05-17 15:18:28 UTC (rev 22123)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-05-17 15:28:59 UTC (rev 22124)
@@ -72,6 +72,9 @@
public static final String GUVNOR_ADD = "Add...";
public static final String GUVNOR_DELETE = "Delete...";
public static final String GUVNOR_DISCONNECT = "Disconnect";
+ public static final String GUVNOR_SHOW_HISTORY = "Show History";
+ public static final String GUVNOR_COMPARE_WITH_VERSION = "Compare with Version...";
+ public static final String GUVNOR_SWITCH_TO_VERSION = "Switch to Version...";
public static final String NAVIGATION = "Navigation";
public static final String MAXIMIZE_ACTIVE_VIEW_OR_EDITOR = "Maximize Active View or Editor";
}
@@ -188,6 +191,7 @@
public static final String PROBLEMS = "Problems";
public static final String DEBUG = "Debug";
public static final String GUVNOR_REPOSITORIES = "Guvnor Repositories";
+ public static final String GUVNOR_RESOURCE_HISTORY = "Guvnor Resource History";
public static final String PROPERTIES = "Properties";
}
@@ -460,6 +464,11 @@
public static final String GUVNOR_REPOSITORY_ROOT_TREE_ITEM = "http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav";
public static final String PACKAGES_TREE_ITEM = "packages/";
public static final String MORTGAGE_TREE_ITEM = "mortgages/";
+ public static final String GO_INTO_GUVNOR_REPOSITORY_TOOLTIP = "Go Into";
+ public static final String BACK_GUVNOR_REPOSITORY_TOOLTIP = "Back";
+ public static final String HOME_GUVNOR_REPOSITORY_TOOLTIP = "Home";
+ public static final String DEFAULT_PACKAGE_TREE_ITEM = "defaultPackage/";
+ public static final String APPLICANTDSL_DSL_TREE_ITEM = "ApplicantDsl.dsl";
}
public static final class GuvnorConsole {
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java 2010-05-17 15:18:28 UTC (rev 22123)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java 2010-05-17 15:28:59 UTC (rev 22124)
@@ -19,7 +19,8 @@
*/
public enum ViewType {
PACKAGE_EXPLORER, PROJECT_EXPLORER, WELCOME, DATA_SOURCE_EXPLORER,
- SERVERS,WEB_PROJECTS,PROBLEMS,DEBUG,GUVNOR_REPOSITORIES,PROPERTIES;
+ SERVERS,WEB_PROJECTS,PROBLEMS,DEBUG,GUVNOR_REPOSITORIES,PROPERTIES,
+ GUVNOR_RESOURCE_HISTORY;
public String getGroupLabel() {
@@ -34,6 +35,7 @@
case DEBUG: viewLabel = IDELabel.ViewGroup.DEBUG; break;
case GUVNOR_REPOSITORIES: viewLabel = IDELabel.ViewGroup.GUVNOR; break;
case PROPERTIES: viewLabel = IDELabel.ViewGroup.GENERAL; break;
+ case GUVNOR_RESOURCE_HISTORY: viewLabel = IDELabel.ViewGroup.GUVNOR; break;
default: fail("Unknown View Type");
}
return viewLabel;
@@ -51,6 +53,7 @@
case DEBUG: viewLabel = IDELabel.View.DEBUG; break;
case GUVNOR_REPOSITORIES: viewLabel = IDELabel.View.GUVNOR_REPOSITORIES; break;
case PROPERTIES: viewLabel = IDELabel.View.PROPERTIES; break;
+ case GUVNOR_RESOURCE_HISTORY: viewLabel = IDELabel.View.GUVNOR_RESOURCE_HISTORY; break;
default: fail("Unknown View Type");
}
return viewLabel;
15 years, 11 months
JBoss Tools SVN: r22123 - trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-05-17 11:18:28 -0400 (Mon, 17 May 2010)
New Revision: 22123
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
Log:
https://jira.jboss.org/browse/JBIDE-5997 - more simple fix
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-05-17 15:06:12 UTC (rev 22122)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2010-05-17 15:18:28 UTC (rev 22123)
@@ -185,13 +185,6 @@
throw new HibernateConsoleRuntimeException(out);
}
- method = clazz.getMethod("getProperties", new Class[] {}); //$NON-NLS-1$
- Properties props = (Properties)method.invoke(ejb3cfg, new Object[] {} );
- if (props.getProperty("hibernate.search.autoregister_listeners") == null) { //$NON-NLS-1$
- method = clazz.getMethod("setProperty", new Class[] { String.class, String.class }); //$NON-NLS-1$
- method.invoke(ejb3cfg, new Object[] { "hibernate.search.autoregister_listeners", "false" } ); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
method = clazz.getMethod("getHibernateConfiguration", new Class[0]);//$NON-NLS-1$
Configuration invoke = (Configuration) method.invoke(ejb3cfg, (Object[])null);
invoke = configureConnectionProfile(invoke);
@@ -332,11 +325,6 @@
Properties properties = prefs.getProperties();
if(properties!=null) {
- // to fix: JBIDE-5839 - setup this property: false is default value
- // to make hibernate tools diff hibernate versions compatible
- if (properties.getProperty("hibernate.search.autoregister_listeners") == null) { //$NON-NLS-1$
- properties.setProperty("hibernate.search.autoregister_listeners", "false"); //$NON-NLS-1$ //$NON-NLS-2$
- }
// in case the transaction manager is empty then we need to inject a faketm since hibernate will still try and instantiate it.
String str = properties.getProperty( "hibernate.transaction.manager_lookup_class" ); //$NON-NLS-1$
if(str != null && StringHelper.isEmpty( str )) {
@@ -372,6 +360,12 @@
// TODO: HBX-
localCfg.setProperty( "hibernate.temp.use_jdbc_metadata_defaults", "false" ); //$NON-NLS-1$//$NON-NLS-2$
localCfg.setProperty( Environment.HBM2DDL_AUTO, "false" ); //$NON-NLS-1$
+ // to fix: JBIDE-5839 & JBIDE-5997 - setup this property: false is default value
+ // to make hibernate tools diff hibernate versions compatible:
+ // if the property not set get NoSuchMethodError with FullTextIndexEventListener
+ if (localCfg.getProperty("hibernate.search.autoregister_listeners") == null) { //$NON-NLS-1$
+ localCfg.setProperty("hibernate.search.autoregister_listeners", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
return localCfg;
}
@@ -753,10 +747,6 @@
private Configuration configureStandardConfiguration(final boolean includeMappings, Configuration localCfg, Properties properties) {
if(properties!=null) {
localCfg = localCfg.setProperties(properties);
- } else {
- if (localCfg.getProperty("hibernate.search.autoregister_listeners") == null) { //$NON-NLS-1$
- localCfg.setProperty("hibernate.search.autoregister_listeners", "false"); //$NON-NLS-1$ //$NON-NLS-2$
- }
}
EntityResolver entityResolver = XMLHelper.DEFAULT_DTD_RESOLVER;
if(StringHelper.isNotEmpty(prefs.getEntityResolverName())) {
15 years, 11 months
JBoss Tools SVN: r22122 - branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/resources/help.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-05-17 11:06:12 -0400 (Mon, 17 May 2010)
New Revision: 22122
Modified:
branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/resources/help/keys-jsf-menu.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-6269
Modified: branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/resources/help/keys-jsf-menu.properties
===================================================================
--- branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/resources/help/keys-jsf-menu.properties 2010-05-17 14:58:10 UTC (rev 22121)
+++ branches/jbosstools-3.1.x/jsf/plugins/org.jboss.tools.jsf/resources/help/keys-jsf-menu.properties 2010-05-17 15:06:12 UTC (rev 22122)
@@ -1,5 +1,6 @@
JSF.SetApplication.menu=Edit Application Settings...
JSF.SetFactory.menu=Edit Factory Settings...
+JSFProcess.AddRule.menu=New View...
JSF.AddRule.menu=Rule...
JSF.AddComponent.menu=Component...
JSF.AddConverter.menu=Converter
15 years, 11 months
JBoss Tools SVN: r22121 - branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/dtd.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-05-17 10:58:10 -0400 (Mon, 17 May 2010)
New Revision: 22121
Modified:
branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ds_5_0.xsd
branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-web_5_1.xsd
branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss_5_1.xsd
Log:
https://jira.jboss.org/browse/JBIDE-5694
Modified: branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ds_5_0.xsd
===================================================================
--- branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ds_5_0.xsd 2010-05-17 14:45:18 UTC (rev 22120)
+++ branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ds_5_0.xsd 2010-05-17 14:58:10 UTC (rev 22121)
@@ -11,7 +11,7 @@
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="5.0">
- <xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="javaee_5.xsd"/>
+ <xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="http://java.sun.com/xml/ns/javaee/javaee_5.xsd"/>
<xsd:include schemaLocation="jboss-common_5_1.xsd"/>
<xsd:group name="connectionPoolGroup">
Modified: branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-web_5_1.xsd
===================================================================
--- branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-web_5_1.xsd 2010-05-17 14:45:18 UTC (rev 22120)
+++ branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-web_5_1.xsd 2010-05-17 14:58:10 UTC (rev 22121)
@@ -64,7 +64,7 @@
consistency with the Servlet API. </xsd:documentation>
</xsd:annotation>
- <xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="javaee_5.xsd"/>
+ <xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="http://java.sun.com/xml/ns/javaee/javaee_5.xsd"/>
<xsd:include schemaLocation="jboss-common_5_1.xsd"/>
<xsd:element name="jboss-web" type="jboss:jboss-webType">
Modified: branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss_5_1.xsd
===================================================================
--- branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss_5_1.xsd 2010-05-17 14:45:18 UTC (rev 22120)
+++ branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss_5_1.xsd 2010-05-17 14:58:10 UTC (rev 22121)
@@ -65,7 +65,7 @@
</xsd:annotation>
<xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"/>
- <xsd:include schemaLocation="http://www.jboss.org/j2ee/schema/jboss-common_5_1.xsd "/>
+ <xsd:include schemaLocation="jboss-common_5_1.xsd "/>
<!-- **************************************************** -->
15 years, 11 months
JBoss Tools SVN: r22120 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-05-17 10:45:18 -0400 (Mon, 17 May 2010)
New Revision: 22120
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ds_5_0.xsd
trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-web_5_1.xsd
trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss_5_1.xsd
Log:
https://jira.jboss.org/browse/JBIDE-5694
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ds_5_0.xsd
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ds_5_0.xsd 2010-05-17 13:51:21 UTC (rev 22119)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-ds_5_0.xsd 2010-05-17 14:45:18 UTC (rev 22120)
@@ -11,7 +11,7 @@
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="5.0">
- <xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="javaee_5.xsd"/>
+ <xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="http://java.sun.com/xml/ns/javaee/javaee_5.xsd"/>
<xsd:include schemaLocation="jboss-common_5_1.xsd"/>
<xsd:group name="connectionPoolGroup">
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-web_5_1.xsd
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-web_5_1.xsd 2010-05-17 13:51:21 UTC (rev 22119)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss-web_5_1.xsd 2010-05-17 14:45:18 UTC (rev 22120)
@@ -64,7 +64,7 @@
consistency with the Servlet API. </xsd:documentation>
</xsd:annotation>
- <xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="javaee_5.xsd"/>
+ <xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="http://java.sun.com/xml/ns/javaee/javaee_5.xsd"/>
<xsd:include schemaLocation="jboss-common_5_1.xsd"/>
<xsd:element name="jboss-web" type="jboss:jboss-webType">
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss_5_1.xsd
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss_5_1.xsd 2010-05-17 13:51:21 UTC (rev 22119)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/dtd/jboss_5_1.xsd 2010-05-17 14:45:18 UTC (rev 22120)
@@ -65,7 +65,7 @@
</xsd:annotation>
<xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"/>
- <xsd:include schemaLocation="http://www.jboss.org/j2ee/schema/jboss-common_5_1.xsd "/>
+ <xsd:include schemaLocation="jboss-common_5_1.xsd "/>
<!-- **************************************************** -->
15 years, 11 months
JBoss Tools SVN: r22119 - in trunk/vpe: plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2010-05-17 09:51:21 -0400 (Mon, 17 May 2010)
New Revision: 22119
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/VpeImportExportWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/VpeImportExportWizardsUtils.java
Removed:
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/wizard/
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java
Log:
Removing duplicate code from import/export wizards. JUnits were corrected.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizardPage.java 2010-05-17 13:10:52 UTC (rev 22118)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ExportUnknownTagsTemplatesWizardPage.java 2010-05-17 13:51:21 UTC (rev 22119)
@@ -15,19 +15,11 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.CheckboxCellEditor;
import org.eclipse.jface.viewers.ColumnLayoutData;
import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTException;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
@@ -40,9 +32,7 @@
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.WizardExportResourcesPage;
import org.jboss.tools.vpe.editor.template.VpeAnyData;
@@ -56,17 +46,9 @@
*
* @author dmaliarevich
*/
-public class ExportUnknownTagsTemplatesWizardPage extends WizardExportResourcesPage {
+public class ExportUnknownTagsTemplatesWizardPage extends
+ WizardExportResourcesPage implements VpeImportExportWizardPage {
- private static final String[] COLUMNS_NAMES = new String[] {
- VpeUIMessages.TemplatesTableProvider_TagName,
- VpeUIMessages.TemplatesTableProvider_TagForDisplay,
- VpeUIMessages.TemplatesTableProvider_URI,
- VpeUIMessages.TemplatesTableProvider_Children};
- private static final int[] COLUMNS_WIDTHS = new int[] {
- 50, 50, 90, 40
- };
-
private String pathString;
private Table tagsTable;
private List<VpeAnyData> tagsList;
@@ -123,7 +105,7 @@
/*
* Fill the table with stored tags
*/
- updateTagsTable(true);
+ VpeImportExportWizardsUtils.updateTagsTable(tagsTable, tagsList, true);
/*
* Add path output and browse button
@@ -173,113 +155,6 @@
*/
}
- /**
- * Updates visual table with tags templates.
- *
- * @param clearTagsTable clears current tags table
- */
- private void updateTagsTable(boolean clearTagsTable) {
- /*
- * Return when visual table hasn't been initialized.
- */
- if(tagsTable == null || tagsTable.isDisposed()) {
- return;
- }
- /*
- * Clear current visual table.
- */
- if (clearTagsTable) {
- tagsTable.clearAll();
- }
- /*
- * Return when tags templates list hasn't been initialized.
- */
- if (tagsList == null) {
- return;
- }
- /*
- * Remember current selection index
- * and restore it at the end.
- */
- int selectionIndex = tagsTable.getSelectionIndex();
- TableItem tableItem = null;
- for (int i = 0; i < tagsList.size(); i++) {
- if(tagsTable.getItemCount() > i) {
- /*
- * Use existed items
- */
- tableItem = tagsTable.getItem(i);
- } else {
- /*
- * Add necessary item
- */
- tableItem = new TableItem(tagsTable, SWT.BORDER, i);
- }
- /*
- * Fill in columns.
- */
- String[] itemColumnsData = new String[tagsTable.getColumnCount()];
- for (int j = 0; j < itemColumnsData.length; j++) {
- /*
- * Getting values from tagList
- */
- itemColumnsData[j] = toVisualValue(getValueAt(i, j));
- }
- /*
- * Set cells text
- */
- tableItem.setText(itemColumnsData);
-
- }
-
- /*
- * Restoring selection index
- */
- if (selectionIndex > 0 ) {
- try {
- tagsTable.setSelection(selectionIndex);
- } catch (SWTException e) {
- /*
- * Do nothing
- */
- }
- }
- }
-
- public String getValueAt(int row, int column) {
- String result = "List is empty"; //$NON-NLS-1$
- if ((null != tagsList) && ((row >= 0) && (tagsList.size() > 0) && (row < tagsList.size()))) {
- VpeAnyData tagItem = (VpeAnyData)tagsList.get(row);
- switch(column){
- case 0:
- result = tagItem.getName();
- break;
- case 1:
- result = tagItem.getTagForDisplay();
- break;
- case 2:
- result = tagItem.getUri();
- break;
- case 3:
- if(tagItem.isChildren()) {
- result = VpeUIMessages.TemplatesTableProvider_Yes;
- } else {
- result = VpeUIMessages.TemplatesTableProvider_No;
- }
- break;
- }
- }
- return result;
- }
-
- private String toVisualValue(String v) {
- if(v == null) return ""; //$NON-NLS-1$
- if(v.indexOf('\n') >= 0) v = v.replace('\n', ' ');
- if(v.indexOf('\t') >= 0) v = v.replace('\t', ' ');
- if(v.indexOf('\r') >= 0) v = v.replace('\r', ' ');
- return v;
- }
-
public void handleEvent(Event event) {
/*
* Do nothing
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java 2010-05-17 13:10:52 UTC (rev 22118)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/ImportUnknownTagsTemplatesWizardPage.java 2010-05-17 13:51:21 UTC (rev 22119)
@@ -22,7 +22,6 @@
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTException;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
@@ -31,13 +30,10 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.WizardResourceImportPage;
import org.jboss.tools.vpe.VpePlugin;
@@ -47,29 +43,18 @@
import org.jboss.tools.vpe.messages.VpeUIMessages;
import org.jboss.tools.vpe.resref.core.ReferenceWizardPage;
-
/**
* Page for importing unknown tags templates.
*
* @author dmaliarevich
*/
public class ImportUnknownTagsTemplatesWizardPage extends
- WizardResourceImportPage {
-
- private static final String[] COLUMNS_NAMES = new String[] {
- VpeUIMessages.TemplatesTableProvider_TagName,
- VpeUIMessages.TemplatesTableProvider_TagForDisplay,
- VpeUIMessages.TemplatesTableProvider_URI,
- VpeUIMessages.TemplatesTableProvider_Children};
- private static final int[] COLUMNS_WIDTHS = new int[] {
- 50, 50, 90, 40
- };
+ WizardResourceImportPage implements VpeImportExportWizardPage {
private String pathString;
private Table tagsTable;
private List<VpeAnyData> tagsList;
-
/**
* Constructor
*
@@ -127,7 +112,7 @@
/*
* Update table tags list based on the loaded file.
*/
- updateTagsTable(true);
+ VpeImportExportWizardsUtils.updateTagsTable(tagsTable, tagsList, true);
/*
* Check if the page is complete.
*/
@@ -182,111 +167,7 @@
setControl(composite);
}
-
- /**
- * Updates visual table with tags templates.
- *
- * @param clearTagsTable clears current tags table
- */
- private void updateTagsTable(boolean clearTagsTable) {
- /*
- * Return when visual table hasn't been initialized.
- */
- if(tagsTable == null || tagsTable.isDisposed()) {
- return;
- }
- /*
- * Clear current visual table.
- */
- if (clearTagsTable) {
- tagsTable.clearAll();
- }
- /*
- * Return when tags templates list hasn't been initialized.
- */
- if (tagsList == null) {
- return;
- }
- /*
- * Remember current selection index
- * and restore it at the end.
- */
- int selectionIndex = tagsTable.getSelectionIndex();
- TableItem tableItem = null;
- for (int i = 0; i < tagsList.size(); i++) {
- if(tagsTable.getItemCount() > i) {
- /*
- * Use existed items
- */
- tableItem = tagsTable.getItem(i);
- } else {
- /*
- * Add new item
- */
- tableItem = new TableItem(tagsTable, SWT.BORDER, i);
- }
- /*
- * Fill in columns.
- */
- String[] itemColumnsData = new String[tagsTable.getColumnCount()];
- for (int j = 0; j < itemColumnsData.length; j++) {
- /*
- * Getting values from tagList
- */
- itemColumnsData[j] = toVisualValue(getValueAt(i, j));
- }
- /*
- * Set cells text
- */
- tableItem.setText(itemColumnsData);
- }
- /*
- * Restoring selection index
- */
- if (selectionIndex > 0 ) {
- try {
- tagsTable.setSelection(selectionIndex);
- } catch (SWTException e) {
- VpePlugin.getDefault().logError(
- VpeUIMessages.COULD_NOT_SET_TABLE_SELECTION, e);
- }
- }
- }
- public String getValueAt(int row, int column) {
- String result = "List is empty"; //$NON-NLS-1$
- if ((null != tagsList) && ((row >= 0) && (tagsList.size() > 0) && (row < tagsList.size()))) {
- VpeAnyData tagItem = (VpeAnyData)tagsList.get(row);
- switch(column){
- case 0:
- result = tagItem.getName();
- break;
- case 1:
- result = tagItem.getTagForDisplay();
- break;
- case 2:
- result = tagItem.getUri();
- break;
- case 3:
- if(tagItem.isChildren()) {
- result = VpeUIMessages.TemplatesTableProvider_Yes;
- } else {
- result = VpeUIMessages.TemplatesTableProvider_No;
- }
- break;
- }
- }
- return result;
- }
-
- private String toVisualValue(String v) {
- if(v == null) return ""; //$NON-NLS-1$
- if(v.indexOf('\n') >= 0) v = v.replace('\n', ' ');
- if(v.indexOf('\t') >= 0) v = v.replace('\t', ' ');
- if(v.indexOf('\r') >= 0) v = v.replace('\r', ' ');
- return v;
- }
-
@Override
public boolean isPageComplete() {
boolean isPageComplete = false;
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/VpeImportExportWizardPage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/VpeImportExportWizardPage.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/VpeImportExportWizardPage.java 2010-05-17 13:51:21 UTC (rev 22119)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.wizards;
+
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
+public interface VpeImportExportWizardPage {
+
+ String[] COLUMNS_NAMES = new String[] {
+ VpeUIMessages.TemplatesTableProvider_TagName,
+ VpeUIMessages.TemplatesTableProvider_TagForDisplay,
+ VpeUIMessages.TemplatesTableProvider_URI,
+ VpeUIMessages.TemplatesTableProvider_Children};
+
+ int[] COLUMNS_WIDTHS = new int[] {
+ 50, 50, 90, 40
+ };
+}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/VpeImportExportWizardsUtils.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/VpeImportExportWizardsUtils.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/wizards/VpeImportExportWizardsUtils.java 2010-05-17 13:51:21 UTC (rev 22119)
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.wizards;
+
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTException;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.template.VpeAnyData;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+
+public class VpeImportExportWizardsUtils {
+
+ /**
+ * Updates visual table with tags templates.
+ *
+ * @param tagsTable updated tags list
+ * @param tagsList current tags list
+ * @param clearTagsTable clears current tags table
+ */
+ public static void updateTagsTable(Table tagsTable, List<VpeAnyData> tagsList, boolean clearTagsTable) {
+ /*
+ * Return when visual table hasn't been initialized.
+ */
+ if(tagsTable == null || tagsTable.isDisposed()) {
+ return;
+ }
+ /*
+ * Clear current visual table.
+ */
+ if (clearTagsTable) {
+ tagsTable.clearAll();
+ }
+ /*
+ * Return when tags templates list hasn't been initialized.
+ */
+ if (tagsList == null) {
+ return;
+ }
+ /*
+ * Remember current selection index
+ * and restore it at the end.
+ */
+ int selectionIndex = tagsTable.getSelectionIndex();
+ TableItem tableItem = null;
+ for (int i = 0; i < tagsList.size(); i++) {
+ if(tagsTable.getItemCount() > i) {
+ /*
+ * Use existed items
+ */
+ tableItem = tagsTable.getItem(i);
+ } else {
+ /*
+ * Add new item
+ */
+ tableItem = new TableItem(tagsTable, SWT.BORDER, i);
+ }
+ /*
+ * Fill in columns.
+ */
+ String[] itemColumnsData = new String[tagsTable.getColumnCount()];
+ for (int j = 0; j < itemColumnsData.length; j++) {
+ /*
+ * Getting values from tagList
+ */
+ itemColumnsData[j] = toVisualValue(getValueAt(tagsList, i, j));
+ }
+ /*
+ * Set cells text
+ */
+ tableItem.setText(itemColumnsData);
+ }
+
+ /*
+ * Restoring selection index
+ */
+ if (selectionIndex > 0 ) {
+ try {
+ tagsTable.setSelection(selectionIndex);
+ } catch (SWTException e) {
+ VpePlugin.getDefault().logError(
+ VpeUIMessages.COULD_NOT_SET_TABLE_SELECTION, e);
+ }
+ }
+ }
+
+ private static String getValueAt(List<VpeAnyData> tagsList, int row, int column) {
+ String result = VpeUIMessages.LIST_IS_EMPTY;
+ if ((null != tagsList) && ((row >= 0) && (tagsList.size() > 0) && (row < tagsList.size()))) {
+ VpeAnyData tagItem = (VpeAnyData)tagsList.get(row);
+ switch(column){
+ case 0:
+ result = tagItem.getName();
+ break;
+ case 1:
+ result = tagItem.getTagForDisplay();
+ break;
+ case 2:
+ result = tagItem.getUri();
+ break;
+ case 3:
+ if(tagItem.isChildren()) {
+ result = VpeUIMessages.TemplatesTableProvider_Yes;
+ } else {
+ result = VpeUIMessages.TemplatesTableProvider_No;
+ }
+ break;
+ }
+ }
+ return result;
+ }
+
+ private static String toVisualValue(String v) {
+ if(v == null) return ""; //$NON-NLS-1$
+ if(v.indexOf('\n') >= 0) v = v.replace('\n', ' ');
+ if(v.indexOf('\t') >= 0) v = v.replace('\t', ' ');
+ if(v.indexOf('\r') >= 0) v = v.replace('\r', ' ');
+ return v;
+ }
+
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-05-17 13:10:52 UTC (rev 22118)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/VpeUIMessages.java 2010-05-17 13:51:21 UTC (rev 22119)
@@ -155,5 +155,6 @@
public static String NONE_TEMPLATES_WERE_ADDED;
public static String COULD_NOT_SET_TABLE_SELECTION;
public static String CANNOT_LOAD_TAGLIBS_FROM_PAGE_CONTEXT;
+ public static String LIST_IS_EMPTY;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-05-17 13:10:52 UTC (rev 22118)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/messages/messages.properties 2010-05-17 13:51:21 UTC (rev 22119)
@@ -141,6 +141,7 @@
IMPORT_UNKNOWN_TAGS_PAGE_DESCRIPTION=Import unknown tags templates from external file
NONE_TEMPLATES_WERE_ADDED=None of the templates were added.
COULD_NOT_SET_TABLE_SELECTION=Could not set table selection.
+LIST_IS_EMPTY=List is empty
# Other messages
CANNOT_LOAD_TAGLIBS_FROM_PAGE_CONTEXT=Cannot load taglibs from PageContext!
\ No newline at end of file
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java 2010-05-17 13:10:52 UTC (rev 22118)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeUiTests.java 2010-05-17 13:51:21 UTC (rev 22119)
@@ -18,7 +18,6 @@
import org.jboss.tools.vpe.ui.test.dialog.VpeResourcesDialogTest;
import org.jboss.tools.vpe.ui.test.editor.CustomSashFormTest;
import org.jboss.tools.vpe.ui.test.preferences.VpeEditorPreferencesPageTest;
-import org.jboss.tools.vpe.ui.test.wizard.VpeImportExportUnknownTagsWizardsTest;
/**
* @author mareshkau
@@ -33,7 +32,6 @@
suite.addTestSuite(CustomSashFormTest.class);
suite.addTestSuite(VpePopupMenuTest.class);
suite.addTestSuite(VpeEditAnyDialogTest.class);
- suite.addTestSuite(VpeImportExportUnknownTagsWizardsTest.class);
return new VpeTestSetup(suite);
}
15 years, 11 months
JBoss Tools SVN: r22118 - in trunk/maven/plugins: org.jboss.tools.maven.seam/poms and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-05-17 09:10:52 -0400 (Mon, 17 May 2010)
New Revision: 22118
Modified:
trunk/maven/plugins/org.jboss.tools.maven.core/poms/hibernate332-template.xml
trunk/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml
Log:
https://jira.jboss.org/browse/JBIDE-6294 Add JBoss Community Public Maven Repository when creating JBoss Maven Integration facet
Modified: trunk/maven/plugins/org.jboss.tools.maven.core/poms/hibernate332-template.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.core/poms/hibernate332-template.xml 2010-05-17 13:07:46 UTC (rev 22117)
+++ trunk/maven/plugins/org.jboss.tools.maven.core/poms/hibernate332-template.xml 2010-05-17 13:10:52 UTC (rev 22118)
@@ -10,7 +10,7 @@
<repositories>
<repository>
<id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
+ <name>JBoss Community Public Maven Repository</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
<layout>default</layout>
<releases>
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml 2010-05-17 13:07:46 UTC (rev 22117)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml 2010-05-17 13:10:52 UTC (rev 22118)
@@ -42,7 +42,7 @@
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
+ <name>JBoss Community Public Maven Repository</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
<layout>default</layout>
<releases>
@@ -459,7 +459,7 @@
<repositories>
<repository>
<id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
+ <name>JBoss Community Public Maven Repository</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
<layout>default</layout>
<releases>
15 years, 11 months
JBoss Tools SVN: r22117 - in branches/jbosstools-3.1.x/maven/plugins: org.jboss.tools.maven.seam/poms and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-05-17 09:07:46 -0400 (Mon, 17 May 2010)
New Revision: 22117
Modified:
branches/jbosstools-3.1.x/maven/plugins/org.jboss.tools.maven.core/poms/hibernate332-template.xml
branches/jbosstools-3.1.x/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml
Log:
https://jira.jboss.org/browse/JBIDE-6294 Add JBoss Community Public Maven Repository when creating JBoss Maven Integration facet
Modified: branches/jbosstools-3.1.x/maven/plugins/org.jboss.tools.maven.core/poms/hibernate332-template.xml
===================================================================
--- branches/jbosstools-3.1.x/maven/plugins/org.jboss.tools.maven.core/poms/hibernate332-template.xml 2010-05-17 10:26:09 UTC (rev 22116)
+++ branches/jbosstools-3.1.x/maven/plugins/org.jboss.tools.maven.core/poms/hibernate332-template.xml 2010-05-17 13:07:46 UTC (rev 22117)
@@ -10,7 +10,7 @@
<repositories>
<repository>
<id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
+ <name>JBoss Community Public Maven Repository</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
<layout>default</layout>
<releases>
Modified: branches/jbosstools-3.1.x/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml
===================================================================
--- branches/jbosstools-3.1.x/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml 2010-05-17 10:26:09 UTC (rev 22116)
+++ branches/jbosstools-3.1.x/maven/plugins/org.jboss.tools.maven.seam/poms/parent-pom.xml 2010-05-17 13:07:46 UTC (rev 22117)
@@ -42,7 +42,7 @@
<pluginRepositories>
<pluginRepository>
<id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
+ <name>JBoss Community Public Maven Repository</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
<layout>default</layout>
<releases>
@@ -459,7 +459,7 @@
<repositories>
<repository>
<id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
+ <name>JBoss Community Public Maven Repository</name>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
<layout>default</layout>
<releases>
15 years, 11 months
JBoss Tools SVN: r22116 - in workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces: src/org/jboss/tools/jsf/vpe/template/mock/impl and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-05-17 06:26:09 -0400 (Mon, 17 May 2010)
New Revision: 22116
Added:
workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/icefaces/template/IceInputSecretTemplate.java
workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeHtmlInputSecret.java
Modified:
workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeExternalContext.java
workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/templates/vpe-templates-icefaces.xml
Log:
https://jira.jboss.org/browse/JBIDE-4710 ice input secree has been added
Added: workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/icefaces/template/IceInputSecretTemplate.java
===================================================================
--- workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/icefaces/template/IceInputSecretTemplate.java (rev 0)
+++ workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/icefaces/template/IceInputSecretTemplate.java 2010-05-17 10:26:09 UTC (rev 22116)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 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.jsf.vpe.icefaces.template;
+
+import javax.faces.render.Renderer;
+
+import org.jboss.tools.jsf.vpe.icefaces.utill.VpeRendererUtil;
+import org.jboss.tools.jsf.vpe.template.mock.impl.VpeFacesContext;
+import org.jboss.tools.jsf.vpe.template.mock.impl.VpeHtmlInputSecret;
+import org.jboss.tools.jsf.vpe.template.mock.impl.VpeHtmlInputText;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class IceInputSecretTemplate extends VpeAbstractTemplate{
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ VpeFacesContext.getInstance().setResponseWriter(null);
+ Renderer render = new com.icesoft.faces.component.ext.renderkit.SecretRenderer();
+ VpeHtmlInputSecret uiComponent = new VpeHtmlInputSecret(
+ (Element) sourceNode);
+ return VpeRendererUtil.createVisualEditorDate(pageContext, sourceNode, visualDocument, render, uiComponent);
+ }
+
+}
Modified: workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeExternalContext.java
===================================================================
--- workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeExternalContext.java 2010-05-17 10:23:52 UTC (rev 22115)
+++ workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeExternalContext.java 2010-05-17 10:26:09 UTC (rev 22116)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.template.mock.impl;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.jboss.tools.jsf.vpe.template.mock.abstr.VpeAbstractExternalContext;
@@ -37,7 +38,12 @@
*/
@Override
public Map getRequestMap() {
- // TODO Auto-generated method stub
+ //this map used to add js support
return new HashMap();
}
+ @Override
+ public Map getRequestParameterMap() {
+ return Collections.EMPTY_MAP;
+ }
+
}
Added: workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeHtmlInputSecret.java
===================================================================
--- workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeHtmlInputSecret.java (rev 0)
+++ workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/src/org/jboss/tools/jsf/vpe/template/mock/impl/VpeHtmlInputSecret.java 2010-05-17 10:26:09 UTC (rev 22116)
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 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.jsf.vpe.template.mock.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.PropertyNotFoundException;
+import javax.el.PropertyNotWritableException;
+import javax.el.ValueExpression;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+import com.icesoft.faces.component.ext.HtmlInputSecret;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class VpeHtmlInputSecret extends HtmlInputSecret {
+ private Map attributesMap;
+
+ public VpeHtmlInputSecret(Element sourceElement) {
+ attributesMap = new HashMap();
+ NamedNodeMap attributes = sourceElement.getAttributes();
+ for(int i=0;i<attributes.getLength();i++){
+ Node item = attributes.item(i);
+ attributesMap.put(item.getNodeName(), item.getNodeValue());
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.UIComponentBase#getRendererType()
+ */
+ @Override
+ public String getRendererType() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.UIComponent#getAttributes()
+ */
+ @Override
+ public Map getAttributes() {
+ return attributesMap;
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.UIComponent#getValueExpression(java.lang.String)
+ */
+ @Override
+ public ValueExpression getValueExpression(final String name) {
+ return new ValueExpression(){
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 4723033247685328768L;
+
+ @Override
+ public Class<?> getExpectedType() {
+ // TODO Auto-generated method stub
+ return String.class;
+ }
+
+ @Override
+ public Class<?> getType(ELContext arg0)
+ throws NullPointerException, PropertyNotFoundException,
+ ELException {
+ // TODO Auto-generated method stub
+ return String.class;
+ }
+
+ @Override
+ public Object getValue(ELContext arg0) throws NullPointerException,
+ PropertyNotFoundException, ELException {
+ return getAttributes().get(name);
+ }
+
+ @Override
+ public boolean isReadOnly(ELContext arg0)
+ throws NullPointerException, PropertyNotFoundException,
+ ELException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public void setValue(ELContext arg0, Object arg1)
+ throws NullPointerException, PropertyNotFoundException,
+ PropertyNotWritableException, ELException {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public boolean equals(Object arg0) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public String getExpressionString() {
+ // TODO Auto-generated method stub
+ return (String) getAttributes().get(name);
+ }
+
+ @Override
+ public int hashCode() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ @Override
+ public boolean isLiteralText() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ };
+ }
+}
Modified: workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/templates/vpe-templates-icefaces.xml
===================================================================
--- workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/templates/vpe-templates-icefaces.xml 2010-05-17 10:23:52 UTC (rev 22115)
+++ workspace/mareshkau/org.jboss.tools.jsf.vpe.icefaces/templates/vpe-templates-icefaces.xml 2010-05-17 10:26:09 UTC (rev 22116)
@@ -57,4 +57,17 @@
</vpe:dnd>
</vpe:template>
</vpe:tag>
+ <vpe:tag name="ice:inputSecret" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.jsf.vpe.icefaces.template.IceInputSecretTemplate">
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no"></vpe:drop>
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
</vpe:templates>
15 years, 11 months
JBoss Tools SVN: r22115 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-05-17 06:23:52 -0400 (Mon, 17 May 2010)
New Revision: 22115
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputSecret.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputSecret.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputText.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputText.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceOutputText.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceOutputText.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceSelectBooleanCheckbox.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceSelectBooleanCheckbox.xhtml.xml
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/index.xhtml
Log:
https://jira.jboss.org/browse/JBIDE-4710 junit test
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputSecret.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputSecret.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputSecret.xhtml 2010-05-17 10:23:52 UTC (rev 22115)
@@ -0,0 +1,8 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ice="http://www.icesoft.com/icefaces/component">
+ <ice:inputSecret id="iceInputSecreet" value="Test" />
+</ui:composition>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputSecret.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputSecret.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputSecret.xhtml.xml 2010-05-17 10:23:52 UTC (rev 22115)
@@ -0,0 +1,5 @@
+<tests>
+<test id="iceInputSecreet">
+<INPUT TYPE="password" ID="j_id0" NAME="j_id0" ONBLUR="setFocus('');" ONFOCUS="setFocus(this.id);" ONKEYPRESS="iceSubmit(form,this,event);" ONMOUSEDOWN="this.focus();" VALUE=""/>
+</test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputText.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputText.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputText.xhtml 2010-05-17 10:23:52 UTC (rev 22115)
@@ -0,0 +1,8 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ice="http://www.icesoft.com/icefaces/component">
+ <ice:inputText id="iceInputText" value="Test" />
+</ui:composition>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputText.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputText.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceInputText.xhtml.xml 2010-05-17 10:23:52 UTC (rev 22115)
@@ -0,0 +1,5 @@
+<tests>
+<test id="iceInputText">
+<INPUT TYPE="text" ID="j_id0" NAME="j_id0" ONBLUR="setFocus('');" VALUE="Test"/>
+</test>
+</tests>
\ No newline at end of file
Copied: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceOutputText.xhtml (from rev 22031, trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/index.xhtml)
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceOutputText.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceOutputText.xhtml 2010-05-17 10:23:52 UTC (rev 22115)
@@ -0,0 +1,8 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ice="http://www.icesoft.com/icefaces/component">
+ <ice:outputText id="iceFacesTextProcessing" value="Ice Test Output Text" style="color:blue"></ice:outputText>
+</ui:composition>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceOutputText.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceOutputText.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceOutputText.xhtml.xml 2010-05-17 10:23:52 UTC (rev 22115)
@@ -0,0 +1,7 @@
+<tests>
+<test id="iceFacesTextProcessing">
+<SPAN STYLE="color: blue;">
+Ice Test Output Text<BR VPE:PSEUDO-ELEMENT="yes" STYLE="font-style: italic; color: green; -moz-user-modify: read-only;"/>
+</SPAN>
+</test>
+</tests>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceSelectBooleanCheckbox.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceSelectBooleanCheckbox.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceSelectBooleanCheckbox.xhtml 2010-05-17 10:23:52 UTC (rev 22115)
@@ -0,0 +1,8 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ice="http://www.icesoft.com/icefaces/component">
+ <ice:selectBooleanCheckbox id="iceSelectBooleanCheckbox" style="color:blue"></ice:selectBooleanCheckbox>
+</ui:composition>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceSelectBooleanCheckbox.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceSelectBooleanCheckbox.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/iceSelectBooleanCheckbox.xhtml.xml 2010-05-17 10:23:52 UTC (rev 22115)
@@ -0,0 +1,5 @@
+<tests>
+<test id="iceSelectBooleanCheckbox">
+<INPUT TYPE="checkbox" ID="uiOutput" NAME="uiOutput" ONBLUR="setFocus('');" ONFOCUS="setFocus(this.id);" ONKEYPRESS="Ice.util.radioCheckboxEnter(form,this,event);" STYLE="color: blue;"/>
+</test>
+</tests>
\ No newline at end of file
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/index.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/index.xhtml 2010-05-17 10:20:56 UTC (rev 22114)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4710/index.xhtml 2010-05-17 10:23:52 UTC (rev 22115)
@@ -1,8 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ice="http://www.icesoft.com/icefaces/component">
- <ice:outputText value="Ice Test Output Text" style="color:blue"></ice:outputText>
-</ui:composition>
15 years, 11 months