JBoss Tools SVN: r13492 - in trunk: jsf/tests/org.jboss.tools.jsf.ui.test/META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-02-05 13:37:37 -0500 (Thu, 05 Feb 2009)
New Revision: 13492
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizard/newfile/NewFileWizardEx.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssClassNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssFileNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/FacesConfigNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/HtmlFileNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsFileNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JspFileNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/PropertiesNewWizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/WizardTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/XhtmlFileNewWizardTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3500
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizard/newfile/NewFileWizardEx.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizard/newfile/NewFileWizardEx.java 2009-02-05 15:43:43 UTC (rev 13491)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/wizard/newfile/NewFileWizardEx.java 2009-02-05 18:37:37 UTC (rev 13492)
@@ -32,5 +32,11 @@
public void init(IWorkbench workbench, IStructuredSelection selection) {
context.setSelection(selection);
}
+
+
+ // added for test https://jira.jboss.org/jira/browse/JBIDE-3500
+ public NewFileContextEx getFileContext(){
+ return context;
+ }
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF 2009-02-05 15:43:43 UTC (rev 13491)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF 2009-02-05 18:37:37 UTC (rev 13492)
@@ -12,5 +12,7 @@
org.jboss.tools.common.test;bundle-version="2.0.0",
org.eclipse.ui.workbench;bundle-version="3.4.0",
org.jboss.tools.jsf.ui;bundle-version="2.0.0",
- org.jboss.tools.jst.web.ui;bundle-version="2.0.0"
+ org.jboss.tools.jst.web.ui;bundle-version="2.0.0",
+ org.jboss.tools.jst.jsp;bundle-version="2.0.0",
+ org.jboss.tools.common.model.ui;bundle-version="2.0.0"
Bundle-Localization: plugin
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssClassNewWizardTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssClassNewWizardTest.java 2009-02-05 15:43:43 UTC (rev 13491)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssClassNewWizardTest.java 2009-02-05 18:37:37 UTC (rev 13492)
@@ -12,7 +12,7 @@
}
public void testCssClassNewWizardValidation() {
- IWizard wizard = getWizardWithoutSelection();
+ IWizard wizard = getWizard();
boolean canFinish = wizard.canFinish();
@@ -25,7 +25,7 @@
boolean canFinish = wizard.canFinish();
// Assert Finish button is enabled by default if wizard is called on Project
- assertTrue("Finish button is disabled at first wizard page.", canFinish);
+ assertFalse("Finish button is disabled at first wizard page.", canFinish);
// Assert Finish button is disabled and error is present if
// Folder field is empty
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssFileNewWizardTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssFileNewWizardTest.java 2009-02-05 15:43:43 UTC (rev 13491)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/CssFileNewWizardTest.java 2009-02-05 18:37:37 UTC (rev 13492)
@@ -12,7 +12,7 @@
}
public void testCssFileNewWizardValidation() {
- IWizard wizard = getWizardWithoutSelection();
+ IWizard wizard = getWizard();
boolean canFinish = wizard.canFinish();
@@ -20,31 +20,6 @@
}
public void testCssFileNewWizardValidation2() {
- IWizard wizard = getWizardOnProject();
-
- boolean canFinish = wizard.canFinish();
-
- // Assert Finish button is enabled by default if wizard is called on Project
- assertTrue("Finish button is disabled at first wizard page.", canFinish);
-
- // Assert Finish button is disabled and error is present if
- // Folder field is empty
- // All other fields are correct
-
- // Assert Finish button is disabled and error is present if
- // Folder field points to folder that doesn't exist
- // All other fields are correct
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field is empty
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field contains forbidden characters
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field contains file name that already exists
+ validateFolderAndName();
}
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/FacesConfigNewWizardTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/FacesConfigNewWizardTest.java 2009-02-05 15:43:43 UTC (rev 13491)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/FacesConfigNewWizardTest.java 2009-02-05 18:37:37 UTC (rev 13492)
@@ -1,14 +1,6 @@
package org.jboss.tools.jsf.ui.test;
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.IWorkbenchWizard;
-import org.eclipse.ui.PlatformUI;
-import org.jboss.tools.common.util.WorkbenchUtils;
public class FacesConfigNewWizardTest extends WizardTest {
@@ -21,7 +13,7 @@
}
public void testFacesConfigNewWizardValidation() {
- IWizard wizard = getWizardWithoutSelection();
+ IWizard wizard = getWizard();
boolean canFinish = wizard.canFinish();
@@ -29,32 +21,7 @@
}
public void testFacesConfigNewWizardValidation2() {
- IWizard wizard = getWizardOnProject();
-
- boolean canFinish = wizard.canFinish();
-
- // Assert Finish button is enabled by default if wizard is called on Project
- assertTrue("Finish button is disabled at first wizard page.", canFinish);
-
- // Assert Finish button is disabled and error is present if
- // Folder field is empty
- // All other fields are correct
-
- // Assert Finish button is disabled and error is present if
- // Folder field points to folder that doesn't exist
- // All other fields are correct
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field is empty
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field contains forbidden characters
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field contains file name that already exists
+ validateFolderAndName();
}
public void testFacesConfigNewWizardResults() {
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/HtmlFileNewWizardTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/HtmlFileNewWizardTest.java 2009-02-05 15:43:43 UTC (rev 13491)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/HtmlFileNewWizardTest.java 2009-02-05 18:37:37 UTC (rev 13492)
@@ -13,7 +13,7 @@
}
public void testHtmlFileNewWizardValidation() {
- IWizard wizard = getWizardWithoutSelection();
+ IWizard wizard = getWizard();
boolean canFinish = wizard.canFinish();
@@ -21,31 +21,5 @@
}
public void testHtmlFileNewWizardValidation2() {
- IWizard wizard = getWizardOnProject();
-
- boolean canFinish = wizard.canFinish();
-
- // Assert Finish button is enabled by default if wizard is called on Project
- assertTrue("Finish button is disabled at first wizard page.", canFinish);
-
- // Assert Finish button is disabled and error is present if
- // Folder field is empty
- // All other fields are correct
-
- // Assert Finish button is disabled and error is present if
- // Folder field points to folder that doesn't exist
- // All other fields are correct
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field is empty
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field contains forbidden characters
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field contains file name that already exists
- }
+ validateFolderAndName(); }
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsFileNewWizardTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsFileNewWizardTest.java 2009-02-05 15:43:43 UTC (rev 13491)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsFileNewWizardTest.java 2009-02-05 18:37:37 UTC (rev 13492)
@@ -13,7 +13,7 @@
}
public void testJsFileNewWizardValidation() {
- IWizard wizard = getWizardWithoutSelection();
+ IWizard wizard = getWizard();
boolean canFinish = wizard.canFinish();
@@ -21,31 +21,6 @@
}
public void testJsFileNewWizardValidation2() {
- IWizard wizard = getWizardOnProject();
-
- boolean canFinish = wizard.canFinish();
-
- // Assert Finish button is enabled by default if wizard is called on Project
- assertTrue("Finish button is disabled at first wizard page.", canFinish);
-
- // Assert Finish button is disabled and error is present if
- // Folder field is empty
- // All other fields are correct
-
- // Assert Finish button is disabled and error is present if
- // Folder field points to folder that doesn't exist
- // All other fields are correct
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field is empty
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field contains forbidden characters
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field contains file name that already exists
+ validateFolderAndName();
}
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JspFileNewWizardTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JspFileNewWizardTest.java 2009-02-05 15:43:43 UTC (rev 13491)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JspFileNewWizardTest.java 2009-02-05 18:37:37 UTC (rev 13492)
@@ -13,7 +13,7 @@
}
public void testJspFileNewWizardValidation() {
- IWizard wizard = getWizardWithoutSelection();
+ IWizard wizard = getWizard();
boolean canFinish = wizard.canFinish();
@@ -21,31 +21,6 @@
}
public void testJspFileNewWizardValidation2() {
- IWizard wizard = getWizardOnProject();
-
- boolean canFinish = wizard.canFinish();
-
- // Assert Finish button is enabled by default if wizard is called on Project
- assertTrue("Finish button is disabled at first wizard page.", canFinish);
-
- // Assert Finish button is disabled and error is present if
- // Folder field is empty
- // All other fields are correct
-
- // Assert Finish button is disabled and error is present if
- // Folder field points to folder that doesn't exist
- // All other fields are correct
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field is empty
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field contains forbidden characters
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field contains file name that already exists
+ validateFolderAndName();
}
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/PropertiesNewWizardTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/PropertiesNewWizardTest.java 2009-02-05 15:43:43 UTC (rev 13491)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/PropertiesNewWizardTest.java 2009-02-05 18:37:37 UTC (rev 13492)
@@ -13,7 +13,7 @@
}
public void testPropertiesFileNewWizardValidation() {
- IWizard wizard = getWizardWithoutSelection();
+ IWizard wizard = getWizard();
boolean canFinish = wizard.canFinish();
@@ -21,31 +21,6 @@
}
public void testPropertiesFileNewWizardValidation2() {
- IWizard wizard = getWizardOnProject();
-
- boolean canFinish = wizard.canFinish();
-
- // Assert Finish button is enabled by default if wizard is called on Project
- assertTrue("Finish button is disabled at first wizard page.", canFinish);
-
- // Assert Finish button is disabled and error is present if
- // Folder field is empty
- // All other fields are correct
-
- // Assert Finish button is disabled and error is present if
- // Folder field points to folder that doesn't exist
- // All other fields are correct
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field is empty
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field contains forbidden characters
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field contains file name that already exists
+ validateFolderAndName();
}
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/WizardTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/WizardTest.java 2009-02-05 15:43:43 UTC (rev 13491)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/WizardTest.java 2009-02-05 18:37:37 UTC (rev 13492)
@@ -2,8 +2,6 @@
import java.util.ArrayList;
-import javax.swing.text.View;
-
import junit.framework.TestCase;
import org.eclipse.core.resources.IProject;
@@ -13,9 +11,11 @@
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IWorkbenchWizard;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.meta.action.impl.SpecialWizardSupport;
+import org.jboss.tools.common.model.ui.wizard.newfile.NewFileContextEx;
+import org.jboss.tools.common.model.ui.wizard.newfile.NewFileWizardEx;
import org.jboss.tools.common.util.WorkbenchUtils;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ProjectImportTestSetup;
@@ -75,7 +75,6 @@
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
wizard);
dialog.setBlockOnOpen(false);
- //dialog.
dialog.open();
// System.out.println("\nWizard ID - "+id);
@@ -98,7 +97,7 @@
}
- public IWizard getWizardWithoutSelection(){
+ public IWizard getWizard(){
IWizard wizard = WorkbenchUtils.findWizardByDefId(id);
dialog = new WizardDialog(
@@ -110,6 +109,33 @@
return wizard;
}
+ public IWizard getWizard(String folder, String name){
+ IWizard wizard = WorkbenchUtils.findWizardByDefId(id);
+
+ NewFileWizardEx wiz = (NewFileWizardEx)wizard;
+
+ NewFileContextEx context = wiz.getFileContext();
+
+ SpecialWizardSupport support = context.getSupport();
+
+ ArrayList<IProject> list = new ArrayList<IProject>();
+
+ StructuredSelection selection = new StructuredSelection(list);
+
+ ((IWorkbenchWizard)wizard).init(PlatformUI.getWorkbench(), selection);
+
+ support.setAttributeValue(0, "folder", folder);
+ support.setAttributeValue(0, "name", name);
+
+ dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ wizard);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+
+ return wizard;
+ }
+
public IWizard getWizardOnProject(){
ArrayList<IProject> list = new ArrayList<IProject>();
@@ -129,4 +155,89 @@
return wizard;
}
+
+ public IWizard getWizardOnProject(String name){
+ ArrayList<IProject> list = new ArrayList<IProject>();
+
+ list.add(project);
+
+ StructuredSelection selection = new StructuredSelection(list);
+
+ IWizard wizard = WorkbenchUtils.findWizardByDefId(id);
+
+ NewFileWizardEx wiz = (NewFileWizardEx)wizard;
+
+ NewFileContextEx context = wiz.getFileContext();
+
+ SpecialWizardSupport support = context.getSupport();
+
+ ((IWorkbenchWizard)wizard).init(PlatformUI.getWorkbench(), selection);
+
+ support.setAttributeValue(0, "name", name);
+
+ dialog = new WizardDialog(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ wizard);
+ dialog.setBlockOnOpen(false);
+ dialog.open();
+
+ return wizard;
+ }
+
+ protected void validateFolderAndName(){
+ IWizard wizard = getWizardOnProject("aaa");
+
+
+ boolean canFinish = wizard.canFinish();
+
+ // Assert Finish button is enabled by default if wizard is called on Project
+ assertTrue("Finish button is disabled at first wizard page.", canFinish);
+
+ dialog.close();
+
+ // Assert Finish button is disabled and error is present if
+ // Folder field is empty
+ // All other fields are correct
+
+ wizard = getWizard("","aaa");
+ canFinish = wizard.canFinish();
+ assertFalse("Finish button is enabled when folder field is empty.", canFinish);
+
+ dialog.close();
+
+
+ // Assert Finish button is disabled and error is present if
+ // Folder field points to folder that doesn't exist
+ // All other fields are correct
+
+ wizard = getWizard("anyFolder","aaa");
+ canFinish = wizard.canFinish();
+ assertFalse("Finish button is enabled when folders field points to folder that does not exist", canFinish);
+
+ dialog.close();
+
+ // Assert Finish button is disabled and error is present if
+ // Folder field is correct
+ // Name field is empty
+
+ wizard = getWizardOnProject("");
+ canFinish = wizard.canFinish();
+ assertFalse("Finish button is enabled when name field is empty.", canFinish);
+
+ dialog.close();
+
+ // Assert Finish button is disabled and error is present if
+ // Folder field is correct
+ // Name field contains forbidden characters
+
+ wizard = getWizardOnProject("?-/");
+ canFinish = wizard.canFinish();
+ assertFalse("Finish button is enabled when name field contains forbiden characters.", canFinish);
+
+ dialog.close();
+
+ // Assert Finish button is disabled and error is present if
+ // Folder field is correct
+ // Name field contains file name that already exists
+ }
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/XhtmlFileNewWizardTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/XhtmlFileNewWizardTest.java 2009-02-05 15:43:43 UTC (rev 13491)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/XhtmlFileNewWizardTest.java 2009-02-05 18:37:37 UTC (rev 13492)
@@ -13,7 +13,7 @@
}
public void testXhtmlFileNewWizardValidation() {
- IWizard wizard = getWizardWithoutSelection();
+ IWizard wizard = getWizard();
boolean canFinish = wizard.canFinish();
@@ -21,31 +21,6 @@
}
public void testXhtmlFileNewWizardValidation2() {
- IWizard wizard = getWizardOnProject();
-
- boolean canFinish = wizard.canFinish();
-
- // Assert Finish button is enabled by default if wizard is called on Project
- assertTrue("Finish button is disabled at first wizard page.", canFinish);
-
- // Assert Finish button is disabled and error is present if
- // Folder field is empty
- // All other fields are correct
-
- // Assert Finish button is disabled and error is present if
- // Folder field points to folder that doesn't exist
- // All other fields are correct
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field is empty
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field contains forbidden characters
-
- // Assert Finish button is disabled and error is present if
- // Folder field is correct
- // Name field contains file name that already exists
+ validateFolderAndName();
}
}
15 years, 2 months
JBoss Tools SVN: r13491 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-02-05 10:43:43 -0500 (Thu, 05 Feb 2009)
New Revision: 13491
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectBean.java
Log:
JBIDE-3724
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectBean.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectBean.java 2009-02-05 15:41:52 UTC (rev 13490)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectBean.java 2009-02-05 15:43:43 UTC (rev 13491)
@@ -11,6 +11,7 @@
package org.jboss.tools.jsf.model.pv;
import java.util.*;
+
import org.eclipse.jdt.core.*;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.impl.RegularObjectImpl;
@@ -92,6 +93,9 @@
for (int i = 0; i < cs.length; i++) map.put(cs[i].getPathPart(), cs[i]);
if(type != null) {
IType _type = type;
+
+ Set<IType> interfaces = new HashSet<IType>();
+
while(_type != null) {
IField[] fs = _type.getFields();
if(fs != null) for (int i = 0; i < fs.length; i++) {
@@ -156,13 +160,65 @@
properties.add(n);
}
}
-
+
+ String[] is = _type.getSuperInterfaceNames();
+ for (int i = 0; i < is.length; i++) {
+ String in = EclipseJavaUtil.resolveType(_type, is[i]);
+ if(in != null && in.length() > 0) {
+ IType it = beans.getType(in);
+ if(it != null) interfaces.add(it);
+ }
+ }
+
String sc = _type.getSuperclassName();
if(sc == null || sc.length() == 0 || "java.lang.Object".equals(sc)) break;
sc = EclipseJavaUtil.resolveType(_type, sc);
if(sc == null || sc.length() == 0 || "java.lang.Object".equals(sc)) break;
_type = beans.getType(sc);
+
}
+
+ Set<IType> allInterfaces = new HashSet<IType>();
+
+ while(!interfaces.isEmpty()) {
+ allInterfaces.addAll(interfaces);
+ Set<IType> interfaces2 = new HashSet<IType>();
+
+ for (IType t : interfaces) {
+ IField[] fs = t.getFields();
+ if (fs != null) for (int i = 0; i < fs.length; i++) {
+ String n = fs[i].getElementName();
+ if (properties.contains(n)) continue;
+ JSFProjectBeanMember c = (JSFProjectBeanMember) map.get(n);
+ if (c != null && !c.getModelEntity().getName().equals("JSFProjectBeanProperty")) {
+ c.removeFromParent();
+ map.remove(n);
+ c = null;
+ }
+ if (c != null) {
+ map.remove(n);
+ String typeName = EclipseJavaUtil.getMemberTypeAsString(fs[i]);
+ c.setType(beans.getType(typeName));
+ if (typeName == null) typeName = "";
+ c.setAttributeValue("class name", typeName);
+ c.setAttributeValue("declaring class", fs[i].getDeclaringType().getFullyQualifiedName());
+ } else {
+ c = createMember(n, fs[i], "JSFProjectBeanProperty");
+ }
+ properties.add(n);
+ }
+
+ String[] is = t.getSuperInterfaceNames();
+ for (int i = 0; i < is.length; i++) {
+ String in = EclipseJavaUtil.resolveType(_type, is[i]);
+ if(in != null && in.length() > 0) {
+ IType it = beans.getType(in);
+ if(it != null && !allInterfaces.contains(it)) interfaces2.add(it);
+ }
+ }
+ }
+ interfaces = interfaces2;
+ }
} else if(beanList.length > 0) {
XModelObject[] ps = beanList[0].getChildren();
for (int i = 0; i < ps.length; i++) {
15 years, 2 months
JBoss Tools SVN: r13490 - in trunk: jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-02-05 10:41:52 -0500 (Thu, 05 Feb 2009)
New Revision: 13490
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/keepAlive.xhtml.xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/WEB-INF/web.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/form/input.html
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/form/input.html.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-883, junit errors was fixed
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/keepAlive.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/keepAlive.xhtml.xml 2009-02-05 15:31:39 UTC (rev 13489)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/keepAlive.xhtml.xml 2009-02-05 15:41:52 UTC (rev 13490)
@@ -1,5 +0,0 @@
-<tests>
- <test id="keepAlive">
- <NOBR STYLE="-moz-user-modify: read-only;"> testBean</NOBR>
- </test>
-</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java 2009-02-05 15:31:39 UTC (rev 13489)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java 2009-02-05 15:41:52 UTC (rev 13490)
@@ -26,7 +26,7 @@
}
public void testKeepAlive() throws Throwable {
- performContentTest("components/keepAlive.xhtml");//$NON-NLS-1$
+ performInvisibleTagTest("components/keepAlive.xhtml","keepAlive");//$NON-NLS-1$
}
public void testActionparam() throws Throwable {
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/WEB-INF/web.xml 2009-02-05 15:31:39 UTC (rev 13489)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/WEB-INF/web.xml 2009-02-05 15:41:52 UTC (rev 13490)
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>jsfTest</display-name>
<context-param>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/form/input.html
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/form/input.html 2009-02-05 15:31:39 UTC (rev 13489)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/form/input.html 2009-02-05 15:41:52 UTC (rev 13490)
@@ -15,7 +15,7 @@
<h4>file</h4>
-<input id="file" align="top" dir="ltr" class="fileClass" value="value" width="50" height="20" type="file" name="name" style="color:red" size="30" disabled="disabled" readonly="readonly" src="src">
+<input id="file" align="top" dir="ltr" class="fileClass" value="value" width="50" type="file" name="name" style="color:red" size="30" disabled="disabled" readonly="readonly" src="src">
<h4>hidden</h4>
@@ -25,7 +25,7 @@
<input id="button" type="button" value="input button" dir="ltr" class="buttonClass" style="color:red;" >
-<h4><input id="image" type="image" src="/img/image.jpeg" class="imageClass" style="color:red;" width="40" height="40">input image</h4>
+<h4><input id="image" type="image" src="/img/image.jpeg" class="imageClass" style="color:red;" width="40">input image</h4>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/form/input.html.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/form/input.html.xml 2009-02-05 15:31:39 UTC (rev 13489)
+++ trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/form/input.html.xml 2009-02-05 15:41:52 UTC (rev 13490)
@@ -17,7 +17,7 @@
</test>
<test id="image">
- <INPUT WIDTH="40" TYPE="image" HEIGHT="40" CLASS="imageClass"
+ <INPUT TYPE="image" CLASS="imageClass"
SRC="/.*ve/unresolved_image.gif/" STYLE="color: red; -moz-user-modify: read-only;" />
</test>
<test id="password">
15 years, 2 months
JBoss Tools SVN: r13489 - branches/jbosstools-3.0.0.CR2/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-02-05 10:31:39 -0500 (Thu, 05 Feb 2009)
New Revision: 13489
Modified:
branches/jbosstools-3.0.0.CR2/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/LoadConsoleCFGCompletionProposal.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3662
Modified: branches/jbosstools-3.0.0.CR2/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/LoadConsoleCFGCompletionProposal.java
===================================================================
--- branches/jbosstools-3.0.0.CR2/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/LoadConsoleCFGCompletionProposal.java 2009-02-05 14:57:26 UTC (rev 13488)
+++ branches/jbosstools-3.0.0.CR2/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/LoadConsoleCFGCompletionProposal.java 2009-02-05 15:31:39 UTC (rev 13489)
@@ -43,7 +43,7 @@
try {
consoleConfiguration.build();
} catch (HibernateException he) {
- HibernateConsolePlugin.getDefault().showError(HibernateConsolePlugin.getDefault().getShell(), HibernateConsoleMessages.LoadConsoleCFGCompletionProposal_could_not_load_configuration + consoleConfiguration.getName(), he);
+ HibernateConsolePlugin.getDefault().showError(HibernateConsolePlugin.getDefault().getShell(), HibernateConsoleMessages.LoadConsoleCFGCompletionProposal_could_not_load_configuration + ' ' + consoleConfiguration.getName(), he);
}
}
}
15 years, 2 months
JBoss Tools SVN: r13488 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-02-05 09:57:26 -0500 (Thu, 05 Feb 2009)
New Revision: 13488
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/LoadConsoleCFGCompletionProposal.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3662
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/LoadConsoleCFGCompletionProposal.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/LoadConsoleCFGCompletionProposal.java 2009-02-05 14:37:20 UTC (rev 13487)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/LoadConsoleCFGCompletionProposal.java 2009-02-05 14:57:26 UTC (rev 13488)
@@ -43,7 +43,7 @@
try {
consoleConfiguration.build();
} catch (HibernateException he) {
- HibernateConsolePlugin.getDefault().showError(HibernateConsolePlugin.getDefault().getShell(), HibernateConsoleMessages.LoadConsoleCFGCompletionProposal_could_not_load_configuration + consoleConfiguration.getName(), he);
+ HibernateConsolePlugin.getDefault().showError(HibernateConsolePlugin.getDefault().getShell(), HibernateConsoleMessages.LoadConsoleCFGCompletionProposal_could_not_load_configuration + ' ' + consoleConfiguration.getName(), he);
}
}
}
15 years, 2 months
JBoss Tools SVN: r13487 - in trunk: vpe/plugins/org.jboss.tools.vpe/templates and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-02-05 09:37:20 -0500 (Thu, 05 Feb 2009)
New Revision: 13487
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-auto.xml
trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd
Log:
https://jira.jboss.org/jira/browse/JBIDE-883, vpe templates scheme was adjusted
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2009-02-05 14:24:51 UTC (rev 13486)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2009-02-05 14:37:20 UTC (rev 13487)
@@ -54,8 +54,8 @@
<vpe:tag name="a4j:commandLink" case-sensitive="yes">
<vpe:template children="yes" modify="yes">
- <vpe:a class="{@styleClass}"
- style="{@style}" dir="{@dir}" title="{tagstring()}"/>
+ <vpe:a class="{@styleClass}" value="{jsfvalue(@value)}"
+ style="{@style}" dir="{@dir}" title="{tagstring()}"/>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
<vpe:drop container="yes">
@@ -247,7 +247,7 @@
<vpe:tag name="a4j:htmlCommandLink" case-sensitive="yes">
<vpe:template children="yes" modify="yes">
- <vpe:a class="{@styleClass}"
+ <vpe:a class="{@styleClass}" value="{jsfvalue(@value)}"
style="{@style}" title="{tagstring()}" dir="{@dir}"/>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-auto.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-auto.xml 2009-02-05 14:24:51 UTC (rev 13486)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-auto.xml 2009-02-05 14:37:20 UTC (rev 13487)
@@ -1,3 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<vpe:templates>
+ <vpe:tag case-sensitive="no" name="">
+ <vpe:template children="no" modify="no">
+ <vpe:any style="color:red" tag-for-display="tag-name1" value="tag-value"/>
+ </vpe:template>
+ </vpe:tag>
+ <vpe:tag case-sensitive="no" name="">
+ <vpe:template children="no" modify="no">
+ <vpe:any style="color:white" tag-for-display="tag-name2" value="tag-value"/>
+ </vpe:template>
+ </vpe:tag>
</vpe:templates>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd 2009-02-05 14:24:51 UTC (rev 13486)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd 2009-02-05 14:37:20 UTC (rev 13487)
@@ -187,6 +187,7 @@
<xsd:attribute name="class" use="required" type="xsd:string"/>
<xsd:attribute name="dir" use="optional" type="xsd:string"/>
<xsd:attribute name="title" use="optional" type="xsd:string"/>
+ <xsd:attribute name="value" use="optional" type="xsd:string"/>
</xsd:complexType>
<!-- -->
<xsd:complexType name="TEXT-FORMATING">
15 years, 2 months
JBoss Tools SVN: r13486 - in trunk/jsf/tests: org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/jbide and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-02-05 09:24:51 -0500 (Thu, 05 Feb 2009)
New Revision: 13486
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfAllTests.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfTestPlugin.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/jbide/JBIDE3416Test.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-883, headers was added
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfAllTests.java 2009-02-05 13:57:19 UTC (rev 13485)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfAllTests.java 2009-02-05 14:24:51 UTC (rev 13486)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.jsf.vpe.ajax4jsf.test;
import java.util.ArrayList;
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java 2009-02-05 13:57:19 UTC (rev 13485)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java 2009-02-05 14:24:51 UTC (rev 13486)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.jsf.vpe.ajax4jsf.test;
import org.jboss.tools.vpe.ui.test.ComponentContentTest;
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfTestPlugin.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfTestPlugin.java 2009-02-05 13:57:19 UTC (rev 13485)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfTestPlugin.java 2009-02-05 14:24:51 UTC (rev 13486)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.jsf.vpe.ajax4jsf.test;
import java.net.URL;
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/jbide/JBIDE3416Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/jbide/JBIDE3416Test.java 2009-02-05 13:57:19 UTC (rev 13485)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/jbide/JBIDE3416Test.java 2009-02-05 14:24:51 UTC (rev 13486)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.jsf.vpe.facelets.test.jbide;
import org.jboss.tools.jsf.vpe.facelets.test.FaceletsComponentTest;
15 years, 2 months
JBoss Tools SVN: r13485 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-02-05 08:57:19 -0500 (Thu, 05 Feb 2009)
New Revision: 13485
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd
Log:
https://jira.jboss.org/jira/browse/JBIDE-883, schema for VPE templates was adjusted, some errors in templates was fixed
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2009-02-05 12:09:25 UTC (rev 13484)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/templates/vpe-templates-ajax4jsf.xml 2009-02-05 13:57:19 UTC (rev 13485)
@@ -54,7 +54,7 @@
<vpe:tag name="a4j:commandLink" case-sensitive="yes">
<vpe:template children="yes" modify="yes">
- <vpe:a class="{@styleClass}" value="{jsfvalue(@value)}"
+ <vpe:a class="{@styleClass}"
style="{@style}" dir="{@dir}" title="{tagstring()}"/>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
@@ -247,7 +247,7 @@
<vpe:tag name="a4j:htmlCommandLink" case-sensitive="yes">
<vpe:template children="yes" modify="yes">
- <vpe:a class="{@styleClass}" value="{jsfvalue(@value)}"
+ <vpe:a class="{@styleClass}"
style="{@style}" title="{tagstring()}" dir="{@dir}"/>
<vpe:dnd>
<vpe:drag start-enable="yes"/>
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2009-02-05 12:09:25 UTC (rev 13484)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2009-02-05 13:57:19 UTC (rev 13485)
@@ -237,7 +237,7 @@
<!--else-->
<vpe:if test="not(attrpresent('image'))">
<vpe:if test="(@type='')">
- <vpe:template children="no" modify="no">z
+ <vpe:template children="no" modify="no">
<input type="button" value="{iif(@value='',' ',jsfvalue(@value))}"
class="{@styleClass}" style="{@style}"
title="{tagstring()}" dir="{@dir}"/>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2009-02-05 12:09:25 UTC (rev 13484)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/templates/vpe-templates-html.xml 2009-02-05 13:57:19 UTC (rev 13485)
@@ -809,7 +809,8 @@
<vpe:tag name="frame" case-sensitive="no">
<vpe:template children="no" modify="no">
- <frame src="{src(@src)}" bordercolor="{@bordercolor}"
+ <frame src="{src(@src)}" longdesc="{@longdesc}" marginheight="{@marginheight}"
+ marginwidth="{@marginwidth}"
frameborder="{@frameborder}" name="{@name}" noresize="{@noresize}"
scrolling="{@scrolling}" />
</vpe:template>
@@ -1085,8 +1086,9 @@
<vpe:tag name="iframe" case-sensitive="no">
<vpe:template children="yes" modify="no">
<iframe src="{src(@src)}" align="{@align}" frameborder="{@frameborder}"
- height="{@height}" hspace="{@hspace}" name="{@name}" scrolling="{@scrolling}"
- vspace="{@vspace}" width="{@width}" />
+ height="{@height}" name="{@name}" scrolling="{@scrolling}"
+ width="{@width}" longdesc="{@longdesc}" marginheight="{@marginheight}"
+ marginwidth="{@marginwidth}"/>
<vpe:dnd>
<vpe:drag start-enable="yes" />
</vpe:dnd>
@@ -1183,7 +1185,7 @@
<vpe:template children="no" modify="no">
<!-- <img src="{@src}" width="20" height="20" />-->
<input type="image" value="{@value}" class="{@class}" style="{@style}"
- size="{@size}" disabled="{@disabled}" width="{@width}" height="{@height}" border="{@border}" dir="{@dir}" src="{src(@src)}" />
+ size="{@size}" disabled="{@disabled}" border="{@border}" dir="{@dir}" src="{src(@src)}" />
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="no">
@@ -1421,11 +1423,13 @@
<vpe:template children="yes" modify="no">
<vpe:copy
attrs="align,classid,code,codebase,codetype,data,height,hspace,type,vspace,width,class,id,dir" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="param" />
- <vpe:container-child tag-name="object" />
- <vpe:container-child tag-name="embed" />
- </vpe:drop>
+ <vpe:dnd>
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="param" />
+ <vpe:container-child tag-name="object" />
+ <vpe:container-child tag-name="embed" />
+ </vpe:drop>
+ </vpe:dnd>
</vpe:template>
</vpe:tag>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd 2009-02-05 12:09:25 UTC (rev 13484)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd 2009-02-05 13:57:19 UTC (rev 13485)
@@ -72,7 +72,11 @@
<xsd:element minOccurs="0" name="em" type="vpe:HTML_EM" form="unqualified" maxOccurs="unbounded"/>
<xsd:element minOccurs="0" name="i" type="vpe:HTML_I" form="unqualified" maxOccurs="unbounded"/>
<xsd:element minOccurs="0" name="ol" type="vpe:HTML_OL" form="unqualified" maxOccurs="unbounded"/>
-
+ <xsd:element minOccurs="0" name="form" type="vpe:HTML_FORM" form="unqualified" maxOccurs="unbounded"/>
+ <xsd:element minOccurs="0" name="frame" type="vpe:HTML_FRAME" form="unqualified" maxOccurs="unbounded"/>
+ <xsd:element minOccurs="0" name="iframe" type="vpe:HTML_IFRAME" form="unqualified" maxOccurs="unbounded"/>
+
+
<!-- VPE tags -->
<xsd:element minOccurs="0" name="panellayout" type="vpe:PANELLAYOT"/>
<xsd:element minOccurs="0" name="list" type="vpe:LIST"/>
@@ -519,7 +523,31 @@
<xsd:attribute name="width" use="optional" type="xsd:string"/>
<xsd:attribute name="title" use="optional" type="xsd:string"/>
</xsd:complexType>
-<!-- -->
+<!-- -->
+ <xsd:complexType name="HTML_FRAME">
+ <xsd:attribute name="frameborder" use="optional" type="xsd:string"/>
+ <xsd:attribute name="longdesc" use="optional" type="xsd:string"/>
+ <xsd:attribute name="marginheight" use="optional" type="xsd:string"/>
+ <xsd:attribute name="marginwidth" use="optional" type="xsd:string"/>
+ <xsd:attribute name="name" use="optional" type="xsd:string"/>
+ <xsd:attribute name="noresize" use="optional" type="xsd:string"/>
+ <xsd:attribute name="scrolling" use="optional" type="xsd:string"/>
+ <xsd:attribute name="src" use="optional" type="xsd:string" />
+ </xsd:complexType>
+ <!-- -->
+ <xsd:complexType name="HTML_IFRAME">
+ <xsd:attribute name="align" use="optional" type="xsd:string"/>
+ <xsd:attribute name="frameborder" use="optional" type="xsd:string"/>
+ <xsd:attribute name="height" use="optional" type="xsd:string"/>
+ <xsd:attribute name="longdesc" use="optional" type="xsd:string"/>
+ <xsd:attribute name="marginheight" use="optional" type="xsd:string"/>
+ <xsd:attribute name="marginwidth" use="optional" type="xsd:string"/>
+ <xsd:attribute name="name" use="optional" type="xsd:string"/>
+ <xsd:attribute name="scrolling" use="optional" type="xsd:string"/>
+ <xsd:attribute name="src" use="optional" type="xsd:string" />
+ <xsd:attribute name="width" use="optional" type="xsd:string"/>
+ </xsd:complexType>
+<!-- -->
<xsd:complexType name="HTML_OL"/>
<!-- -->
<xsd:complexType name="HTML_I"/>
@@ -533,6 +561,8 @@
<xsd:complexType name="HTML_UL"/>
<!-- -->
<xsd:complexType name="HTML_P"/>
+ <!-- -->
+ <xsd:complexType name="HTML_FORM"/>
<!-- -->
<xsd:complexType name="DEFAULT_TEMPLATE">
<xsd:sequence>
15 years, 2 months
JBoss Tools SVN: r13484 - in trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui: texteditors and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-02-05 07:09:25 -0500 (Thu, 05 Feb 2009)
New Revision: 13484
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/UIMessages.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/messages.properties
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorStandAlone.java
Log:
JBIDE-3741
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/UIMessages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/UIMessages.java 2009-02-05 12:05:24 UTC (rev 13483)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/UIMessages.java 2009-02-05 12:09:25 UTC (rev 13484)
@@ -25,4 +25,5 @@
public static String PROPERTIES;
public static String PREVIEW;
public static String MUST_BE_IFILEEDITORINPUT;
+ public static String CANNOT_DISPLAY_DOCUMENT_CONTENTS;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/messages.properties 2009-02-05 12:05:24 UTC (rev 13483)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/messages/messages.properties 2009-02-05 12:09:25 UTC (rev 13484)
@@ -3,3 +3,4 @@
PROPERTIES=Properties
PREVIEW=Preview
MUST_BE_IFILEEDITORINPUT=Invalid Input: Must be IFileEditorInput
+CANNOT_DISPLAY_DOCUMENT_CONTENTS=Cannot display document contents.
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java 2009-02-05 12:05:24 UTC (rev 13483)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java 2009-02-05 12:09:25 UTC (rev 13484)
@@ -27,9 +27,12 @@
import org.eclipse.jface.text.TextEvent;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
@@ -53,6 +56,7 @@
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.editor.IModelObjectEditorInput;
+import org.jboss.tools.common.model.ui.messages.UIMessages;
import org.jboss.tools.common.model.ui.texteditors.xmleditor.XMLTextEditor;
import org.jboss.tools.common.model.util.PositionSearcher;
@@ -81,8 +85,24 @@
public TextEditorSupport getSupport() {
return support;
}
-
+
+ boolean isNullEditor = false;
+
+ public void createPartControl(Composite parent) {
+ if(getModel() == null) {
+ setObject(null);
+ isNullEditor = true;
+ Label label = new Label(parent, SWT.NONE);
+ label.setText(UIMessages.CANNOT_DISPLAY_DOCUMENT_CONTENTS);
+ label.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ return;
+ } else {
+ super.createPartControl(parent);
+ }
+ }
+
public void setObject(XModelObject object) {
+ if(isNullEditor) return;
isObjectNull = (object == null);
if(isObjectNull) return;
getDocumentListenerRegister().unregister();
@@ -157,11 +177,13 @@
}
public void addFocusListener(FocusListener listener) {
- getSourceViewer().getTextWidget().addFocusListener(listener);
+ ISourceViewer sv = getSourceViewer();
+ if (sv != null) sv.getTextWidget().addFocusListener(listener);
}
public void removeFocusListener(FocusListener listener) {
- getSourceViewer().getTextWidget().removeFocusListener(listener);
+ ISourceViewer sv = getSourceViewer();
+ if (sv != null) getSourceViewer().getTextWidget().removeFocusListener(listener);
}
public void setCursor(int line, int position) {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorStandAlone.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorStandAlone.java 2009-02-05 12:05:24 UTC (rev 13483)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorStandAlone.java 2009-02-05 12:09:25 UTC (rev 13484)
@@ -25,7 +25,6 @@
import org.jboss.tools.common.model.event.XModelTreeEvent;
import org.jboss.tools.common.model.event.XModelTreeListener;
import org.jboss.tools.common.model.filesystems.impl.FolderImpl;
-import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.util.XModelTreeListenerSWTSync;
public class XMLTextEditorStandAlone extends XMLTextEditorComponent implements XModelTreeListener {
@@ -43,6 +42,9 @@
public void createPartControl(Composite parent) {
super.createPartControl(parent);
+ if(getModel() == null) {
+ return;
+ }
XModelObject o = getModelObject();
setObject(o);
if(o != null) o.getModel().addModelTreeListener(syncListener);
15 years, 2 months
JBoss Tools SVN: r13483 - trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-02-05 07:05:24 -0500 (Thu, 05 Feb 2009)
New Revision: 13483
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/ToggleOccurencesMarkUpAction.java
Log:
JBIDE-3741
Modified: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/ToggleOccurencesMarkUpAction.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/ToggleOccurencesMarkUpAction.java 2009-02-05 10:15:58 UTC (rev 13482)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/ToggleOccurencesMarkUpAction.java 2009-02-05 12:05:24 UTC (rev 13483)
@@ -64,7 +64,7 @@
StructuredTextEditor sse = getStructuredTextEditor(getTextEditor());
if (sse instanceof IOccurrencePreferenceProvider) {
fOccurrencePreferenceProvider = (IOccurrencePreferenceProvider)sse;
- if (fOccurrencePreferenceProvider != null) {
+ if (fOccurrencePreferenceProvider != null && fOccurrencePreferenceProvider.getOccurrencePreferenceProvider() != null) {
fEditorId = fOccurrencePreferenceProvider.getOccurrencePreferenceProvider().getEditorId();
fKey = PreferenceKeyGenerator.generateKey(
OccurrencePreferenceConstants.EDITOR_MARK_OCCURRENCES,
15 years, 2 months