JBoss Tools SVN: r23772 - trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2010-07-28 07:21:41 -0400 (Wed, 28 Jul 2010)
New Revision: 23772
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
Log:
JBIDE-6706: StackOverflowError in KB Project Validator
Issue is fixed
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2010-07-28 11:07:46 UTC (rev 23771)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2010-07-28 11:21:41 UTC (rev 23772)
@@ -145,7 +145,8 @@
fTypeOfArrayElement = type.getTypeOfArrayElement();
}
for (int i = 0; i < fParameters.length; i++) {
- fParameters[i].initializeParameters(parameters);
+ if (type != fParameters[i])
+ fParameters[i].initializeParameters(parameters);
}
}
13 years, 9 months
JBoss Tools SVN: r23771 - in trunk/vpe/tests/org.jboss.tools.vpe.spring.test: src/org/jboss/tools/vpe/spring/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-07-28 07:07:46 -0400 (Wed, 28 Jul 2010)
New Revision: 23771
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringTestPlugin.java
Log:
https://jira.jboss.org/browse/JBIDE-6711
https://jira.jboss.org/browse/JBIDE-6721
- minor change: an unnecessary method is removed, a comment is added
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java 2010-07-28 10:38:34 UTC (rev 23770)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java 2010-07-28 11:07:46 UTC (rev 23771)
@@ -1,5 +1,9 @@
package org.jboss.tools.vpe.spring.test.springtest;
+/**
+ *
+ * @author Yahor Radtsevich (yradtsevich)
+ */
public class FormBean {
private boolean chechbox1Selected = false;
private boolean chechbox2Selected = true;
Modified: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringTestPlugin.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringTestPlugin.java 2010-07-28 10:38:34 UTC (rev 23770)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringTestPlugin.java 2010-07-28 11:07:46 UTC (rev 23771)
@@ -10,13 +10,8 @@
******************************************************************************/
package org.jboss.tools.vpe.spring.test;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Platform;
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
-import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
/**
@@ -70,16 +65,4 @@
public static IPluginLog getPluginLog() {
return getDefault();
}
-
- public static String getPluginResourcePath() {
- Bundle bundle = Platform.getBundle(PLUGIN_ID);
- URL url = null;
- try {
- url = bundle == null ? null : FileLocator.resolve(bundle
- .getEntry("/resources")); //$NON-NLS-1$
- } catch (Exception e) {
- url = bundle.getEntry("/resources"); //$NON-NLS-1$
- }
- return (url == null) ? null : url.getPath();
- }
}
\ No newline at end of file
13 years, 9 months
JBoss Tools SVN: r23770 - trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-07-28 06:38:34 -0400 (Wed, 28 Jul 2010)
New Revision: 23770
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/MultipleHyperlinkPresenterManager.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/EventListHyperlink.java
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointListHyperlink.java
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ObserverMethodListHyperlink.java
Log:
https://jira.jboss.org/browse/JBIDE-3124
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/EventListHyperlink.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/EventListHyperlink.java 2010-07-28 09:58:55 UTC (rev 23769)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/EventListHyperlink.java 2010-07-28 10:38:34 UTC (rev 23770)
@@ -16,13 +16,7 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jface.text.hyperlink.MultipleHyperlinkPresenter;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
import org.jboss.tools.cdi.core.IInjectionPoint;
-import org.jboss.tools.cdi.core.IObserverMethod;
import org.jboss.tools.cdi.text.ext.CDIExtensionsMessages;
import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlink;
@@ -31,16 +25,12 @@
private Set<IInjectionPoint> events;
private IRegion region;
- private static MultipleHyperlinkPresenter mhp = new MultipleHyperlinkPresenter(new RGB(0, 0, 255));
- private static boolean installed = false;
-
public EventListHyperlink(ITextViewer viewer, IRegion region, Set<IInjectionPoint> events, IDocument document){
this.viewer = viewer;
this.events = events;
this.region = region;
setDocument(document);
}
-
@Override
protected IRegion doGetHyperlinkRegion(int offset) {
@@ -60,39 +50,10 @@
return;
}
- if(installed){
- installed = false;
- mhp.uninstall();
- }
-
if(hyperlinks.length == 1){
((EventHyperlink)hyperlinks[0]).doHyperlink(region);
}else{
- installed = true;
-
- mhp.install(viewer);
- mhp.showHyperlinks(hyperlinks);
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().addPartListener(new IPartListener(){
- public void partActivated(IWorkbenchPart arg0) {
- }
-
- public void partBroughtToTop(IWorkbenchPart arg0) {
- }
-
- public void partClosed(IWorkbenchPart arg0) {
- if(installed){
- installed = false;
- mhp.uninstall();
- }
- }
-
- public void partDeactivated(IWorkbenchPart arg0) {
-
- }
-
- public void partOpened(IWorkbenchPart arg0) {
- }
- });
+ MultipleHyperlinkPresenterManager.installAndShow(viewer, hyperlinks);
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointListHyperlink.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointListHyperlink.java 2010-07-28 09:58:55 UTC (rev 23769)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointListHyperlink.java 2010-07-28 10:38:34 UTC (rev 23770)
@@ -19,12 +19,6 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jface.text.hyperlink.MultipleHyperlinkPresenter;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.ITextEditor;
import org.jboss.tools.cdi.core.CDICoreNature;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.CDIUtil;
@@ -41,9 +35,6 @@
private IRegion region;
private ITextViewer viewer;
- private static MultipleHyperlinkPresenter mhp = new MultipleHyperlinkPresenter(new RGB(0, 0, 255));
- private static boolean installed = false;
-
public InjectedPointListHyperlink(IFile file, ITextViewer viewer, IRegion region, IJavaElement element, int position, IDocument document){
this.file = file;
this.element = element;
@@ -97,39 +88,10 @@
return;
}
- if(installed){
- installed = false;
- mhp.uninstall();
- }
-
if(hyperlinks.length == 1){
((InjectedPointHyperlink)hyperlinks[0]).doHyperlink(region);
}else{
- installed = true;
-
- mhp.install(viewer);
- mhp.showHyperlinks(hyperlinks);
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().addPartListener(new IPartListener(){
- public void partActivated(IWorkbenchPart arg0) {
- }
-
- public void partBroughtToTop(IWorkbenchPart arg0) {
- }
-
- public void partClosed(IWorkbenchPart arg0) {
- if(installed){
- installed = false;
- mhp.uninstall();
- }
- }
-
- public void partDeactivated(IWorkbenchPart arg0) {
-
- }
-
- public void partOpened(IWorkbenchPart arg0) {
- }
- });
+ MultipleHyperlinkPresenterManager.installAndShow(viewer, hyperlinks);
}
}
Added: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/MultipleHyperlinkPresenterManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/MultipleHyperlinkPresenterManager.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/MultipleHyperlinkPresenterManager.java 2010-07-28 10:38:34 UTC (rev 23770)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.text.ext.hyperlink;
+
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.hyperlink.MultipleHyperlinkPresenter;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+
+public class MultipleHyperlinkPresenterManager {
+ private static MultipleHyperlinkPresenter mhp = new MultipleHyperlinkPresenter(new RGB(0, 0, 255));
+ private static boolean installed = false;
+ private static MyPartListener listener = new MyPartListener();
+
+ public static void installAndShow(ITextViewer viewer, IHyperlink[] hyperlinks){
+ if(installed)
+ uninstall();
+
+ mhp.install(viewer);
+ mhp.showHyperlinks(hyperlinks);
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().addPartListener(listener);
+ installed = true;
+ }
+
+ public static void uninstall(){
+ installed = false;
+ mhp.uninstall();
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().removePartListener(listener);
+ }
+
+ static class MyPartListener implements IPartListener{
+ public MyPartListener(){
+
+ }
+
+ public void partActivated(IWorkbenchPart arg0) {
+ }
+
+ public void partBroughtToTop(IWorkbenchPart arg0) {
+ }
+
+ public void partClosed(IWorkbenchPart arg0) {
+ if(installed){
+ uninstall();
+ }
+ }
+
+ public void partDeactivated(IWorkbenchPart arg0) {
+
+ }
+
+ public void partOpened(IWorkbenchPart arg0) {
+ }
+ }
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/MultipleHyperlinkPresenterManager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ObserverMethodListHyperlink.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ObserverMethodListHyperlink.java 2010-07-28 09:58:55 UTC (rev 23769)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/ObserverMethodListHyperlink.java 2010-07-28 10:38:34 UTC (rev 23770)
@@ -16,11 +16,6 @@
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jface.text.hyperlink.MultipleHyperlinkPresenter;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.ui.IPartListener;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.PlatformUI;
import org.jboss.tools.cdi.core.IObserverMethod;
import org.jboss.tools.cdi.text.ext.CDIExtensionsMessages;
import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlink;
@@ -30,16 +25,12 @@
private Set<IObserverMethod> observerMethods;
private IRegion region;
- private static MultipleHyperlinkPresenter mhp = new MultipleHyperlinkPresenter(new RGB(0, 0, 255));
- private static boolean installed = false;
-
public ObserverMethodListHyperlink(ITextViewer viewer, IRegion region, Set<IObserverMethod> observerMethods, IDocument document){
this.viewer = viewer;
this.observerMethods = observerMethods;
this.region = region;
setDocument(document);
}
-
@Override
protected IRegion doGetHyperlinkRegion(int offset) {
@@ -59,39 +50,10 @@
return;
}
- if(installed){
- installed = false;
- mhp.uninstall();
- }
-
if(hyperlinks.length == 1){
((ObserverMethodHyperlink)hyperlinks[0]).doHyperlink(region);
}else{
- installed = true;
-
- mhp.install(viewer);
- mhp.showHyperlinks(hyperlinks);
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().addPartListener(new IPartListener(){
- public void partActivated(IWorkbenchPart arg0) {
- }
-
- public void partBroughtToTop(IWorkbenchPart arg0) {
- }
-
- public void partClosed(IWorkbenchPart arg0) {
- if(installed){
- installed = false;
- mhp.uninstall();
- }
- }
-
- public void partDeactivated(IWorkbenchPart arg0) {
-
- }
-
- public void partOpened(IWorkbenchPart arg0) {
- }
- });
+ MultipleHyperlinkPresenterManager.installAndShow(viewer, hyperlinks);
}
}
13 years, 9 months
JBoss Tools SVN: r23769 - in trunk/vpe: plugins/org.jboss.tools.vpe.spring and 36 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-07-28 05:58:55 -0400 (Wed, 28 Jul 2010)
New Revision: 23769
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.spring/
trunk/vpe/plugins/org.jboss.tools.vpe.spring/.classpath
trunk/vpe/plugins/org.jboss.tools.vpe.spring/.project
trunk/vpe/plugins/org.jboss.tools.vpe.spring/META-INF/
trunk/vpe/plugins/org.jboss.tools.vpe.spring/META-INF/MANIFEST.MF
trunk/vpe/plugins/org.jboss.tools.vpe.spring/about.html
trunk/vpe/plugins/org.jboss.tools.vpe.spring/build.properties
trunk/vpe/plugins/org.jboss.tools.vpe.spring/plugin.properties
trunk/vpe/plugins/org.jboss.tools.vpe.spring/plugin.xml
trunk/vpe/plugins/org.jboss.tools.vpe.spring/pom.xml
trunk/vpe/plugins/org.jboss.tools.vpe.spring/src/
trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/
trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/.classpath
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/.project
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/META-INF/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/META-INF/MANIFEST.MF
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/build.properties
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/plugin.properties
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/plugin.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/pom.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.classpath
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.project
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/.jsdtscope
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/com.springsource.server.ide.jdt.core.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.jdt.core.prefs
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.ltk.core.refactoring.prefs
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.common.component
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.jsdt.ui.superType.container
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.jsdt.ui.superType.name
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.validation.prefs
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.maven.ide.eclipse.prefs
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.springframework.ide.eclipse.beans.core.prefs
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.springframework.ide.eclipse.core.prefs
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.springBeans
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/pom.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormController.java
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/resources/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkbox.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkbox.jsp.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/form.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/form.jsp.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/web.xml
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/resources/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/test/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/test/java/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/test/java/org/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/test/java/org/jboss/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/test/java/org/jboss/tools/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/test/java/org/jboss/tools/vpe/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/test/java/org/jboss/tools/vpe/spring/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/test/java/org/jboss/tools/vpe/spring/test/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/test/java/org/jboss/tools/vpe/spring/test/springtest/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/test/resources/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringAllTests.java
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringFormComponentTest.java
trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringTestPlugin.java
Log:
https://jira.jboss.org/browse/JBIDE-6711
https://jira.jboss.org/browse/JBIDE-6721
- org.jboss.tools.vpe.spring plugin initial commit (two Spring tags are already implemented: form:form and form:checkbox)
- org.jboss.tools.vpe.spring.test initial commit (SpringTest project is inside along with JUnits for form:form and form:checkbox)
Added: trunk/vpe/plugins/org.jboss.tools.vpe.spring/.classpath
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/.classpath (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/.classpath 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/vpe/plugins/org.jboss.tools.vpe.spring/.project
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/.project (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/.project 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.vpe.spring</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/vpe/plugins/org.jboss.tools.vpe.spring/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/META-INF/MANIFEST.MF (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/META-INF/MANIFEST.MF 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %bundleName
+Bundle-SymbolicName: org.jboss.tools.vpe.spring;singleton:=true
+Bundle-Version: 3.1.0.qualifier
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.jboss.tools.vpe
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: %vendorName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added: trunk/vpe/plugins/org.jboss.tools.vpe.spring/about.html
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/about.html (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/about.html 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>©2007 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the
+Content is being redistributed by another party ("Redistributor") and different
+terms and conditions may apply to your use of any object code in the Content.
+Check the Redistributor's license that was provided with the Content. If no such
+license exists, contact the Redistributor. Unless otherwise indicated below, the
+terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at
+ <A href="http://www.jboss.org/tools">http://www.jboss.org/tools</A>.</P>
+
+</BODY>
+</HTML>
\ No newline at end of file
Added: trunk/vpe/plugins/org.jboss.tools.vpe.spring/build.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/build.properties (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/build.properties 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ templates/,\
+ plugin.properties,\
+ about.html
Added: trunk/vpe/plugins/org.jboss.tools.vpe.spring/plugin.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/plugin.properties (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/plugin.properties 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,3 @@
+#Properties file for org.jboss.tools.vpe.spring
+vendorName = JBoss by Red Hat
+bundleName =Spring support for JBoss Visual Page Editor Plug-in
\ No newline at end of file
Added: trunk/vpe/plugins/org.jboss.tools.vpe.spring/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/plugin.xml (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/plugin.xml 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+ <extension
+ point="org.jboss.tools.vpe.templates">
+ <templates
+ decsription="VPE templates for Spring support"
+ name="Spring"
+ path="templates/vpe-templates-spring.xml">
+ </templates>
+ </extension>
+</plugin>
Added: trunk/vpe/plugins/org.jboss.tools.vpe.spring/pom.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/pom.xml (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/pom.xml 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,14 @@
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <relativePath>../../../parent-pom.xml</relativePath>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.spring.plugins</groupId>
+ <artifactId>org.jboss.tools.vpe.spring</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
Added: trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.spring/templates/vpe-templates-spring.xml 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<vpe:templates xmlns:vpe="http://org.jboss.org/tools/vpe/template"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <vpe:template-taglib
+ uri="http://www.springframework.org/tags/form"
+ prefix="form" />
+ <vpe:template-taglib
+ uri="http://www.springframework.org/tags"
+ prefix="spring" />
+ <vpe:template-taglib
+ uri="http://www.springframework.org/security/tags"
+ prefix="security" />
+
+ <vpe:tag name="form:checkbox" case-sensitive="yes">
+ <vpe:if test="@disabled='true'">
+ <vpe:template children="no" modify="no">
+ <span class="vpe-text">
+ <input type="checkbox" id="{@id}" style="{@cssStyle}"
+ class="{@cssClass}" disabled="disabled"/>
+ <label>
+ <vpe:value expr="{@label}"/>
+ </label>
+ </span>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:if>
+ <vpe:template children="no" modify="no">
+ <span class="vpe-text">
+ <input type="checkbox" id="{@id}" style="{@cssStyle}"
+ class="{@cssClass}"/>
+ <label>
+ <vpe:value expr="{@label}"/>
+ </label>
+ </span>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="form:form" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes">
+ <form id="{@id}" style="{@cssStyle}" class="{@cssClass}"/>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+</vpe:templates>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/.classpath
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/.classpath (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/.classpath 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/.project
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/.project (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/.project 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.vpe.spring.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/META-INF/MANIFEST.MF 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.jboss.tools.vpe.spring.test;singleton:=true
+Bundle-Version: 3.2.0.qualifier
+Bundle-Activator: org.jboss.tools.vpe.spring.test.SpringTestPlugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.jboss.tools.vpe.ui.test,
+ org.jboss.tools.common.text.ext,
+ org.jboss.tools.common.model,
+ org.jboss.tools.vpe.xulrunner,
+ org.junit,
+ org.jboss.tools.vpe.spring;bundle-version="3.1.0",
+ org.jboss.tools.vpe.jsp;bundle-version="3.1.0",
+ org.jboss.tools.vpe.html;bundle-version="3.1.0"
+Bundle-ActivationPolicy: lazy
+Export-Package: org.jboss.tools.vpe.spring.test
+Bundle-Vendor: %Bundle-Vendor.0
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/build.properties
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/build.properties (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/build.properties 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,13 @@
+bin.includes = META-INF/,\
+ resources/,\
+ plugin.properties,\
+ plugin.xml,\
+ .
+jars.compile.order = .
+src.includes = src/,\
+ resources/,\
+ META-INF/,\
+ build.properties,\
+ plugin.xml
+source.. = src/
+output.. = bin/
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/plugin.properties
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/plugin.properties (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/plugin.properties 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,3 @@
+#Properties file for org.jboss.tools.vpe.spring.test
+Bundle-Vendor.0 = JBoss by Red Hat
+Bundle-Name.0 = Spring Test Plug-in
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/plugin.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/plugin.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/plugin.xml 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.3"?>
+<plugin>
+ <extension
+ point="org.jboss.tools.vpe.ui.tests">
+ <tests
+ description="Unit tests for Spring support in VPE"
+ name="Spring Tests"
+ testSuite="org.jboss.tools.vpe.spring.test.SpringAllTests"/>
+ <testProject
+ name="SpringTest"
+ path="resources/SpringTest"/>
+ </extension>
+
+</plugin>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/pom.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/pom.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/pom.xml 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,36 @@
+<project
+xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <relativePath>../../../parent-pom.xml</relativePath>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.spring.tests</groupId>
+ <artifactId>org.jboss.tools.vpe.spring.test</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+ <properties>
+ <emma.filter>org.jboss.tools*</emma.filter>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <configuration>
+ <product>org.jboss.tools.tests</product>
+ <explodedBundles>
+ <bundle>org.jboss.tools.vpe</bundle>
+ <bundle>org.mozilla.xulrunner.carbon.macosx</bundle>
+ <bundle>org.mozilla.xulrunner.cocoa.macosx</bundle>
+ <bundle>org.mozilla.xulrunner.gtk.linux.x86</bundle>
+ <bundle>org.mozilla.xulrunner.gtk.linux.x86_64</bundle>
+ <bundle>org.mozilla.xulrunner.win32.win32.x86</bundle>
+ </explodedBundles>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.classpath
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.classpath (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.classpath 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+ <attributes>
+ <attribute name="owner.project.facets" value="java"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.project
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.project (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.project 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>SpringTest</name>
+ <comment></comment>
+ <projects>
+ <project>Servers</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.ajdt.core.ajbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.springframework.ide.eclipse.core.springbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.springsource.sts.roo.core.nature</nature>
+ <nature>org.eclipse.ajdt.ui.ajnature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.springframework.ide.eclipse.core.springnature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ </natures>
+</projectDescription>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/.jsdtscope
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/.jsdtscope (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/.jsdtscope 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+ <attributes>
+ <attribute name="hide" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+ <classpathentry kind="output" path=""/>
+</classpath>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/com.springsource.server.ide.jdt.core.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/com.springsource.server.ide.jdt.core.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/com.springsource.server.ide.jdt.core.xml 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,2 @@
+<classpath>
+</classpath>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.jdt.core.prefs 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,8 @@
+#Wed Jul 28 09:46:16 EEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.ltk.core.refactoring.prefs
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.ltk.core.refactoring.prefs (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.ltk.core.refactoring.prefs 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,3 @@
+#Thu Mar 11 16:34:45 EST 2010
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.common.component 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="SpringTest">
+ <wb-resource deploy-path="/" source-path="/src/main/webapp"/>
+ <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
+ <property name="java-output-path" value="target/classes"/>
+ <property name="context-root" value="SpringTest"/>
+ </wb-module>
+</project-modules>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.common.project.facet.core.xml 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <fixed facet="jst.web"/>
+ <fixed facet="jst.java"/>
+ <installed facet="jst.web" version="2.5"/>
+ <installed facet="jst.java" version="1.6"/>
+</faceted-project>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.jsdt.ui.superType.container
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.jsdt.ui.superType.container (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.jsdt.ui.superType.container 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.jsdt.ui.superType.name
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.jsdt.ui.superType.name (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.jsdt.ui.superType.name 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1 @@
+Window
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.validation.prefs
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.validation.prefs (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.eclipse.wst.validation.prefs 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,6 @@
+#Fri Jun 06 17:00:12 BST 2008
+DELEGATES_PREFERENCE=delegateValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator\=org.eclipse.wst.wsdl.validation.internal.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator\=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator;
+USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsf.validation.internal.JSPSemanticsValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator;org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator;
+USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.wsdl.validation.internal.eclipse.WSDLDelegatingValidator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.jst.jsf.validation.internal.JSPSemanticsValidator;org.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator;org.eclipse.wst.common.componentcore.internal.ModuleCoreValidator;org.eclipse.jst.jsf.validation.internal.appconfig.AppConfigValidator;org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator;org.eclipse.wst.html.internal.validation.HTMLValidator;org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;org.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;org.eclipse.wst.wsi.ui.internal.WSIMessageValidator;
+USER_PREFERENCE=overrideGlobalPreferencesfalse
+eclipse.preferences.version=1
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.maven.ide.eclipse.prefs 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,9 @@
+#Tue Mar 17 14:28:16 EDT 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.springframework.ide.eclipse.beans.core.prefs
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.springframework.ide.eclipse.beans.core.prefs (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.springframework.ide.eclipse.beans.core.prefs 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,4 @@
+#Tue Mar 16 01:34:25 CET 2010
+eclipse.preferences.version=1
+org.springframework.ide.eclipse.beans.core.ignoreMissingNamespaceHandler=false
+org.springframework.ide.eclipse.beans.core.loadNamespaceHandlerFromClasspath=false
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.springframework.ide.eclipse.core.prefs
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.springframework.ide.eclipse.core.prefs (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.settings/org.springframework.ide.eclipse.core.prefs 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,69 @@
+#Tue Mar 16 01:34:25 CET 2010
+eclipse.preferences.version=1
+org.springframework.ide.eclipse.core.builders.enable.aopreferencemodelbuilder=true
+org.springframework.ide.eclipse.core.builders.enable.beanmetadatabuilder=true
+org.springframework.ide.eclipse.core.builders.enable.osgibundleupdater=false
+org.springframework.ide.eclipse.core.enable.project.preferences=false
+org.springframework.ide.eclipse.core.validator.enable.com.springsource.server.ide.manifest.core.manifestvalidator=true
+org.springframework.ide.eclipse.core.validator.enable.com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.enable.com.springsource.sts.server.quickfix.manifestvalidator=false
+org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.core.springvalidator=false
+org.springframework.ide.eclipse.core.validator.enable.org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.applicationSymbolicNameRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.applicationVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleActivationPolicyRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleActivatorRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleManifestVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleNameRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleSymbolicNameRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.bundleVersionRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.exportPackageRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.importRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.parsingProblemsRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.server.ide.manifest.core.requireBundleRule-com.springsource.server.ide.manifest.core.manifestvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.AvoidDriverManagerDataSource-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.ImportElementsAtTopRulee-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.ParentBeanSpecifiesAbstractClassRule-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.RefElementRule-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.TooManyBeansInFileRule-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.UnnecessaryValueElementRule-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.com.springsource.sts.bestpractices.UseBeanInheritance-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.bestpractices.legacyxmlusage.jndiobjectfactory-com.springsource.sts.bestpractices.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.importBundleVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.importLibraryVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.importPackageVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.com.springsource.sts.server.quickfix.requireBundleVersionRule-com.springsource.sts.server.quickfix.manifestvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.autowire.autowire-org.springframework.ide.eclipse.beans.core.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanAlias-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanClass-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanConstructorArgument-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinition-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanDefinitionHolder-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanFactory-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanInitDestroyMethod-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.beanReference-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.methodOverride-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.parsingProblems-org.springframework.ide.eclipse.beans.core.beansvalidator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.requiredProperty-org.springframework.ide.eclipse.beans.core.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.beans.core.toolAnnotation-org.springframework.ide.eclipse.beans.core.beansvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.core.springClasspath-org.springframework.ide.eclipse.core.springvalidator=false
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.action-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.actionstate-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attribute-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.attributemapper-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.beanaction-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationaction-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.evaluationresult-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.exceptionhandler-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.import-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.inputattribute-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.mapping-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.outputattribute-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.set-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.state-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.subflowstate-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.transition-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.variable-org.springframework.ide.eclipse.webflow.core.validator=true
+org.springframework.ide.eclipse.core.validator.rule.enable.org.springframework.ide.eclipse.webflow.core.validation.webflowstate-org.springframework.ide.eclipse.webflow.core.validator=true
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.springBeans
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.springBeans (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/.springBeans 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beansProjectDescription>
+ <version>1</version>
+ <pluginVersion><![CDATA[2.3.1.201003090936-RELEASE]]></pluginVersion>
+ <configSuffixes>
+ <configSuffix><![CDATA[xml]]></configSuffix>
+ </configSuffixes>
+ <enableImports><![CDATA[true]]></enableImports>
+ <configs>
+ <config>src/main/resources/META-INF/spring/integration.xml</config>
+ <config>src/main/resources/META-INF/spring/security.xml</config>
+ <config>src/main/resources/META-INF/spring/theorchid/controllers.xml</config>
+ </configs>
+ <configSets>
+ </configSets>
+</beansProjectDescription>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/pom.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/pom.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/pom.xml 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,277 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.springframework.samples</groupId>
+ <artifactId>SpringTest</artifactId>
+ <name>SpringTest</name>
+ <packaging>war</packaging>
+ <version>1.0.0-BUILD-SNAPSHOT</version>
+ <properties>
+ <java-version>1.6</java-version>
+ <org.springframework-version>3.0.3.BUILD-SNAPSHOT</org.springframework-version>
+ <org.springframework.webflow-version>2.1.0.BUILD-SNAPSHOT</org.springframework.webflow-version>
+ <org.springframework.security-version>3.0.2.RELEASE</org.springframework.security-version>
+ <org.aspectj-version>1.6.8</org.aspectj-version>
+ </properties>
+ <dependencies>
+ <!-- Spring -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${org.springframework-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ <version>${org.springframework-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-orm</artifactId>
+ <version>${org.springframework-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${org.springframework-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.webflow</groupId>
+ <artifactId>spring-webflow</artifactId>
+ <version>${org.springframework.webflow-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.webflow</groupId>
+ <artifactId>spring-js</artifactId>
+ <version>${org.springframework.webflow-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-web</artifactId>
+ <version>${org.springframework.security-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-taglibs</artifactId>
+ <version>${org.springframework.security-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-config</artifactId>
+ <version>${org.springframework.security-version}</version>
+ </dependency>
+ <!-- ROO dependencies -->
+ <dependency>
+ <groupId>org.springframework.roo</groupId>
+ <artifactId>org.springframework.roo.annotations</artifactId>
+ <version>1.0.2.RELEASE</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- AspectJ -->
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ <version>${org.aspectj-version}</version>
+ </dependency>
+
+ <!-- @Inject -->
+ <dependency>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ <version>1</version>
+ </dependency>
+
+ <!-- Database -->
+ <dependency>
+ <groupId>org.hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.10</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- Servlet -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.2</version>
+ </dependency>
+
+ <!-- Apache Tiles -->
+ <dependency>
+ <groupId>org.apache.tiles</groupId>
+ <artifactId>tiles-jsp</artifactId>
+ <version>2.1.3</version>
+ </dependency>
+
+ <!-- Hibernate JPA 2 Provider -->
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.5.0-Final</version>
+ </dependency>
+
+ <!-- JSR 303 with Hibernate Validator -->
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <version>1.0.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>4.0.2.GA</version>
+ </dependency>
+
+ <!-- Joda Time -->
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time-jsptags</artifactId>
+ <version>1.0.2</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.2</version>
+ <type>jar</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <!-- For testing against latest Spring snapshots -->
+ <repository>
+ <id>org.springframework.maven.snapshot</id>
+ <name>Spring Maven Snapshot Repository</name>
+ <url>http://maven.springframework.org/snapshot</url>
+ <releases><enabled>false</enabled></releases>
+ <snapshots><enabled>true</enabled></snapshots>
+ </repository>
+ <!-- For developing against latest Spring milestones -->
+ <repository>
+ <id>org.springframework.maven.milestone</id>
+ <name>Spring Maven Milestone Repository</name>
+ <url>http://maven.springframework.org/milestone</url>
+ <snapshots><enabled>false</enabled></snapshots>
+ </repository>
+ <!-- Maven Central -->
+ <repository>
+ <id>org.maven.central</id>
+ <name>Maven Central Repository</name>
+ <url>http://repo1.maven.org/maven2</url>
+ <snapshots><enabled>false</enabled></snapshots>
+ </repository>
+ <!-- For released artifacts not in Maven Central -->
+ <!-- Needed for for annotations until it is added to central -->
+ <repository>
+ <id>com.springsource.repository.bundles.release</id>
+ <name>SpringSource Bundle Repository</name>
+ <url>http://repository.springsource.com/maven/bundles/release</url>
+ <snapshots><enabled>false</enabled></snapshots>
+ </repository>
+ <!-- Needed for Hibernate, which is not published to central -->
+ <repository>
+ <id>org.jboss.repository</id>
+ <name>JBoss Maven Repository</name>
+ <url>http://repository.jboss.org/maven2</url>
+ <snapshots><enabled>false</enabled></snapshots>
+ </repository>
+ </repositories>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>${java-version}</source>
+ <target>${java-version}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <warName>SpringTest</warName>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>install</id>
+ <phase>install</phase>
+ <goals>
+ <goal>sources</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>aspectj-maven-plugin</artifactId>
+ <!-- Have to use version 1.2 since version 1.3 does not appear to work with ITDs -->
+ <version>1.2</version>
+ <dependencies>
+ <!-- You must use Maven 2.0.9 or above or these are ignored (see MNG-2972) -->
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ <version>${org.aspectj-version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.aspectj</groupId>
+ <artifactId>aspectjtools</artifactId>
+ <version>${org.aspectj-version}</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <goals>
+ <goal>compile</goal>
+ <goal>test-compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <outxml>true</outxml>
+ <source>${java-version}</source>
+ <target>${java-version}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <junitArtifactName>junit:junit</junitArtifactName>
+ <excludes>
+ <exclude>**/*_Roo_*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>tomcat-maven-plugin</artifactId>
+ <version>1.0-beta-1</version>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormBean.java 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,26 @@
+package org.jboss.tools.vpe.spring.test.springtest;
+
+public class FormBean {
+ private boolean chechbox1Selected = false;
+ private boolean chechbox2Selected = true;
+ private boolean chechbox3Selected = false;
+
+ public boolean isChechbox1Selected() {
+ return chechbox1Selected;
+ }
+ public void setChechbox1Selected(boolean chechbox1Selected) {
+ this.chechbox1Selected = chechbox1Selected;
+ }
+ public boolean isChechbox2Selected() {
+ return chechbox2Selected;
+ }
+ public void setChechbox2Selected(boolean chechbox2Selected) {
+ this.chechbox2Selected = chechbox2Selected;
+ }
+ public boolean isChechbox3Selected() {
+ return chechbox3Selected;
+ }
+ public void setChechbox3Selected(boolean chechbox3Selected) {
+ this.chechbox3Selected = chechbox3Selected;
+ }
+}
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormController.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormController.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/java/org/jboss/tools/vpe/spring/test/springtest/FormController.java 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,29 @@
+package org.jboss.tools.vpe.spring.test.springtest;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.Controller;
+
+/**
+ *
+ * @author Yahor Radtsevich (yradtsevich)
+ */
+public class FormController implements Controller {
+
+ protected final Log logger = LogFactory.getLog(getClass());
+
+ public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+
+ String viewName = request.getServletPath().replace(".htm", "");
+ FormBean formBean = new FormBean();
+ return new ModelAndView(viewName, "formBean", formBean);
+ }
+}
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkbox.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkbox.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkbox.jsp 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,29 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<html>
+<head>
+ <style>
+ .tall-checkbox {
+ -moz-appearance: none;
+ height: 30px;
+ }
+ </style>
+</head>
+<body>
+ <h1>Test of form:checkbox</h1>
+
+ <form:form modelAttribute="formBean">
+ <form:checkbox id="checkbox1" path="chechbox1Selected" />
+ form:checkbox with id and path attributes
+ <br/>
+ <form:checkbox id="checkbox2" path="chechbox2Selected"
+ cssStyle="width: 30px;" cssClass="tall-checkbox"
+ label="form:checkbox with id, path, cssStyle, cssClass and label attributes. (Must look as a big square.)"/>
+ <br/>
+ <form:checkbox id="checkbox3" path="chechbox3Selected"
+ disabled="true"
+ label="form:checkbox with id, path and disabled='true' attributes."/>
+ <br/>
+ </form:form>
+</body>
+</html>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkbox.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkbox.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/checkbox.jsp.xml 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,27 @@
+<tests>
+ <test id="checkbox1">
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="checkbox" ID="checkbox1" />
+ <LABEL>
+ </LABEL>
+ </SPAN>
+ </test>
+ <test id="checkbox2">
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="checkbox" CLASS="tall-checkbox" ID="checkbox2"
+ STYLE="width: 30px;" />
+ <LABEL>
+ form:checkbox with id, path, cssStyle, cssClass and label
+ attributes. (Must be big square.)
+ </LABEL>
+ </SPAN>
+ </test>
+ <test id="checkbox3">
+ <SPAN CLASS="vpe-text">
+ <INPUT TYPE="checkbox" DISABLED="disabled" ID="checkbox3" />
+ <LABEL>
+ form:checkbox with id, path and disabled='true' attributes.
+ </LABEL>
+ </SPAN>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/form.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/form.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/form.jsp 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,22 @@
+<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
+<html>
+<head>
+ <style>
+ .yellow-text {
+ color: yellow
+ }
+ </style>
+</head>
+<body>
+ <h1>Test of form:form</h1>
+
+ <form:form id="form1">
+ This is a form:form with id-attribute.
+ </form:form>
+
+ <form:form id="form2" cssClass="yellow-text" cssStyle="background-color: black">
+ This is a form:form with style and class attributes. Yellow text on black background.
+ </form:form>
+</body>
+</html>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/form.jsp.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/form.jsp.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/jsp/form.jsp.xml 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,18 @@
+<tests>
+ <test id="form1">
+ <FORM ID="form1">
+ <SPAN CLASS="vpe-text">
+ This is a form:form with id-attribute.
+ </SPAN>
+ </FORM>
+ </test>
+ <test id="form2">
+ <FORM CLASS="yellow-text" ID="form2"
+ STYLE="background-color: black;">
+ <SPAN CLASS="vpe-text">
+ This is a form:form with style and class attributes. Yellow text on black
+ background.
+ </SPAN>
+ </FORM>
+ </test>
+</tests>
\ No newline at end of file
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/springapp-servlet.xml 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
+
+ <!-- the application context definition for the springapp DispatcherServlet -->
+
+ <bean name="/form.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
+ <bean name="/checkbox.htm" class="org.jboss.tools.vpe.spring.test.springtest.FormController"/>
+
+ <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
+ <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property>
+ <property name="prefix" value="/WEB-INF/jsp"></property>
+ <property name="suffix" value=".jsp"></property>
+ </bean>
+</beans>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/WEB-INF/web.xml 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
+ http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
+
+ <servlet>
+ <servlet-name>springapp</servlet-name>
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>springapp</servlet-name>
+ <url-pattern>*.htm</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>
+ index.jsp
+ </welcome-file>
+ </welcome-file-list>
+
+</web-app>
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/resources/SpringTest/src/main/webapp/index.jsp 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,5 @@
+<a href="checkbox.htm">checkbox.htm</a>
+<br/>
+<a href="form.htm">form.htm</a>
+<br/>
+
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringAllTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringAllTests.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringAllTests.java 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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.vpe.spring.test;
+
+import org.jboss.tools.vpe.ui.test.VpeTestSetup;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Class for testing all RichFaces components
+ *
+ * @author Yahor Radtsevich (yradtsevich)
+ *
+ */
+
+public class SpringAllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Tests for Vpe Spring components"); //$NON-NLS-1$
+ // $JUnit-BEGIN$
+ suite.addTestSuite(SpringFormComponentTest.class);
+ //cleanUpTests();
+ // $JUnit-END$
+ return new VpeTestSetup(suite);
+ }
+}
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringFormComponentTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringFormComponentTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringFormComponentTest.java 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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.vpe.spring.test;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * Class for testing form spring components
+ *
+ * @author Yahor Radtsevich (yradtsevich)
+ *
+ */
+public class SpringFormComponentTest extends VpeTest {
+
+ // import project name
+ static final String IMPORT_PROJECT_NAME = "SpringTest"; //$NON-NLS-1$
+
+ public SpringFormComponentTest(String name) {
+ super(name);
+ }
+
+ /*
+ * Spring Form test cases
+ */
+
+ public void testCheckbox() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getResource(
+ "src/main/webapp/WEB-INF/jsp/checkbox.jsp", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+
+ public void testForm() throws Throwable {
+ performTestForVpeComponent((IFile)TestUtil.getResource(
+ "src/main/webapp/WEB-INF/jsp/form.jsp", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ }
+}
Added: trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringTestPlugin.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringTestPlugin.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.spring.test/src/org/jboss/tools/vpe/spring/test/SpringTestPlugin.java 2010-07-28 09:58:55 UTC (rev 23769)
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * 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.vpe.spring.test;
+
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.common.log.BaseUIPlugin;
+import org.jboss.tools.common.log.IPluginLog;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ *
+ * @author Yahor Radtsevich (yradtsevich)
+ */
+public class SpringTestPlugin extends BaseUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.vpe.spring.test"; //$NON-NLS-1$
+
+ // The shared instance
+ private static SpringTestPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public SpringTestPlugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static SpringTestPlugin getDefault() {
+ return plugin;
+ }
+
+ public static IPluginLog getPluginLog() {
+ return getDefault();
+ }
+
+ public static String getPluginResourcePath() {
+ Bundle bundle = Platform.getBundle(PLUGIN_ID);
+ URL url = null;
+ try {
+ url = bundle == null ? null : FileLocator.resolve(bundle
+ .getEntry("/resources")); //$NON-NLS-1$
+ } catch (Exception e) {
+ url = bundle.getEntry("/resources"); //$NON-NLS-1$
+ }
+ return (url == null) ? null : url.getPath();
+ }
+}
\ No newline at end of file
13 years, 9 months
JBoss Tools SVN: r23768 - in branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui: META-INF and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2010-07-28 05:35:52 -0400 (Wed, 28 Jul 2010)
New Revision: 23768
Added:
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/ProcessNodeType.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeDependency.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksInputType.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksModelUtils.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiPageEditorContributor.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksXMLEditor.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/Messages.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/SmooksConfigurationFormPage.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/messages.properties
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/ISmooksModelProvider.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/ISourceSynchronizeListener.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/Messages.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/messages.properties
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/ISmooksActionProvider.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/Messages.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/messages.properties
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/ISmooksEditorInitListener.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/Messages.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksMessage.java
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/messages.properties
Modified:
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/plugin.xml
Log:
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2010-07-28 09:06:32 UTC (rev 23767)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2010-07-28 09:35:52 UTC (rev 23768)
@@ -10,7 +10,13 @@
org.eclipse.core.resources,
org.eclipse.ui.editors,
org.eclipse.ui.forms,
- org.eclipse.ui.ide;bundle-version="3.6.0"
+ org.eclipse.ui.ide,
+ org.jboss.tools.smooks.ecore.model,
+ org.eclipse.wst.sse.core,
+ org.eclipse.wst.sse.ui,
+ org.eclipse.emf.common,
+ org.jboss.tools.smooks.runtime,
+ org.eclipse.emf.edit
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/plugin.xml
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/plugin.xml 2010-07-28 09:06:32 UTC (rev 23767)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/plugin.xml 2010-07-28 09:35:52 UTC (rev 23768)
@@ -26,4 +26,18 @@
id="org.jboss.tools.smooks.configuration.wizards.NewConfigurationFileWizard">
</wizard>
</extension>
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ class="org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor"
+ contributorClass="org.jboss.tools.smooks.configuration.editors.SmooksMultiPageEditorContributor"
+ default="false"
+ icon="icons/smooks-sm.gif"
+ id="org.jboss.tools.smooks.ui.smookseditor"
+ name="Smooks Editor">
+ <contentTypeBinding
+ contentTypeId="org.jboss.tools.smooks.ui.smooks.contentType">
+ </contentTypeBinding>
+ </editor>
+ </extension>
</plugin>
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/ProcessNodeType.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/ProcessNodeType.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/ProcessNodeType.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.tools.smooks.configuration;
+
+/**
+ * Configuration process node type enumeration.
+ *
+ * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
+ */
+public enum ProcessNodeType {
+ INPUT_CSV,
+ INPUT_EDI,
+ INPUT_JSON,
+
+ BASE,
+ CORE,
+ CALC,
+ DATASOURCE,
+ FIXED_LENGTH,
+ JAVA_BINDING,
+ PERSISTENCE,
+ ROUTING,
+ RULES,
+ SCRIPTING,
+ TEMPLATING,
+ VALIDATION,
+}
\ No newline at end of file
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/ProcessNodeType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeDependency.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeDependency.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeDependency.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,215 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.tools.smooks.configuration;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.milyn.Smooks;
+import org.milyn.SmooksException;
+import org.milyn.container.ExecutionContext;
+import org.milyn.delivery.sax.SAXElement;
+import org.milyn.delivery.sax.SAXVisitBefore;
+
+/**
+ * Smooks runtime dependency.
+ *
+ * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
+ */
+public class RuntimeDependency {
+
+ /**
+ * Smooks runtime versions.
+ */
+ public static enum SmooksVersion {
+ v1_0,
+ v1_1,
+ v1_2,
+ v1_3,
+ }
+
+ /**
+ * The Maven Artfact ID of the Smooks dependency.
+ */
+ private String artifactId;
+ /**
+ * The configuration namespace URI for the config..
+ */
+ private URI namespaceURI;
+ /**
+ * If the namepsaceURI is unsupported by the editor, this property can contain a change-to/upgrade/downgrade namepsace.
+ */
+ private URI changeToNS;
+ /**
+ * Whether or not the configuration is supported by the Editor. Note that this property being 'false' is not the
+ * same as saying the config is not supported by the Smooks Runtime (see the 'runtimeVersions' property).
+ */
+ private boolean supportedByEditor;
+ /**
+ * The list of Smooks Runtimes that can support this configuration. Note this does not mean
+ * the editor can support the configuration (see the 'supportedByEditor' property).
+ */
+ private List<SmooksVersion> runtimeVersions;
+
+ private static final String GROUP_ID = "org.milyn"; //$NON-NLS-1$
+ private static final String META_INF = "META-INF"; //$NON-NLS-1$
+ private static final String MILYN_SMOOKS_CORE = "milyn-smooks-core"; //$NON-NLS-1$
+ private static final String MILYN_SMOOKS_CSV = "milyn-smooks-csv"; //$NON-NLS-1$
+ private static final String MILYN_SMOOKS_EDI = "milyn-smooks-edi"; //$NON-NLS-1$
+ private static final String MILYN_SMOOKS_JSON = "milyn-smooks-json"; //$NON-NLS-1$
+ private static final String MILYN_SMOOKS_TEMPLATING = "milyn-smooks-templating"; //$NON-NLS-1$
+ private static final String MILYN_SMOOKS_JAVABEAN = "milyn-smooks-javabean"; //$NON-NLS-1$
+ private static final String MILYN_SMOOKS_FIXED_LENGTH = "milyn-smooks-fixed-length"; //$NON-NLS-1$
+ private static final String MILYN_SMOOKS_CALC = "milyn-smooks-calc"; //$NON-NLS-1$
+ private static final String MILYN_SMOOKS_PERSISTENCE = "milyn-smooks-persistence"; //$NON-NLS-1$
+ private static final String MILYN_SMOOKS_ROUTING = "milyn-smooks-routing"; //$NON-NLS-1$
+ private static final String MILYN_SMOOKS_RULES = "milyn-smooks-rules"; //$NON-NLS-1$
+ private static final String MILYN_SMOOKS_SCRIPTING = "milyn-smooks-scripting"; //$NON-NLS-1$
+ private static final String MILYN_SMOOKS_VALIDATION = "milyn-smooks-validation"; //$NON-NLS-1$
+
+ private RuntimeDependency(String artifactId, URI namespaceURI, URI changeToNS, boolean supportedByEditor, List<SmooksVersion> runtimeVersions) {
+ this.artifactId = artifactId;
+ this.namespaceURI = namespaceURI;
+ this.changeToNS = changeToNS;
+ this.supportedByEditor = supportedByEditor;
+ }
+
+ public String getGroupId() {
+ return GROUP_ID;
+ }
+ public String getArtifactId() {
+ return artifactId;
+ }
+ public URI getNamespaceURI() {
+ return namespaceURI;
+ }
+ public URI getChangeToNS() {
+ return changeToNS;
+ }
+ public boolean isSupportedByEditor() {
+ return supportedByEditor;
+ }
+ public boolean isSupportedBySmooksVersion(SmooksVersion smooksVersion) {
+ return runtimeVersions.contains(smooksVersion);
+ }
+ public boolean isOnProjectClasspath(ClassLoader projectClassloader) {
+ String resourcePath = META_INF + namespaceURI.getPath();
+ return (projectClassloader.getResource(resourcePath) != null);
+ }
+
+ public static void addDependencyChecklist(Smooks metadataExtractor) {
+ // Add the supported feature dependency details...
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.BASE, "smooks-1.1.xsd", null, true, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CSV, ProcessNodeType.INPUT_CSV, "smooks/csv-1.2.xsd", null, true, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_EDI, ProcessNodeType.INPUT_EDI, "smooks/edi-1.2.xsd", null, true, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_JSON, ProcessNodeType.INPUT_JSON, "smooks/json-1.2.xsd", null, true, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_TEMPLATING, ProcessNodeType.TEMPLATING, "smooks/freemarker-1.1.xsd", null, true, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/freemarker"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_JAVABEAN, ProcessNodeType.JAVA_BINDING, "smooks/javabean-1.2.xsd", null, true, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/bean"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // Add the unsupported feature dependency details...
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.BASE, "smooks-1.0.xsd", "smooks-1.1.xsd", false, SmooksVersion.v1_0, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CSV, ProcessNodeType.INPUT_CSV, "smooks/csv-1.1.xsd", "smooks/csv-1.2.xsd", false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CSV, ProcessNodeType.INPUT_CSV, "smooks/csv-1.3.xsd", "smooks/csv-1.2.xsd", false, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_EDI, ProcessNodeType.INPUT_EDI, "smooks/edi-1.1.xsd", "smooks/edi-1.2.xsd", false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_JSON, ProcessNodeType.INPUT_JSON, "smooks/json-1.1.xsd", "smooks/json-1.2.xsd", false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_FIXED_LENGTH, ProcessNodeType.FIXED_LENGTH, "smooks/fixed-length-1.3.xsd", null, false, SmooksVersion.v1_3), "/smooks-resource-list/reader"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.DATASOURCE, "smooks/datasource-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/direct"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.DATASOURCE, "smooks/datasource-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/JNDI"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.DATASOURCE, "smooks/datasource-1.3.xsd", null, false, SmooksVersion.v1_3), "/smooks-resource-list/direct"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.DATASOURCE, "smooks/datasource-1.3.xsd", null, false, SmooksVersion.v1_3), "/smooks-resource-list/JNDI"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.CORE, "smooks/core-1.3.xsd", null, false, SmooksVersion.v1_3), "/smooks-resource-list/filterSettings"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.CORE, "smooks/core-1.3.xsd", null, false, SmooksVersion.v1_3), "/smooks-resource-list/namespaces"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CORE, ProcessNodeType.CORE, "smooks/core-1.3.xsd", null, false, SmooksVersion.v1_3), "/smooks-resource-list/terminate"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_TEMPLATING, ProcessNodeType.TEMPLATING, "smooks/xsl-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/xsl"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_JAVABEAN, ProcessNodeType.JAVA_BINDING, "smooks/javabean-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/binding"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_JAVABEAN, ProcessNodeType.JAVA_BINDING, "smooks/javabean-1.3.xsd", null, false, SmooksVersion.v1_3), "/smooks-resource-list/bean"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_CALC, ProcessNodeType.CALC, "smooks/calc-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/counter"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_PERSISTENCE, ProcessNodeType.PERSISTENCE, "smooks/persistence-1.2.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/inserter"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_PERSISTENCE, ProcessNodeType.PERSISTENCE, "smooks/persistence-1.2.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/updater"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_PERSISTENCE, ProcessNodeType.PERSISTENCE, "smooks/persistence-1.2.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/deleter"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_PERSISTENCE, ProcessNodeType.PERSISTENCE, "smooks/persistence-1.2.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/deleter"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_PERSISTENCE, ProcessNodeType.PERSISTENCE, "smooks/persistence-1.2.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/flusher"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_PERSISTENCE, ProcessNodeType.PERSISTENCE, "smooks/persistence-1.2.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/locator"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_ROUTING, ProcessNodeType.ROUTING, "smooks/db-routing-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/executor"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_ROUTING, ProcessNodeType.ROUTING, "smooks/db-routing-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/resultSetRowSelector"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_ROUTING, ProcessNodeType.ROUTING, "smooks/file-routing-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/outputStream"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_ROUTING, ProcessNodeType.ROUTING, "smooks/io-routing-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/router"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_ROUTING, ProcessNodeType.ROUTING, "smooks/jms-routing-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/router"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_ROUTING, ProcessNodeType.ROUTING, "smooks/jms-routing-1.2.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/router"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_RULES, ProcessNodeType.RULES, "smooks/rules-1.0.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/ruleBases"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_SCRIPTING, ProcessNodeType.SCRIPTING, "smooks/groovy-1.1.xsd", null, false, SmooksVersion.v1_1, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/groovy"); //$NON-NLS-1$ //$NON-NLS-2$
+ metadataExtractor.addVisitor(new RuntimeDependencyTracker(MILYN_SMOOKS_VALIDATION, ProcessNodeType.VALIDATION, "smooks/validation-1.0.xsd", null, false, SmooksVersion.v1_2, SmooksVersion.v1_3), "/smooks-resource-list/rule"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ private static class RuntimeDependencyTracker implements SAXVisitBefore {
+
+ private String artifactId;
+ private ProcessNodeType nodeType;
+ private URI namespaceURI;
+ private URI changeToNS;
+ /**
+ * Whether or not the configuration is supported by the Editor. Note that this property being 'false' is not the
+ * same as saying the config is not supported by the Smooks Runtime (see the 'runtimeVersions' property).
+ */
+ private boolean supportedByEditor;
+ /**
+ * The list of Smooks Runtimes that can support this configuration. Note this does not mean
+ * the editor can support the configuration (see the 'supportedByEditor' property).
+ */
+ private List<SmooksVersion> runtimeVersions = new ArrayList<SmooksVersion>();
+
+ public RuntimeDependencyTracker(String artifactId, ProcessNodeType nodeType, String xsd, String changeToXSD, boolean supportedByEditor, SmooksVersion... runtimeVersions) {
+ this.artifactId = artifactId;
+ this.nodeType = nodeType;
+ this.namespaceURI = URI.create("http://www.milyn.org/xsd/" + xsd); //$NON-NLS-1$
+ if(changeToXSD != null) {
+ this.changeToNS = URI.create("http://www.milyn.org/xsd/" + changeToXSD); //$NON-NLS-1$
+ }
+ this.supportedByEditor = supportedByEditor;
+ if(runtimeVersions != null) {
+ this.runtimeVersions.addAll(Arrays.asList(runtimeVersions));
+ }
+ }
+
+ public void visitBefore(SAXElement configElement, ExecutionContext execContext) throws SmooksException, IOException {
+ RuntimeMetadata metadata = (RuntimeMetadata) execContext.getAttribute(RuntimeMetadata.class);
+ Set<URI> alreadyProcessed = (Set<URI>) execContext.getAttribute(RuntimeDependencyTracker.class);
+
+ metadata.getNodeTypes().add(nodeType);
+
+ if(alreadyProcessed == null) {
+ alreadyProcessed = new HashSet<URI>();
+ execContext.setAttribute(RuntimeDependencyTracker.class, alreadyProcessed);
+ }
+
+ // If the config namespace hasn't already been added, we need to add it...
+ String configNS = configElement.getName().getNamespaceURI();
+ if(configNS.equals(namespaceURI.toString()) && !alreadyProcessed.contains(namespaceURI)) {
+ metadata.getDependencies().add(new RuntimeDependency(artifactId, namespaceURI, changeToNS, supportedByEditor, runtimeVersions));
+ alreadyProcessed.add(namespaceURI);
+ }
+ }
+ }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeDependency.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,251 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.tools.smooks.configuration;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+import javax.xml.transform.stream.StreamSource;
+
+import org.eclipse.core.resources.IResource;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.milyn.Smooks;
+import org.milyn.SmooksException;
+import org.milyn.container.ExecutionContext;
+import org.milyn.delivery.sax.SAXElement;
+import org.milyn.delivery.sax.SAXVisitAfter;
+import org.milyn.delivery.sax.SAXVisitBefore;
+
+/**
+ * Smooks configuration runtime metadata.
+ * <p/>
+ * Verifies the specified config is a Smooks configuration and extracts metadata
+ * from the config e.g. input file, dependencies.
+ *
+ * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
+ */
+public class RuntimeMetadata {
+
+ private Smooks metadataExtractor;
+ private boolean isSmooksConfig;
+ private boolean isValidSmooksConfig;
+ private File configFile;
+ private String inputType;
+ private File inputFile;
+ private Set<ProcessNodeType> processNodeTypes = new HashSet<ProcessNodeType>();
+ private List<RuntimeDependency> dependencies = new ArrayList<RuntimeDependency>();
+
+ public RuntimeMetadata() {
+ metadataExtractor = new Smooks();
+ metadataExtractor.addVisitor(new SmooksConfigAsserter(), "/smooks-resource-list", //$NON-NLS-1$
+ "http://www.milyn.org/xsd/smooks-1.1.xsd"); //$NON-NLS-1$
+ metadataExtractor.addVisitor(new InputParamExtractor(), "/smooks-resource-list/params/param", //$NON-NLS-1$
+ "http://www.milyn.org/xsd/smooks-1.1.xsd"); //$NON-NLS-1$
+
+ // Build dependency map...
+ RuntimeDependency.addDependencyChecklist(metadataExtractor);
+ }
+
+ public boolean isSmooksConfig() {
+ return isSmooksConfig;
+ }
+
+ public boolean isValidSmooksConfig() {
+ return isValidSmooksConfig;
+ }
+
+ public String getErrorMessage() {
+ if (isValidSmooksConfig) {
+ throw new IllegalStateException(
+ Messages.RuntimeMetadata_Error_Invalid_GetErrorMessage_Call);
+ }
+
+ if (configFile == null) {
+ return Messages.RuntimeMetadata_Error_SmooksFile_Does_Not_Exist;
+ } else if (!configFile.exists()) {
+ return Messages.RuntimeMetadata_Error_SmooksFile_Not_Found;
+ } else if (!configFile.isFile()) {
+ return Messages.RuntimeMetadata_Error_SmooksFile_Not_Readable;
+ } else if (!isSmooksConfig) {
+ return Messages.RuntimeMetadata_Error_SmooksFile_Not_Valid;
+ } else if (inputFile == null) {
+ return Messages.RuntimeMetadata_Error_Input_Task_No_Input_File;
+ } else if (!inputFile.exists()) {
+ return Messages.RuntimeMetadata_Error_Input_Task_Input_File_Not_Found;
+ } else if (!inputFile.isFile()) {
+ return Messages.RuntimeMetadata_Error_Input_Task_Input_File_Cannot_Be_Read;
+ }
+
+ return ""; //$NON-NLS-1$
+ }
+
+ public File getConfigFile() {
+ return configFile;
+ }
+
+ public String getInputType() {
+ return inputType;
+ }
+
+ public File getInputFile() {
+ return inputFile;
+ }
+
+ public List<RuntimeDependency> getDependencies() {
+ return dependencies;
+ }
+
+ public Set<ProcessNodeType> getNodeTypes() {
+ return processNodeTypes;
+ }
+
+ public String getNodeTypesString() {
+ StringBuilder builder = new StringBuilder();
+ for (ProcessNodeType nodeType : processNodeTypes) {
+ if (builder.length() > 0) {
+ builder.append(',');
+ }
+ builder.append(nodeType.toString());
+ }
+ return builder.toString();
+ }
+
+ public void setSmooksConfig(IResource smooksConfig) {
+ reset();
+
+ if (smooksConfig != null) {
+ setSmooksConfig(new File(smooksConfig.getRawLocation().toOSString().trim()));
+ }
+ }
+
+ public void setSmooksConfig(File file) {
+ reset();
+
+ if (file != null) {
+ configFile = file;
+ if (configFile.exists() && configFile.isFile()) {
+ try {
+ digestSmooksConfig(new FileInputStream(configFile));
+ } catch (Exception e) {
+ // Not a valid Smooks config file
+ }
+ }
+ }
+ }
+
+ public void setSmooksConfig(File file, InputStream inputStream) {
+ if (inputStream == null) {
+ setSmooksConfig(file);
+ } else {
+ configFile = file;
+ if (configFile.exists() && configFile.isFile()) {
+ digestSmooksConfig(inputStream);
+ }
+ }
+ }
+
+ private void digestSmooksConfig(InputStream inputStream) {
+ ExecutionContext execContext = metadataExtractor.createExecutionContext();
+ Properties inputParams = new Properties();
+
+ try {
+ // Filter the config and capture the input params...
+ execContext.setAttribute(InputParamExtractor.class, inputParams);
+ execContext.setAttribute(RuntimeMetadata.class, this);
+
+ metadataExtractor.filterSource(execContext, new StreamSource(inputStream));
+
+ inputType = inputParams.getProperty(SmooksModelUtils.INPUT_TYPE);
+ if (inputType != null) {
+ String inputPath = inputParams.getProperty(inputType);
+ if (inputPath != null) {
+ String resolvedFilePath;
+ try {
+ resolvedFilePath = SmooksUIUtils.parseFilePath(inputPath.trim());
+ } catch (Exception e) {
+ // It's not a valid config...
+ inputFile = new File(inputPath.trim());
+ return;
+ }
+
+ inputFile = new File(resolvedFilePath);
+ if (inputFile.exists() && inputFile.isFile()) {
+ isValidSmooksConfig = true;
+ }
+ }
+ }
+ } catch (Exception e) {
+ // Not a valid Smooks config file
+ }
+ }
+
+
+ private void reset() {
+ isSmooksConfig = false;
+ isValidSmooksConfig = false;
+ configFile = null;
+ inputType = null;
+ inputFile = null;
+ processNodeTypes.clear();
+ }
+
+ private static class SmooksConfigAsserter implements SAXVisitBefore {
+ public void visitBefore(SAXElement paramElement, ExecutionContext execContext) throws SmooksException,
+ IOException {
+ RuntimeMetadata metadata = (RuntimeMetadata) execContext.getAttribute(RuntimeMetadata.class);
+ metadata.isSmooksConfig = true;
+ }
+ }
+
+ private static class InputParamExtractor implements SAXVisitBefore, SAXVisitAfter {
+
+ public void visitBefore(SAXElement paramElement, ExecutionContext execContext) throws SmooksException,
+ IOException {
+ paramElement.accumulateText();
+ }
+
+ public void visitAfter(SAXElement paramElement, ExecutionContext execContext) throws SmooksException,
+ IOException {
+ Properties inputParams = (Properties) execContext.getAttribute(InputParamExtractor.class);
+
+ if (inputParams != null) {
+ String paramName = paramElement.getAttribute("name"); //$NON-NLS-1$
+
+ if (paramName != null) {
+ if (paramName.equals(SmooksModelUtils.INPUT_TYPE)) {
+ inputParams.setProperty(SmooksModelUtils.INPUT_TYPE, paramElement.getTextContent());
+ } else {
+ String paramType = paramElement.getAttribute("type"); //$NON-NLS-1$
+ if (paramType != null && paramType.equals(SmooksModelUtils.INPUT_ACTIVE_TYPE)) {
+ inputParams.setProperty(paramName, paramElement.getTextContent());
+ }
+ }
+ }
+ }
+ }
+ }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksInputType.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksInputType.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksInputType.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * (C) 2005-2006, JBoss Inc.
+ */
+package org.jboss.tools.smooks.configuration;
+
+/**
+ * Smooks Input Type Enumeration.
+ * @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
+ */
+public class SmooksInputType {
+
+ public static final String INPUT_TYPE_JAVA = "input.java"; //$NON-NLS-1$
+
+ public static final String INPUT_TYPE_CUSTOM = "input.custom"; //$NON-NLS-1$
+
+ public static final String INPUT_TYPE_JSON = "input.json"; //$NON-NLS-1$
+
+ public static final String INPUT_TYPE_CSV = "input.csv"; //$NON-NLS-1$
+
+ public static final String INPUT_TYPE_XML = "input.xml"; //$NON-NLS-1$
+
+ public static final String INPUT_TYPE_XSD = "input.xsd"; //$NON-NLS-1$
+
+ public static final String INPUT_TYPE_EDI = "input.edi"; //$NON-NLS-1$
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksInputType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksModelUtils.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksModelUtils.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksModelUtils.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration;
+
+/**
+ * @author Dart Peng
+ *
+ */
+
+public class SmooksModelUtils {
+
+ public static final String KEY_TEMPLATE_TYPE = "messageType"; //$NON-NLS-1$
+
+ public static final String FREEMARKER_TEMPLATE_TYPE_CSV = "CSV"; //$NON-NLS-1$
+
+ public static final String FREEMARKER_TEMPLATE_TYPE_XML = "XML"; //$NON-NLS-1$
+
+ public static final String KEY_CSV_FIELDS = "csvFields"; //$NON-NLS-1$
+
+ public static final String KEY_INCLUDE_FIELD_NAMES = "includeFieldNames"; //$NON-NLS-1$
+
+ public static final String KEY_TASK_ID_REF = "idref"; //$NON-NLS-1$
+
+ public static final String KEY_OBJECT_ID = "id"; //$NON-NLS-1$
+
+ public static final String KEY_XML_FILE_TYPE = "modelSrcType"; //$NON-NLS-1$
+
+ public static final String KEY_XML_FILE_PATH = "modelSrc"; //$NON-NLS-1$
+
+ public static final String KEY_XML_ROOT_NAME = "rootElementName"; //$NON-NLS-1$
+
+ public static final String KEY_XML_FILE_TYPE_XSD = "XSD"; //$NON-NLS-1$
+
+ public static final String KEY_XML_FILE_TYPE_XML = "XML"; //$NON-NLS-1$
+
+ public static final String KEY_CSV_SEPERATOR = "seperator"; //$NON-NLS-1$
+
+ public static final String KEY_CSV_QUOTE = "quote"; //$NON-NLS-1$
+
+ public static final String INPUT_TYPE_JAVA = SmooksInputType.INPUT_TYPE_JAVA;
+
+ public static final String INPUT_TYPE = "inputType"; //$NON-NLS-1$
+
+ public static final String INPUT_TYPE_CUSTOME = SmooksInputType.INPUT_TYPE_CUSTOM;
+
+ public static final String INPUT_TYPE_JSON_1_1 = SmooksInputType.INPUT_TYPE_JSON;
+
+ public static final String INPUT_TYPE_CSV = SmooksInputType.INPUT_TYPE_CSV;
+
+ public static final String INPUT_ACTIVE_TYPE = "input.type.actived"; //$NON-NLS-1$
+
+ public static final String INPUT_DEACTIVE_TYPE = "input.type.deactived"; //$NON-NLS-1$
+
+ public static final String INPUT_TYPE_CSV_1_2 = SmooksInputType.INPUT_TYPE_CSV;
+
+ public static final String PARAM_NAME_CLASS = "class"; //$NON-NLS-1$
+
+ public static final String PARAM_NAME_PATH = "path"; //$NON-NLS-1$
+
+ public static final String PARAM_NAME_ACTIVED = "actived"; //$NON-NLS-1$
+
+ public static final String INPUT_TYPE_XML = SmooksInputType.INPUT_TYPE_XML;
+
+ public static final String INPUT_TYPE_XSD = SmooksInputType.INPUT_TYPE_XSD;
+
+ public static final String TYPE_XSL = "xsl"; //$NON-NLS-1$
+
+ public static final String[] TEMPLATE_TYPES = new String[] { "xsl", "ftl" }; //$NON-NLS-1$ //$NON-NLS-2$
+
+ public static final String BEAN_CLASS = "beanClass"; //$NON-NLS-1$
+
+ public static final String BEAN_ID = "beanId"; //$NON-NLS-1$
+
+ public static final String BINDINGS = "bindings"; //$NON-NLS-1$
+
+ public static final String INPUT_TYPE_EDI_1_1 = SmooksInputType.INPUT_TYPE_EDI;
+
+ public static final String INPUT_TYPE_EDI_1_2 = SmooksInputType.INPUT_TYPE_EDI;
+
+ public static final String INPUT_TYPE_JSON_1_2 = SmooksInputType.INPUT_TYPE_JSON;
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksModelUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,40 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.configuration.editors;
+
+import org.eclipse.ui.PartInitException;
+import org.jboss.tools.smooks.dbm.editor.SmooksConfigurationFormPage;
+import org.jboss.tools.smooks.editor.AbstractSmooksFormEditor;
+
+/**
+ * @author Dart
+ *
+ */
+public class SmooksMultiFormEditor extends AbstractSmooksFormEditor {
+
+ private SmooksConfigurationFormPage optionsPage;
+
+ @Override
+ protected void addPages() {
+
+
+ optionsPage = createSmooksConfigurationOverviewPage();
+ addSourceSynchronizeListener(optionsPage);
+ addSmooksEditorInitListener(optionsPage);
+ try {
+ int index = this.addPage(optionsPage);
+ setPageText(index, Messages.SmooksMultiFormEditor_opetiontab_label);
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ }
+
+ super.addPages();
+ }
+
+ private SmooksConfigurationFormPage createSmooksConfigurationOverviewPage() {
+ return new SmooksConfigurationFormPage(this,
+ "options_page", Messages.SmooksMultiFormEditor_optinepage_name, this); //$NON-NLS-1$
+ }
+
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiPageEditorContributor.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiPageEditorContributor.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiPageEditorContributor.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,77 @@
+package org.jboss.tools.smooks.configuration.editors;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
+import org.eclipse.ui.texteditor.ITextEditorActionConstants;
+import org.jboss.tools.smooks.graphical.actions.ISmooksActionProvider;
+
+/**
+ * Manages the installation/deinstallation of global actions for multi-page editors.
+ * Responsible for the redirection of global actions to the active editor.
+ * Multi-page contributor replaces the contributors for the individual editors in the multi-page editor.
+ */
+public class SmooksMultiPageEditorContributor extends MultiPageEditorActionBarContributor {
+ private IEditorPart activeEditorPart;
+ /**
+ * Creates a multi-page contributor.
+ */
+ public SmooksMultiPageEditorContributor() {
+ super();
+ }
+
+
+ protected IAction getAction(IEditorPart editor , String actionID){
+ if(editor instanceof ISmooksActionProvider){
+ return ((ISmooksActionProvider)editor).getAction(actionID);
+ }
+ return null;
+ }
+
+ /* (non-JavaDoc)
+ * Method declared in AbstractMultiPageEditorActionBarContributor.
+ */
+
+ public void setActivePage(IEditorPart part) {
+ if (activeEditorPart == part)
+ return;
+ activeEditorPart = part;
+ IActionBars actionBars = getActionBars();
+ if (actionBars != null) {
+
+ IEditorPart editor = activeEditorPart;
+
+ actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(),
+ getAction(editor, ITextEditorActionConstants.DELETE));
+ actionBars.setGlobalActionHandler(
+ ActionFactory.UNDO.getId(),
+ getAction(editor, ITextEditorActionConstants.UNDO));
+ actionBars.setGlobalActionHandler(
+ ActionFactory.REDO.getId(),
+ getAction(editor, ITextEditorActionConstants.REDO));
+ actionBars.updateActionBars();
+ }
+ }
+// private void createActions() {
+// sampleAction = new Action() {
+// public void run() {
+// MessageDialog.openInformation(null, "Configuration Plug-in", "Sample Action Executed"); //$NON-NLS-1$ //$NON-NLS-2$
+// }
+// };
+// sampleAction.setText("Sample Action"); //$NON-NLS-1$
+// sampleAction.setToolTipText("Sample Action tool tip"); //$NON-NLS-1$
+// sampleAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
+// getImageDescriptor(IDE.SharedImages.IMG_OBJS_TASK_TSK));
+// }
+// public void contributeToMenu(IMenuManager manager) {
+// IMenuManager menu = new MenuManager("Editor &Menu"); //$NON-NLS-1$
+// manager.prependToGroup(IWorkbenchActionConstants.MB_ADDITIONS, menu);
+// menu.add(sampleAction);
+// }
+// public void contributeToToolBar(IToolBarManager manager) {
+// manager.add(new Separator());
+// manager.add(sampleAction);
+// }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiPageEditorContributor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksXMLEditor.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksXMLEditor.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksXMLEditor.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com)
+ * Date Apr 1, 2009
+ */
+public class SmooksXMLEditor extends StructuredTextEditor {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.wst.sse.ui.StructuredTextEditor#doSetInput(org.eclipse.ui.IEditorInput)
+ */
+ @Override
+ public void doSetInput(IEditorInput input) throws CoreException {
+ // TODO Auto-generated method stub
+ super.doSetInput(input);
+ }
+
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksXMLEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.uitls;
+
+import java.io.File;
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+
+/**
+ *
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class SmooksUIUtils {
+
+ public static String[] SMOOKS_PLATFORM_1_1_CONFLICT_NAMESPACES = new String[] {};
+
+ public static final String FILE_PRIX = "File:/"; //$NON-NLS-1$
+
+ public static final String WORKSPACE_PRIX = "Workspace:/"; //$NON-NLS-1$
+
+ public static final String RESOURCE = "Resource:/"; //$NON-NLS-1$
+
+ public static final String XSL_NAMESPACE = " xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" "; //$NON-NLS-1$
+
+ public static int VALUE_TYPE_VALUE = 1;
+
+ public static int VALUE_TYPE_TEXT = 2;
+
+ public static int VALUE_TYPE_COMMENT = 3;
+
+ public static int VALUE_TYPE_CDATA = 0;
+
+ public static final int SELECTOR_EXPAND_MAX_LEVEL = 5;
+
+ public static final String[] SELECTOR_SPERATORS = new String[] { " ", "/" }; //$NON-NLS-1$ //$NON-NLS-2$
+
+ public static String parseFilePath(String path) throws InvocationTargetException {
+ if (path == null)
+ return null;
+ if (new File(path).exists()) {
+ return path;
+ }
+ int index = path.indexOf(FILE_PRIX);
+ if (index != -1) {
+ path = path.substring(index + FILE_PRIX.length(), path.length());
+ } else {
+ index = path.indexOf(WORKSPACE_PRIX);
+ if (index != -1) {
+ path = path.substring(index + WORKSPACE_PRIX.length(), path.length());
+ Path wpath = new Path(path);
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(wpath);
+ if (file.exists()) {
+ path = file.getLocation().toOSString();
+ } else {
+ throw new InvocationTargetException(new Exception("File : " + path + " isn't exsit")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ } else {
+ throw new InvocationTargetException(new Exception("This path is un-support" + path + ".")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ return path;
+ }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/Messages.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/Messages.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/Messages.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,23 @@
+package org.jboss.tools.smooks.dbm.editor;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.smooks.editor.messages"; //$NON-NLS-1$
+ public static String AbstractSmooksFormEditor_Error_Unknown;
+ public static String AbstractSmooksFormEditor_Error_Unsupported;
+ public static String AbstractSmooksFormEditor_Error_Unsupported2;
+ public static String AbstractSmooksFormEditor_Error_Update_Namespace;
+ public static String AbstractSmooksFormEditor_Error_Update_Namespace2;
+ public static String AbstractSmooksFormEditor_Exception_Cannot_Get_Input_File;
+ public static String AbstractSmooksFormEditor_Exception_Transform_URL;
+ public static String AbstractSmooksFormEditor_Source_Page_Title;
+ public static String AbstractSmooksFormEditor_Task_Saving_File;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/Messages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/SmooksConfigurationFormPage.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/SmooksConfigurationFormPage.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/SmooksConfigurationFormPage.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,345 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.dbm.editor;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.IFormColors;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.IMessage;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.ScrolledPageBook;
+import org.eclipse.ui.forms.widgets.Section;
+import org.jboss.tools.smooks.configuration.SmooksConstants;
+import org.jboss.tools.smooks.configuration.editors.Messages;
+import org.jboss.tools.smooks.editor.ISmooksModelProvider;
+import org.jboss.tools.smooks.editor.ISourceSynchronizeListener;
+import org.jboss.tools.smooks.graphical.editors.ISmooksEditorInitListener;
+import org.jboss.tools.smooks.graphical.editors.SmooksMessage;
+import org.jboss.tools.smooks.model.core.ICorePackage;
+import org.jboss.tools.smooks.model.core.IParam;
+import org.jboss.tools.smooks.model.core.Param;
+import org.jboss.tools.smooks.model.core.Params;
+
+/**
+ * @author Dart
+ *
+ */
+public class SmooksConfigurationFormPage extends FormPage implements ISmooksEditorInitListener , ISourceSynchronizeListener {
+
+ private String currentMessage = null;
+ private ISmooksModelProvider smooksModelProvider;
+// private ModelPanelCreator defaultSettingPanelCreator;
+ private Section globalParamSection;
+ private Section settingSection;
+ protected boolean lockEventFire = false;
+
+ private Combo streamFilterTypeCombo;
+ private Button defaultSerializationOnCheckbox;
+ private Combo versionCombo;
+ private int currentMessageType;
+
+ public SmooksConfigurationFormPage(FormEditor editor, String id,
+ String title, ISmooksModelProvider provider) {
+ super(editor, id, title);
+ this.smooksModelProvider = provider;
+ }
+
+ public SmooksConfigurationFormPage(String id, String title, ISmooksModelProvider provider) {
+ super(id, title);
+ this.smooksModelProvider = provider;
+ }
+
+ protected void createFormContent(IManagedForm managedForm) {
+ final ScrolledForm form = managedForm.getForm();
+ FormToolkit toolkit = managedForm.getToolkit();
+ toolkit.decorateFormHeading(form.getForm());
+ String title = getTitle();
+ form.setText(title);
+ GridLayout gl = new GridLayout();
+ gl.marginHeight = 0;
+ gl.marginWidth = 0;
+ form.getBody().setLayout(gl);
+
+ ScrolledPageBook pageBook = new ScrolledPageBook(form.getBody());
+ pageBook.setBackground(toolkit.getColors().getBackground());
+ Composite mainComposite = pageBook.createPage(pageBook);
+ pageBook.showPage(pageBook);
+
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ pageBook.setLayoutData(gd);
+
+ GridLayout mgl = new GridLayout();
+ mgl.numColumns = 2;
+ mgl.horizontalSpacing = 20;
+ mainComposite.setLayout(mgl);
+
+ settingSection = toolkit.createSection(mainComposite, Section.TITLE_BAR);
+ settingSection.setLayout(new FillLayout());
+ settingSection.setText(Messages.SmooksConfigurationOverviewPage_ConfigurationSectionTitle);
+ Composite settingComposite = toolkit.createComposite(settingSection);
+ settingSection.setClient(settingComposite);
+ gd = new GridData();
+ gd.widthHint = 500;
+ gd.verticalAlignment = GridData.BEGINNING;
+ settingSection.setLayoutData(gd);
+
+ GridLayout sgl = new GridLayout();
+ settingComposite.setLayout(sgl);
+ sgl.numColumns = 2;
+
+ createSettingSection(settingComposite, toolkit);
+
+ globalParamSection = toolkit.createSection(mainComposite, Section.TITLE_BAR | Section.TWISTIE
+ | Section.EXPANDED);
+ globalParamSection.setText(Messages.SmooksConfigurationOverviewPage_FilterSettingSectionTitle);
+ globalParamSection.setLayout(new FillLayout());
+ Composite globalParamComposite = toolkit.createComposite(globalParamSection);
+ globalParamSection.setClient(globalParamComposite);
+ gd = new GridData();
+ gd.verticalAlignment = GridData.BEGINNING;
+ gd.widthHint = 500;
+ globalParamSection.setLayoutData(gd);
+
+ GridLayout gpgl = new GridLayout();
+ globalParamComposite.setLayout(gpgl);
+ gpgl.numColumns = 2;
+
+ createGlobalParamterSection(globalParamComposite, toolkit);
+
+
+ updateFormHeader();
+ }
+
+ protected void updateFormHeader() {
+ if (currentMessageType == IMessageProvider.NONE) {
+ if (this.getManagedForm() != null) {
+ getManagedForm().getMessageManager().removeAllMessages();
+ getManagedForm().getMessageManager().update();
+
+ streamFilterTypeCombo.setEnabled(true);
+ defaultSerializationOnCheckbox.setEnabled(true);
+ }
+ } else {
+ if (this.getManagedForm() != null) {
+ streamFilterTypeCombo.setEnabled(false);
+ defaultSerializationOnCheckbox.setEnabled(false);
+ String[] messages = currentMessage.split("\n"); //$NON-NLS-1$
+ List<IMessage> messageList = new ArrayList<IMessage>();
+ for (int i = 0; i < messages.length; i++) {
+ String message = messages[i];
+ if (message != null)
+ message.trim();
+ if (message.length() == 0) {
+ continue;
+ }
+ messageList.add(new SmooksMessage(currentMessageType, message));
+ }
+ String mainMessage = null;
+ if (messageList.isEmpty()) {
+ mainMessage = currentMessage;
+ } else {
+ mainMessage = messageList.get(0).getMessage();
+ }
+ this.getManagedForm().getForm().getForm().setMessage(mainMessage, currentMessageType,
+ messageList.toArray(new IMessage[] {}));
+ }
+ }
+ }
+
+ private void createSettingSection(Composite settingComposite, FormToolkit toolkit) {
+ toolkit.createLabel(settingComposite, Messages.SmooksConfigurationOverviewPage_VersionLabel).setForeground(
+ toolkit.getColors().getColor(IFormColors.TITLE));
+ int type = SWT.BORDER;
+// if (SmooksUIUtils.isLinuxOS()) {
+// type = SWT.BORDER;
+// }
+ versionCombo = new Combo(settingComposite, type | SWT.READ_ONLY);
+ versionCombo.setEnabled(false);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ versionCombo.setLayoutData(gd);
+ for (int i = 0; i < SmooksConstants.SMOOKS_VERSIONS.length; i++) {
+ String version = SmooksConstants.SMOOKS_VERSIONS[i];
+ versionCombo.add(version);
+ }
+
+ String version = getSmooksVersion();
+ if (version != null)
+ versionCombo.setText(version);
+ versionCombo.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent e) {
+ // if (smooksModelProvider != null) {
+ // smooksModelProvider.getSmooksGraphicsExt().setPlatformVersion(v);
+ // }
+ }
+ });
+
+ toolkit.paintBordersFor(settingComposite);
+ }
+
+ private String getSmooksVersion() {
+ return "1.1";
+ }
+
+
+ private void createGlobalParamterSection(Composite globalParamComposite, FormToolkit toolkit) {
+ if (smooksModelProvider != null) {
+
+ toolkit.createLabel(globalParamComposite, Messages.SmooksConfigurationOverviewPage_FilterTypeLabel)
+ .setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ GridData gd = new GridData(SWT.FILL, SWT.NONE, true, false);
+ streamFilterTypeCombo = new Combo(globalParamComposite, SWT.DROP_DOWN | SWT.READ_ONLY);
+ streamFilterTypeCombo.setItems(new String[] { "SAX", "DOM" }); //$NON-NLS-1$ //$NON-NLS-2$
+ streamFilterTypeCombo.setLayoutData(gd);
+
+ toolkit.createLabel(globalParamComposite, Messages.SmooksConfigurationOverviewPage_SerializationLabel)
+ .setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ gd = new GridData(SWT.FILL, SWT.NONE, true, false);
+ defaultSerializationOnCheckbox = toolkit.createButton(globalParamComposite, null, SWT.CHECK); //$NON-NLS-1$
+ defaultSerializationOnCheckbox.setLayoutData(gd);
+
+ initGlobalSettingControls();
+
+ toolkit.paintBordersFor(globalParamComposite);
+
+ streamFilterTypeCombo.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ if (lockEventFire)
+ return;
+ String value = streamFilterTypeCombo.getText();
+ updateGlobalProperty("stream.filter.type", value); //$NON-NLS-1$
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ });
+
+ defaultSerializationOnCheckbox.addSelectionListener(new SelectionListener() {
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ if (lockEventFire)
+ return;
+ String value = Boolean.toString(defaultSerializationOnCheckbox.getSelection());
+ updateGlobalProperty("default.serialization.on", value); //$NON-NLS-1$
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ widgetDefaultSelected(e);
+ }
+ });
+ }
+
+ }
+
+ protected Params getParams(){
+ if(smooksModelProvider != null){
+ return smooksModelProvider.getSmooksModel().getModelRoot().getParams();
+ }
+ return null;
+ }
+
+ protected void initGlobalSettingControls() {
+ Params m = getParams();
+ if (m != null) {
+ EList<IParam> parmList = m.getParams();
+ for (int i = 0; i < parmList.size(); i++) {
+ Param param = (Param) parmList.get(i);
+ if (param.getName().equals("stream.filter.type")) { //$NON-NLS-1$
+ streamFilterTypeCombo.setText(param.getValue());
+ } else if (param.getName().equals("default.serialization.on")) { //$NON-NLS-1$
+ Boolean boolValue = Boolean.valueOf(param.getValue());
+ defaultSerializationOnCheckbox.setSelection(boolValue.booleanValue());
+ }
+ }
+ } else { // set defaults
+ streamFilterTypeCombo.setText("SAX"); //$NON-NLS-1$
+ defaultSerializationOnCheckbox.setSelection(true);
+ }
+ }
+
+ private void updateGlobalProperty(String propertyID, String value) {
+ EditingDomain editingDomain = smooksModelProvider.getEditingDomain();
+ if(editingDomain == null) throw new RuntimeException("Smooks EMF EditingDomain can't be null");
+ boolean foundProperty = false;
+ if (getSmooksVersion() == null) {
+ return;
+ }
+ Params parent = getParams();
+ Param param = null;
+ Param newparam = null;
+ if (parent != null) {
+ List<?> parmList = parent.getParams();
+ for (int i = 0; i < parmList.size(); i++) {
+ param = (Param) parmList.get(i);
+ if (param.getName().equals(propertyID)) {
+ Command command = SetCommand.create(editingDomain, param, ICorePackage.Literals.PARAM__VALUE, value);
+ editingDomain.getCommandStack().execute(command);
+ foundProperty = true;
+ break;
+ }
+ }
+ }
+ if(!foundProperty){
+ newparam = new Param();
+ newparam.setName(propertyID);
+ newparam.setValue(value);
+ Command ac = AddCommand.create(editingDomain,parent, ICorePackage.Literals.PARAMS__PARAMS, newparam);
+ editingDomain.getCommandStack().execute(ac);
+ }
+ }
+
+ public void initFailed(int messageType, String message) {
+
+ }
+
+ public void sourceChange(Object model) {
+ lockEventFire = true;
+ if (streamFilterTypeCombo == null || defaultSerializationOnCheckbox == null || versionCombo == null) {
+ lockEventFire = false;
+ return;
+ }
+ streamFilterTypeCombo.setEnabled(true);
+ defaultSerializationOnCheckbox.setEnabled(true);
+ defaultSerializationOnCheckbox.setSelection(false);
+ String version = getSmooksVersion();
+ if (version == null)
+ version = ""; //$NON-NLS-1$
+ versionCombo.setText(version);
+
+ if (model == null) {
+ // the file was broken
+ streamFilterTypeCombo.setEnabled(false);
+
+ defaultSerializationOnCheckbox.setEnabled(false);
+ defaultSerializationOnCheckbox.setSelection(false);
+ } else {
+ initGlobalSettingControls();
+ }
+ lockEventFire = false;
+ }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/SmooksConfigurationFormPage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/messages.properties
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/messages.properties (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/messages.properties 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,9 @@
+AbstractSmooksFormEditor_Error_Unknown=Unknown error. Please check the file
+AbstractSmooksFormEditor_Error_Unsupported=\n\nSorry, this configuration is not yet supported by the Smooks Editor because it contains configurations from the '
+AbstractSmooksFormEditor_Error_Unsupported2=' configuration namespace.\n\nPlease open this configuration using the XML Editor.
+AbstractSmooksFormEditor_Error_Update_Namespace=\n\nFix: Update the configuration to use the '
+AbstractSmooksFormEditor_Error_Update_Namespace2=' configuration namespace.
+AbstractSmooksFormEditor_Exception_Cannot_Get_Input_File=Can't get the input file
+AbstractSmooksFormEditor_Exception_Transform_URL=Transform URL to URL error.
+AbstractSmooksFormEditor_Source_Page_Title=Source
+AbstractSmooksFormEditor_Task_Saving_File=Saving Smooks config file
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/dbm/editor/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,640 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.editor;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.EventObject;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.common.command.CommandStackListener;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.jface.text.TextViewer;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.jboss.tools.smooks.configuration.RuntimeDependency;
+import org.jboss.tools.smooks.configuration.RuntimeMetadata;
+import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
+import org.jboss.tools.smooks.configuration.editors.SmooksXMLEditor;
+import org.jboss.tools.smooks.graphical.editors.ISmooksEditorInitListener;
+import org.jboss.tools.smooks.model.SmooksEditorModelBuilder;
+import org.jboss.tools.smooks.model.SmooksModel;
+import org.milyn.javabean.dynamic.Model;
+
+/**
+ * @author Dart
+ *
+ */
+public class AbstractSmooksFormEditor extends FormEditor implements
+ ISmooksModelProvider , IEditingDomainProvider{
+
+ private boolean handleEMFModelChange;
+
+ private IResourceChangeListener resourceChangeListener = null;
+
+ protected StructuredTextEditor textEditor = null;
+
+ private IDocumentListener xmlDocumentTraker = null;
+
+ private Exception initSmooksModelException = null;
+
+ protected SmooksEditorModelBuilder smooksEditorModelBuilder = null;
+
+ protected List<ISmooksEditorInitListener> smooksInitListener = new ArrayList<ISmooksEditorInitListener>();
+
+ protected List<ISourceSynchronizeListener> sourceSynchronizeListener = new ArrayList<ISourceSynchronizeListener>();
+
+ protected Model<SmooksModel> smooksModel;
+
+ protected CommandStack commandStack = new BasicCommandStack();
+
+ protected EditingDomain editingDomain;
+
+ protected boolean graphChanged = false;
+
+ private ComposedAdapterFactory adapterFactory;
+
+ public AbstractSmooksFormEditor() {
+ super();
+ resourceChangeListener = new SmooksResourceTraker();
+ xmlDocumentTraker = new SmooksXMLEditorDocumentListener();
+ smooksEditorModelBuilder = new SmooksEditorModelBuilder();
+ }
+
+ private void handleCommandStack(CommandStack commandStack) {
+ commandStack.addCommandStackListener(new CommandStackListener() {
+
+ public void commandStackChanged(EventObject event) {
+ firePropertyChange(IEditorPart.PROP_DIRTY);
+ handleEMFModelChange();
+ }
+ });
+ }
+
+ protected void initEditingDomain() {
+ adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+ handleCommandStack(commandStack);
+ editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap<Resource, Boolean>());
+ }
+
+ @Override
+ public boolean isDirty() {
+ return graphChanged || ((BasicCommandStack)commandStack).isSaveNeeded() || super.isDirty();
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.forms.editor.FormEditor#addPages()
+ */
+ @Override
+ protected void addPages() {
+ textEditor = createTextEditor();
+ try {
+ int index = this.addPage(textEditor, getEditorInput());
+ setPageText(index,
+ Messages.AbstractSmooksFormEditor_Source_Page_Title);
+ } catch (PartInitException e) {
+ e.printStackTrace();
+ }
+ int messageType = IMessageProvider.ERROR;
+ Exception exception = initSmooksModelException;
+ if (exception == null) {
+ exception = checkSmooksConfigContents(null);
+ messageType = IMessageProvider.WARNING;
+ }
+ if (exception != null) {
+ for (Iterator<?> iterator = this.smooksInitListener.iterator(); iterator
+ .hasNext();) {
+ ISmooksEditorInitListener initListener = (ISmooksEditorInitListener) iterator
+ .next();
+ initListener.initFailed(messageType, exception.getMessage());
+ }
+ }
+ }
+
+ public void addSmooksEditorInitListener(ISmooksEditorInitListener listener) {
+ this.smooksInitListener.add(listener);
+ }
+
+ public void removeSmooksEditorInitListener(
+ ISmooksEditorInitListener listener) {
+ this.smooksInitListener.remove(listener);
+ }
+
+ public void addSourceSynchronizeListener(ISourceSynchronizeListener listener) {
+ this.sourceSynchronizeListener.add(listener);
+ }
+
+ public void removeSourceSynchronizeListener(
+ ISourceSynchronizeListener listener) {
+ this.sourceSynchronizeListener.remove(listener);
+ }
+
+ @Override
+ public void init(IEditorSite site, IEditorInput input)
+ throws PartInitException {
+ RuntimeMetadata runtimeMetadata = new RuntimeMetadata();
+ String filePath = null;
+ IFile file = null;
+ if (input instanceof FileStoreEditorInput) {
+ try {
+ filePath = ((FileStoreEditorInput) input).getURI().toURL()
+ .getFile();
+ runtimeMetadata.setSmooksConfig(new File(filePath));
+ } catch (MalformedURLException e) {
+ throw new PartInitException(
+ Messages.AbstractSmooksFormEditor_Exception_Transform_URL,
+ e);
+ }
+ }
+ if (input instanceof IFileEditorInput) {
+ file = ((IFileEditorInput) input).getFile();
+ runtimeMetadata.setSmooksConfig(file);
+ filePath = file.getFullPath().toPortableString();
+ }
+
+ if (filePath == null)
+ throw new PartInitException(
+ Messages.AbstractSmooksFormEditor_Exception_Cannot_Get_Input_File);
+ handleCommandStack(commandStack);
+ super.init(site, input);
+ }
+
+ public void setInput(IEditorInput input) {
+ if (getEditorInput() != null) {
+ IFile file = ((IFileEditorInput) getEditorInput()).getFile();
+ file.getWorkspace().removeResourceChangeListener(
+ resourceChangeListener);
+ }
+
+ super.setInput(input);
+
+ if (getEditorInput() != null) {
+ IFile file = ((IFileEditorInput) getEditorInput()).getFile();
+ file.getWorkspace().addResourceChangeListener(
+ resourceChangeListener);
+ setPartName(file.getName());
+ }
+
+ String filePath = null;
+
+ IFile file = null;
+
+ if (input instanceof IFileEditorInput) {
+ file = ((IFileEditorInput) input).getFile();
+ filePath = file.getFullPath().toPortableString();
+ }
+
+ // create EMF resource
+ if (file != null) {
+ try {
+ smooksModel = smooksEditorModelBuilder.readModel(file
+ .getContents());
+ } catch (Exception e) {
+ initSmooksModelException = e;
+ }
+ } else {
+ }
+
+ // if (ex == null) {
+ // if (smooksModel == null) {
+ // try {
+ // smooksResource.load(Collections.emptyMap());
+ // smooksModel = smooksResource.getContents().get(0);
+ // } catch (IOException e) {
+ //
+ // }
+ // } else {
+ // smooksResource.getContents().add(smooksModel);
+ // }
+ // }
+ }
+
+ protected void handleEMFModelChange() {
+ IDocument document = textEditor.getDocumentProvider().getDocument(
+ textEditor.getEditorInput());
+
+ try {
+ StringWriter writer = new StringWriter();
+ this.smooksModel.writeModel(writer);
+
+ String newContent = writer.toString();
+ // newContent = getFormattedXMLContents(newContent);
+
+ String oldContent = document.get();
+
+ int startIndex = 0;
+ while (startIndex < newContent.length()
+ && startIndex < oldContent.length()
+ && newContent.charAt(startIndex) == oldContent
+ .charAt(startIndex)) {
+ ++startIndex;
+ }
+ int newEndIndex = newContent.length() - 1;
+ int oldEndIndex = oldContent.length() - 1;
+ while (newEndIndex >= startIndex
+ && oldEndIndex >= startIndex
+ && newContent.charAt(newEndIndex) == oldContent
+ .charAt(oldEndIndex)) {
+ --newEndIndex;
+ --oldEndIndex;
+ }
+
+ String replacement = newContent.substring(startIndex,
+ newEndIndex + 1);
+ int length = oldEndIndex - startIndex + 1;
+ handleEMFModelChange = true;
+ document.replace(startIndex, length, replacement);
+
+ // validator.startValidate(smooksModel.eResource().getContents(),
+ // editingDomain);
+
+ } catch (Exception exception) {
+ SmooksConfigurationActivator.log(exception);
+ }
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.
+ * IProgressMonitor)
+ */
+ @Override
+ public void doSave(IProgressMonitor monitor) {
+ if (monitor == null) {
+ monitor = new NullProgressMonitor();
+ }
+ try {
+ IEditorPart activeEditor = getActiveEditor();
+ if (/* this.smooksModel == null || */(activeEditor != null && activeEditor == textEditor)) {
+ textEditor.doSave(monitor);
+ this.commandStack.flush();
+ } else {
+ handleEMFModelChange = true;
+ if (smooksModel != null) {
+ StringWriter writer = new StringWriter();
+ this.smooksModel.writeModel(writer);
+
+ String newContent = writer.toString();
+ IFile file = ((IFileEditorInput) getEditorInput())
+ .getFile();
+ ((IFile) file).setContents(new ByteArrayInputStream(
+ newContent.getBytes()), IResource.FORCE, monitor);
+ monitor.worked(1);
+ this.commandStack.flush();
+ textEditor.doRevertToSaved();
+ }
+ }
+ graphChanged = false;
+ firePropertyChange(PROP_DIRTY);
+
+ } catch (Exception e) {
+ SmooksConfigurationActivator.log(e);
+ } finally {
+ monitor.done();
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.part.EditorPart#doSaveAs()
+ */
+ @Override
+ public void doSaveAs() {
+ // TODO Auto-generated method stub
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+ */
+ @Override
+ public boolean isSaveAsAllowed() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ protected Exception checkSmooksConfigContents(InputStream stream) {
+ // Check
+ Exception exception = null;
+ IFile file = null;
+ String filePath = null;
+ RuntimeMetadata runtimeMetadata = new RuntimeMetadata();
+ IEditorInput input = getEditorInput();
+ if (input instanceof FileStoreEditorInput) {
+ try {
+ filePath = ((FileStoreEditorInput) input).getURI().toURL()
+ .getFile();
+ runtimeMetadata.setSmooksConfig(new File(filePath), stream);
+ } catch (MalformedURLException e) {
+ exception = e;
+ // throw new PartInitException("Transform URL to URL error.",
+ // e);
+ }
+ }
+ if (exception == null) {
+ if (input instanceof IFileEditorInput) {
+ file = ((IFileEditorInput) input).getFile();
+ File f = new File(file.getRawLocation().toOSString().trim());
+ runtimeMetadata.setSmooksConfig(f, stream);
+ }
+
+ try {
+
+ assertConfigSupported(runtimeMetadata);
+
+ } catch (PartInitException e) {
+ exception = e;
+ }
+ }
+ return exception;
+ }
+
+ private void assertConfigSupported(RuntimeMetadata runtimeMetadata)
+ throws PartInitException {
+ List<RuntimeDependency> dependencies = runtimeMetadata
+ .getDependencies();
+
+ for (RuntimeDependency dependency : dependencies) {
+ if (!dependency.isSupportedByEditor()) {
+ java.net.URI changeToNS = dependency.getChangeToNS();
+ String errorMsg = Messages.AbstractSmooksFormEditor_Error_Unsupported
+ + dependency.getNamespaceURI()
+ + Messages.AbstractSmooksFormEditor_Error_Unsupported2;
+
+ if (changeToNS != null) {
+ errorMsg += Messages.AbstractSmooksFormEditor_Error_Update_Namespace
+ + changeToNS
+ + Messages.AbstractSmooksFormEditor_Error_Update_Namespace2;
+ }
+
+ throw new PartInitException(errorMsg);
+ }
+ }
+ }
+
+ protected StructuredTextEditor createTextEditor() {
+ SmooksXMLEditor xmlEditor = new SmooksXMLEditor() {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.SmooksXMLEditor#
+ * doSetInput(org.eclipse.ui.IEditorInput)
+ */
+ @Override
+ public void doSetInput(IEditorInput input) throws CoreException {
+ TextViewer viewer = getTextViewer();
+ if (viewer != null) {
+ IDocument document = viewer.getDocument();
+ if (document != null) {
+ document.removeDocumentListener(xmlDocumentTraker);
+ }
+ }
+ super.doSetInput(input);
+ viewer = getTextViewer();
+ if (viewer != null) {
+ IDocument document = viewer.getDocument();
+ if (document != null) {
+ document.addDocumentListener(xmlDocumentTraker);
+ }
+ }
+ }
+
+ public void createPartControl(Composite parent) {
+ super.createPartControl(parent);
+ getTextViewer().getDocument().addDocumentListener(
+ xmlDocumentTraker);
+
+ }
+
+ };
+ return xmlEditor;
+ }
+
+ public void createNewModelViaTextPage() {
+ IDocumentProvider dp = textEditor.getDocumentProvider();
+ if (dp == null)
+ return;
+ Exception exception = null;
+ int messageType = IMessageProvider.NONE;
+ IDocument document = dp.getDocument(textEditor.getEditorInput());
+ String conents = document.get();
+ InputStream stream = new ByteArrayInputStream(conents.getBytes());
+ exception = checkSmooksConfigContents(stream);
+ if (exception != null)
+ messageType = IMessageProvider.WARNING;
+ if (exception == null) {
+ try {
+ stream = new ByteArrayInputStream(conents.getBytes());
+ this.smooksModel = smooksEditorModelBuilder.readModel(stream);
+ } catch (Exception e) {
+ smooksModel = null;
+ exception = e;
+ messageType = IMessageProvider.ERROR;
+ } finally {
+ if (stream != null) {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ // setPlatformVersion(SmooksUIUtils.judgeSmooksPlatformVersion(smooksModel));
+ // judgeInputReader();
+ for (Iterator<?> iterator = this.sourceSynchronizeListener.iterator(); iterator
+ .hasNext();) {
+ ISourceSynchronizeListener l = (ISourceSynchronizeListener) iterator
+ .next();
+ try {
+ l.sourceChange(smooksModel);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ String message = null;
+ if (exception != null) {
+ message = exception.getMessage();
+ }
+ if (message == null) {
+ message = Messages.AbstractSmooksFormEditor_Error_Unknown;
+ }
+ for (Iterator<?> iterator = this.smooksInitListener.iterator(); iterator
+ .hasNext();) {
+ ISmooksEditorInitListener initListener = (ISmooksEditorInitListener) iterator
+ .next();
+ initListener.initFailed(messageType, message);
+ }
+ }
+
+ public void handleDocumentChange() {
+ createNewModelViaTextPage();
+ }
+
+ public class SmooksXMLEditorDocumentListener implements IDocumentListener {
+ protected Timer timer = new Timer();
+ protected TimerTask timerTask;
+
+ public void documentAboutToBeChanged(DocumentEvent documentEvent) {
+ // Ingore
+ }
+
+ public void documentChanged(final DocumentEvent documentEvent) {
+ try {
+ // This is need for the Properties view.
+ //
+ // setSelection(StructuredSelection.EMPTY);
+
+ if (timerTask != null) {
+ timerTask.cancel();
+ }
+
+ if (handleEMFModelChange) {
+ handleEMFModelChange = false;
+ } else {
+ timerTask = new TimerTask() {
+ @Override
+ public void run() {
+ getSite().getShell().getDisplay()
+ .asyncExec(new Runnable() {
+ public void run() {
+ handleDocumentChange();
+ }
+ });
+ }
+ };
+
+ timer.schedule(timerTask, 1000);
+ }
+ } catch (Exception exception) {
+ SmooksConfigurationActivator.log(exception);
+ }
+ }
+ }
+
+ public class SmooksResourceTraker implements IResourceChangeListener,
+ IResourceDeltaVisitor {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.core.resources.IResourceChangeListener#resourceChanged
+ * (org.eclipse.core.resources.IResourceChangeEvent)
+ */
+ public void resourceChanged(IResourceChangeEvent event) {
+ IResourceDelta delta = event.getDelta();
+ try {
+ if (delta != null)
+ delta.accept(this);
+ } catch (CoreException exception) {
+ }
+ }
+
+ public boolean visit(IResourceDelta delta) throws CoreException {
+ if (delta == null
+ || !delta.getResource().equals(
+ ((IFileEditorInput) getEditorInput()).getFile()))
+ return true;
+
+ if (delta.getKind() == IResourceDelta.REMOVED) {
+ Display display = getSite().getShell().getDisplay();
+ if ((IResourceDelta.MOVED_TO & delta.getFlags()) == 0) { // if
+ // the
+ // file
+ // was
+ // deleted
+ // NOTE: The case where an open, unsaved file is deleted is
+ // being handled by the
+ // PartListener added to the Workbench in the initialize()
+ // method.
+ display.asyncExec(new Runnable() {
+ public void run() {
+ // if (!isDirty())
+ closeEditor(false);
+ }
+ });
+ } else { // else if it was moved or renamed
+ final IFile newFile = ResourcesPlugin.getWorkspace()
+ .getRoot().getFile(delta.getMovedToPath());
+ display.asyncExec(new Runnable() {
+ public void run() {
+ // try {
+ // ((SmooksXMLEditor) textEditor).doSetInput(new
+ // FileEditorInput(newFile));
+ // } catch (CoreException e) {
+ // e.printStackTrace();
+ // }
+ setInput(new FileEditorInput(newFile));
+ }
+ });
+ }
+ }
+ return false;
+ }
+ }
+
+ private void closeEditor(boolean forceSave) {
+ this.close(forceSave);
+ }
+
+ public Model<SmooksModel> getSmooksModel() {
+ return smooksModel;
+ }
+
+ public EditingDomain getEditingDomain() {
+ return editingDomain;
+ }
+
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/ISmooksModelProvider.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/ISmooksModelProvider.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/ISmooksModelProvider.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,16 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.editor;
+
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.jboss.tools.smooks.model.SmooksModel;
+import org.milyn.javabean.dynamic.Model;
+
+/**
+ * @author Dart
+ *
+ */
+public interface ISmooksModelProvider extends IEditingDomainProvider{
+ Model<SmooksModel> getSmooksModel();
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/ISmooksModelProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/ISourceSynchronizeListener.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/ISourceSynchronizeListener.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/ISourceSynchronizeListener.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.editor;
+
+/**
+ * @author Dart
+ *
+ */
+public interface ISourceSynchronizeListener {
+ public void sourceChange(Object model);
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/ISourceSynchronizeListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/Messages.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/Messages.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/Messages.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,23 @@
+package org.jboss.tools.smooks.editor;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.smooks.editor.messages"; //$NON-NLS-1$
+ public static String AbstractSmooksFormEditor_Error_Unknown;
+ public static String AbstractSmooksFormEditor_Error_Unsupported;
+ public static String AbstractSmooksFormEditor_Error_Unsupported2;
+ public static String AbstractSmooksFormEditor_Error_Update_Namespace;
+ public static String AbstractSmooksFormEditor_Error_Update_Namespace2;
+ public static String AbstractSmooksFormEditor_Exception_Cannot_Get_Input_File;
+ public static String AbstractSmooksFormEditor_Exception_Transform_URL;
+ public static String AbstractSmooksFormEditor_Source_Page_Title;
+ public static String AbstractSmooksFormEditor_Task_Saving_File;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/Messages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/messages.properties
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/messages.properties (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/messages.properties 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,9 @@
+AbstractSmooksFormEditor_Error_Unknown=Unknown error. Please check the file
+AbstractSmooksFormEditor_Error_Unsupported=\n\nSorry, this configuration is not yet supported by the Smooks Editor because it contains configurations from the '
+AbstractSmooksFormEditor_Error_Unsupported2=' configuration namespace.\n\nPlease open this configuration using the XML Editor.
+AbstractSmooksFormEditor_Error_Update_Namespace=\n\nFix: Update the configuration to use the '
+AbstractSmooksFormEditor_Error_Update_Namespace2=' configuration namespace.
+AbstractSmooksFormEditor_Exception_Cannot_Get_Input_File=Can't get the input file
+AbstractSmooksFormEditor_Exception_Transform_URL=Transform URL to URL error.
+AbstractSmooksFormEditor_Source_Page_Title=Source
+AbstractSmooksFormEditor_Task_Saving_File=Saving Smooks config file
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/ISmooksActionProvider.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/ISmooksActionProvider.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/ISmooksActionProvider.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.graphical.actions;
+
+import org.eclipse.jface.action.IAction;
+
+/**
+ * @author Dart
+ *
+ */
+public interface ISmooksActionProvider {
+ IAction getAction(String actionId);
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/ISmooksActionProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/Messages.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/Messages.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/Messages.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,16 @@
+package org.jboss.tools.smooks.graphical.actions;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.smooks.graphical.actions.messages"; //$NON-NLS-1$
+ public static String AutoLayoutAction_Action_Text;
+ public static String DeleteTaskNodeAction_Action_Delete;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/Messages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/messages.properties
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/messages.properties (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/messages.properties 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,2 @@
+AutoLayoutAction_Action_Text=Auto Layout
+DeleteTaskNodeAction_Action_Delete=Delete
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/ISmooksEditorInitListener.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/ISmooksEditorInitListener.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/ISmooksEditorInitListener.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.graphical.editors;
+
+/**
+ * @author Dart
+ *
+ */
+public interface ISmooksEditorInitListener {
+ void initFailed(int messageType , String message);
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/ISmooksEditorInitListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/Messages.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/Messages.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/Messages.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,46 @@
+package org.jboss.tools.smooks.graphical.editors;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.smooks.graphical.editors.messages"; //$NON-NLS-1$
+ public static String SmooksFreemarkerTemplateGraphicalEditor_Warning_CSV_Fields_Empty;
+ public static String SmooksFreemarkerTemplateGraphicalEditor_Warning_Must_Link_CSV_Record;
+ public static String SmooksFreemarkerTemplateGraphicalEditor_Warning_Must_Link_to_Collection;
+ public static String SmooksFreemarkerTemplateGraphicalEditor_Warning_Quote_Empty;
+ public static String SmooksFreemarkerTemplateGraphicalEditor_Warning_Separator_Empty;
+ public static String SmooksGraphicalEditorMenuContextProvider_Add_Menu_Text;
+ public static String SmooksGraphicalEditorPaletteRootCreator_General_Palette_Drawer;
+ public static String SmooksGraphicalEditorPaletteRootCreator_Link_Tool_Text;
+ public static String SmooksGraphicalEditorPaletteRootCreator_Link_Tool_Tooltip;
+ public static String SmooksJavaMappingGraphicalEditor_BeanIdEmptyErrormessage;
+ public static String SmooksJavaMappingGraphicalEditor_NodeMustLinkWithJavaBean;
+ public static String SmooksJavaMappingGraphicalEditor_NodeMustLinkWithSource;
+ public static String SmooksJavaMappingGraphicalEditor_NullLabel;
+ public static String SmooksJavaMappingGraphicalEditor_WarningMessage1;
+ public static String SmooksProcessGraphicalEditor_4;
+ public static String SmooksProcessGraphicalEditor_AddTaskActionText;
+ public static String SmooksProcessGraphicalEditor_FormText;
+ public static String SmooksProcessGraphicalEditor_TaskConfigurationSectionTitle;
+ public static String SmooksProcessGraphicalEditor_TasksMapSectionTitle;
+ public static String SmooksXSLTemplateGraphicalEditor_Group_Name;
+ public static String TaskTypeManager_ApplyTemplateTaskLabel;
+ public static String TaskTypeManager_ApplyXSLTemplateTaskLabel;
+ public static String TaskTypeManager_Input;
+ public static String TaskTypeManager_InputTaskLabel;
+ public static String TaskTypeManager_JavaMappingTaskLabel;
+ public static String XSLLabelProvider_Text_Null_Value;
+ public static String SmooksProcessGraphicalEditor_Empty_Input_File;
+ public static String SmooksProcessGraphicalEditor_Java_Mapping_Not_Found;
+ public static String SmooksProcessGraphicalEditor_No_Input_File_Active;
+ public static String SmooksProcessGraphicalEditor_No_Input_Specified;
+ public static String SmooksProcessGraphicalEditor_No_Input_Task_Found;
+ public static String SmooksProcessGraphicalEditor_ValidationError_MultipleTemplate;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/Messages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksMessage.java
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksMessage.java (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksMessage.java 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,123 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.graphical.editors;
+
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.forms.IMessage;
+
+/**
+ * @author Dart
+ *
+ */
+public class SmooksMessage implements IMessage {
+
+ private int messageType;
+
+ private Control control;
+
+ private Object data;
+
+ private Object key;
+
+ private String prefix = "-"; //$NON-NLS-1$
+
+ private String message;
+
+ public SmooksMessage(int messageType , String message){
+ this.setMessage(message);
+ this.setMessageType(messageType);
+ }
+
+ /**
+ * @return the messageType
+ */
+ public int getMessageType() {
+ return messageType;
+ }
+
+ /**
+ * @param messageType the messageType to set
+ */
+ public void setMessageType(int messageType) {
+ this.messageType = messageType;
+ }
+
+ /**
+ * @return the control
+ */
+ public Control getControl() {
+ return control;
+ }
+
+ /**
+ * @param control the control to set
+ */
+ public void setControl(Control control) {
+ this.control = control;
+ }
+
+ /**
+ * @return the data
+ */
+ public Object getData() {
+ return data;
+ }
+
+ /**
+ * @param data the data to set
+ */
+ public void setData(Object data) {
+ this.data = data;
+ }
+
+ /**
+ * @return the key
+ */
+ public Object getKey() {
+ return key;
+ }
+
+ /**
+ * @param key the key to set
+ */
+ public void setKey(Object key) {
+ this.key = key;
+ }
+
+ /**
+ * @return the prefix
+ */
+ public String getPrefix() {
+ return prefix;
+ }
+
+ /**
+ * @param prefix the prefix to set
+ */
+ public void setPrefix(String prefix) {
+ this.prefix = prefix;
+ }
+
+ /**
+ * @return the message
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * @param message the message to set
+ */
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+}
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksMessage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/messages.properties
===================================================================
--- branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/messages.properties (rev 0)
+++ branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/messages.properties 2010-07-28 09:35:52 UTC (rev 23768)
@@ -0,0 +1,32 @@
+SmooksFreemarkerTemplateGraphicalEditor_Warning_CSV_Fields_Empty=CSV fields can't be empty
+SmooksFreemarkerTemplateGraphicalEditor_Warning_Must_Link_CSV_Record=Must link CSV-Record before linking this node.
+SmooksFreemarkerTemplateGraphicalEditor_Warning_Must_Link_to_Collection=Must be linked with collection java class node
+SmooksFreemarkerTemplateGraphicalEditor_Warning_Quote_Empty=Quote character can't be empty
+SmooksFreemarkerTemplateGraphicalEditor_Warning_Separator_Empty=Separator character can't be empty
+SmooksGraphicalEditorMenuContextProvider_Add_Menu_Text=Add
+SmooksGraphicalEditorPaletteRootCreator_General_Palette_Drawer=General
+SmooksGraphicalEditorPaletteRootCreator_Link_Tool_Text=Link
+SmooksGraphicalEditorPaletteRootCreator_Link_Tool_Tooltip=Connect node
+SmooksJavaMappingGraphicalEditor_BeanIdEmptyErrormessage=The Bean ID shouldn't be empty
+SmooksJavaMappingGraphicalEditor_NodeMustLinkWithJavaBean=The node must link to another Java Bean
+SmooksJavaMappingGraphicalEditor_NodeMustLinkWithSource=The node must be linked with input source
+SmooksJavaMappingGraphicalEditor_NullLabel=<NULL>
+SmooksJavaMappingGraphicalEditor_WarningMessage1=Decoder should be '
+SmooksProcessGraphicalEditor_4=No java mapping has been specified in the Java Mapping task.
+SmooksProcessGraphicalEditor_ValidationError_MultipleTemplate=Doesn't support multiple template task.
+SmooksProcessGraphicalEditor_AddTaskActionText=Add Task
+SmooksProcessGraphicalEditor_FormText=Smooks Processing
+SmooksProcessGraphicalEditor_TaskConfigurationSectionTitle=Selected Task Details
+SmooksProcessGraphicalEditor_TasksMapSectionTitle=Processing Tasks
+SmooksXSLTemplateGraphicalEditor_Group_Name=XSL Template
+TaskTypeManager_ApplyTemplateTaskLabel=Apply Template
+TaskTypeManager_ApplyXSLTemplateTaskLabel=Apply XSL Template
+TaskTypeManager_Input=Input
+TaskTypeManager_InputTaskLabel=Input Task
+TaskTypeManager_JavaMappingTaskLabel=Java Mapping
+XSLLabelProvider_Text_Null_Value=\ (Null Value)
+SmooksProcessGraphicalEditor_Empty_Input_File=Sample input file is empty.
+SmooksProcessGraphicalEditor_Java_Mapping_Not_Found=Mapping to Java classes is missing or incorrect.
+SmooksProcessGraphicalEditor_No_Input_File_Active=No sample input file is specified.
+SmooksProcessGraphicalEditor_No_Input_Specified=No Input configuration has been specified.
+SmooksProcessGraphicalEditor_No_Input_Task_Found=No Input task was found.
Property changes on: branches/smooks-dmb/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
13 years, 9 months
JBoss Tools SVN: r23767 - in trunk/jst/plugins: org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-07-28 05:06:32 -0400 (Wed, 28 Jul 2010)
New Revision: 23767
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewXHTMLTemplatesWizardPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewXHTMLWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/CreateJSPFileSupport.java
Log:
fix https://jira.jboss.org/browse/JBIDE-6709 Page created using JSF Composite Component has wrong content.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/CreateJSPFileSupport.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/CreateJSPFileSupport.java 2010-07-28 08:43:01 UTC (rev 23766)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/CreateJSPFileSupport.java 2010-07-28 09:06:32 UTC (rev 23767)
@@ -182,7 +182,11 @@
return;
}
String body = getTemplateBody();
- Set<String> existing = taglibs.getTaglibsFromTemplate(body);
+ setTaglibsFromTemplateBody(body);
+ }
+
+ public void setTaglibsFromTemplateBody(String templateBody) {
+ Set<String> existing = taglibs.getTaglibsFromTemplate(templateBody);
StringBuffer sb = new StringBuffer();
Iterator<String> it = existing.iterator();
while(it.hasNext()) {
@@ -190,9 +194,10 @@
if(sb.length() > 0) sb.append(";"); //$NON-NLS-1$
sb.append(taglibs.getTaglibDescription(s));
}
- value = sb.toString();
- setAttributeValue(1, "taglibs", value); //$NON-NLS-1$
+ setAttributeValue(1, "taglibs", sb.toString()); //$NON-NLS-1$
}
+
+ public void asd(String ast) {}
protected String modifyBody(String body) throws IOException {
if(getEntityData().length < 2 || taglibs == null) return body;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewXHTMLTemplatesWizardPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewXHTMLTemplatesWizardPage.java 2010-07-28 08:43:01 UTC (rev 23766)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewXHTMLTemplatesWizardPage.java 2010-07-28 09:06:32 UTC (rev 23767)
@@ -63,6 +63,7 @@
import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
+import org.jboss.tools.jst.web.model.handlers.CreateJSPFileSupport;
import org.jboss.tools.jst.web.ui.Messages;
import org.jboss.tools.jst.web.ui.WebUiPlugin;
import org.jboss.tools.jst.web.ui.editor.pref.template.TemplateContextTypeIdsXHTML;
@@ -146,9 +147,12 @@
private TemplateStore fTemplateStore;
/** Checkbox for using templates. */
private Button fUseTemplateButton;
+
+ private CreateJSPFileSupport fJspFileSupport;
- public NewXHTMLTemplatesWizardPage() {
+ public NewXHTMLTemplatesWizardPage(CreateJSPFileSupport jspFileSupport) {
super("NewXHTMLTemplatesWizardPage", Messages.NewXHTMLTemplatesWizardPage_0, null); //$NON-NLS-1$
+ this.fJspFileSupport = jspFileSupport;
setDescription(Messages.NewXHTMLTemplatesWizardPage_0);
}
@@ -501,12 +505,12 @@
* Updates the pattern viewer.
*/
void updateViewerInput() {
+ String pattern = ""; //$NON-NLS-1$
Template template = getSelectedTemplate();
if (template != null) {
- fPatternViewer.getDocument().set(template.getPattern());
+ pattern = template.getPattern();
+ fJspFileSupport.setTaglibsFromTemplateBody(pattern);
}
- else {
- fPatternViewer.getDocument().set(""); //$NON-NLS-1$
- }
+ fPatternViewer.getDocument().set(pattern);
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewXHTMLWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewXHTMLWizard.java 2010-07-28 08:43:01 UTC (rev 23766)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewXHTMLWizard.java 2010-07-28 09:06:32 UTC (rev 23767)
@@ -35,6 +35,7 @@
import org.jboss.tools.common.meta.action.impl.SpecialWizardSupport;
import org.jboss.tools.common.model.XModelException;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
+import org.jboss.tools.common.model.ui.wizard.newfile.NewFileContextEx;
import org.jboss.tools.common.model.ui.wizard.newfile.NewXHTMLFileWizard;
import org.jboss.tools.jst.web.model.handlers.CreateJSPFileSupport;
import org.jboss.tools.jst.web.ui.Messages;
@@ -64,7 +65,10 @@
this.fNewFilePage.setTitle(Messages.UI_WIZARD_XHTML_NEW_TITLE);
this.fNewFilePage.setDescription(Messages.UI_WIZARD_XHTML_NEW_Description);
- this.fNewFileTemplatesPage = new NewXHTMLTemplatesWizardPage();
+ NewFileContextEx newFileContext = newXHTMLFileWizard.getFileContext();
+ CreateJSPFileSupport jspFileSupport = (CreateJSPFileSupport)newFileContext.getSupport();
+ this.fNewFileTemplatesPage = new NewXHTMLTemplatesWizardPage(jspFileSupport);
+
addPage(this.fNewFileTemplatesPage);
this.newXHTMLWizardSelectTagLibrariesPage = getURISelectionPage();
addPage(this.newXHTMLWizardSelectTagLibrariesPage);
@@ -118,7 +122,9 @@
// put template contents into file
String templateString = fNewFileTemplatesPage.getTemplateString();
try {
- templateString=((CreateJSPFileSupport)getNewXHTMLFileWizard().getFileContext().getSupport()).addTaglibs(templateString);
+ NewFileContextEx newFileContext = newXHTMLFileWizard.getFileContext();
+ CreateJSPFileSupport jspFileSupport = (CreateJSPFileSupport)newFileContext.getSupport();
+ templateString = jspFileSupport.addTaglibs(templateString);
} catch (IOException ex) {
WebUiPlugin.getDefault().logWarning("Problems with adding taglibs",ex); //$NON-NLS-1$
}
13 years, 9 months
JBoss Tools SVN: r23766 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-07-28 04:43:01 -0400 (Wed, 28 Jul 2010)
New Revision: 23766
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java
Log:
https://jira.jboss.org/browse/JBIDE-6727
Check that associated console configuration exists.
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java 2010-07-28 08:36:03 UTC (rev 23765)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJptPlugin.java 2010-07-28 08:43:01 UTC (rev 23766)
@@ -128,8 +128,7 @@
@Override
public void configurationRemoved(ConsoleConfiguration root,
boolean forUpdate) {
- if(forUpdate || root.getConfiguration() == null
- || root.getConfiguration().getNamingStrategy() == null) {
+ if(forUpdate) {
return;
}
revalidateProjects(root);
13 years, 9 months
JBoss Tools SVN: r23765 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal: context and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-07-28 04:36:03 -0400 (Wed, 28 Jul 2010)
New Revision: 23765
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaProject.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties
Log:
https://jira.jboss.org/browse/JBIDE-6727
Check that associated console configuration exists.
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaProject.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaProject.java 2010-07-28 08:18:12 UTC (rev 23764)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaProject.java 2010-07-28 08:36:03 UTC (rev 23765)
@@ -11,15 +11,21 @@
package org.jboss.tools.hibernate.jpt.core.internal;
+import java.util.List;
+
import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.jpt.core.JpaProject;
import org.eclipse.jpt.core.internal.AbstractJpaProject;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.hibernate.cfg.Configuration;
import org.hibernate.cfg.NamingStrategy;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.KnownConfigurations;
import org.hibernate.eclipse.console.properties.HibernatePropertiesConstants;
+import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnit.LocalMessage;
+import org.jboss.tools.hibernate.jpt.core.internal.context.Messages;
import org.osgi.service.prefs.Preferences;
/**
@@ -71,5 +77,22 @@
}
return cachedNamingStrategyEnable;
}
+
+ @Override
+ protected void validate(List<IMessage> messages, IReporter reporter) {
+ super.validate(messages, reporter);
+ this.validateConsoleConfiguration(messages);
+ }
+ /**
+ * @param messages
+ */
+ protected void validateConsoleConfiguration(List<IMessage> messages) {
+ if (KnownConfigurations.getInstance().find(getDefaultConsoleConfigurationName()) == null){
+ IMessage message = new LocalMessage(IMessage.HIGH_SEVERITY,
+ Messages.CC_NOT_EXISTS, new String[]{getDefaultConsoleConfigurationName()}, getResource());
+ messages.add(message);
+ }
+ }
+
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java 2010-07-28 08:18:12 UTC (rev 23764)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java 2010-07-28 08:36:03 UTC (rev 23765)
@@ -29,5 +29,7 @@
String NAMING_STRATEGY_EXCEPTION = "NAMING_STRATEGY_EXCEPTION"; //$NON-NLS-1$
String UNRESOLVED_FOREIGN_KEY_NAME = "UNRESOLVED_FOREIGN_KEY_NAME"; //$NON-NLS-1$
+
+ String CC_NOT_EXISTS = "CC_NOT_EXISTS"; //$NON-NLS-1$
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties 2010-07-28 08:18:12 UTC (rev 23764)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties 2010-07-28 08:36:03 UTC (rev 23765)
@@ -4,4 +4,5 @@
STRATEGY_CANT_BE_EMPTY = Strategy could not be empty.
STRATEGY_INTERFACE = Strategy class \"{0}\" should implement interface \"org.hibernate.id.IdentifierGenerator\".
NAMING_STRATEGY_EXCEPTION = Exception occurred when calling NamingStrategy:
-UNRESOLVED_FOREIGN_KEY_NAME = Foreign key \"{0}\" not found in the table \"{1}\".
\ No newline at end of file
+UNRESOLVED_FOREIGN_KEY_NAME = Foreign key \"{0}\" not found in the table \"{1}\".
+CC_NOT_EXISTS= Console configuration \"{0}\" does not exist.
\ No newline at end of file
13 years, 9 months
JBoss Tools SVN: r23764 - trunk/hibernatetools/docs/task-reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-07-28 04:18:12 -0400 (Wed, 28 Jul 2010)
New Revision: 23764
Added:
trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks.xml.bak
Removed:
trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks.xml
Log:
https://jira.jboss.org/browse/JBIDE-6720
- the file sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks.xml
is renamed to
sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks.xml.bak
to avoid name duplicating.
Deleted: trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks.xml
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks.xml 2010-07-28 08:07:21 UTC (rev 23763)
+++ trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks.xml 2010-07-28 08:18:12 UTC (rev 23764)
@@ -1,15 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "Hibernate_Tools_Reference_Guide.ent">
-%BOOK_ENTITIES;
-]>
-<section id="sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks">
- <title>Ant Tasks</title>
- <para>
-
- </para>
- <xi:include href="sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks-Ant_tasks_overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks-Hibernate_Configurations.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks-Reverse_Engineering_Control.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
-</section>
\ No newline at end of file
Copied: trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks.xml.bak (from rev 23763, trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks.xml)
===================================================================
--- trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks.xml.bak (rev 0)
+++ trunk/hibernatetools/docs/task-reference/en-US/sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks.xml.bak 2010-07-28 08:18:12 UTC (rev 23764)
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "Hibernate_Tools_Reference_Guide.ent">
+%BOOK_ENTITIES;
+]>
+<section id="sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks">
+ <title>Ant Tasks</title>
+ <para>
+
+ </para>
+ <xi:include href="sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks-Ant_tasks_overview.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks-Hibernate_Configurations.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="sect-Hibernate_Tools_Reference_Guide-Concepts-Ant_Tasks-Reverse_Engineering_Control.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+
+</section>
\ No newline at end of file
13 years, 9 months