JBoss Tools SVN: r18979 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2009-12-02 05:52:08 -0500 (Wed, 02 Dec 2009)
New Revision: 18979
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5351
Remove unnecessary setSmooksConfig method on the RuntimeMetadata class
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java 2009-12-02 10:48:51 UTC (rev 18978)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java 2009-12-02 10:52:08 UTC (rev 18979)
@@ -21,7 +21,6 @@
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
@@ -150,35 +149,8 @@
if (file != null) {
configFile = file;
if (configFile.exists() && configFile.isFile()) {
- 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(new FileInputStream(configFile)));
-
- 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;
- }
- }
- }
+ digestSmooksConfig(new FileInputStream(configFile));
} catch (Exception e) {
// Not a valid Smooks config file
}
@@ -187,50 +159,48 @@
}
public void setSmooksConfig(File file, InputStream inputStream) {
- reset();
- if (file != null) {
+ if (inputStream == null) {
+ setSmooksConfig(file);
+ } else {
configFile = file;
if (configFile.exists() && configFile.isFile()) {
- if (inputStream == null) {
- try {
- inputStream = new FileInputStream(file);
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- }
- ExecutionContext execContext = metadataExtractor.createExecutionContext();
- Properties inputParams = new Properties();
+ digestSmooksConfig(inputStream);
+ }
+ }
+ }
- try {
- // Filter the config and capture the input params...
- execContext.setAttribute(InputParamExtractor.class, inputParams);
- execContext.setAttribute(RuntimeMetadata.class, this);
+ private void digestSmooksConfig(InputStream inputStream) {
+ ExecutionContext execContext = metadataExtractor.createExecutionContext();
+ Properties inputParams = new Properties();
- metadataExtractor.filterSource(execContext, new StreamSource(inputStream));
+ try {
+ // Filter the config and capture the input params...
+ execContext.setAttribute(InputParamExtractor.class, inputParams);
+ execContext.setAttribute(RuntimeMetadata.class, this);
- 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;
- }
+ metadataExtractor.filterSource(execContext, new StreamSource(inputStream));
- inputFile = new File(resolvedFilePath);
- if (inputFile.exists() && inputFile.isFile()) {
- isValidSmooksConfig = true;
- }
- }
+ 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;
}
- } catch (Exception e) {
- // Not a valid Smooks config file
+
+ inputFile = new File(resolvedFilePath);
+ if (inputFile.exists() && inputFile.isFile()) {
+ isValidSmooksConfig = true;
+ }
}
}
+ } catch (Exception e) {
+ // Not a valid Smooks config file
}
}
15 years, 1 month
JBoss Tools SVN: r18978 - branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2009-12-02 05:48:51 -0500 (Wed, 02 Dec 2009)
New Revision: 18978
Modified:
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5351
Remove unnecessary setSmooksConfig method on the RuntimeMetadata class
Modified: branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java 2009-12-02 10:48:46 UTC (rev 18977)
+++ branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/RuntimeMetadata.java 2009-12-02 10:48:51 UTC (rev 18978)
@@ -21,7 +21,6 @@
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
@@ -150,35 +149,8 @@
if (file != null) {
configFile = file;
if (configFile.exists() && configFile.isFile()) {
- 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(new FileInputStream(configFile)));
-
- 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;
- }
- }
- }
+ digestSmooksConfig(new FileInputStream(configFile));
} catch (Exception e) {
// Not a valid Smooks config file
}
@@ -187,50 +159,48 @@
}
public void setSmooksConfig(File file, InputStream inputStream) {
- reset();
- if (file != null) {
+ if (inputStream == null) {
+ setSmooksConfig(file);
+ } else {
configFile = file;
if (configFile.exists() && configFile.isFile()) {
- if (inputStream == null) {
- try {
- inputStream = new FileInputStream(file);
- } catch (FileNotFoundException e) {
- e.printStackTrace();
- }
- }
- ExecutionContext execContext = metadataExtractor.createExecutionContext();
- Properties inputParams = new Properties();
+ digestSmooksConfig(inputStream);
+ }
+ }
+ }
- try {
- // Filter the config and capture the input params...
- execContext.setAttribute(InputParamExtractor.class, inputParams);
- execContext.setAttribute(RuntimeMetadata.class, this);
+ private void digestSmooksConfig(InputStream inputStream) {
+ ExecutionContext execContext = metadataExtractor.createExecutionContext();
+ Properties inputParams = new Properties();
- metadataExtractor.filterSource(execContext, new StreamSource(inputStream));
+ try {
+ // Filter the config and capture the input params...
+ execContext.setAttribute(InputParamExtractor.class, inputParams);
+ execContext.setAttribute(RuntimeMetadata.class, this);
- 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;
- }
+ metadataExtractor.filterSource(execContext, new StreamSource(inputStream));
- inputFile = new File(resolvedFilePath);
- if (inputFile.exists() && inputFile.isFile()) {
- isValidSmooksConfig = true;
- }
- }
+ 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;
}
- } catch (Exception e) {
- // Not a valid Smooks config file
+
+ inputFile = new File(resolvedFilePath);
+ if (inputFile.exists() && inputFile.isFile()) {
+ isValidSmooksConfig = true;
+ }
}
}
+ } catch (Exception e) {
+ // Not a valid Smooks config file
}
}
15 years, 1 month
JBoss Tools SVN: r18977 - trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-12-02 05:48:46 -0500 (Wed, 02 Dec 2009)
New Revision: 18977
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
Log:
https://jira.jboss.org/jira/browse/JBIDE-5191
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2009-12-02 10:45:13 UTC (rev 18976)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2009-12-02 10:48:46 UTC (rev 18977)
@@ -35,7 +35,7 @@
<PAIR name="org.jboss.soa.esb.actions.soap.SOAPProcessor" value="ESBPreActionSOAPProcessor"/>
<PAIR name="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy" value="ESBPreActionSOAPProxy"/>
<PAIR name="org.jboss.soa.esb.actions.soap.wise.SOAPClient" value="ESBPreActionSOAPWiseClient"/>
- <PAIR name="org.jboss.soa.esb.actions.transformation.xslt.XslAction" value="ESBPreActionXSLTAction"/>
+ <PAIR name="org.jboss.soa.esb.actions.transformation.xslt.XsltAction" value="ESBPreActionXSLTAction"/>
<PAIR
name="org.jboss.soa.esb.actions.validation.SchemaValidationAction" value="ESBPreActionSchemaValidator"/>
<PAIR name="org.jboss.soa.esb.scripting.ScriptingAction" value="ESBPreActionScripting"/>
@@ -2124,7 +2124,7 @@
<XModelAttribute PROPERTIES="category=general;id=true;save=always"
name="name" xmlname="name"/>
<XModelAttribute PROPERTIES="category=general;save=always"
- default="org.jboss.soa.esb.actions.transformation.xslt.XslAction"
+ default="org.jboss.soa.esb.actions.transformation.xslt.XsltAction"
name="class" xmlname="class">
<Editor name="Uneditable"/>
</XModelAttribute>
15 years, 1 month
JBoss Tools SVN: r18976 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-12-02 05:45:13 -0500 (Wed, 02 Dec 2009)
New Revision: 18976
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java
Log:
JBIDE-5346
Done
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java 2009-12-02 10:43:33 UTC (rev 18975)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java 2009-12-02 10:45:13 UTC (rev 18976)
@@ -57,7 +57,8 @@
* (java.util.Collection, org.eclipse.emf.edit.domain.EditingDomain)
*/
@Override
- public List<Diagnostic> validate(Collection<?> selectedObjects, EditingDomain editingDomain) {
+ public List<Diagnostic> validate(Collection<?> selectedObjects,
+ EditingDomain editingDomain) {
return super.validate(selectedObjects, editingDomain);
}
@@ -76,9 +77,19 @@
return null;
Object data = ((EObject) model).eGet(feature);
if (data == null) {
+ if (feature instanceof EAttribute) {
+ if (model instanceof BeanType
+ || model instanceof BindingsType) {
+ return newWaringDiagnostic(
+ "Must be linked with source input node", model,
+ (EAttribute) feature);
+ }
+ }
return null;
}
String path = data.toString();
+ if (path != null)
+ path = path.trim();
// if (path == null) {
// return null;
// }
@@ -91,6 +102,16 @@
if (path.indexOf('/') == -1) {
sperator = " ";
}
+ if (path == null || path.length() == 0) {
+ if (feature instanceof EAttribute) {
+ if (model instanceof BeanType
+ || model instanceof BindingsType) {
+ return newWaringDiagnostic(
+ "Must be linked with source input node", model,
+ (EAttribute) feature);
+ }
+ }
+ }
if (feature != null && path != null) {
if ("#document".equals(path)) {
return null;
@@ -101,10 +122,12 @@
if (obj instanceof IXMLStructuredObject) {
if (node == null) {
try {
- node = SmooksUIUtils.localXMLNodeWithPath(path, (IXMLStructuredObject) obj, sperator,
+ node = SmooksUIUtils.localXMLNodeWithPath(path,
+ (IXMLStructuredObject) obj, sperator,
false);
} catch (Throwable e) {
- SmooksConfigurationActivator.getDefault().log(e);
+ SmooksConfigurationActivator.getDefault()
+ .log(e);
}
}
if (node != null) {
@@ -113,16 +136,20 @@
}
}
if (node == null && feature instanceof EAttribute) {
- if (model instanceof BeanType || model instanceof BindingsType || model instanceof ValueType
+ if (model instanceof BeanType
+ || model instanceof BindingsType
+ || model instanceof ValueType
|| model instanceof org.jboss.tools.smooks.model.javabean12.ValueType
|| model instanceof WiringType
|| model instanceof org.jboss.tools.smooks.model.javabean12.WiringType
|| model instanceof ExpressionType
|| model instanceof org.jboss.tools.smooks.model.javabean12.ExpressionType) {
- return newWaringDiagnostic("Can't find the input source node : '" + path + "'", model,
- (EAttribute) feature);
+ return newWaringDiagnostic(
+ "Can't find the input source node : '" + path
+ + "'", model, (EAttribute) feature);
}
- return newWaringDiagnostic("Selector '" + path + "' isn't available", model, (EAttribute) feature);
+ return newWaringDiagnostic("Selector '" + path
+ + "' isn't available", model, (EAttribute) feature);
}
}
}
@@ -133,9 +160,11 @@
return SmooksUIUtils.getSelectorFeature((EObject) model);
}
- public void initValidator(Collection<?> selectedObjects, EditingDomain editingDomain) {
+ public void initValidator(Collection<?> selectedObjects,
+ EditingDomain editingDomain) {
list.clear();
- Resource resource = editingDomain.getResourceSet().getResources().get(0);
+ Resource resource = editingDomain.getResourceSet().getResources()
+ .get(0);
if (resource.getContents().isEmpty()) {
return;
}
@@ -152,7 +181,8 @@
return;
IContentType contentType = null;
try {
- IContentDescription contentDescription = file.getContentDescription();
+ IContentDescription contentDescription = file
+ .getContentDescription();
if (contentDescription != null) {
contentType = contentDescription.getContentType();
}
@@ -160,18 +190,22 @@
} catch (Throwable t) {
}
- IContentType smooksContentType = Platform.getContentTypeManager().getContentType(
- "org.jboss.tools.smooks.ui.smooks.contentType");
- IContentType ediMappingContentType = Platform.getContentTypeManager().getContentType(
- "org.jboss.tools.smooks.ui.edimap.contentType");
+ IContentType smooksContentType = Platform.getContentTypeManager()
+ .getContentType(
+ "org.jboss.tools.smooks.ui.smooks.contentType");
+ IContentType ediMappingContentType = Platform
+ .getContentTypeManager().getContentType(
+ "org.jboss.tools.smooks.ui.edimap.contentType");
- if (!(smooksContentType.equals(contentType) || ediMappingContentType.equals(contentType))) {
+ if (!(smooksContentType.equals(contentType) || ediMappingContentType
+ .equals(contentType))) {
return;
}
// final FileEditorInput input = new FileEditorInput(file);
final SmooksResourceListType finalList = listType;
- Display dis = SmooksConfigurationActivator.getDefault().getWorkbench().getDisplay();
+ Display dis = SmooksConfigurationActivator.getDefault()
+ .getWorkbench().getDisplay();
if (dis != null && !dis.isDisposed()) {
dis.syncExec(new Runnable() {
@@ -181,7 +215,8 @@
* @see java.lang.Runnable#run()
*/
public void run() {
- IWorkbenchWindow window = SmooksConfigurationActivator.getDefault().getWorkbench()
+ IWorkbenchWindow window = SmooksConfigurationActivator
+ .getDefault().getWorkbench()
.getActiveWorkbenchWindow();
IWorkbenchPage activePage = window.getActivePage();
if (activePage != null) {
@@ -190,7 +225,8 @@
// activePage.findEditor(input);
// if (part != null && part instanceof
// AbstractSmooksFormEditor) {
- List<Object> l = SelectorCreationDialog.generateInputData(finalList);
+ List<Object> l = SelectorCreationDialog
+ .generateInputData(finalList);
if (l != null) {
list.addAll(l);
}
15 years, 1 month
JBoss Tools SVN: r18975 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks: configuration/validate and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-12-02 05:43:33 -0500 (Wed, 02 Dec 2009)
New Revision: 18975
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaTypeFieldDialog.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/ClassFieldEditorValidator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/JavaBeanCreationWizardPage.java
Log:
JBIDE-5344
Done
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaTypeFieldDialog.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaTypeFieldDialog.java 2009-12-02 10:40:22 UTC (rev 18974)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaTypeFieldDialog.java 2009-12-02 10:43:33 UTC (rev 18975)
@@ -56,7 +56,11 @@
return null;
}
- public static String openJavaTypeDialog(Shell shell, IJavaProject javaProject) {
+ public static String openJavaTypeDialog(Shell shell, IJavaProject javaProject ) {
+ return openJavaTypeDialog(shell, javaProject, IJavaElementSearchConstants.CONSIDER_CLASSES);
+ }
+
+ public static String openJavaTypeDialog(Shell shell, IJavaProject javaProject , int javaType) {
IJavaSearchScope scope = null;
String className = null;
if (javaProject == null) {
@@ -80,8 +84,7 @@
SelectionDialog dialog;
try {
dialog = JavaUI.createTypeDialog(shell, SmooksConfigurationActivator.getDefault().getWorkbench()
- .getActiveWorkbenchWindow(), scope,
- IJavaElementSearchConstants.CONSIDER_CLASSES_AND_INTERFACES, false);
+ .getActiveWorkbenchWindow(), scope,javaType, false);
dialog.setMessage(Messages.JavaTypeFieldDialog_SearchDialogTitle);
dialog.setTitle(Messages.JavaTypeFieldDialog_SearchDialogTitle);
if (dialog.open() == Window.OK) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/ClassFieldEditorValidator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/ClassFieldEditorValidator.java 2009-12-02 10:40:22 UTC (rev 18974)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/ClassFieldEditorValidator.java 2009-12-02 10:43:33 UTC (rev 18975)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.validate;
+import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
@@ -23,6 +24,7 @@
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.Modifier;
import org.jboss.tools.smooks.configuration.editors.uitls.ProjectClassLoader;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.csv12.Binding;
@@ -127,8 +129,24 @@
// ignore
}
}
- String message = "Can't find class : \"" + classString + "\"";
+ String message = null;
if (clazz1 == null) {
+ message = "Can't find class : \"" + classString + "\"";
+ }else{
+ if(Modifier.isAbstract(clazz1.getModifiers())){
+ message = "The class can't be abstract";
+ }else{
+ try {
+ Constructor<?> constructor = clazz1.getConstructor(null);
+ } catch (SecurityException e) {
+ message = "The class '"+classString+"'can't be instanced";
+ } catch (NoSuchMethodException e) {
+ message = "The class '"+classString+"'can't be instanced";
+ }
+ }
+
+ }
+ if(message != null){
list.add(newWaringDiagnostic(message, object,(EAttribute) feature));
}
break;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/JavaBeanCreationWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/JavaBeanCreationWizardPage.java 2009-12-02 10:40:22 UTC (rev 18974)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/JavaBeanCreationWizardPage.java 2009-12-02 10:43:33 UTC (rev 18975)
@@ -11,6 +11,7 @@
package org.jboss.tools.smooks.graphical.wizards;
import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
@@ -19,6 +20,8 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.ui.IJavaElementSearchConstants;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTreeViewer;
@@ -76,7 +79,8 @@
private Text colllectionClassText;
- public JavaBeanCreationWizardPage(String pageName, String title, ImageDescriptor titleImage, IJavaProject project,
+ public JavaBeanCreationWizardPage(String pageName, String title,
+ ImageDescriptor titleImage, IJavaProject project,
List<String> exsitingBeanIDs) {
super(pageName, title, titleImage);
this.project = project;
@@ -85,7 +89,8 @@
this.setDescription(Messages.JavaBeanCreationWizardPage_WizardDes);
}
- public JavaBeanCreationWizardPage(String pageName, IJavaProject project, List<String> exsitingBeanIDs) {
+ public JavaBeanCreationWizardPage(String pageName, IJavaProject project,
+ List<String> exsitingBeanIDs) {
super(pageName);
this.project = project;
this.exsitingBeanIDs = exsitingBeanIDs;
@@ -122,7 +127,8 @@
createBeanTypeControls(mainComposite);
- Label seperator = new Label(mainComposite, SWT.HORIZONTAL | SWT.SEPARATOR);
+ Label seperator = new Label(mainComposite, SWT.HORIZONTAL
+ | SWT.SEPARATOR);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
gd.heightHint = 18;
@@ -169,11 +175,14 @@
element = ((TreeItem) element).getData();
}
if (element instanceof JavaBeanModel) {
- Object key = expandRecord.get(((JavaBeanModel) element).getID().toString());
+ Object key = expandRecord.get(((JavaBeanModel) element)
+ .getID().toString());
if (key == null) {
- expandRecord.put(((JavaBeanModel) element).getID().toString(), new Object());
+ expandRecord.put(((JavaBeanModel) element).getID()
+ .toString(), new Object());
if (viewer.getChecked(element)) {
- for (Iterator<?> iterator = ((JavaBeanModel) element).getChildren().iterator(); iterator
+ for (Iterator<?> iterator = ((JavaBeanModel) element)
+ .getChildren().iterator(); iterator
.hasNext();) {
Object child = (Object) iterator.next();
viewer.setChecked(child, true);
@@ -192,20 +201,24 @@
public void checkStateChanged(CheckStateChangedEvent event) {
Object element = event.getElement();
- CheckboxTreeViewer viewer = (CheckboxTreeViewer) event.getSource();
+ CheckboxTreeViewer viewer = (CheckboxTreeViewer) event
+ .getSource();
boolean checked = event.getChecked();
if (checked) {
checkParents(element, viewer);
- checkChildren((JavaBeanModel)element, true);
+ checkChildren((JavaBeanModel) element, true);
} else {
unCheckChildren(element, viewer);
}
}
- private void unCheckChildren(Object element, CheckboxTreeViewer viewer) {
- ITreeContentProvider provider = (ITreeContentProvider) viewer.getContentProvider();
+ private void unCheckChildren(Object element,
+ CheckboxTreeViewer viewer) {
+ ITreeContentProvider provider = (ITreeContentProvider) viewer
+ .getContentProvider();
if (element instanceof JavaBeanModel) {
- if (provider.hasChildren(element) && ((JavaBeanModel) element).isExpaned()) {
+ if (provider.hasChildren(element)
+ && ((JavaBeanModel) element).isExpaned()) {
Object[] children = provider.getChildren(element);
for (int i = 0; i < children.length; i++) {
Object child = children[i];
@@ -218,7 +231,8 @@
private void checkChildren(JavaBeanModel model, boolean flag) {
if (((JavaBeanModel) model).isExpaned()) {
- for (Iterator<?> iterator = ((JavaBeanModel) model).getChildren().iterator(); iterator.hasNext();) {
+ for (Iterator<?> iterator = ((JavaBeanModel) model)
+ .getChildren().iterator(); iterator.hasNext();) {
JavaBeanModel child = (JavaBeanModel) iterator.next();
viewer.setChecked(child, flag);
checkChildren(child, flag);
@@ -226,8 +240,10 @@
}
}
- private void checkParents(Object element, final CheckboxTreeViewer viewer) {
- ITreeContentProvider provider = (ITreeContentProvider) viewer.getContentProvider();
+ private void checkParents(Object element,
+ final CheckboxTreeViewer viewer) {
+ ITreeContentProvider provider = (ITreeContentProvider) viewer
+ .getContentProvider();
Object parent = provider.getParent(element);
if (parent != null && !viewer.getChecked(parent)) {
viewer.setChecked(parent, true);
@@ -248,7 +264,8 @@
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
Label beanTypeLabel = new Label(mainComposite, SWT.NONE);
- beanTypeLabel.setText(Messages.JavaBeanCreationWizardPage_BeanTypeLabel);
+ beanTypeLabel
+ .setText(Messages.JavaBeanCreationWizardPage_BeanTypeLabel);
Composite composite = new Composite(mainComposite, SWT.NONE);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -262,13 +279,16 @@
composite.setLayout(gl);
arrayButton = new Button(composite, SWT.CHECK);
- arrayButton.setText(Messages.JavaBeanCreationWizardPage_ArrayButtonText);
+ arrayButton
+ .setText(Messages.JavaBeanCreationWizardPage_ArrayButtonText);
final Button collectionButton = new Button(composite, SWT.CHECK);
- collectionButton.setText(Messages.JavaBeanCreationWizardPage_CollectionButtonLabel);
+ collectionButton
+ .setText(Messages.JavaBeanCreationWizardPage_CollectionButtonLabel);
Label beanClassLabel = new Label(mainComposite, SWT.NONE);
- beanClassLabel.setText(Messages.JavaBeanCreationWizardPage_CollectionClassLabel);
+ beanClassLabel
+ .setText(Messages.JavaBeanCreationWizardPage_CollectionClassLabel);
Composite beanClassComposite = new Composite(mainComposite, SWT.NONE);
GridLayout gl1 = new GridLayout();
@@ -300,23 +320,26 @@
beanClassComposite.setLayoutData(gd);
collectionClassBrowseButton = new Button(beanClassComposite, SWT.NONE);
- collectionClassBrowseButton.setText(Messages.JavaBeanCreationWizardPage_BrowseButtonLabel);
- collectionClassBrowseButton.addSelectionListener(new SelectionAdapter() {
+ collectionClassBrowseButton
+ .setText(Messages.JavaBeanCreationWizardPage_BrowseButtonLabel);
+ collectionClassBrowseButton
+ .addSelectionListener(new SelectionAdapter() {
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
- * .swt.events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- String classString = JavaTypeFieldDialog.openJavaTypeDialog(getShell(), project);
- colllectionClassText.setText(classString);
- }
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.swt.events.SelectionAdapter#widgetSelected
+ * (org.eclipse .swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ String classString = JavaTypeFieldDialog
+ .openJavaTypeDialog(getShell(), project);
+ colllectionClassText.setText(classString);
+ }
- });
+ });
collectionClassBrowseButton.setEnabled(false);
arrayButton.addSelectionListener(new SelectionAdapter() {
@@ -389,7 +412,8 @@
if (collectionClass != null) {
Class<?> clazz = loader.loadClass(beanClass);
Class<?> cclazz = loader.loadClass(collectionClass);
- javaBeanModel = JavaBeanModelFactory.getJavaBeanModelWithLazyLoad(clazz);
+ javaBeanModel = JavaBeanModelFactory
+ .getJavaBeanModelWithLazyLoad(clazz);
javaBeanModel.setComponentClass(cclazz);
} else {
viewer.setInput(""); //$NON-NLS-1$
@@ -400,14 +424,16 @@
Object arrayInstance = Array.newInstance(clazz, 0);
clazz = arrayInstance.getClass();
}
- javaBeanModel = JavaBeanModelFactory.getJavaBeanModelWithLazyLoad(clazz);
+ javaBeanModel = JavaBeanModelFactory
+ .getJavaBeanModelWithLazyLoad(clazz);
}
if (javaBeanModel != null) {
if (beanID != null) {
javaBeanModel.setName(beanID);
}
viewer.setInput(javaBeanModel.getChildren());
- viewer.setCheckedElements(javaBeanModel.getChildren().toArray());
+ viewer.setCheckedElements(javaBeanModel.getChildren()
+ .toArray());
} else {
viewer.setInput(""); //$NON-NLS-1$
}
@@ -421,7 +447,8 @@
private void createBeanClassControls(Composite mainComposite) {
Label beanClassLabel = new Label(mainComposite, SWT.NONE);
- beanClassLabel.setText(Messages.JavaBeanCreationWizardPage_BeanClassLabel);
+ beanClassLabel
+ .setText(Messages.JavaBeanCreationWizardPage_BeanClassLabel);
Composite beanClassComposite = new Composite(mainComposite, SWT.NONE);
GridLayout gl = new GridLayout();
@@ -463,7 +490,8 @@
beanClassComposite.setLayoutData(gd);
Button javaTypeBrowseButton = new Button(beanClassComposite, SWT.NONE);
- javaTypeBrowseButton.setText(Messages.JavaBeanCreationWizardPage_BrowseButtonLabel);
+ javaTypeBrowseButton
+ .setText(Messages.JavaBeanCreationWizardPage_BrowseButtonLabel);
javaTypeBrowseButton.addSelectionListener(new SelectionAdapter() {
/*
@@ -475,7 +503,9 @@
*/
@Override
public void widgetSelected(SelectionEvent e) {
- String classString = JavaTypeFieldDialog.openJavaTypeDialog(getShell(), project);
+ String classString = JavaTypeFieldDialog.openJavaTypeDialog(
+ getShell(), project,
+ IJavaElementSearchConstants.CONSIDER_CLASSES);
beanClassText.setText(classString);
}
@@ -522,10 +552,13 @@
} else {
if (exsitingBeanIDs != null) {
beanID = beanID.trim();
- for (Iterator<?> iterator = exsitingBeanIDs.iterator(); iterator.hasNext();) {
+ for (Iterator<?> iterator = exsitingBeanIDs.iterator(); iterator
+ .hasNext();) {
String id = (String) iterator.next();
if (id.equals(beanID)) {
- error = Messages.JavaBeanCreationWizardPage_BeanIDDuplicateErrorMessage1 + beanID + Messages.JavaBeanCreationWizardPage_BeanIDDuplicateErrorMessage2;
+ error = Messages.JavaBeanCreationWizardPage_BeanIDDuplicateErrorMessage1
+ + beanID
+ + Messages.JavaBeanCreationWizardPage_BeanIDDuplicateErrorMessage2;
}
}
}
@@ -536,11 +569,23 @@
try {
beanClass = beanClass.trim();
ProjectClassLoader loader = new ProjectClassLoader(project);
- loader.loadClass(beanClass);
+ Class<?> clazz = loader.loadClass(beanClass);
+ if (Modifier.isAbstract(clazz.getModifiers())) {
+ error = "The class can't be abstract";
+ } else {
+ try {
+ Constructor<?> constructor = clazz.getConstructor(null);
+ } catch (SecurityException e) {
+ error = "The class can't be instanced";
+ } catch (NoSuchMethodException e) {
+ error = "The class can't be instanced";
+ }
+ }
} catch (JavaModelException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
- error = Messages.JavaBeanCreationWizardPage_CatFindClassErrorMessage1 + beanClass + Messages.JavaBeanCreationWizardPage_27;
+ error = Messages.JavaBeanCreationWizardPage_CatFindClassErrorMessage1
+ + beanClass + Messages.JavaBeanCreationWizardPage_27;
}
}
@@ -550,11 +595,24 @@
} else {
try {
ProjectClassLoader loader = new ProjectClassLoader(project);
- loader.loadClass(collectionClass);
+ Class<?> clazz = loader.loadClass(collectionClass);
+ if (Modifier.isAbstract(clazz.getModifiers())) {
+ error = "The collection component class can't be abstract";
+ } else {
+ try {
+ Constructor<?> constructor = clazz
+ .getConstructor(null);
+ } catch (SecurityException e) {
+ error = "The collection component class can't be instanced";
+ } catch (NoSuchMethodException e) {
+ error = "The collection component class can't be instanced";
+ }
+ }
} catch (JavaModelException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
- error = Messages.JavaBeanCreationWizardPage_CatFindClassErrorMessage1 + beanClass;
+ error = Messages.JavaBeanCreationWizardPage_CatFindClassErrorMessage1
+ + beanClass;
}
}
}
15 years, 1 month
JBoss Tools SVN: r18974 - branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-12-02 05:40:22 -0500 (Wed, 02 Dec 2009)
New Revision: 18974
Modified:
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java
Log:
JBIDE-5346
DONE
Modified: branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java 2009-12-02 10:12:57 UTC (rev 18973)
+++ branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java 2009-12-02 10:40:22 UTC (rev 18974)
@@ -57,7 +57,8 @@
* (java.util.Collection, org.eclipse.emf.edit.domain.EditingDomain)
*/
@Override
- public List<Diagnostic> validate(Collection<?> selectedObjects, EditingDomain editingDomain) {
+ public List<Diagnostic> validate(Collection<?> selectedObjects,
+ EditingDomain editingDomain) {
return super.validate(selectedObjects, editingDomain);
}
@@ -76,9 +77,19 @@
return null;
Object data = ((EObject) model).eGet(feature);
if (data == null) {
+ if (feature instanceof EAttribute) {
+ if (model instanceof BeanType
+ || model instanceof BindingsType) {
+ return newWaringDiagnostic(
+ "Must be linked with source input node", model,
+ (EAttribute) feature);
+ }
+ }
return null;
}
String path = data.toString();
+ if (path != null)
+ path = path.trim();
// if (path == null) {
// return null;
// }
@@ -91,6 +102,16 @@
if (path.indexOf('/') == -1) {
sperator = " ";
}
+ if (path == null || path.length() == 0) {
+ if (feature instanceof EAttribute) {
+ if (model instanceof BeanType
+ || model instanceof BindingsType) {
+ return newWaringDiagnostic(
+ "Must be linked with source input node", model,
+ (EAttribute) feature);
+ }
+ }
+ }
if (feature != null && path != null) {
if ("#document".equals(path)) {
return null;
@@ -101,10 +122,12 @@
if (obj instanceof IXMLStructuredObject) {
if (node == null) {
try {
- node = SmooksUIUtils.localXMLNodeWithPath(path, (IXMLStructuredObject) obj, sperator,
+ node = SmooksUIUtils.localXMLNodeWithPath(path,
+ (IXMLStructuredObject) obj, sperator,
false);
} catch (Throwable e) {
- SmooksConfigurationActivator.getDefault().log(e);
+ SmooksConfigurationActivator.getDefault()
+ .log(e);
}
}
if (node != null) {
@@ -113,16 +136,20 @@
}
}
if (node == null && feature instanceof EAttribute) {
- if (model instanceof BeanType || model instanceof BindingsType || model instanceof ValueType
+ if (model instanceof BeanType
+ || model instanceof BindingsType
+ || model instanceof ValueType
|| model instanceof org.jboss.tools.smooks.model.javabean12.ValueType
|| model instanceof WiringType
|| model instanceof org.jboss.tools.smooks.model.javabean12.WiringType
|| model instanceof ExpressionType
|| model instanceof org.jboss.tools.smooks.model.javabean12.ExpressionType) {
- return newWaringDiagnostic("Can't find the input source node : '" + path + "'", model,
- (EAttribute) feature);
+ return newWaringDiagnostic(
+ "Can't find the input source node : '" + path
+ + "'", model, (EAttribute) feature);
}
- return newWaringDiagnostic("Selector '" + path + "' isn't available", model, (EAttribute) feature);
+ return newWaringDiagnostic("Selector '" + path
+ + "' isn't available", model, (EAttribute) feature);
}
}
}
@@ -133,9 +160,11 @@
return SmooksUIUtils.getSelectorFeature((EObject) model);
}
- public void initValidator(Collection<?> selectedObjects, EditingDomain editingDomain) {
+ public void initValidator(Collection<?> selectedObjects,
+ EditingDomain editingDomain) {
list.clear();
- Resource resource = editingDomain.getResourceSet().getResources().get(0);
+ Resource resource = editingDomain.getResourceSet().getResources()
+ .get(0);
if (resource.getContents().isEmpty()) {
return;
}
@@ -152,7 +181,8 @@
return;
IContentType contentType = null;
try {
- IContentDescription contentDescription = file.getContentDescription();
+ IContentDescription contentDescription = file
+ .getContentDescription();
if (contentDescription != null) {
contentType = contentDescription.getContentType();
}
@@ -160,18 +190,22 @@
} catch (Throwable t) {
}
- IContentType smooksContentType = Platform.getContentTypeManager().getContentType(
- "org.jboss.tools.smooks.ui.smooks.contentType");
- IContentType ediMappingContentType = Platform.getContentTypeManager().getContentType(
- "org.jboss.tools.smooks.ui.edimap.contentType");
+ IContentType smooksContentType = Platform.getContentTypeManager()
+ .getContentType(
+ "org.jboss.tools.smooks.ui.smooks.contentType");
+ IContentType ediMappingContentType = Platform
+ .getContentTypeManager().getContentType(
+ "org.jboss.tools.smooks.ui.edimap.contentType");
- if (!(smooksContentType.equals(contentType) || ediMappingContentType.equals(contentType))) {
+ if (!(smooksContentType.equals(contentType) || ediMappingContentType
+ .equals(contentType))) {
return;
}
// final FileEditorInput input = new FileEditorInput(file);
final SmooksResourceListType finalList = listType;
- Display dis = SmooksConfigurationActivator.getDefault().getWorkbench().getDisplay();
+ Display dis = SmooksConfigurationActivator.getDefault()
+ .getWorkbench().getDisplay();
if (dis != null && !dis.isDisposed()) {
dis.syncExec(new Runnable() {
@@ -181,7 +215,8 @@
* @see java.lang.Runnable#run()
*/
public void run() {
- IWorkbenchWindow window = SmooksConfigurationActivator.getDefault().getWorkbench()
+ IWorkbenchWindow window = SmooksConfigurationActivator
+ .getDefault().getWorkbench()
.getActiveWorkbenchWindow();
IWorkbenchPage activePage = window.getActivePage();
if (activePage != null) {
@@ -190,7 +225,8 @@
// activePage.findEditor(input);
// if (part != null && part instanceof
// AbstractSmooksFormEditor) {
- List<Object> l = SelectorCreationDialog.generateInputData(finalList);
+ List<Object> l = SelectorCreationDialog
+ .generateInputData(finalList);
if (l != null) {
list.addAll(l);
}
15 years, 1 month
JBoss Tools SVN: r18973 - in branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks: configuration/validate and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-12-02 05:12:57 -0500 (Wed, 02 Dec 2009)
New Revision: 18973
Modified:
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaTypeFieldDialog.java
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/ClassFieldEditorValidator.java
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/JavaBeanCreationWizardPage.java
Log:
JBIDE-5354
Modified: branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaTypeFieldDialog.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaTypeFieldDialog.java 2009-12-02 10:12:27 UTC (rev 18972)
+++ branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaTypeFieldDialog.java 2009-12-02 10:12:57 UTC (rev 18973)
@@ -56,7 +56,11 @@
return null;
}
- public static String openJavaTypeDialog(Shell shell, IJavaProject javaProject) {
+ public static String openJavaTypeDialog(Shell shell, IJavaProject javaProject ) {
+ return openJavaTypeDialog(shell, javaProject, IJavaElementSearchConstants.CONSIDER_CLASSES);
+ }
+
+ public static String openJavaTypeDialog(Shell shell, IJavaProject javaProject , int javaType) {
IJavaSearchScope scope = null;
String className = null;
if (javaProject == null) {
@@ -80,8 +84,7 @@
SelectionDialog dialog;
try {
dialog = JavaUI.createTypeDialog(shell, SmooksConfigurationActivator.getDefault().getWorkbench()
- .getActiveWorkbenchWindow(), scope,
- IJavaElementSearchConstants.CONSIDER_CLASSES_AND_INTERFACES, false);
+ .getActiveWorkbenchWindow(), scope,javaType, false);
dialog.setMessage(Messages.JavaTypeFieldDialog_SearchDialogTitle);
dialog.setTitle(Messages.JavaTypeFieldDialog_SearchDialogTitle);
if (dialog.open() == Window.OK) {
Modified: branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/ClassFieldEditorValidator.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/ClassFieldEditorValidator.java 2009-12-02 10:12:27 UTC (rev 18972)
+++ branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/ClassFieldEditorValidator.java 2009-12-02 10:12:57 UTC (rev 18973)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.validate;
+import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
@@ -23,6 +24,7 @@
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.Modifier;
import org.jboss.tools.smooks.configuration.editors.uitls.ProjectClassLoader;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.csv12.Binding;
@@ -127,8 +129,24 @@
// ignore
}
}
- String message = "Can't find class : \"" + classString + "\"";
+ String message = null;
if (clazz1 == null) {
+ message = "Can't find class : \"" + classString + "\"";
+ }else{
+ if(Modifier.isAbstract(clazz1.getModifiers())){
+ message = "The class can't be abstract";
+ }else{
+ try {
+ Constructor<?> constructor = clazz1.getConstructor(null);
+ } catch (SecurityException e) {
+ message = "The class '"+classString+"'can't be instanced";
+ } catch (NoSuchMethodException e) {
+ message = "The class '"+classString+"'can't be instanced";
+ }
+ }
+
+ }
+ if(message != null){
list.add(newWaringDiagnostic(message, object,(EAttribute) feature));
}
break;
Modified: branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/JavaBeanCreationWizardPage.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/JavaBeanCreationWizardPage.java 2009-12-02 10:12:27 UTC (rev 18972)
+++ branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/JavaBeanCreationWizardPage.java 2009-12-02 10:12:57 UTC (rev 18973)
@@ -11,6 +11,7 @@
package org.jboss.tools.smooks.graphical.wizards;
import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
@@ -19,6 +20,8 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.ui.IJavaElementSearchConstants;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTreeViewer;
@@ -76,7 +79,8 @@
private Text colllectionClassText;
- public JavaBeanCreationWizardPage(String pageName, String title, ImageDescriptor titleImage, IJavaProject project,
+ public JavaBeanCreationWizardPage(String pageName, String title,
+ ImageDescriptor titleImage, IJavaProject project,
List<String> exsitingBeanIDs) {
super(pageName, title, titleImage);
this.project = project;
@@ -85,7 +89,8 @@
this.setDescription(Messages.JavaBeanCreationWizardPage_WizardDes);
}
- public JavaBeanCreationWizardPage(String pageName, IJavaProject project, List<String> exsitingBeanIDs) {
+ public JavaBeanCreationWizardPage(String pageName, IJavaProject project,
+ List<String> exsitingBeanIDs) {
super(pageName);
this.project = project;
this.exsitingBeanIDs = exsitingBeanIDs;
@@ -122,7 +127,8 @@
createBeanTypeControls(mainComposite);
- Label seperator = new Label(mainComposite, SWT.HORIZONTAL | SWT.SEPARATOR);
+ Label seperator = new Label(mainComposite, SWT.HORIZONTAL
+ | SWT.SEPARATOR);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
gd.heightHint = 18;
@@ -169,11 +175,14 @@
element = ((TreeItem) element).getData();
}
if (element instanceof JavaBeanModel) {
- Object key = expandRecord.get(((JavaBeanModel) element).getID().toString());
+ Object key = expandRecord.get(((JavaBeanModel) element)
+ .getID().toString());
if (key == null) {
- expandRecord.put(((JavaBeanModel) element).getID().toString(), new Object());
+ expandRecord.put(((JavaBeanModel) element).getID()
+ .toString(), new Object());
if (viewer.getChecked(element)) {
- for (Iterator<?> iterator = ((JavaBeanModel) element).getChildren().iterator(); iterator
+ for (Iterator<?> iterator = ((JavaBeanModel) element)
+ .getChildren().iterator(); iterator
.hasNext();) {
Object child = (Object) iterator.next();
viewer.setChecked(child, true);
@@ -192,20 +201,24 @@
public void checkStateChanged(CheckStateChangedEvent event) {
Object element = event.getElement();
- CheckboxTreeViewer viewer = (CheckboxTreeViewer) event.getSource();
+ CheckboxTreeViewer viewer = (CheckboxTreeViewer) event
+ .getSource();
boolean checked = event.getChecked();
if (checked) {
checkParents(element, viewer);
- checkChildren((JavaBeanModel)element, true);
+ checkChildren((JavaBeanModel) element, true);
} else {
unCheckChildren(element, viewer);
}
}
- private void unCheckChildren(Object element, CheckboxTreeViewer viewer) {
- ITreeContentProvider provider = (ITreeContentProvider) viewer.getContentProvider();
+ private void unCheckChildren(Object element,
+ CheckboxTreeViewer viewer) {
+ ITreeContentProvider provider = (ITreeContentProvider) viewer
+ .getContentProvider();
if (element instanceof JavaBeanModel) {
- if (provider.hasChildren(element) && ((JavaBeanModel) element).isExpaned()) {
+ if (provider.hasChildren(element)
+ && ((JavaBeanModel) element).isExpaned()) {
Object[] children = provider.getChildren(element);
for (int i = 0; i < children.length; i++) {
Object child = children[i];
@@ -218,7 +231,8 @@
private void checkChildren(JavaBeanModel model, boolean flag) {
if (((JavaBeanModel) model).isExpaned()) {
- for (Iterator<?> iterator = ((JavaBeanModel) model).getChildren().iterator(); iterator.hasNext();) {
+ for (Iterator<?> iterator = ((JavaBeanModel) model)
+ .getChildren().iterator(); iterator.hasNext();) {
JavaBeanModel child = (JavaBeanModel) iterator.next();
viewer.setChecked(child, flag);
checkChildren(child, flag);
@@ -226,8 +240,10 @@
}
}
- private void checkParents(Object element, final CheckboxTreeViewer viewer) {
- ITreeContentProvider provider = (ITreeContentProvider) viewer.getContentProvider();
+ private void checkParents(Object element,
+ final CheckboxTreeViewer viewer) {
+ ITreeContentProvider provider = (ITreeContentProvider) viewer
+ .getContentProvider();
Object parent = provider.getParent(element);
if (parent != null && !viewer.getChecked(parent)) {
viewer.setChecked(parent, true);
@@ -248,7 +264,8 @@
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
Label beanTypeLabel = new Label(mainComposite, SWT.NONE);
- beanTypeLabel.setText(Messages.JavaBeanCreationWizardPage_BeanTypeLabel);
+ beanTypeLabel
+ .setText(Messages.JavaBeanCreationWizardPage_BeanTypeLabel);
Composite composite = new Composite(mainComposite, SWT.NONE);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -262,13 +279,16 @@
composite.setLayout(gl);
arrayButton = new Button(composite, SWT.CHECK);
- arrayButton.setText(Messages.JavaBeanCreationWizardPage_ArrayButtonText);
+ arrayButton
+ .setText(Messages.JavaBeanCreationWizardPage_ArrayButtonText);
final Button collectionButton = new Button(composite, SWT.CHECK);
- collectionButton.setText(Messages.JavaBeanCreationWizardPage_CollectionButtonLabel);
+ collectionButton
+ .setText(Messages.JavaBeanCreationWizardPage_CollectionButtonLabel);
Label beanClassLabel = new Label(mainComposite, SWT.NONE);
- beanClassLabel.setText(Messages.JavaBeanCreationWizardPage_CollectionClassLabel);
+ beanClassLabel
+ .setText(Messages.JavaBeanCreationWizardPage_CollectionClassLabel);
Composite beanClassComposite = new Composite(mainComposite, SWT.NONE);
GridLayout gl1 = new GridLayout();
@@ -300,23 +320,26 @@
beanClassComposite.setLayoutData(gd);
collectionClassBrowseButton = new Button(beanClassComposite, SWT.NONE);
- collectionClassBrowseButton.setText(Messages.JavaBeanCreationWizardPage_BrowseButtonLabel);
- collectionClassBrowseButton.addSelectionListener(new SelectionAdapter() {
+ collectionClassBrowseButton
+ .setText(Messages.JavaBeanCreationWizardPage_BrowseButtonLabel);
+ collectionClassBrowseButton
+ .addSelectionListener(new SelectionAdapter() {
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse
- * .swt.events.SelectionEvent)
- */
- @Override
- public void widgetSelected(SelectionEvent e) {
- String classString = JavaTypeFieldDialog.openJavaTypeDialog(getShell(), project);
- colllectionClassText.setText(classString);
- }
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.swt.events.SelectionAdapter#widgetSelected
+ * (org.eclipse .swt.events.SelectionEvent)
+ */
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ String classString = JavaTypeFieldDialog
+ .openJavaTypeDialog(getShell(), project);
+ colllectionClassText.setText(classString);
+ }
- });
+ });
collectionClassBrowseButton.setEnabled(false);
arrayButton.addSelectionListener(new SelectionAdapter() {
@@ -389,7 +412,8 @@
if (collectionClass != null) {
Class<?> clazz = loader.loadClass(beanClass);
Class<?> cclazz = loader.loadClass(collectionClass);
- javaBeanModel = JavaBeanModelFactory.getJavaBeanModelWithLazyLoad(clazz);
+ javaBeanModel = JavaBeanModelFactory
+ .getJavaBeanModelWithLazyLoad(clazz);
javaBeanModel.setComponentClass(cclazz);
} else {
viewer.setInput(""); //$NON-NLS-1$
@@ -400,14 +424,16 @@
Object arrayInstance = Array.newInstance(clazz, 0);
clazz = arrayInstance.getClass();
}
- javaBeanModel = JavaBeanModelFactory.getJavaBeanModelWithLazyLoad(clazz);
+ javaBeanModel = JavaBeanModelFactory
+ .getJavaBeanModelWithLazyLoad(clazz);
}
if (javaBeanModel != null) {
if (beanID != null) {
javaBeanModel.setName(beanID);
}
viewer.setInput(javaBeanModel.getChildren());
- viewer.setCheckedElements(javaBeanModel.getChildren().toArray());
+ viewer.setCheckedElements(javaBeanModel.getChildren()
+ .toArray());
} else {
viewer.setInput(""); //$NON-NLS-1$
}
@@ -421,7 +447,8 @@
private void createBeanClassControls(Composite mainComposite) {
Label beanClassLabel = new Label(mainComposite, SWT.NONE);
- beanClassLabel.setText(Messages.JavaBeanCreationWizardPage_BeanClassLabel);
+ beanClassLabel
+ .setText(Messages.JavaBeanCreationWizardPage_BeanClassLabel);
Composite beanClassComposite = new Composite(mainComposite, SWT.NONE);
GridLayout gl = new GridLayout();
@@ -463,7 +490,8 @@
beanClassComposite.setLayoutData(gd);
Button javaTypeBrowseButton = new Button(beanClassComposite, SWT.NONE);
- javaTypeBrowseButton.setText(Messages.JavaBeanCreationWizardPage_BrowseButtonLabel);
+ javaTypeBrowseButton
+ .setText(Messages.JavaBeanCreationWizardPage_BrowseButtonLabel);
javaTypeBrowseButton.addSelectionListener(new SelectionAdapter() {
/*
@@ -475,7 +503,9 @@
*/
@Override
public void widgetSelected(SelectionEvent e) {
- String classString = JavaTypeFieldDialog.openJavaTypeDialog(getShell(), project);
+ String classString = JavaTypeFieldDialog.openJavaTypeDialog(
+ getShell(), project,
+ IJavaElementSearchConstants.CONSIDER_CLASSES);
beanClassText.setText(classString);
}
@@ -522,10 +552,13 @@
} else {
if (exsitingBeanIDs != null) {
beanID = beanID.trim();
- for (Iterator<?> iterator = exsitingBeanIDs.iterator(); iterator.hasNext();) {
+ for (Iterator<?> iterator = exsitingBeanIDs.iterator(); iterator
+ .hasNext();) {
String id = (String) iterator.next();
if (id.equals(beanID)) {
- error = Messages.JavaBeanCreationWizardPage_BeanIDDuplicateErrorMessage1 + beanID + Messages.JavaBeanCreationWizardPage_BeanIDDuplicateErrorMessage2;
+ error = Messages.JavaBeanCreationWizardPage_BeanIDDuplicateErrorMessage1
+ + beanID
+ + Messages.JavaBeanCreationWizardPage_BeanIDDuplicateErrorMessage2;
}
}
}
@@ -536,11 +569,23 @@
try {
beanClass = beanClass.trim();
ProjectClassLoader loader = new ProjectClassLoader(project);
- loader.loadClass(beanClass);
+ Class<?> clazz = loader.loadClass(beanClass);
+ if (Modifier.isAbstract(clazz.getModifiers())) {
+ error = "The class can't be abstract";
+ } else {
+ try {
+ Constructor<?> constructor = clazz.getConstructor(null);
+ } catch (SecurityException e) {
+ error = "The class can't be instanced";
+ } catch (NoSuchMethodException e) {
+ error = "The class can't be instanced";
+ }
+ }
} catch (JavaModelException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
- error = Messages.JavaBeanCreationWizardPage_CatFindClassErrorMessage1 + beanClass + Messages.JavaBeanCreationWizardPage_27;
+ error = Messages.JavaBeanCreationWizardPage_CatFindClassErrorMessage1
+ + beanClass + Messages.JavaBeanCreationWizardPage_27;
}
}
@@ -550,11 +595,24 @@
} else {
try {
ProjectClassLoader loader = new ProjectClassLoader(project);
- loader.loadClass(collectionClass);
+ Class<?> clazz = loader.loadClass(collectionClass);
+ if (Modifier.isAbstract(clazz.getModifiers())) {
+ error = "The collection component class can't be abstract";
+ } else {
+ try {
+ Constructor<?> constructor = clazz
+ .getConstructor(null);
+ } catch (SecurityException e) {
+ error = "The collection component class can't be instanced";
+ } catch (NoSuchMethodException e) {
+ error = "The collection component class can't be instanced";
+ }
+ }
} catch (JavaModelException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
- error = Messages.JavaBeanCreationWizardPage_CatFindClassErrorMessage1 + beanClass;
+ error = Messages.JavaBeanCreationWizardPage_CatFindClassErrorMessage1
+ + beanClass;
}
}
}
15 years, 1 month
JBoss Tools SVN: r18972 - in trunk/bpel/plugins: org.eclipse.bpel.common.ui/META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2009-12-02 05:12:27 -0500 (Wed, 02 Dec 2009)
New Revision: 18972
Modified:
trunk/bpel/plugins/org.eclipse.bpel.common.model/META-INF/MANIFEST.MF
trunk/bpel/plugins/org.eclipse.bpel.common.ui/META-INF/MANIFEST.MF
trunk/bpel/plugins/org.eclipse.bpel.model/META-INF/MANIFEST.MF
trunk/bpel/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF
trunk/bpel/plugins/org.eclipse.bpel.wsil.model/META-INF/MANIFEST.MF
Log:
JBIDE-5349: sync the bpel codes from eclipse bpel codes base
Modified: trunk/bpel/plugins/org.eclipse.bpel.common.model/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.common.model/META-INF/MANIFEST.MF 2009-12-02 10:05:14 UTC (rev 18971)
+++ trunk/bpel/plugins/org.eclipse.bpel.common.model/META-INF/MANIFEST.MF 2009-12-02 10:12:27 UTC (rev 18972)
@@ -58,4 +58,4 @@
org.eclipse.bpel.names
Bundle-Vendor: eclipse.org
Bundle-ClassPath: bin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/bpel/plugins/org.eclipse.bpel.common.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.common.ui/META-INF/MANIFEST.MF 2009-12-02 10:05:14 UTC (rev 18971)
+++ trunk/bpel/plugins/org.eclipse.bpel.common.ui/META-INF/MANIFEST.MF 2009-12-02 10:12:27 UTC (rev 18972)
@@ -29,6 +29,6 @@
org.eclipse.bpel.common.ui.markers,
org.eclipse.bpel.common.ui.palette,
org.eclipse.bpel.common.ui.tray
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: eclipse.org
Bundle-ClassPath: bin
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/META-INF/MANIFEST.MF 2009-12-02 10:05:14 UTC (rev 18971)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/META-INF/MANIFEST.MF 2009-12-02 10:12:27 UTC (rev 18972)
@@ -29,5 +29,5 @@
org.eclipse.bpel.model.resource,
org.eclipse.bpel.model.terms,
org.eclipse.bpel.model.util
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: bin
Modified: trunk/bpel/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF 2009-12-02 10:05:14 UTC (rev 18971)
+++ trunk/bpel/plugins/org.eclipse.bpel.ui/META-INF/MANIFEST.MF 2009-12-02 10:12:27 UTC (rev 18972)
@@ -66,4 +66,4 @@
org.eclipse.bpel.ui.util.marker,
org.eclipse.bpel.ui.wizards
Bundle-ClassPath: bin
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/bpel/plugins/org.eclipse.bpel.wsil.model/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.wsil.model/META-INF/MANIFEST.MF 2009-12-02 10:05:14 UTC (rev 18971)
+++ trunk/bpel/plugins/org.eclipse.bpel.wsil.model/META-INF/MANIFEST.MF 2009-12-02 10:12:27 UTC (rev 18972)
@@ -27,4 +27,4 @@
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.emf.ecore.xmi;bundle-version="[2.4.0,3.0.0)";visibility:=reexport
Eclipse-LazyStart: true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
15 years, 1 month
JBoss Tools SVN: r18971 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-12-02 05:05:14 -0500 (Wed, 02 Dec 2009)
New Revision: 18971
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4407
workaround applied
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java 2009-12-02 10:03:37 UTC (rev 18970)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java 2009-12-02 10:05:14 UTC (rev 18971)
@@ -58,6 +58,9 @@
private CSSStyleSheet styleSheet = null;
private static final String COPY_SUFFIX = "_copy"; //$NON-NLS-1$
private boolean copy = false;
+
+ // workaround for JBIDE-4407
+ private String oldText = null;
/**
* Constructor.
@@ -105,6 +108,9 @@
partitioner.connect(model.getStructuredDocument());
}
+ // workaround for JBIDE-4407
+ oldText = model.getStructuredDocument().get();
+
if (model instanceof ICSSModel) {
ICSSModel cssModel = (ICSSModel) model;
@@ -221,6 +227,9 @@
}
model = null;
+ // workaround for JBIDE-4407
+ oldText = null;
+
}
public void save() {
@@ -242,7 +251,15 @@
buffer.setDirty(false);
}
- model.save();
+ // workaround for JBIDE-4407
+ // if the model is unchanged the text CSS editor
+ // loses highlighting. When the problem will be fixed on
+ // the WTP side, the following checking will not be needed.
+ String newText = model.getStructuredDocument().get();
+ if (!oldText.equals(newText)) {
+ model.save();
+ oldText = newText;
+ }
} catch (IOException e) {
JspEditorPlugin.getPluginLog().logError(e.getMessage());
} catch (CoreException e) {
@@ -253,7 +270,6 @@
public void setFile(final IFile file) {
this.styleFile = file;
-
}
public void updateCSSStyle(final String selectorLabel,
15 years, 1 month
JBoss Tools SVN: r18970 - branches/jbosstools-3.1.0.RC1/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-12-02 05:03:37 -0500 (Wed, 02 Dec 2009)
New Revision: 18970
Modified:
branches/jbosstools-3.1.0.RC1/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console.launch
branches/jbosstools-3.1.0.RC1/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console_jpa.launch
Log:
https://jira.jboss.org/jira/browse/JBIDE-5328
Modified: branches/jbosstools-3.1.0.RC1/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console.launch
===================================================================
--- branches/jbosstools-3.1.0.RC1/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console.launch 2009-12-02 09:03:25 UTC (rev 18969)
+++ branches/jbosstools-3.1.0.RC1/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console.launch 2009-12-02 10:03:37 UTC (rev 18970)
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Hibernate Console launch configuration -->
<launchConfiguration type="org.hibernate.eclipse.launch.ConsoleConfigurationLaunchConfigurationType">
-<stringAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS" value="\@projectName@">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/@projectName@"/>
</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="@projectName@"/>
<stringAttribute key="org.hibernate.eclipse.launch.CONFIGURATION_FACTORY" value="JPA"/>
<stringAttribute key="org.hibernate.eclipse.launch.CONNECTION_PROFILE_NAME" value="@connectionProfile@"/>
Modified: branches/jbosstools-3.1.0.RC1/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console_jpa.launch
===================================================================
--- branches/jbosstools-3.1.0.RC1/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console_jpa.launch 2009-12-02 09:03:25 UTC (rev 18969)
+++ branches/jbosstools-3.1.0.RC1/seam/plugins/org.jboss.tools.seam.core/templates/hibernatetools/hibernate-console_jpa.launch 2009-12-02 10:03:37 UTC (rev 18970)
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Hibernate Console launch configuration -->
<launchConfiguration type="org.hibernate.eclipse.launch.ConsoleConfigurationLaunchConfigurationType">
-<stringAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS" value="\@projectName@">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/@projectName@"/>
</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="@projectName@"/>
<stringAttribute key="org.hibernate.eclipse.launch.CONFIGURATION_FACTORY" value="JPA"/>
<stringAttribute key="org.hibernate.eclipse.launch.USE_JPA_PROJECT_PROFILE" value="true"/>
15 years, 1 month