JBoss Tools SVN: r9980 - https:.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-09-01 07:48:50 -0400 (Mon, 01 Sep 2008)
New Revision: 9980
Added:
https:/svn.jboss.org/
Log:
Initial import.
16 years, 4 months
JBoss Tools SVN: r9979 - /.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-09-01 07:46:56 -0400 (Mon, 01 Sep 2008)
New Revision: 9979
Added:
https:/
Log:
Initial import.
16 years, 4 months
JBoss Tools SVN: r9978 - in trunk/common/plugins/org.jboss.tools.common.el: .settings and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-09-01 07:45:16 -0400 (Mon, 01 Sep 2008)
New Revision: 9978
Added:
trunk/common/plugins/org.jboss.tools.common.el/.classpath
trunk/common/plugins/org.jboss.tools.common.el/.project
trunk/common/plugins/org.jboss.tools.common.el/.settings/
trunk/common/plugins/org.jboss.tools.common.el/.settings/org.eclipse.jdt.core.prefs
trunk/common/plugins/org.jboss.tools.common.el/META-INF/
trunk/common/plugins/org.jboss.tools.common.el/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.el/build.properties
trunk/common/plugins/org.jboss.tools.common.el/src/
trunk/common/plugins/org.jboss.tools.common.el/src/org/
trunk/common/plugins/org.jboss.tools.common.el/src/org/jboss/
trunk/common/plugins/org.jboss.tools.common.el/src/org/jboss/tools/
trunk/common/plugins/org.jboss.tools.common.el/src/org/jboss/tools/vpe/
trunk/common/plugins/org.jboss.tools.common.el/src/org/jboss/tools/vpe/el/
trunk/common/plugins/org.jboss.tools.common.el/src/org/jboss/tools/vpe/el/Activator.java
Log:
Initial import.
Added: trunk/common/plugins/org.jboss.tools.common.el/.classpath
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el/.classpath (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el/.classpath 2008-09-01 11:45:16 UTC (rev 9978)
@@ -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>
Property changes on: trunk/common/plugins/org.jboss.tools.common.el/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/common/plugins/org.jboss.tools.common.el/.project
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el/.project (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el/.project 2008-09-01 11:45:16 UTC (rev 9978)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.common.el</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>
Property changes on: trunk/common/plugins/org.jboss.tools.common.el/.project
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/common/plugins/org.jboss.tools.common.el/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el/.settings/org.eclipse.jdt.core.prefs 2008-09-01 11:45:16 UTC (rev 9978)
@@ -0,0 +1,7 @@
+#Mon Sep 01 14:25:08 EEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Property changes on: trunk/common/plugins/org.jboss.tools.common.el/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/common/plugins/org.jboss.tools.common.el/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el/META-INF/MANIFEST.MF (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el/META-INF/MANIFEST.MF 2008-09-01 11:45:16 UTC (rev 9978)
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: El Plug-in
+Bundle-SymbolicName: org.jboss.tools.common.el
+Bundle-Version: 1.0.0
+Bundle-Activator: org.jboss.tools.vpe.el.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Property changes on: trunk/common/plugins/org.jboss.tools.common.el/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/common/plugins/org.jboss.tools.common.el/build.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el/build.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el/build.properties 2008-09-01 11:45:16 UTC (rev 9978)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Property changes on: trunk/common/plugins/org.jboss.tools.common.el/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/common/plugins/org.jboss.tools.common.el/src/org/jboss/tools/vpe/el/Activator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el/src/org/jboss/tools/vpe/el/Activator.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el/src/org/jboss/tools/vpe/el/Activator.java 2008-09-01 11:45:16 UTC (rev 9978)
@@ -0,0 +1,50 @@
+package org.jboss.tools.vpe.el;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.vpe.el";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#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 Activator getDefault() {
+ return plugin;
+ }
+
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.el/src/org/jboss/tools/vpe/el/Activator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
16 years, 4 months
JBoss Tools SVN: r9977 - trunk/common/plugins.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-09-01 07:44:56 -0400 (Mon, 01 Sep 2008)
New Revision: 9977
Added:
trunk/common/plugins/org.jboss.tools.common.el/
Log:
Initial import.
16 years, 4 months
JBoss Tools SVN: r9976 - trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-09-01 07:37:18 -0400 (Mon, 01 Sep 2008)
New Revision: 9976
Modified:
trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css
Log:
https://jira.jboss.org/jira/browse/JBDS-336 - centralizing the content;
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css 2008-09-01 10:07:50 UTC (rev 9975)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css 2008-09-01 11:37:18 UTC (rev 9976)
@@ -52,9 +52,10 @@
z-index:-1;
}
-div.book, div.chapter, #title{
+div.book, div.chapter{
text-align:justify;
width: 70em;
+ margin-left:50px;
}
ul.docnav {
16 years, 4 months
JBoss Tools SVN: r9975 - in workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean: src/org/jboss/tools/smooks/javabean/analyzer and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-09-01 06:07:50 -0400 (Mon, 01 Sep 2008)
New Revision: 9975
Added:
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/Header.java
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/Order.java
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/test/
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/test/SmooksAnalyzerTester.java
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/test/Test.xml
Modified:
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/META-INF/MANIFEST.MF
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java
Log:
add some code for testing the JavaBeanAnalyzer
Modified: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/META-INF/MANIFEST.MF
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/META-INF/MANIFEST.MF 2008-09-01 09:55:07 UTC (rev 9974)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/META-INF/MANIFEST.MF 2008-09-01 10:07:50 UTC (rev 9975)
@@ -17,7 +17,8 @@
org.jboss.tools.smooks.model,
org.jboss.tools.smooks.model.edit,
org.eclipse.ui.ide,
- org.jboss.tools.smooks.graphicalInfo
+ org.jboss.tools.smooks.graphicalInfo,
+ org.junit
Eclipse-LazyStart: true
Bundle-ClassPath: libs/commons-beanutils-1.8.0-BETA.jar,
libs/commons-beanutils-1.8.0-BETA-javadoc.jar,
Modified: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-09-01 09:55:07 UTC (rev 9974)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-09-01 10:07:50 UTC (rev 9975)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
+ * 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,
@@ -343,8 +343,8 @@
}
public Object buildSourceInputObjects(GraphInformations graphInfo,
- SmooksResourceListType listType, IFile sourceFile)
- throws InvocationTargetException {
+ SmooksResourceListType listType, IFile sourceFile,
+ ClassLoader classLoader) throws InvocationTargetException {
List resourceConfigList = listType.getAbstractResourceConfig();
String rootClassName = null;
ResourceConfigType current = null;
@@ -367,14 +367,17 @@
if (rootClassName == null)
return null;
- IProject project = sourceFile.getProject();
+
boolean isWarning = false;
boolean isError = false;
Class clazz = null;
try {
- ProjectClassLoader loader = new ProjectClassLoader(JavaCore
- .create(project));
- clazz = loader.loadClass(rootClassName);
+ if (classLoader == null) {
+ IProject project = sourceFile.getProject();
+ classLoader = new ProjectClassLoader(JavaCore.create(project));
+ }
+
+ clazz = classLoader.loadClass(rootClassName);
} catch (Exception e) {
// ignore
}
@@ -394,6 +397,13 @@
return null;
}
+ public Object buildSourceInputObjects(GraphInformations graphInfo,
+ SmooksResourceListType listType, IFile sourceFile)
+ throws InvocationTargetException {
+ return this.buildSourceInputObjects(graphInfo, listType, sourceFile,
+ null);
+ }
+
protected void buildSourceInputProperties(SmooksResourceListType listType,
JavaBeanModel beanModel, boolean rootIsWarning,
boolean rootIsError, ResourceConfigType currentResourceConfigType) {
@@ -412,6 +422,9 @@
String selector = (String) binding
.getAnyAttribute()
.get(SmooksModelUtils.ATTRIBUTE_SELECTOR, false);
+ setSelectorIsUsed(currentResourceConfigType
+ .getSelector());
+ analyzeBindingSelector(selector, beanModel, listType);
}
}
}
@@ -426,26 +439,31 @@
currentModel.setProperties(null);
currentModel.getProperties();
selector = selector.substring(2, selector.length() - 1);
- JavaBeanModel model = findTheChildJavaBeanModel(selector,
- currentModel);
- // something wrong
- if (model == null) {
- JavaBeanModel errorModel = new JavaBeanModel(null, selector);
- currentModel.addProperty(errorModel);
- errorModel.setError("don't exist");
- List rl = listType.getAbstractResourceConfig();
- for (Iterator iterator = rl.iterator(); iterator.hasNext();) {
- ResourceConfigType rct = (ResourceConfigType) iterator
- .next();
- if (this.isSelectorIsUsed(rct.getSelector()))
- continue;
- String beanId = getBeanIDFromParam(rct);
- if (selector.equals(beanId)) {
- buildSourceInputProperties(listType, errorModel, false,
- true, rct);
- }
+ List rl = listType.getAbstractResourceConfig();
+ ResourceConfigType resourceConfig = null;
+ for (Iterator iterator = rl.iterator(); iterator.hasNext();) {
+ ResourceConfigType rct = (ResourceConfigType) iterator.next();
+ if (this.isSelectorIsUsed(rct.getSelector()))
+ continue;
+ String beanId = getBeanIDFromParam(rct);
+ System.out.println(beanId);
+ if (selector.equals(beanId)) {
+ resourceConfig = rct;
+ break;
}
}
+ if (resourceConfig != null) {
+ JavaBeanModel model = findTheChildJavaBeanModelFromBeanId(
+ resourceConfig.getSelector(), currentModel);
+ // something wrong
+ if (model == null) {
+ model = new JavaBeanModel(null, selector);
+ currentModel.addProperty(model);
+ model.setError("don't exist");
+ }
+ buildSourceInputProperties(listType, model, false, true,
+ resourceConfig);
+ }
}
}
@@ -457,17 +475,26 @@
Object obj = p.getMixed().get(
XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
true);
- if (obj != null)
- return obj.toString().trim();
+ if (obj != null && obj instanceof List)
+ return ((List) obj).get(0).toString().trim();
}
}
return null;
}
- protected JavaBeanModel findTheChildJavaBeanModel(String name,
+ protected JavaBeanModel findTheChildJavaBeanModelFromBeanId(String name,
JavaBeanModel parentModel) {
List list = parentModel.getProperties();
+ if (parentModel.isList() || parentModel.isMany()) {
+ if (list.size() >= 1) {
+ JavaBeanModel m = (JavaBeanModel) list.get(0);
+ if (m.getBeanClass().getName().equals(name)) {
+ return m;
+ }
+ }
+ }
+
for (Iterator iterator = list.iterator(); iterator.hasNext();) {
JavaBeanModel child = (JavaBeanModel) iterator.next();
if (name.equals(child.getName())) {
Modified: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java 2008-09-01 09:55:07 UTC (rev 9974)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java 2008-09-01 10:07:50 UTC (rev 9975)
@@ -105,6 +105,21 @@
private boolean lazyLoadProperties = true;
public boolean isList() {
+ if (Collection.class.isAssignableFrom(beanClass)) {
+ if (this.propertyDescriptor != null) {
+ Method rmethod = propertyDescriptor.getReadMethod();
+ if (rmethod != null) {
+ Type returnType = rmethod.getGenericReturnType();
+ if (returnType instanceof ParameterizedType) {
+ Type gtype = ((ParameterizedType) returnType)
+ .getActualTypeArguments()[0];
+ Class beanType = (Class) gtype;
+ componentClass = beanType;
+ }
+ }
+ }
+ setList(true);
+ }
return isList;
}
@@ -201,6 +216,11 @@
}
public boolean isMany() {
+ if (beanClass.isArray()) {
+ Class beanType = beanClass.getComponentType();
+ setMany(true);
+ componentClass = beanType;
+ }
return many;
}
Added: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/Header.java
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/Header.java (rev 0)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/Header.java 2008-09-01 10:07:50 UTC (rev 9975)
@@ -0,0 +1,17 @@
+
+ public class Header {
+ private Integer age;
+ private String name;
+ public Integer getAge() {
+ return age;
+ }
+ public void setAge(Integer age) {
+ this.age = age;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Property changes on: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/Header.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/Order.java
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/Order.java (rev 0)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/Order.java 2008-09-01 10:07:50 UTC (rev 9975)
@@ -0,0 +1,26 @@
+
+public class Order {
+ private String name;
+ private int height;
+ private Header header;
+ public Header getHeader() {
+ return header;
+ }
+ public void setHeader(Header header) {
+ this.header = header;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public int getHeight() {
+ return height;
+ }
+ public void setHeight(int height) {
+ this.height = height;
+ }
+
+
+}
Property changes on: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/Order.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/test/SmooksAnalyzerTester.java
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/test/SmooksAnalyzerTester.java (rev 0)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/test/SmooksAnalyzerTester.java 2008-09-01 10:07:50 UTC (rev 9975)
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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 test;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collections;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EPackage.Registry;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceFactoryImpl;
+import org.jboss.tools.smooks.graphical.GraphInformations;
+import org.jboss.tools.smooks.graphical.GraphicalPackage;
+import org.jboss.tools.smooks.javabean.analyzer.JavaBeanAnalyzer;
+import org.milyn.xsd.smooks.DocumentRoot;
+import org.milyn.xsd.smooks.SmooksPackage;
+import org.milyn.xsd.smooks.SmooksResourceListType;
+import org.milyn.xsd.smooks.util.SmooksResourceFactoryImpl;
+
+/**
+ * @author Dart Peng Date : 2008-9-1
+ */
+public class SmooksAnalyzerTester extends TestCase {
+ public void testParse() {
+ Registry.INSTANCE.put(GraphicalPackage.eNS_URI,
+ GraphicalPackage.eINSTANCE);
+ Registry.INSTANCE.put(SmooksPackage.eNS_URI, SmooksPackage.eINSTANCE);
+ try {
+ String path = "C:\\Users\\Dart\\Documents\\SmooksTest\\Test.smooks";
+ String path1 = "C:\\Users\\Dart\\Documents\\SmooksTest\\Test.smooks.graph";
+ Resource resource = new SmooksResourceFactoryImpl()
+ .createResource(URI.createFileURI(path));
+ Resource gr = new XMLResourceFactoryImpl()
+ .createResource(URI.createFileURI(path1));
+ gr.load(Collections.EMPTY_MAP);
+ GraphInformations graph = (GraphInformations) gr.getContents().get(0);;
+
+ resource.load(Collections.EMPTY_MAP);
+ JavaBeanAnalyzer sourceModelAnalyzer = new JavaBeanAnalyzer();
+
+ SmooksResourceListType listType = ((DocumentRoot) resource
+ .getContents().get(0)).getSmooksResourceList();
+ Object obj = sourceModelAnalyzer
+ .buildSourceInputObjects(graph, listType, null,
+ SmooksAnalyzerTester.class.getClassLoader());
+ } catch (IOException e) {
+ e.printStackTrace();
+ } catch (InvocationTargetException e) {
+ e.printStackTrace();
+ }
+ }
+}
Property changes on: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/test/SmooksAnalyzerTester.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/test/Test.xml
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/test/Test.xml (rev 0)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/test/Test.xml 2008-09-01 10:07:50 UTC (rev 9975)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ASCII"?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
+ <resource-config selector="srcmodel.Order">
+ <resource>org.milyn.javabean.BeanPopulator</resource>
+ <param name="beanId">LineOrder</param>
+ <param name="beanClass">targetmodel.LineOrder</param>
+ <param name="bindings">
+ <binding property="customerId"
+ selector="header customerNumber" />
+ <binding property="customerName"
+ selector="header customerName" />
+ <binding property="lineItems" selector="${lineItems}" />
+ </param>
+ </resource-config>
+ <resource-config selector="orderItems">
+ <resource>org.milyn.javabean.BeanPopulator</resource>
+ <param name="beanId">lineItems</param>
+ <param name="beanClass">targetmodel.LineItem[]</param>
+ <param name="bindings">
+ <binding property="LineItem" selector="${LineItem}" />
+ </param>
+ </resource-config>
+ <resource-config selector="srcmodel.OrderItem">
+ <resource>org.milyn.javabean.BeanPopulator</resource>
+ <param name="beanId">LineItem</param>
+ <param name="beanClass">targetmodel.LineItem</param>
+ <param name="bindings">
+ <binding property="productCode"
+ selector="srcmodel.OrderItem productId" />
+ <binding property="unitPrice"
+ selector="srcmodel.OrderItem price" />
+ <binding property="unitQuantity"
+ selector="srcmodel.OrderItem quantity" />
+ </param>
+ </resource-config>
+</smooks-resource-list>
\ No newline at end of file
Property changes on: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src_test/test/Test.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 4 months
JBoss Tools SVN: r9974 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-09-01 05:55:07 -0400 (Mon, 01 Sep 2008)
New Revision: 9974
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualCaretInfo.java
Log:
Fix JBIDE-1046 issue.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2008-09-01 09:23:46 UTC (rev 9973)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2008-09-01 09:55:07 UTC (rev 9974)
@@ -12,14 +12,19 @@
package org.jboss.tools.vpe.dnd;
import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.VpeVisualCaretInfo;
+import org.jboss.tools.vpe.editor.VpeVisualInnerDropInfo;
import org.jboss.tools.vpe.editor.mozilla.EditorDomEventListener;
import org.jboss.tools.vpe.editor.mozilla.MozillaDropInfo;
+import org.jboss.tools.vpe.editor.selection.VpeSelectionController;
import org.jboss.tools.vpe.xulrunner.XPCOM;
import org.mozilla.interfaces.nsIComponentManager;
import org.mozilla.interfaces.nsIDOMEvent;
+import org.mozilla.interfaces.nsIDOMEventTarget;
import org.mozilla.interfaces.nsIDOMMouseEvent;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDragService;
+import org.mozilla.interfaces.nsISelectionController;
import org.mozilla.interfaces.nsIServiceManager;
import org.mozilla.interfaces.nsISupportsArray;
import org.mozilla.interfaces.nsISupportsString;
@@ -161,6 +166,30 @@
}
}
}
+ //sets possability to drop current element here
+ //Added by estherbin fix jbide-1046
+ VpeController controller = null;
+
+ if (editorDomEventListener instanceof VpeController) {
+ controller = (VpeController) editorDomEventListener;
+ }
+ VpeSelectionController selectionController = controller.getVisualSelectionController();
+ final VpeVisualCaretInfo visualCaretInfo = controller.getSelectionBuilder().getVisualCaretInfo(event);
+
+ final nsIDOMEventTarget target = event.getTarget();
+ final nsIDOMNode targetDomNode = (nsIDOMNode) target.queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+ final nsIDOMNode selectedVisualNode = controller.getXulRunnerEditor().getLastSelectedNode();
+
+ if ((targetDomNode.getFirstChild() != null) && (targetDomNode.getFirstChild().getNodeType() == nsIDOMNode.TEXT_NODE)) {
+ selectionController.getSelection(nsISelectionController.SELECTION_NORMAL).collapse(targetDomNode.getFirstChild(),
+ visualCaretInfo.getRageOffset());
+ }
+// }else if((targetDomNode.getNodeType()!=nsIDOMNode.TEXT_NODE)){
+// selectionController.getSelection(nsISelectionController.SELECTION_NORMAL).collapse(targetDomNode,visualCaretInfo.getRageOffset());
+// }
+
+
+
//sets possability to drop current element here
getDragService().getCurrentSession().setCanDrop(canDrop);
mouseEvent.preventDefault();
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2008-09-01 09:23:46 UTC (rev 9973)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2008-09-01 09:55:07 UTC (rev 9974)
@@ -991,7 +991,7 @@
return originalNode;
}
- VpeVisualInnerDropInfo getInnerDropInfo(nsIDOMEvent event) {
+ public VpeVisualInnerDropInfo getInnerDropInfo(nsIDOMEvent event) {
nsIDOMNSUIEvent nsuiEvent = (nsIDOMNSUIEvent) event.queryInterface(nsIDOMNSUIEvent.NS_IDOMNSUIEVENT_IID);
nsIDOMNode dropContainer = null;
int dropOffset = 0;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualCaretInfo.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualCaretInfo.java 2008-09-01 09:23:46 UTC (rev 9973)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualCaretInfo.java 2008-09-01 09:55:07 UTC (rev 9974)
@@ -31,6 +31,10 @@
return rangeParent != null;
}
+ public int getRageOffset(){
+ return rangeOffset;
+ }
+
public void showCaret() {
selectionBuilder.showVisualDragCaret(rangeParent, rangeOffset);
}
16 years, 4 months