JBoss Tools SVN: r11496 - branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/JavaSource/demo.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-11-03 20:00:16 -0500 (Mon, 03 Nov 2008)
New Revision: 11496
Modified:
branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/JavaSource/demo/User.java
Log:
@Role and @Roles annotations were added to test class to increase test coverage
Modified: branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/JavaSource/demo/User.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/JavaSource/demo/User.java 2008-11-04 00:22:41 UTC (rev 11495)
+++ branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/projects/TestScanner/JavaSource/demo/User.java 2008-11-04 01:00:16 UTC (rev 11496)
@@ -12,9 +12,19 @@
import javax.persistence.Entity;
+import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.*;
-import org.jboss.seam.Component;
+import org.jboss.seam.annotations.Create;
+import org.jboss.seam.annotations.Destroy;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Role;
+import org.jboss.seam.annotations.Roles;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Unwrap;
/**
* Created by JBoss Developer Studio
@@ -24,6 +34,12 @@
@Scope(ScopeType.APPLICATION)
@Entity
@Install(precedence=Install.FRAMEWORK)
+@Role(name="roleName1", scope=ScopeType.SESSION)
+@Roles({
+ @Role(name="roleName2", scope=ScopeType.SESSION),
+ @Role(name="roleName3", scope=ScopeType.SESSION),
+ @Role(name="roleName4", scope=ScopeType.SESSION)
+})
public class User {
16 years, 2 months
JBoss Tools SVN: r11495 - branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-11-03 19:22:41 -0500 (Mon, 03 Nov 2008)
New Revision: 11495
Modified:
branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
Log:
test for Seam Prompting Provider has been removed
Modified: branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2008-11-03 23:23:16 UTC (rev 11494)
+++ branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2008-11-04 00:22:41 UTC (rev 11495)
@@ -18,9 +18,10 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jface.text.BadLocationException;
import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.seam.core.BeanType;
import org.jboss.tools.seam.core.BijectedAttributeType;
@@ -44,12 +45,14 @@
import org.jboss.tools.seam.core.event.ISeamValueMapEntry;
import org.jboss.tools.seam.core.event.ISeamValueString;
import org.jboss.tools.seam.internal.core.SeamProject;
+import org.jboss.tools.seam.internal.core.el.SeamELCompletionEngine;
import org.jboss.tools.seam.internal.core.el.SeamPromptingProvider;
import org.jboss.tools.seam.internal.core.scanner.IFileScanner;
import org.jboss.tools.seam.internal.core.scanner.LoadedDeclarations;
import org.jboss.tools.seam.internal.core.scanner.lib.ClassPath;
import org.jboss.tools.seam.internal.core.scanner.lib.LibraryScanner;
import org.jboss.tools.test.util.JUnitUtils;
+import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
public class ScannerTest extends TestCase {
@@ -66,9 +69,8 @@
provider = new TestProjectProvider("org.jboss.tools.seam.core.test",
null,"TestScanner" ,true);
project = provider.getProject();
- project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
this.project.build(IncrementalProjectBuilder.FULL_BUILD, null);
- //EditorTestHelper.joinBackgroundActivities();
+ JobUtils.waitForIdle();
}
private ISeamProject getSeamProject() {
@@ -460,20 +462,7 @@
String actualValue = valueObject.getValue().getValue();
assertTrue("Property " + propertyName + " has value " + actualValue + " rather than " + expectedValue, expectedValue.equals(actualValue));
}
-
}
-
- public void testPromptingProvider() {
- ISeamProject seamProject = getSeamProject();
- SeamPromptingProvider pp = new SeamPromptingProvider();
- Properties properties = new Properties();
- properties.put("seamProject", seamProject);
- List list = pp.getList(null, SeamPromptingProvider.VARIABLES, "", properties);
- assertTrue("Prompting has to contain 'myUser' variable", list.contains("myUser"));
-
- list = pp.getList(null, SeamPromptingProvider.MEMBERS, "#{myUser.", properties);
- assertTrue("Prompting has to contain 'payment' property for '#{myUser.' seed", list.contains("payment"));
- }
public void testInnerClass_JBIDE_1374() {
ISeamProject seamProject = getSeamProject();
16 years, 2 months
JBoss Tools SVN: r11493 - branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-11-03 16:14:11 -0500 (Mon, 03 Nov 2008)
New Revision: 11493
Modified:
branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
Log:
increase delay for a second to check if that helps fix seam core validation Junit tests errors
Modified: branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2008-11-03 20:58:23 UTC (rev 11492)
+++ branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2008-11-03 21:14:11 UTC (rev 11493)
@@ -94,6 +94,8 @@
public void testJBIDE1318() throws CoreException {
getSeamProject(project);
IFile testJSP = project.getFile("WebContent/test.jsp");
+ testJSP.touch(null);
+ refreshProject(project);
assertMarkerIsNotCreated(testJSP, null, "actor cannot be resolved");
}
@@ -125,6 +127,8 @@
public void testJiraJbide1631() throws CoreException {
// Test for http://jira.jboss.com/jira/browse/JBIDE-1631
IFile jbide1631XHTMLFile = project.getFile("WebContent/JBIDE-1631.xhtml");
+ jbide1631XHTMLFile.touch(null);
+ JobUtils.waitForIdle();
refreshProject(project);
assertMarkerIsCreated(jbide1631XHTMLFile, null, "\"foo1\" cannot be resolved", 16 );
assertMarkerIsCreated(jbide1631XHTMLFile, null, "\"foo2\" cannot be resolved", 16 );
@@ -845,6 +849,6 @@
private void refreshProject(IProject project){
JobUtils.delay(1000);
JobUtils.waitForIdle();
- JobUtils.delay(500);
+ JobUtils.delay(1500);
}
}
\ No newline at end of file
16 years, 2 months
JBoss Tools SVN: r11492 - trunk/vpe/tests/org.jboss.tools.vpe.test/scheme.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-11-03 15:58:23 -0500 (Mon, 03 Nov 2008)
New Revision: 11492
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd
Log:
fix JUnit Tests Error
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd 2008-11-03 20:49:47 UTC (rev 11491)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd 2008-11-03 20:58:23 UTC (rev 11492)
@@ -271,6 +271,7 @@
<xsd:attribute name="icon" type="vpe:VPE-BOOLEAN" use="optional"/>
<xsd:attribute name="background-color" type="xsd:string" use="optional"/>
<xsd:attribute name="border" type="xsd:string" use="optional"/>
+ <xsd:attribute name="style" type="xsd:string" use="optional"/>
</xsd:complexType>
<!-- -->
<xsd:complexType name="TAGLIB"/>
16 years, 2 months
JBoss Tools SVN: r11491 - in trunk/examples/plugins/org.jboss.tools.project.examples: src/org/jboss/tools/project/examples and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-11-03 15:49:47 -0500 (Mon, 03 Nov 2008)
New Revision: 11491
Added:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/actions/
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/actions/ProjectExamplesHandler.java
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml
Log:
JBIDE-3076 Adding the project examples action to the Help menu
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml 2008-11-03 15:32:57 UTC (rev 11490)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/plugin.xml 2008-11-03 20:49:47 UTC (rev 11491)
@@ -15,4 +15,29 @@
icon="icons/examples_wiz.gif">
</wizard>
</extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ name="Project Examples"
+ id="org.jboss.tools.project.examples">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ commandId="org.jboss.tools.project.examples"
+ class="org.jboss.tools.project.examples.actions.ProjectExamplesHandler">
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ locationURI="menu:help?after=group.tutorials">
+ <command
+ commandId="org.jboss.tools.project.examples"
+ id="org.jboss.tools.project.examples">
+ </command>
+
+ </menuContribution>
+ </extension>
</plugin>
Added: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/actions/ProjectExamplesHandler.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/actions/ProjectExamplesHandler.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/actions/ProjectExamplesHandler.java 2008-11-03 20:49:47 UTC (rev 11491)
@@ -0,0 +1,20 @@
+package org.jboss.tools.project.examples.actions;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.project.examples.wizard.NewProjectExamplesWizard;
+
+public class ProjectExamplesHandler extends AbstractHandler {
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ Wizard wizard = new NewProjectExamplesWizard();
+ WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
+ dialog.open();
+ return null;
+ }
+
+}
16 years, 2 months
JBoss Tools SVN: r11490 - in trunk: jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/xpl and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-11-03 10:32:57 -0500 (Mon, 03 Nov 2008)
New Revision: 11490
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/messages.properties
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/xpl/WebUIMessages.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeTaglibValidator.java
Log:
JBIDE-2979, validation for prefix was added
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/messages.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/messages.properties 2008-11-03 14:43:50 UTC (rev 11489)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/messages.properties 2008-11-03 15:32:57 UTC (rev 11490)
@@ -170,3 +170,4 @@
CONTEXT_ROOT_CANNOT_CONTAIN_CHARACTER=Context root cannot contain character {0}.
WEB_RESOURCES=Web Resources
INCORRECT_URI=Incorrect URI: {0}
+INCORRECT_PREFIX=Incorrect Prefix: {0}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/xpl/WebUIMessages.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/xpl/WebUIMessages.java 2008-11-03 14:43:50 UTC (rev 11489)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/messages/xpl/WebUIMessages.java 2008-11-03 15:32:57 UTC (rev 11490)
@@ -188,4 +188,5 @@
public static String CONTEXT_ROOT_CANNOT_CONTAIN_CHARACTER;
public static String WEB_RESOURCES;
public static String INCORRECT_URI;
+ public static String INCORRECT_PREFIX;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeTaglibValidator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeTaglibValidator.java 2008-11-03 14:43:50 UTC (rev 11489)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeTaglibValidator.java 2008-11-03 15:32:57 UTC (rev 11490)
@@ -44,10 +44,18 @@
return;
}
String uriStr = (String) data.get("location"); //$NON-NLS-1$
+ String prefix = (String) data.get("prefix");//$NON-NLS-1$
+ String nameStrt = "[A-Za-z_]|[^\\x00-\\x7F]"; //$NON-NLS-1$
+ String nameChar = "[A-Za-z0-9_.-]|[^\\x00-\\x7F]"; //$NON-NLS-1$
+ String name = '(' + nameStrt + ')'+'(' + nameChar + ")*"; //$NON-NLS-1$
+
try {
new URI(uriStr);
}catch (URISyntaxException ex) {
message = NLS.bind(WebUIMessages.INCORRECT_URI,uriStr);
}
+ if((prefix!=null)&&(!prefix.matches(name))){
+ message = NLS.bind(WebUIMessages.INCORRECT_PREFIX,prefix);
+ }
}
}
16 years, 2 months
JBoss Tools SVN: r11489 - in trunk: documentation/guides/GettingStartedGuide/en and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-11-03 09:43:50 -0500 (Mon, 03 Nov 2008)
New Revision: 11489
Modified:
trunk/documentation/guides/Exadel-migration/en/master.xml
trunk/documentation/guides/GettingStartedGuide/en/master.xml
trunk/jsf/docs/userguide/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-189
version of JBDS guide is updated
Modified: trunk/documentation/guides/Exadel-migration/en/master.xml
===================================================================
--- trunk/documentation/guides/Exadel-migration/en/master.xml 2008-11-03 14:01:32 UTC (rev 11488)
+++ trunk/documentation/guides/Exadel-migration/en/master.xml 2008-11-03 14:43:50 UTC (rev 11489)
@@ -33,7 +33,7 @@
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
<releaseinfo>
-Version: 1.1.0.GA
+Version: 2.0.0.Beta1
</releaseinfo>
<abstract>
Modified: trunk/documentation/guides/GettingStartedGuide/en/master.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/master.xml 2008-11-03 14:01:32 UTC (rev 11488)
+++ trunk/documentation/guides/GettingStartedGuide/en/master.xml 2008-11-03 14:43:50 UTC (rev 11489)
@@ -35,7 +35,7 @@
<year>2008</year>
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
- <releaseinfo>Version: 1.1.0.GA</releaseinfo>
+ <releaseinfo>Version: 2.0.0.Beta1</releaseinfo>
</bookinfo>
<toc/>
Modified: trunk/jsf/docs/userguide/en/master.xml
===================================================================
--- trunk/jsf/docs/userguide/en/master.xml 2008-11-03 14:01:32 UTC (rev 11488)
+++ trunk/jsf/docs/userguide/en/master.xml 2008-11-03 14:43:50 UTC (rev 11489)
@@ -35,7 +35,7 @@
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
<releaseinfo>
- Version: 1.1.0.GA
+ Version: 2.0.0.Beta1
</releaseinfo>
<abstract>
<title/>
16 years, 2 months
JBoss Tools SVN: r11488 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test: resources/jsfTest/WebContent/pages/JBIDE/2979 and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-11-03 09:01:32 -0500 (Mon, 03 Nov 2008)
New Revision: 11488
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2979/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2979/test.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2979Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
Log:
Junit test for JBIDE-2979
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2979/test.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2979/test.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/2979/test.xhtml 2008-11-03 14:01:32 UTC (rev 11488)
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<f:loadBundle basename="demo.Messages" var="msg" />
+<head>
+<title><ui:insert name="pageTitle">Page Title</ui:insert></title>
+</head>
+
+<body>
+ <!-- Comment Node -->
+ <h1>Text XHtml Page</h1>
+
+</body>
+
+</html>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-11-03 13:21:10 UTC (rev 11487)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-11-03 14:01:32 UTC (rev 11488)
@@ -39,6 +39,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2624Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2774Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2828Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2979Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3030Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE675Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE788Test;
@@ -105,6 +106,7 @@
suite.addTestSuite(JBIDE2774Test.class);
suite.addTestSuite(JBIDE2828Test.class);
suite.addTestSuite(JBIDE3030Test.class);
+ suite.addTestSuite(JBIDE2979Test.class);
// $JUnit-END$
// added by Max Areshkau
// add here projects which should be imported for junit tests
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2979Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2979Test.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2979Test.java 2008-11-03 14:01:32 UTC (rev 11488)
@@ -0,0 +1,86 @@
+/*******************************************************************************
+* Copyright (c) 2007 Red Hat, Inc.
+* Distributed under license by Red Hat, Inc. All rights reserved.
+* This program is made available under the terms of the
+* Eclipse Public License v1.0 which accompanies this distribution,
+* and is available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.common.el.core.ELReferenceList;
+import org.jboss.tools.common.resref.core.ResourceReference;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * Test case for JBIDE-2979
+ * @author mareshkau
+ *
+ */
+public class JBIDE2979Test extends VpeTest {
+
+ /**
+ * Test Page
+ */
+ private IFile file;
+
+
+ private static Map<String, String> elValuesMap;
+
+ public JBIDE2979Test(String name) {
+ super(name);
+ }
+
+ public void testJBIDE2979() {
+ ResourceReference[] entries = ELReferenceList.getInstance().getAllResources(file);
+ for (ResourceReference resourceReference : entries) {
+ assertEquals("Value from Map Should be equal value from Resource", //$NON-NLS-1$
+ elValuesMap.get(resourceReference.getLocation()),resourceReference.getProperties());
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.ui.test.VpeTest#setUp()
+ */
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ setException(null);
+ this.file = (IFile) TestUtil.getComponentPath("JBIDE/2979/test.xhtml", //$NON-NLS-1$
+ JsfAllTests.IMPORT_PROJECT_NAME);
+ elValuesMap = new HashMap<String, String>();
+ elValuesMap.put("bean.name", "Test Test"); //$NON-NLS-1$ //$NON-NLS-2$
+ elValuesMap.put("bean.value", "Test;. Test"); //$NON-NLS-1$ //$NON-NLS-2$
+ elValuesMap.put("bean.value2", "%Test,.; ddfdf %ED Test"); //$NON-NLS-1$//$NON-NLS-2$
+ ResourceReference[] entries = new ResourceReference[elValuesMap.size()];
+ int i = 0;
+ for (Entry<String, String> string : elValuesMap.entrySet()) {
+ entries[i] = new ResourceReference(string.getKey(), ResourceReference.PROJECT_SCOPE);
+ entries[i].setProperties(string.getValue());
+ i++;
+ }
+ ELReferenceList.getInstance().setAllResources(this.file,entries);
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.ui.test.VpeTest#tearDown()
+ */
+ @Override
+ protected void tearDown() throws Exception {
+ ELReferenceList.getInstance().setAllResources(this.file, new ResourceReference[0]);
+ if(getException()!=null) {
+ throw new Exception(getException());
+ }
+ super.tearDown();
+ }
+}
16 years, 2 months
JBoss Tools SVN: r11487 - in trunk/common/plugins: org.jboss.tools.common.resref.core and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-11-03 08:21:10 -0500 (Mon, 03 Nov 2008)
New Revision: 11487
Added:
trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/ResourceReferencePlugin.java
Removed:
trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/Activator.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectUtil.java
trunk/common/plugins/org.jboss.tools.common.resref.core/.classpath
trunk/common/plugins/org.jboss.tools.common.resref.core/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/ResourceReferenceList.java
Log:
JBIDE-2979
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectUtil.java 2008-11-03 10:33:32 UTC (rev 11486)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectUtil.java 2008-11-03 13:21:10 UTC (rev 11487)
@@ -28,7 +28,7 @@
}
public static String[] asStringArray(String s) {
- return asStringArray(s, ",;");
+ return asStringArray(s, ",;"); //$NON-NLS-1$
}
public static String[] asStringArray(String s, String separator) {
Modified: trunk/common/plugins/org.jboss.tools.common.resref.core/.classpath
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.resref.core/.classpath 2008-11-03 10:33:32 UTC (rev 11486)
+++ trunk/common/plugins/org.jboss.tools.common.resref.core/.classpath 2008-11-03 13:21:10 UTC (rev 11487)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <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"/>
Modified: trunk/common/plugins/org.jboss.tools.common.resref.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.resref.core/META-INF/MANIFEST.MF 2008-11-03 10:33:32 UTC (rev 11486)
+++ trunk/common/plugins/org.jboss.tools.common.resref.core/META-INF/MANIFEST.MF 2008-11-03 13:21:10 UTC (rev 11487)
@@ -3,9 +3,10 @@
Bundle-Name: Core Plug-in
Bundle-SymbolicName: org.jboss.tools.common.resref.core
Bundle-Version: 1.0.0
-Bundle-Activator: org.jboss.tools.common.resref.core.Activator
+Bundle-Activator: org.jboss.tools.common.resref.core.ResourceReferencePlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.jboss.tools.common.model;bundle-version="2.0.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.common.resref.core
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Deleted: trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/Activator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/Activator.java 2008-11-03 10:33:32 UTC (rev 11486)
+++ trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/Activator.java 2008-11-03 13:21:10 UTC (rev 11487)
@@ -1,50 +0,0 @@
-package org.jboss.tools.common.resref.core;
-
-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.common.resref.core";
-
- // 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;
- }
-
-}
Modified: trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/ResourceReferenceList.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/ResourceReferenceList.java 2008-11-03 10:33:32 UTC (rev 11486)
+++ trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/ResourceReferenceList.java 2008-11-03 13:21:10 UTC (rev 11487)
@@ -11,6 +11,9 @@
package org.jboss.tools.common.resref.core;
import java.io.File;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
import java.util.*;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
@@ -18,6 +21,10 @@
import org.jboss.tools.common.model.util.XModelObjectUtil;
public abstract class ResourceReferenceList {
+
+ //Fix for JBIDE-2979
+ private static final String CODING = "UTF-16";//$NON-NLS-1$
+
ResourceReferenceListListener[] listeners = new ResourceReferenceListListener[0];
protected abstract QualifiedName getPropertyName();
@@ -82,17 +89,36 @@
return (ResourceReference[])css.toArray(new ResourceReference[0]);
}
- private String[] getDeclaredResources(IResource resource) {
+ private String[] getDeclaredResources(IResource resource) {
String s = null;
try {
s = resource.getPersistentProperty(getPropertyName());
} catch (CoreException e) {
//ignore
}
- if(s == null || s.length() == 0) return new String[0];
- return XModelObjectUtil.asStringArray(s);
+ if(s == null || s.length() == 0) {
+ return new String[0];
+ } else {
+ return decodeResourceString(s);
+ }
}
+ //Fix for JBIDE-2979
+ private static String[] decodeResourceString(String resource) {
+ String[] results = XModelObjectUtil.asStringArray(resource);
+ String[] returnValues = new String [results.length];
+ try {
+ for (int i=0;i<results.length;i++) {
+ returnValues[i] = URLDecoder.decode(results[i], CODING);
+ }
+ } catch (UnsupportedEncodingException e) {
+ ResourceReferencePlugin.getPluginLog().logError(e);
+ //in case of exception we return undecoded values
+ return results;
+ }
+ return returnValues;
+ }
+
public void setAllResources(IFile file, ResourceReference[] entries) {
IResource changed = null;
boolean b = setDeclaredResources(file, entries, ResourceReference.FILE_SCOPE, 0);
@@ -134,8 +160,14 @@
if(scope < 10 && s != scope) continue;
if(scope == 10 && s == ResourceReference.FILE_SCOPE) continue;
if(scope == ResourceReference.FOLDER_SCOPE && entries[i].getDepth() != depth) continue;
- if(sb.length() > 0) sb.append(";");
- sb.append(entries[i].getLocationAndProperties());
+ if(sb.length() > 0)
+ sb.append(';');
+ try {
+ sb.append(URLEncoder.encode(entries[i].getLocationAndProperties(),CODING));
+ } catch (UnsupportedEncodingException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
}
return sb.toString();
}
@@ -169,7 +201,7 @@
return allExternalResources;
}
private void parseExternalResources(String s) {
- StringTokenizer st = new StringTokenizer(s, "#");
+ StringTokenizer st = new StringTokenizer(s, "#"); //$NON-NLS-1$
while(st.hasMoreTokens()) {
String t = st.nextToken();
int e = t.indexOf('=');
@@ -234,7 +266,11 @@
private String[] getDeclaredResources(IPath path) {
String s = (String)getAllExternalResources().get(path.toString());
- return (s == null || s.length() == 0) ? new String[0] : XModelObjectUtil.asStringArray(s);
+ if(s == null || s.length() == 0) {
+ return new String[0];
+ }else {
+ return decodeResourceString(s);
+ }
}
public void setAllResources(IPath path, ResourceReference[] entries) {
Added: trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/ResourceReferencePlugin.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/ResourceReferencePlugin.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.resref.core/src/org/jboss/tools/common/resref/core/ResourceReferencePlugin.java 2008-11-03 13:21:10 UTC (rev 11487)
@@ -0,0 +1,57 @@
+package org.jboss.tools.common.resref.core;
+
+import org.jboss.tools.common.log.BaseUIPlugin;
+import org.jboss.tools.common.log.IPluginLog;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class ResourceReferencePlugin extends BaseUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.common.resref.core"; //$NON-NLS-1$
+
+ // The shared instance
+ private static ResourceReferencePlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public ResourceReferencePlugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ 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)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static ResourceReferencePlugin getDefault() {
+ return plugin;
+ }
+
+ public static IPluginLog getPluginLog() {
+ return plugin;
+ }
+
+}
16 years, 2 months
JBoss Tools SVN: r11486 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui: schema and 11 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-11-03 05:33:32 -0500 (Mon, 03 Nov 2008)
New Revision: 11486
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/schema/commandProcessor.exsd
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commandprocessor/CommandProcessorFactory.java
Removed:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CommandMappingFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateStructuredDataModelCommand.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/commandprocessor/JavaBeanModelCommandProcessor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/JavaBeanPropertiesSection.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/NewJavaBeanStrucutredDataWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commandprocessor/ICommandProcessor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateConnectionCommand.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/PropertyModel.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/CustomGraphicalNodeEditPolicy.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/tools/TargetTreeDropTargetListener.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/SmooksExtensionPointConstants.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java
Log:
JBIDE-2994
1.create a new extension point
2.delete some useless codes
3.add a new function for adding property type automatically
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml 2008-11-03 10:33:32 UTC (rev 11486)
@@ -3,6 +3,7 @@
<plugin>
<extension-point id="viewerInitor" name="viewerInitor" schema="schema/viewerInitor.exsd"/>
<extension-point id="analyzer" name="analyzer" schema="schema/analyzer.exsd"/>
+ <extension-point id="commandProcessor" name="commandProcessor" schema="schema/commandProcessor.exsd"/>
<extension point="org.eclipse.emf.ecore.generated_package">
<package
uri = "http://www.jboss.org/tools/smooks/graphicalInformation"
@@ -176,4 +177,17 @@
typeID="org.jboss.tools.smooks.xml.viewerInitor.xml">
</targetModelAnalyzer>
</extension>
+ <extension
+ point="org.jboss.tools.smooks.ui.commandProcessor">
+ <commandProcessor
+ class="org.jboss.tools.smooks.javabean.commandprocessor.JavaBeanModelCommandProcessor"
+ sourceId="org.jboss.tools.smooks.ui.viewerInitor.javabean"
+ targetId="org.jboss.tools.smooks.ui.viewerInitor.javabean">
+ </commandProcessor>
+ <commandProcessor
+ class="org.jboss.tools.smooks.javabean.commandprocessor.JavaBeanModelCommandProcessor"
+ sourceId="org.jboss.tools.smooks.xml.viewerInitor.xml"
+ targetId="org.jboss.tools.smooks.ui.viewerInitor.javabean">
+ </commandProcessor>
+ </extension>
</plugin>
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/schema/commandProcessor.exsd
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/schema/commandProcessor.exsd (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/schema/commandProcessor.exsd 2008-11-03 10:33:32 UTC (rev 11486)
@@ -0,0 +1,116 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.jboss.tools.smooks.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.jboss.tools.smooks.ui" id="commandProcessor" name="commandProcessor"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="commandProcessor" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="commandProcessor">
+ <complexType>
+ <attribute name="sourceId" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="targetId" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/schema/commandProcessor.exsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -782,14 +782,17 @@
if (rootClass != null) {
rootModel = JavaBeanModelFactory
.getJavaBeanModelWithLazyLoad(rootClass);
- rootIsError = true;
} else {
rootModel = new JavaBeanModel(null, rootClassName);
+ rootIsError = true;
}
- rootModel.setBeanClassString(SmooksModelUtils.getParmaText("beanClass", current));
- setSelectorIsUsed(rootClassName);
- buildChildrenOfTargetInputModel(listType, rootModel, false,
- rootIsError, current, loader);
+ if (current != null) {
+ rootModel.setBeanClassString(SmooksModelUtils.getParmaText(
+ "beanClass", current));
+ setSelectorIsUsed(rootClassName);
+ buildChildrenOfTargetInputModel(listType, rootModel, false,
+ rootIsError, current, loader);
+ }
List<JavaBeanModel> list = new ArrayList<JavaBeanModel>();
list.add(rootModel);
return list;
@@ -835,7 +838,8 @@
selector = selector.substring(2, selector.length() - 1);
ResourceConfigType resourceConfig = findResourceConfigTypeWithSelector(
selector, listType);
- model.setBeanClassString(SmooksModelUtils.getParmaText("beanClass", resourceConfig));
+ model.setBeanClassString(SmooksModelUtils.getParmaText("beanClass",
+ resourceConfig));
if (resourceConfig != null) {
this.buildChildrenOfTargetInputModel(listType, model, false,
false, resourceConfig, classLoader);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/commandprocessor/JavaBeanModelCommandProcessor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/commandprocessor/JavaBeanModelCommandProcessor.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/commandprocessor/JavaBeanModelCommandProcessor.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -10,15 +10,12 @@
******************************************************************************/
package org.jboss.tools.smooks.javabean.commandprocessor;
-import org.eclipse.gef.DefaultEditDomain;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.GraphicalViewer;
-import org.eclipse.gef.requests.CreateRequest;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorPart;
-import org.jboss.tools.smooks.javabean.ui.JavaBeanModelCreationDialog;
+import org.eclipse.emf.common.command.Command;
+import org.jboss.tools.smooks.javabean.model.JavaBeanModel;
import org.jboss.tools.smooks.ui.gef.commandprocessor.ICommandProcessor;
+import org.jboss.tools.smooks.ui.gef.commands.CreateConnectionCommand;
+import org.jboss.tools.smooks.ui.gef.model.AbstractStructuredDataModel;
+import org.jboss.tools.smooks.ui.gef.model.PropertyModel;
import org.jboss.tools.smooks.utils.UIUtils;
/**
@@ -28,27 +25,49 @@
*/
public class JavaBeanModelCommandProcessor implements ICommandProcessor {
- /*
- * (non-Javadoc)
- *
- * @see
- * org.jboss.tools.smooks.ui.gef.commandprocessor.ICommandProcessor#getNewModel
- * (java.lang.Object, java.lang.Object, org.eclipse.gef.GraphicalEditPart)
- */
- public Object getNewModel(CreateRequest request,
- GraphicalEditPart rootEditPart) {
- DefaultEditDomain domain = (DefaultEditDomain) ((GraphicalViewer) rootEditPart
- .getViewer()).getEditDomain();
- // rootEditPart.getg
- IEditorPart editorPart = domain.getEditorPart();
- Shell shell = editorPart.getSite().getShell();
- JavaBeanModelCreationDialog dialog = new JavaBeanModelCreationDialog(
- shell, UIUtils
- .getJavaProjectFromEditorPart(editorPart));
- if(dialog.open() == Window.OK){
- return dialog.getCheckedJavaBeanModel();
+ public void processEMFCommand(Command emfCommand) {
+ }
+
+ public void processGEFCommand(org.eclipse.gef.commands.Command gefCommand) {
+ if (CreateConnectionCommand.class.isAssignableFrom(gefCommand
+ .getClass())) {
+ CreateConnectionCommand command = (CreateConnectionCommand) gefCommand;
+ if (command.getSource() != null && command.getTarget() != null) {
+ Object m = command.getTarget();
+ if (m instanceof AbstractStructuredDataModel) {
+ Object t = ((AbstractStructuredDataModel)m).getReferenceEntityModel();
+ if (!UIUtils.isInstanceCreatingConnection(t)) {
+ if (t instanceof JavaBeanModel) {
+ Class clazz = ((JavaBeanModel) t).getBeanClass();
+ if (clazz != null && clazz != String.class) {
+ PropertyModel property = new PropertyModel();
+ property.setName("type");
+ property.setValue(getTypeString(clazz));
+ command.addPropertyModel(property);
+ }
+ }
+ }
+ }
+ }
}
- return null;
}
+ public static String getTypeString(Class clazz) {
+ if(clazz.isPrimitive()){
+ return getPrimitiveTypeString(clazz);
+ }
+ String name = clazz.getSimpleName();
+ return name;
+ }
+
+ public static String getPrimitiveTypeString(Class clazz){
+ String name = clazz.getName();
+ if("int".equalsIgnoreCase(name)) return "Integer";
+ if("double".equalsIgnoreCase(name)) return "Double";
+ if("float".equalsIgnoreCase(name)) return "Float";
+ if("long".equalsIgnoreCase(name)) return "Long";
+ if("boolean".equalsIgnoreCase(name)) return "Boolean";
+ return "";
+ }
+
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -87,7 +87,7 @@
}
public String getBeanClassString() {
- if(beanClassString != null){
+ if(beanClassString != null && beanClassString.length() != 0){
return this.beanClassString;
}
Class clazz = this.getBeanClass();
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/JavaBeanPropertiesSection.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/JavaBeanPropertiesSection.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/JavaBeanPropertiesSection.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -51,6 +51,7 @@
import org.jboss.tools.smooks.ui.gef.model.AbstractStructuredDataModel;
import org.jboss.tools.smooks.ui.gef.model.LineConnectionModel;
import org.jboss.tools.smooks.ui.gef.model.PropertyModel;
+import org.jboss.tools.smooks.utils.UIUtils;
/**
* @author Dart Peng
@@ -60,7 +61,7 @@
private static final String PRO_TYPE = "type";
- private Text beanClassText;
+ private Text instanceClassText;
private boolean lock = false;
@@ -68,6 +69,12 @@
protected String instanceClass;
+ private Text classTypeText;
+
+ private Composite typeComposite;
+
+ private Composite instanceClassComposite;
+
@Override
public void createControls(Composite parent,
TabbedPropertySheetPage tabbedPropertySheetPage) {
@@ -91,42 +98,44 @@
factory.createLabel(controlComposite, "Target instance class name : ");
- Composite beanCom = factory.createComposite(controlComposite);
+ instanceClassComposite = factory.createComposite(controlComposite);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- beanCom.setLayoutData(gd);
+ instanceClassComposite.setLayoutData(gd);
GridLayout beanLayout = new GridLayout();
beanLayout.numColumns = 2;
- beanCom.setLayout(beanLayout);
+ instanceClassComposite.setLayout(beanLayout);
- beanClassText = factory.createText(beanCom, "");
+ instanceClassText = factory.createText(instanceClassComposite, "");
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.grabExcessHorizontalSpace = true;
- beanClassText.setLayoutData(gd);
- beanClassText.setEnabled(false);
+ instanceClassText.setLayoutData(gd);
- Button button1 = factory.createButton(beanCom, "Browse", SWT.NONE);
+ Button button1 = factory.createButton(instanceClassComposite, "Browse",
+ SWT.NONE);
button1.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
super.widgetSelected(e);
- openJavaTypeDialog(beanClassText);
+ openJavaTypeDialog(instanceClassText);
}
});
factory.createLabel(controlComposite, "Mapping Type : ");
- Composite typeCom = factory.createComposite(controlComposite);
+ typeComposite = factory.createComposite(controlComposite);
gd = new GridData(GridData.FILL_HORIZONTAL);
- typeCom.setLayoutData(gd);
+ typeComposite.setLayoutData(gd);
GridLayout typeLayout = new GridLayout();
typeLayout.numColumns = 2;
- typeCom.setLayout(typeLayout);
+ typeComposite.setLayout(typeLayout);
- final Text text = factory.createText(typeCom, "");
- text.addModifyListener(new ModifyListener() {
+ classTypeText = factory.createText(typeComposite, "");
+ classTypeText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- beanClassType = text.getText();
+ if (isLock())
+ return;
+ beanClassType = classTypeText.getText();
PropertyModel pro = getTypePropertyModel();
if (pro != null) {
pro.setValue(beanClassType);
@@ -138,8 +147,8 @@
});
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.grabExcessHorizontalSpace = true;
- text.setLayoutData(gd);
- Composite buttonCom = factory.createComposite(typeCom);
+ classTypeText.setLayoutData(gd);
+ Composite buttonCom = factory.createComposite(typeComposite);
GridLayout buttonLayout = new GridLayout();
buttonLayout.numColumns = 2;
buttonCom.setLayout(buttonLayout);
@@ -149,7 +158,7 @@
public void widgetSelected(SelectionEvent e) {
super.widgetSelected(e);
- openJavaTypeDialog(text);
+ openJavaTypeDialog(classTypeText);
}
});
@@ -242,13 +251,13 @@
}
private void hookBeanClasText() {
- beanClassText.addModifyListener(new ModifyListener() {
+ instanceClassText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent arg0) {
JavaBeanModel model = getTargetJavaBeanModel();
if (model != null) {
- model.setBeanClassString(beanClassText.getText());
- instanceClass = beanClassText.getText();
+ model.setBeanClassString(instanceClassText.getText());
+ instanceClass = instanceClassText.getText();
if (isLock())
return;
fireDirty();
@@ -331,18 +340,56 @@
public void refresh() {
super.refresh();
+ lockEventFire();
JavaBeanModel model = getTargetJavaBeanModel();
- if (model != null) {
- if (!beanClassText.getEnabled())
- beanClassText.setEnabled(true);
- String className = model.getBeanClassString();
- lockEventFire();
- beanClassText.setText(className);
- unLockEventFire();
+ String type = getTypeProperty(getLineConnectionModel());
+ if (type == null)
+ type = "";
+ LineConnectionModel connection = getLineConnectionModel();
+ if(connection == null){
+ instanceClassComposite.setEnabled(false);
+ typeComposite.setEnabled(false);
+ return;
}
+ if (UIUtils.isInstanceCreatingConnection(connection)) {
+ if (model != null) {
+ // if (!instanceClassComposite.getEnabled())
+ instanceClassComposite.setEnabled(true);
+// classTypeText.setEnabled(false);
+ String className = model.getBeanClassString();
+ lockEventFire();
+ this.classTypeText.setText("");
+ typeComposite.setEnabled(false);
+ instanceClassText.setText(className);
+ unLockEventFire();
+ }
+ } else {
+ if (type != null) {
+ typeComposite.setEnabled(true);
+ lockEventFire();
+ instanceClassText.setText("");
+ instanceClassComposite.setEnabled(false);
+ this.classTypeText.setText(type);
+ unLockEventFire();
+ }
+ }
+ unLockEventFire();
}
+ private String getTypeProperty(LineConnectionModel connection) {
+ if(connection == null) return null;
+ Object[] properties = connection.getPropertyArray();
+ if(properties == null) return null;
+ for (int i = 0; i < properties.length; i++) {
+ PropertyModel pro = (PropertyModel) properties[i];
+ if ("type".equalsIgnoreCase(pro.getName())) {
+ return pro.getValue();
+ }
+ }
+ return null;
+ }
+
private void unLockEventFire() {
lock = false;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/NewJavaBeanStrucutredDataWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/NewJavaBeanStrucutredDataWizard.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/NewJavaBeanStrucutredDataWizard.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -68,6 +68,7 @@
}
public Object getTreeViewerInputContents() {
+ if(result == null) return null;
List<Object> list = new ArrayList<Object>();
list.add(result);
return list;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -52,6 +52,10 @@
ITabbedPropertySheetPageContributor {
SmooksGraphicalFormPage graphicalPage = null;
+ public SmooksGraphicalFormPage getGraphicalPage() {
+ return graphicalPage;
+ }
+
private TabbedPropertySheetPage tabbedPropertySheetPage;
private SmooksNormalContentEditFormPage normalPage;
public static final String EDITOR_ID = "org.jboss.tools.smooks.ui.editors.SmooksFormEditor";
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -163,6 +163,22 @@
protected Hyperlink sourceLink = null;
protected Hyperlink targetLink = null;
protected String sourceDataTypeID = null;
+ public String getSourceDataTypeID() {
+ return sourceDataTypeID;
+ }
+
+ public void setSourceDataTypeID(String sourceDataTypeID) {
+ this.sourceDataTypeID = sourceDataTypeID;
+ }
+
+ public String getTargetDataTypeID() {
+ return targetDataTypeID;
+ }
+
+ public void setTargetDataTypeID(String targetDataTypeID) {
+ this.targetDataTypeID = targetDataTypeID;
+ }
+
protected String targetDataTypeID = null;
protected SmooksFileBuilder smooksFileBuilder = null;
protected GraphicalInformationSaver graphicalInformationSaver = null;
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commandprocessor/CommandProcessorFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commandprocessor/CommandProcessorFactory.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commandprocessor/CommandProcessorFactory.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -0,0 +1,111 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.ui.gef.commandprocessor;
+
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.gef.DefaultEditDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.GraphicalViewer;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.ui.IEditorPart;
+import org.jboss.tools.smooks.ui.editors.SmooksFormEditor;
+import org.jboss.tools.smooks.ui.editors.SmooksGraphicalFormPage;
+import org.jboss.tools.smooks.utils.SmooksExtensionPointConstants;
+
+/**
+ * @author Dart
+ *
+ */
+public class CommandProcessorFactory {
+
+ private static CommandProcessorFactory instance;
+
+ private HashMap<String, IConfigurationElement> processorMap = new HashMap<String, IConfigurationElement>();
+
+ private CommandProcessorFactory() {
+ loadExtensions();
+ }
+
+ private void loadExtensions() {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint ep = registry
+ .getExtensionPoint(SmooksExtensionPointConstants.EXTENTION_POINT_COMMAND_PROCESSOR);
+ IConfigurationElement[] elements = ep.getConfigurationElements();
+ for (int i = 0; i < elements.length; i++) {
+ IConfigurationElement element = elements[i];
+ if (!element
+ .getName()
+ .equals(
+ SmooksExtensionPointConstants.EXTENTION_POINT_ELEMENT_COMMAND_PROCESSOR))
+ continue;
+ String sourceId = element
+ .getAttribute(SmooksExtensionPointConstants.EXTENTION_POINT_ATTRIBUTE_SOURCEID);
+ String targetId = element
+ .getAttribute(SmooksExtensionPointConstants.EXTENTION_POINT_ATTRIBUTE_TARGETID);
+ if (sourceId != null && targetId != null) {
+ processorMap.put(generateKey(sourceId, targetId), element);
+ }
+ }
+ }
+
+ private String generateKey(String sourceId, String targetId) {
+ return sourceId + ":" + targetId;
+ }
+
+ public synchronized static CommandProcessorFactory getInstance() {
+ if (instance == null) {
+ instance = new CommandProcessorFactory();
+ }
+ return instance;
+ }
+
+ public void processGEFCommand(Command command, EditPart editPart) throws CoreException {
+ if(editPart != null && editPart instanceof GraphicalEditPart){
+ DefaultEditDomain domain = (DefaultEditDomain)((GraphicalViewer)((GraphicalEditPart)editPart).getViewer()).getEditDomain();
+ IEditorPart pa = domain.getEditorPart();
+ if(pa instanceof SmooksGraphicalFormPage){
+ SmooksGraphicalFormPage page = (SmooksGraphicalFormPage)pa;
+ if(page != null){
+ String sourceId = page.getSourceDataTypeID();
+ String targetId = page.getTargetDataTypeID();
+ processGEFCommand(command, sourceId,targetId);
+ }
+ }
+ }
+
+ }
+
+ public void processGEFCommand(Command command, String sourceId,
+ String targetId) throws CoreException {
+ ICommandProcessor pro = getCommandProcessor(sourceId, targetId);
+ if (pro != null) {
+ pro.processGEFCommand(command);
+ }
+ }
+
+ public ICommandProcessor getCommandProcessor(String sourceId,
+ String targetId) throws CoreException {
+ if(sourceId == null || targetId == null) return null;
+ IConfigurationElement element = processorMap.get(generateKey(sourceId,
+ targetId));
+ if (element != null) {
+ String clazz = element
+ .getAttribute(SmooksExtensionPointConstants.EXTENTION_POINT_ATTRIBUTE_CLASS);
+ if (clazz != null) {
+ Object obj = element.createExecutableExtension(SmooksExtensionPointConstants.EXTENTION_POINT_ATTRIBUTE_CLASS);
+ if (obj instanceof ICommandProcessor) {
+ return (ICommandProcessor) obj;
+ }
+ }
+ }
+ return null;
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commandprocessor/CommandProcessorFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commandprocessor/ICommandProcessor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commandprocessor/ICommandProcessor.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commandprocessor/ICommandProcessor.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -1,7 +1,6 @@
package org.jboss.tools.smooks.ui.gef.commandprocessor;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gef.commands.Command;
/**
*
@@ -10,6 +9,8 @@
* @CreateTime Jul 22, 2008
*/
public interface ICommandProcessor {
- public Object getNewModel(CreateRequest request,
- GraphicalEditPart rootEditPart);
+ public void processGEFCommand(Command gefCommand);
+
+ public void processEMFCommand(
+ org.eclipse.emf.common.command.Command emfCommand);
}
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CommandMappingFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CommandMappingFactory.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CommandMappingFactory.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -1,75 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.ui.gef.commands;
-
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.CreateRequest;
-import org.jboss.tools.smooks.ui.gef.commandprocessor.ICommandProcessor;
-import org.jboss.tools.smooks.ui.gef.model.AbstractStructuredDataModel;
-import org.jboss.tools.smooks.ui.modelparser.IStructuredModelParser;
-
-/**
- * @author Dart Peng
- *
- * @CreateTime Jul 22, 2008
- */
-public class CommandMappingFactory implements ICommandMappingFactory {
- /*
- * (non-Javadoc)
- *
- * @seeorg.jboss.tools.smooks.ui.gef.commands.ICommandMappingFactory#
- * createCreationStructuredModelCommand(java.lang.Object, java.lang.Object,
- * org.eclipse.gef.GraphicalEditPart)
- */
- public Command createCreationStructuredModelCommand(CreateRequest request,
- GraphicalEditPart rootEditPart) {
- try {
- Object modelType = request.getNewObjectType();
- Object newObject = request.getNewObject();
- ICommandProcessor processor = this.getCommandProcessor(request,
- rootEditPart);
- IStructuredModelParser parser = this.getStructuredModelParser(
- modelType, newObject, rootEditPart);
- CreateStructuredDataModelCommand command = new CreateStructuredDataModelCommand();
- command.setProcessor(processor);
- command.setParser(parser);
- command.setParent((AbstractStructuredDataModel) rootEditPart
- .getModel());
- command.setHostEditPart(rootEditPart);
- command.setRequest(request);
- return command;
- } catch (Exception e) {
- e.printStackTrace();
- }
- return new NullCommand();
- }
-
- protected IStructuredModelParser getStructuredModelParser(Object modelType,
- Object newObject, GraphicalEditPart rootEditPart) {
-// if (modelType == JavaBeanModel.class) {
-// return new JavaBeanParser();
-// }
- return null;
- }
-
- protected ICommandProcessor getCommandProcessor(CreateRequest request,
- GraphicalEditPart rootEditPart) {
-// if (request.getNewObjectType() == JavaBeanModel.class) {
-// return new JavaBeanModelCommandProcessor();
-// }
- return null;
- }
-
- private class NullCommand extends Command {
-
- }
-}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateConnectionCommand.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateConnectionCommand.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateConnectionCommand.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -1,14 +1,20 @@
package org.jboss.tools.smooks.ui.gef.commands;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
import org.eclipse.gef.commands.Command;
import org.jboss.tools.smooks.ui.gef.model.IConnectableModel;
import org.jboss.tools.smooks.ui.gef.model.LineConnectionModel;
+import org.jboss.tools.smooks.ui.gef.model.PropertyModel;
/**
*
*/
public class CreateConnectionCommand extends Command {
+ private List<PropertyModel> propertyList = new ArrayList<PropertyModel>();
private IConnectableModel source;
@@ -27,8 +33,38 @@
return true;
}
+ public LineConnectionModel getConnection() {
+ return connection;
+ }
+
+ public void addPropertyModel(PropertyModel model){
+ for (Iterator<PropertyModel> iterator = propertyList.iterator(); iterator.hasNext();) {
+ PropertyModel pro = (PropertyModel) iterator.next();
+ if(pro.isSameProperty(model)){
+ return;
+ }
+ }
+ propertyList.add(model);
+ }
+
+ public void setConnection(LineConnectionModel connection) {
+ this.connection = connection;
+ }
+
+ public void setSource(IConnectableModel source) {
+ this.source = source;
+ }
+
+ public void setTarget(IConnectableModel target) {
+ this.target = target;
+ }
+
public void execute() {
connection = new LineConnectionModel();
+ for (Iterator<PropertyModel> iterator = this.propertyList.iterator(); iterator.hasNext();) {
+ PropertyModel property = (PropertyModel) iterator.next();
+ connection.addPropertyModel(property);
+ }
connection.setSource(source);
connection.setTarget(target);
connection.connect();
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateStructuredDataModelCommand.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateStructuredDataModelCommand.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/commands/CreateStructuredDataModelCommand.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.ui.gef.commands;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.gef.GraphicalEditPart;
-import org.eclipse.gef.commands.Command;
-import org.eclipse.gef.requests.CreateRequest;
-import org.jboss.tools.smooks.ui.gef.commandprocessor.ICommandProcessor;
-import org.jboss.tools.smooks.ui.gef.model.AbstractStructuredDataModel;
-import org.jboss.tools.smooks.ui.modelparser.IStructuredModelParser;
-
-/**
- * @author Dart Peng
- *
- * @CreateTime Jul 22, 2008
- * @deprecated
- */
-public class CreateStructuredDataModelCommand extends Command {
- private AbstractStructuredDataModel parent;
- private AbstractStructuredDataModel child;
-
- private ICommandProcessor processor = null;
-
- private GraphicalEditPart hostEditPart;
-
- /**
- * @return the hostEditPart
- */
- public GraphicalEditPart getHostEditPart() {
- return hostEditPart;
- }
-
- /**
- * @param hostEditPart
- * the hostEditPart to set
- */
- public void setHostEditPart(GraphicalEditPart hostEditPart) {
- this.hostEditPart = hostEditPart;
- }
-
- /**
- * @return the processor
- */
- public ICommandProcessor getProcessor() {
- return processor;
- }
-
- /**
- * @param processor
- * the processor to set
- */
- public void setProcessor(ICommandProcessor processor) {
- this.processor = processor;
- }
-
- private int x;
- private int y;
-
- /**
- * @return the x
- */
- public int getX() {
- return x;
- }
-
- /**
- * @param x
- * the x to set
- */
- public void setX(int x) {
- this.x = x;
- }
-
- /**
- * @return the y
- */
- public int getY() {
- return y;
- }
-
- /**
- * @param y
- * the y to set
- */
- public void setY(int y) {
- this.y = y;
- }
-
- /**
- * @return the parser
- */
- public IStructuredModelParser getParser() {
- return parser;
- }
-
- /**
- * @param parser
- * the parser to set
- */
- public void setParser(IStructuredModelParser parser) {
- this.parser = parser;
- }
-
- /**
- * @return the request
- */
- public CreateRequest getRequest() {
- return request;
- }
-
- /**
- * @param request
- * the request to set
- */
- public void setRequest(CreateRequest request) {
- this.request = request;
- }
-
- private IStructuredModelParser parser;
-
- private CreateRequest request = null;
-
- /**
- * @return the parent
- */
- public AbstractStructuredDataModel getParent() {
- return parent;
- }
-
- /**
- * @param parent
- * the parent to set
- */
- public void setParent(AbstractStructuredDataModel parent) {
- this.parent = parent;
- }
-
- /**
- * @return the child
- */
- public AbstractStructuredDataModel getChild() {
- return child;
- }
-
- /**
- * @param child
- * the child to set
- */
- public void setChild(AbstractStructuredDataModel child) {
- this.child = child;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gef.commands.Command#execute()
- */
- @Override
- public void execute() {
- super.execute();
- Object customModel = createCustomModel();
- child = this.createChildModel(customModel);
-
- Assert.isNotNull(parent);
- Assert.isNotNull(child);
-
- child.setX(request.getLocation().x);
- child.setY(request.getLocation().y);
- parent.addChild(child);
- }
-
- protected AbstractStructuredDataModel createChildModel(Object customModel) {
-// if (customModel == null)
-// return null;
-// return new ParseEngine().parseModel(customModel, new BeanContentProvider(), parser);
- return null;
- }
-
- protected Object createCustomModel() {
- Assert.isNotNull(request);
- Assert.isNotNull(hostEditPart);
- Object customModel = this.processor.getNewModel(request, hostEditPart);
- return customModel;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gef.commands.Command#redo()
- */
- @Override
- public void redo() {
- super.redo();
- Assert.isNotNull(parent);
- Assert.isNotNull(child);
- if (parent.getChildren().indexOf(child) == -1){
- parent.addChild(child);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.gef.commands.Command#undo()
- */
- @Override
- public void undo() {
- super.undo();
- Assert.isNotNull(parent);
- Assert.isNotNull(child);
- parent.removeChild(child);
- }
-
-}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/PropertyModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/PropertyModel.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/model/PropertyModel.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -34,6 +34,35 @@
return value;
}
+ public boolean isSameProperty(PropertyModel model) {
+ if (this.name == null)
+ return false;
+ return this.name.equals(model.getName());
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this.name == null)
+ return false;
+ if (obj instanceof PropertyModel) {
+ String name = ((PropertyModel) obj).getName();
+ if (!this.name.equals(name)) {
+ return false;
+ }
+ String value = ((PropertyModel) obj).getValue();
+ if (value == null) {
+ if (this.value == null)
+ return true;
+ return false;
+ }
+
+ if (this.value.equals(value)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
public void setValue(String value) {
String oldValue = this.value;
this.value = value;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/CustomGraphicalNodeEditPolicy.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/CustomGraphicalNodeEditPolicy.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/CustomGraphicalNodeEditPolicy.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -3,6 +3,7 @@
import java.util.Iterator;
import java.util.List;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.draw2d.ConnectionAnchor;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartViewer;
@@ -12,6 +13,7 @@
import org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy;
import org.eclipse.gef.requests.CreateConnectionRequest;
import org.eclipse.gef.requests.ReconnectRequest;
+import org.jboss.tools.smooks.ui.gef.commandprocessor.CommandProcessorFactory;
import org.jboss.tools.smooks.ui.gef.commands.CreateConnectionCommand;
import org.jboss.tools.smooks.ui.gef.model.AbstractStructuredDataModel;
@@ -22,12 +24,16 @@
CreateConnectionCommand command = (CreateConnectionCommand) request
.getStartCommand();
- if (command == null){
- System.out.println("COMMAND IS NULL ");
+ if (command == null) {
return null;
}
- System.out.println("create final step");
command.setTarget(getHost().getModel());
+ try {
+ CommandProcessorFactory.getInstance().processGEFCommand(command,
+ getHost());
+ } catch (CoreException e) {
+ // ignore
+ }
return command;
}
@@ -55,6 +61,12 @@
CreateConnectionCommand command = new CreateConnectionCommand();
command.setSource(getHost().getModel());
request.setStartCommand(command);
+ try {
+ CommandProcessorFactory.getInstance().processGEFCommand(command,
+ getHost());
+ } catch (CoreException e) {
+ // ignore
+ }
return command;
}
@@ -63,7 +75,8 @@
Object model = request.getExtendedData().get("Model");
EditPartViewer viewer = this.getHost().getViewer();
EditPart target = findTheEditPart(model, (GraphicalViewer) viewer);
- if(target == null) return null;
+ if (target == null)
+ return null;
return target instanceof NodeEditPart ? ((NodeEditPart) target)
.getTargetConnectionAnchor(request) : null;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/policy/RootGraphicsXYLayoutEditPolicy.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -2,20 +2,17 @@
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPolicy;
-import org.eclipse.gef.GraphicalEditPart;
import org.eclipse.gef.Request;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
import org.eclipse.gef.editpolicies.XYLayoutEditPolicy;
import org.eclipse.gef.requests.ChangeBoundsRequest;
import org.eclipse.gef.requests.CreateRequest;
-import org.jboss.tools.smooks.ui.gef.commands.CommandMappingFactory;
import org.jboss.tools.smooks.ui.gef.commands.ICommandMappingFactory;
/**
- * @deprecated
* @author Dart
*
*/
@@ -26,18 +23,18 @@
/**
* @return the mappingFactory
*/
- public ICommandMappingFactory getMappingFactory() {
- if (mappingFactory == null)
- mappingFactory = createMappingFactory();
- return mappingFactory;
- }
+// public ICommandMappingFactory getMappingFactory() {
+// if (mappingFactory == null)
+// mappingFactory = createMappingFactory();
+// return mappingFactory;
+// }
/**
* @return the mappingFactory
*/
- public ICommandMappingFactory createMappingFactory() {
- return new CommandMappingFactory();
- }
+// public ICommandMappingFactory createMappingFactory() {
+// return new CommandMappingFactory();
+// }
protected Command createAddCommand(EditPart child, Object constraint) {
return null;
@@ -70,12 +67,12 @@
}
protected Command getCreateCommand(CreateRequest request) {
- GraphicalEditPart rootEditPart = (GraphicalEditPart) this.getHost();
- ICommandMappingFactory factory = getMappingFactory();
- if (factory != null) {
- return factory.createCreationStructuredModelCommand(request,
- rootEditPart);
- }
+// GraphicalEditPart rootEditPart = (GraphicalEditPart) this.getHost();
+// ICommandMappingFactory factory = getMappingFactory();
+// if (factory != null) {
+// return factory.createCreationStructuredModelCommand(request,
+// rootEditPart);
+// }
return null;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/tools/TargetTreeDropTargetListener.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/tools/TargetTreeDropTargetListener.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/gef/tools/TargetTreeDropTargetListener.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -10,11 +10,12 @@
******************************************************************************/
package org.jboss.tools.smooks.ui.gef.tools;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.gef.EditPart;
import org.eclipse.gef.GraphicalViewer;
import org.eclipse.gef.Tool;
import org.eclipse.gef.commands.CommandStack;
import org.eclipse.gef.dnd.TemplateTransfer;
-import org.eclipse.gef.requests.CreateConnectionRequest;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.dnd.DropTargetAdapter;
import org.eclipse.swt.dnd.DropTargetEvent;
@@ -22,8 +23,8 @@
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.TreeItem;
+import org.jboss.tools.smooks.ui.gef.commandprocessor.CommandProcessorFactory;
import org.jboss.tools.smooks.ui.gef.commands.CreateConnectionCommand;
-import org.jboss.tools.smooks.ui.gef.model.AbstractStructuredDataModel;
/**
* @author Dart Peng
@@ -105,11 +106,17 @@
Object target = item.getData();
if (source != null && target != null) {
source = tool.findTheEditPart(source, this.getGraphicalViewer()).getModel();
- target = tool.findTheEditPart(target, this.getGraphicalViewer()).getModel();
+ EditPart targetEditPart = tool.findTheEditPart(target, this.getGraphicalViewer());
+ target = targetEditPart.getModel();
CreateConnectionCommand command = new CreateConnectionCommand();
command.setSource(source);
command.setTarget(target);
CommandStack stack = getGraphicalViewer().getEditDomain().getCommandStack();
+ try {
+ CommandProcessorFactory.getInstance().processGEFCommand(command, targetEditPart);
+ } catch (CoreException e) {
+ // ignore
+ }
stack.execute(command);
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/SmooksExtensionPointConstants.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/SmooksExtensionPointConstants.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/SmooksExtensionPointConstants.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -22,15 +22,23 @@
public static final String EXTENTION_POINT_ANALYZER = "org.jboss.tools.smooks.ui.analyzer";
+ public static final String EXTENTION_POINT_COMMAND_PROCESSOR = "org.jboss.tools.smooks.ui.commandProcessor";
+
public static final String EXTENTION_POINT_ELEMENT_SOURCEMODEL_ANALYZER = "sourceModelAnalyzer";
public static final String EXTENTION_POINT_ELEMENT_TARGETMODEL_ANALYZER = "targetModelAnalyzer";
public static final String EXTENTION_POINT_ELEMENT_MAPPINGANALYZER = "mappingAnalyzer";
+ public static final String EXTENTION_POINT_ELEMENT_COMMAND_PROCESSOR = "commandProcessor";
+
public static final String EXTENTION_POINT_ELEMENT_TARGETSOURCETYPE = "targetSourceType";
public static final String EXTENTION_POINT_ATTRIBUTE_CLASS = "class";
+
+ public static final String EXTENTION_POINT_ATTRIBUTE_SOURCEID = "sourceId";
+
+ public static final String EXTENTION_POINT_ATTRIBUTE_TARGETID = "targetId";
public static final String EXTENTION_POINT_ATTRIBUTE_TYPE_ID = "typeID";
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java 2008-11-03 08:39:25 UTC (rev 11485)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java 2008-11-03 10:33:32 UTC (rev 11486)
@@ -35,6 +35,7 @@
import org.jboss.tools.smooks.ui.gef.model.LineConnectionModel;
import org.jboss.tools.smooks.ui.gef.model.TargetModel;
import org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext;
+import org.jboss.tools.smooks.xml.model.TagObject;
/**
*
@@ -50,6 +51,28 @@
return fill;
}
+ public static boolean isInstanceCreatingConnection(
+ LineConnectionModel connection) {
+ AbstractStructuredDataModel sourceModel = (AbstractStructuredDataModel) connection
+ .getSource();
+ Object referenceObj = sourceModel.getReferenceEntityModel();
+ return isInstanceCreatingConnection(referenceObj);
+ }
+
+ public static boolean isInstanceCreatingConnection(
+ Object targetModel) {
+ Object referenceObj = targetModel;
+ if (referenceObj != null){
+ if(referenceObj instanceof JavaBeanModel){
+ return !((JavaBeanModel)referenceObj).isPrimitive();
+ }
+ if(referenceObj instanceof TagObject){
+ return true;
+ }
+ }
+ return false;
+ }
+
public static void createJavaModelConnectionErrorResolveCommand(
DesignTimeAnalyzeResult result,
SmooksConfigurationFileGenerateContext context,
@@ -167,7 +190,8 @@
String instanceName = ((JavaBeanModel) refObj)
.getBeanClassString();
Class instanceClazz = null;
- if(((JavaBeanModel) refObj).isPrimitive() || ((JavaBeanModel) refObj).isArray()) {
+ if (((JavaBeanModel) refObj).isPrimitive()
+ || ((JavaBeanModel) refObj).isArray()) {
// TODO process primitive type
continue;
}
@@ -183,7 +207,8 @@
DesignTimeAnalyzeResult result = new DesignTimeAnalyzeResult();
result.setErrorMessage("The instance class of \""
+ ((JavaBeanModel) refObj).getName()
- + "\" can't be loaded. Instance name is \"" + instanceName + "\"");
+ + "\" can't be loaded. Instance name is \""
+ + instanceName + "\"");
JavaModelResolveCommand command = new JavaModelResolveCommand(
context);
command
@@ -191,17 +216,18 @@
+ ((JavaBeanModel) refObj)
.getBeanClass()
.getCanonicalName() + "\"");
- command.setInstanceName(((JavaBeanModel) refObj).getBeanClass().getCanonicalName());
+ command.setInstanceName(((JavaBeanModel) refObj)
+ .getBeanClass().getCanonicalName());
command.setJavaBean((JavaBeanModel) refObj);
result.addResolveCommand(command);
resultList.add(result);
}
if (instanceClazz != null && instanceClazz.isInterface()) {
DesignTimeAnalyzeResult result = new DesignTimeAnalyzeResult();
- result
- .setErrorMessage("Java model \""
- + ((JavaBeanModel) refObj).getName()
- + "\" can't be instanced. Instance name is \"" + instanceName + "\"");
+ result.setErrorMessage("Java model \""
+ + ((JavaBeanModel) refObj).getName()
+ + "\" can't be instanced. Instance name is \""
+ + instanceName + "\"");
if (List.class.isAssignableFrom(instanceClazz)) {
JavaModelResolveCommand command = new JavaModelResolveCommand(
context);
16 years, 2 months