JBoss Tools SVN: r4173 - branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-15 06:49:51 -0400 (Mon, 15 Oct 2007)
New Revision: 4173
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCopyCreator.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1045
Modified: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCopyCreator.java
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCopyCreator.java 2007-10-15 10:37:44 UTC (rev 4172)
+++ branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeCopyCreator.java 2007-10-15 10:49:51 UTC (rev 4173)
@@ -20,6 +20,7 @@
import org.mozilla.interfaces.nsIDOMAttr;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
@@ -120,13 +121,13 @@
public void removeAttribute(VpePageContext pageContext,
Element sourceElement, Map visualNodeMap, String name) {
if (isAttribute(name)) {
- Element visualElement = (Element) visualNodeMap.get(this);
+ nsIDOMElement visualElement = (nsIDOMElement) visualNodeMap.get(this);
visualElement.removeAttribute(name);
}
}
public void pseudo(VpePageContext pageContext, Node sourceNode,
- Node visualNode, Map visualNodeMap) {
+ nsIDOMNode visualNode, Map visualNodeMap) {
visualNodeMap.put(this, visualNode);
}
17 years, 3 months
JBoss Tools SVN: r4172 - trunk/documentation/GettingStartedGuide/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-10-15 06:37:44 -0400 (Mon, 15 Oct 2007)
New Revision: 4172
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml
Log:
minor change
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml 2007-10-14 18:53:26 UTC (rev 4171)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/DevelopAsimpleJSPWebApplication.xml 2007-10-15 10:37:44 UTC (rev 4172)
@@ -151,7 +151,7 @@
</mediaobject>
</figure>
<itemizedlist>
- <listitem><para>Click, for example, <emphasis>WA</emphasis> option to create war archive</para></listitem>
+ <listitem><para>Click, for example, <emphasis>WAR</emphasis> option to create war archive</para></listitem>
</itemizedlist>
<para>In the dialog New WAR you can see automatically selected default values</para>
<figure>
17 years, 3 months
JBoss Tools SVN: r4171 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-14 14:53:26 -0400 (Sun, 14 Oct 2007)
New Revision: 4171
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java
Log:
added seamfacet test to overall testsuite
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java 2007-10-14 18:46:57 UTC (rev 4170)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java 2007-10-14 18:53:26 UTC (rev 4171)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.seam.core.test;
+import org.jboss.tools.seam.core.test.project.facet.SeamFacetInstallDelegateTest;
import org.jboss.tools.seam.core.test.project.facet.SeamRuntimeListConverterTest;
import org.jboss.tools.seam.core.test.project.facet.SeamRuntimeManagerTest;
@@ -29,6 +30,9 @@
suite.addTestSuite(SeamEARTest.class);
suite.addTestSuite(SeamRuntimeListConverterTest.class);
suite.addTestSuite(SeamRuntimeManagerTest.class);
+
+ suite.addTestSuite(SeamFacetInstallDelegateTest.class);
+
return suite;
}
}
17 years, 3 months
JBoss Tools SVN: r4170 - in trunk/seam/tests/org.jboss.tools.seam.core.test: src/org/jboss/tools/seam/core/test/project/facet and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-14 14:46:57 -0400 (Sun, 14 Oct 2007)
New Revision: 4170
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegateTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/TestUtils.java
Removed:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegeteTest.java
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
Log:
Added real initial tests for seam facet install delegate.
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2007-10-12 19:35:25 UTC (rev 4169)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2007-10-14 18:46:57 UTC (rev 4170)
@@ -18,5 +18,7 @@
org.jboss.tools.jsf,
org.eclipse.wst.common.project.facet.core,
org.jboss.tools.tests,
- org.eclipse.ui.workbench
+ org.eclipse.ui.workbench,
+ org.eclipse.wst.common.modulecore,
+ org.eclipse.wst.common.frameworks
Provide-Package: org.jboss.tools.seam.core.test
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2007-10-14 18:46:57 UTC (rev 4170)
@@ -0,0 +1,181 @@
+package org.jboss.tools.seam.core.test.project.facet;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.jboss.tools.seam.core.project.facet.SeamRuntime;
+import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
+import org.jboss.tools.seam.core.project.facet.SeamVersion;
+import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
+import org.jboss.tools.seam.internal.core.project.facet.SeamFacetInstallDataModelProvider;
+
+/**
+ * Base class for facet related tests; based on the facet test class found in
+ * WTP test suite.
+ *
+ * @author max
+ *
+ */
+public abstract class AbstractSeamFacetTest extends TestCase {
+
+ protected static final IWorkspace ws = ResourcesPlugin.getWorkspace();
+
+ private SeamRuntime seamRuntime;
+ protected static final String SEAM_1_2_0 = "Seam 1.2.0";
+ protected static final IProjectFacetVersion seamFacetVersion;
+ protected static final IProjectFacetVersion dynamicWebVersion;
+ protected static final IProjectFacetVersion javaVersion;
+ protected static final IProjectFacetVersion javaFacesVersion;
+
+ private static final IProjectFacet seamFacet;
+
+ static {
+ seamFacet = ProjectFacetsManager.getProjectFacet("jst.seam");
+ seamFacetVersion = seamFacet.getVersion("1.2");
+
+ javaVersion = ProjectFacetsManager.getProjectFacet("jst.java").getVersion("5.0");
+ dynamicWebVersion = ProjectFacetsManager.getProjectFacet("jst.web").getVersion("2.5");
+ javaFacesVersion = ProjectFacetsManager.getProjectFacet("jst.jsf").getVersion("1.2");
+
+ }
+
+ protected final Set<IResource> resourcesToCleanup = new HashSet<IResource>();
+ protected final List<Runnable> tearDownOperations = new ArrayList<Runnable>();
+
+ protected AbstractSeamFacetTest(final String name) {
+ super(name);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ // TODO Auto-generated method stub
+ super.setUp();
+ File folder = new File(System.getProperty("jbosstools.test.seam.1.2.1.eap.home", "/home/max/rhdevstudio/jboss-eap/seam"));
+
+ SeamRuntimeManager.getInstance().addRuntime(SEAM_1_2_0, folder.getAbsolutePath(), SeamVersion.SEAM_1_2, true);
+ seamRuntime = SeamRuntimeManager.getInstance().findRuntimeByName(SEAM_1_2_0);
+
+ }
+ protected void tearDown()
+
+ throws CoreException
+
+ {
+ for (IResource r : this.resourcesToCleanup) {
+ r.delete(true, null);
+ }
+
+ for (Runnable runnable : this.tearDownOperations) {
+ runnable.run();
+ }
+ }
+
+ protected final void addResourceToCleanup(final IResource resource) {
+ this.resourcesToCleanup.add(resource);
+ }
+
+ protected final void addTearDownOperation(final Runnable runnable) {
+ this.tearDownOperations.add(runnable);
+ }
+
+ protected IFacetedProject createFacetedProject(final String name) throws CoreException
+
+ {
+ assertFalse(ws.getRoot().getProject(name).exists());
+ final IFacetedProject fpj = ProjectFacetsManager.create(name, null,
+ null);
+ final IProject pj = fpj.getProject();
+ assertTrue(pj.exists());
+ addResourceToCleanup(pj);
+
+ return fpj;
+ }
+
+ protected IFacetedProject createSeamWarProject() throws CoreException {
+ final IFacetedProject fproj = ProjectFacetsManager.create("seam12Project", null,
+ null);
+
+ installDependentFacets(fproj);
+
+ IDataModel config = createSeamDataModel("war");
+
+ fproj.installProjectFacet(seamFacetVersion, config, null);
+
+ final IProject proj = fproj.getProject();
+
+ assertNotNull(proj);
+ assertTrue(proj.exists());
+
+ assertTrue(proj.getWorkspace().getRoot().getProject(proj.getName() + "-test").exists());
+
+ this.resourcesToCleanup.add(proj);
+
+ return fproj;
+ }
+
+ protected IDataModel createSeamDataModel(String deployType) {
+ IDataModel config = (IDataModel) new SeamFacetInstallDataModelProvider().create();
+ config.setStringProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME, SEAM_1_2_0);
+ config.setBooleanProperty(ISeamFacetDataModelProperties.DB_ALREADY_EXISTS, true);
+ config.setBooleanProperty(ISeamFacetDataModelProperties.RECREATE_TABLES_AND_DATA_ON_DEPLOY, false);
+ config.setStringProperty(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS, deployType);
+ config.setStringProperty(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME, "org.session.beans");
+ config.setStringProperty(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME, "org.entity.beans");
+ config.setStringProperty(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME, "org.test.beans");
+ config.setStringProperty(ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE, "noop-connection");
+ config.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH, new String[] { "noop-driver.jar" });
+ return config;
+ }
+
+ protected void installDependentFacets(final IFacetedProject fproj) throws CoreException {
+ fproj.installProjectFacet(javaVersion, null, null);
+ fproj.installProjectFacet(dynamicWebVersion, null, null);
+ fproj.installProjectFacet(javaFacesVersion, null, null);
+ }
+
+ protected IFacetedProject createSeamEarProject() throws CoreException {
+ final IFacetedProject fproj = ProjectFacetsManager.create("seamear12Project", null,
+ null);
+
+ installDependentFacets(fproj);
+
+ IDataModel config = createSeamDataModel("ear");
+
+ fproj.installProjectFacet(seamFacetVersion, config, null);
+
+ final IProject proj = fproj.getProject();
+ assertNotNull(proj);
+
+ IProject testProject = proj.getWorkspace().getRoot().getProject(proj.getName() + "-test");
+ IProject ejbProject = proj.getWorkspace().getRoot().getProject(proj.getName() + "-ejb");
+ IProject earProject = proj.getWorkspace().getRoot().getProject(proj.getName() + "-ear");
+
+ this.resourcesToCleanup.add(proj);
+ this.resourcesToCleanup.add(testProject);
+ this.resourcesToCleanup.add(ejbProject);
+ this.resourcesToCleanup.add(earProject);
+
+ assertTrue(proj.exists());
+ assertTrue(testProject.exists());
+ assertTrue(ejbProject.exists());
+ assertTrue(earProject.exists());
+
+ return fproj;
+ }
+
+}
\ No newline at end of file
Copied: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegateTest.java (from rev 4169, trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegeteTest.java)
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegateTest.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegateTest.java 2007-10-14 18:46:57 UTC (rev 4170)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * 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.seam.core.test.project.facet;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+
+public class SeamFacetInstallDelegateTest extends AbstractSeamFacetTest {
+
+ public SeamFacetInstallDelegateTest(String name) {
+ super(name);
+ }
+
+ public void testCreateWarFromScratch() throws CoreException, IOException {
+
+ final IFacetedProject fproj = createSeamWarProject();
+
+ }
+
+
+ public void testCreateEarFromScratch() throws CoreException, IOException {
+
+ final IFacetedProject fproj = createSeamEarProject();
+
+
+ }
+
+}
Deleted: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegeteTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegeteTest.java 2007-10-12 19:35:25 UTC (rev 4169)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetInstallDelegeteTest.java 2007-10-14 18:46:57 UTC (rev 4170)
@@ -1,25 +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.seam.core.test.project.facet;
-
-import org.jboss.tools.seam.internal.core.project.facet.SeamFacetInstallDelegete;
-
-import junit.framework.TestCase;
-
-/**
- * @author eskimo
- *
- */
-public class SeamFacetInstallDelegeteTest extends TestCase {
- public void testSeamFacetInstallDelegateExists() {
- SeamFacetInstallDelegete instance = new SeamFacetInstallDelegete();
- }
-}
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/TestUtils.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/TestUtils.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/TestUtils.java 2007-10-14 18:46:57 UTC (rev 4170)
@@ -0,0 +1,62 @@
+package org.jboss.tools.seam.core.test.project.facet;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.util.Arrays;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+
+public class TestUtils {
+
+ public static String readFromFile(final IFile file)
+
+ throws CoreException, IOException
+
+ {
+ TestCase.assertTrue(file.exists());
+
+ final StringBuffer buf = new StringBuffer();
+ final Reader r = new InputStreamReader(file.getContents());
+
+ try {
+ char[] chars = new char[1024];
+
+ for (int count; (count = r.read(chars)) != -1;) {
+ buf.append(chars, 0, count);
+ }
+ } finally {
+ try {
+ r.close();
+ } catch (IOException e) {
+ }
+ }
+
+ return buf.toString();
+ }
+
+ public static void assertEquals(final IFile file,
+ final String expectedContents)
+
+ throws CoreException, IOException
+
+ {
+ TestCase.assertEquals(readFromFile(file), expectedContents);
+ }
+
+ public static void assertFileContains(final IFile file, final String str)
+
+ throws CoreException, IOException
+
+ {
+ TestCase.assertTrue(readFromFile(file).indexOf(str) != -1);
+ }
+
+}
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r4169 - trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-12 15:35:25 -0400 (Fri, 12 Oct 2007)
New Revision: 4169
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java
Log:
JBIDE-1021
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java 2007-10-12 16:18:04 UTC (rev 4168)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java 2007-10-12 19:35:25 UTC (rev 4169)
@@ -4,11 +4,14 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jst.server.core.RuntimeClasspathProviderDelegate;
import org.eclipse.wst.server.core.IRuntime;
+import org.jboss.ide.eclipse.as.classpath.core.ClasspathCorePlugin;
import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
/**
@@ -27,9 +30,17 @@
}
public IClasspathEntry[] resolveClasspathContainer(IProject project, IRuntime runtime) {
- if( runtime == null ) return new IClasspathEntry[0];
+ if( runtime == null )
+ return null;
+
+ AbstractJBossServerRuntime ajbsrt = (AbstractJBossServerRuntime)runtime.loadAdapter(AbstractJBossServerRuntime.class, new NullProgressMonitor());
+ if( ajbsrt == null ) {
+ // log error
+ IStatus status = new Status(IStatus.WARNING, ClasspathCorePlugin.PLUGIN_ID, "Runtime " + runtime.getName() + "is not of the proper type");
+ ClasspathCorePlugin.getDefault().getLog().log(status);
+ return null;
+ }
- AbstractJBossServerRuntime ajbsrt = (AbstractJBossServerRuntime)runtime.loadAdapter(AbstractJBossServerRuntime.class, new NullProgressMonitor());
IPath loc = runtime.getLocation();
String config = ajbsrt.getJBossConfiguration();
if( runtime.getRuntimeType().getId().endsWith("32")) {
@@ -38,7 +49,7 @@
return get40(loc, config);
} else if( runtime.getRuntimeType().getId().endsWith("42")) {
return get42(loc, config);
- }
+ }
return null;
}
17 years, 3 months
JBoss Tools SVN: r4168 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-10-12 12:18:04 -0400 (Fri, 12 Oct 2007)
New Revision: 4168
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
Log:
http://jira.jboss.com/jira/browse/EXIN-13
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2007-10-12 16:02:55 UTC (rev 4167)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2007-10-12 16:18:04 UTC (rev 4168)
@@ -206,7 +206,37 @@
}
public void testComponentLifeCycleMethodsValidator() {
+ ISeamProject seamProject = getSeamProject(project);
+ IFile statefulComponentFile = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.java");
+
+ int number = getMarkersNumber(statefulComponentFile);
+ assertTrue("Problem marker was found in StatefulComponent.java file", number == 0);
+
+ // Duplicate @Destroy method
+ System.out.println("Test - Duplicate @Destroy method");
+
+ IFile statefulComponentFile6 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.6");
+ try{
+ statefulComponentFile.setContents(statefulComponentFile6.getContents(), true, false, new NullProgressMonitor());
+ statefulComponentFile.touch(new NullProgressMonitor());
+ }catch(Exception ex){
+ JUnitUtils.fail("Error in changing 'StatefulComponent.java' content to " +
+ "'StatefulComponent.6'", ex);
+ }
+
+ refreshProject(project);
+
+ String message = getMarkersMessage(statefulComponentFile);
+ assertTrue("Problem marker 'Duplicate @Destroy method' not found", "Stateful component \"statefulComponent\" must have a method marked @Remove".equals(message));
+
+ // Duplicate @Create method
+ // Duplicate @Unwrap method
+ // Only component class can have @Destroy method
+ // Only component class can have @Create method
+ // Only component class can have @Unwrap method
+ // Only component class can have @Observer method
+
}
public void testFactoriesValidator() {
17 years, 3 months
JBoss Tools SVN: r4167 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: templates and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-10-12 12:02:55 -0400 (Fri, 12 Oct 2007)
New Revision: 4167
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-847
Create templates for <rich:panelMenu/>, <rich:panelMenuGroup/> and <rich:panelMenuItem> components.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-12 15:50:40 UTC (rev 4166)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-12 16:02:55 UTC (rev 4167)
@@ -37,21 +37,13 @@
private static final String WIDTH_ATTR_PANELMENU = "width";
private static final String STYLE_ATTR_PANELMENU = "style";
-
- // private static final String DISABLED_ATTR_PANELMENU = "disabled";
- // private static final String EXPANDSINGLE_ATTR_PANELMENU = "expandSingle";
private static final String STYLECLASS_ATTR_PANELMENU = "styleClass";
private static final String PANEL_MENU_GROUP_END = ":panelMenuGroup";
private static final String PANEL_MENU_ITEM_END = ":panelMenuItem";
- // private static final String PATH_TO_COLLAPSED_GROUP =
- // "/panelMenuGroup/collapsed.gif";
-
private static Map toggleMap = new HashMap();
- // private boolean collapsedFalg = false;
-
// private static final String DISABLED_STYLE_FOR_TABLE = "color:#B1ADA7";
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
@@ -61,20 +53,15 @@
String width = sourceElement.getAttribute(WIDTH_ATTR_PANELMENU);
String style = sourceElement.getAttribute(STYLE_ATTR_PANELMENU);
- // String disabled =
- // sourceElement.getAttribute(DISABLED_ATTR_PANELMENU);
- // String expandSingle = sourceElement
- // .getAttribute(EXPANDSINGLE_ATTR_PANELMENU);
- String styleClass = sourceElement
- .getAttribute(STYLECLASS_ATTR_PANELMENU);
+ String styleClass = sourceElement.getAttribute(STYLECLASS_ATTR_PANELMENU);
+
+ if(width != null) {
+ style += "" + "; width:" + width;
+ }
Element div = visualDocument.createElement(HTML.TAG_DIV);
VpeCreationData vpeCreationData = new VpeCreationData(div);
- if (width != null) {
- div.setAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR, width);
- }
-
if (style != null) {
div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-12 15:50:40 UTC (rev 4166)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-12 16:02:55 UTC (rev 4167)
@@ -645,8 +645,7 @@
<vpe:tag name="rich:panelMenu" case-sensitive="yes">
<vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesPanelMenuTemplate">
<vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="stylwe.height" />
+ <vpe:width width-attr="width" />
</vpe:resize>
<vpe:drag start-enable="yes"/>
<vpe:drop container="yes"/>
17 years, 3 months
JBoss Tools SVN: r4166 - in trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp: outline and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-12 11:50:40 -0400 (Fri, 12 Oct 2007)
New Revision: 4166
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java
Log:
JBIDE-525
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java 2007-10-12 15:18:23 UTC (rev 4165)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java 2007-10-12 15:50:40 UTC (rev 4166)
@@ -86,17 +86,11 @@
String htmlQuery = null;
if(isFacelets && tagName.indexOf(':')<1 && !RedHatHtmlContentAssistProcessor.JSFCAttributeName.equals(attributeName)) {
Element element = (Element)node;
-
- NamedNodeMap attributes = element.getAttributes();
- Node jsfC = attributes.getNamedItem(RedHatHtmlContentAssistProcessor.JSFCAttributeName);
- if(jsfC != null && (jsfC instanceof Attr)) {
- Attr jsfCAttribute = (Attr)jsfC;
- String jsfTagName = jsfCAttribute.getValue();
- if(jsfTagName != null && jsfTagName.indexOf(':') > 0) {
- htmlQuery = new StringBuffer(KbQuery.TAG_SEPARATOR).append(RedHatHtmlContentAssistProcessor.faceletHtmlPrefixStart + tagName).append(KbQuery.ATTRIBUTE_SEPARATOR).append(attributeName).append(KbQuery.ENUMERATION_SEPARATOR).append(matchString).toString();
- tagName = jsfTagName;
- faceletJsfTag = true;
- }
+ String jsfTagName = valueHelper.getFaceletJsfTag(element);
+ if(jsfTagName != null) {
+ faceletJsfTag = true;
+ tagName = jsfTagName;
+ htmlQuery = new StringBuffer(KbQuery.TAG_SEPARATOR).append(RedHatHtmlContentAssistProcessor.faceletHtmlPrefixStart + tagName).append(KbQuery.ATTRIBUTE_SEPARATOR).append(attributeName).append(KbQuery.ENUMERATION_SEPARATOR).append(matchString).toString();
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2007-10-12 15:18:23 UTC (rev 4165)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2007-10-12 15:50:40 UTC (rev 4166)
@@ -36,6 +36,7 @@
import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
import org.eclipse.wst.xml.ui.internal.properties.EnumeratedStringPropertyDescriptor;
import org.jboss.tools.jst.jsp.JspEditorPlugin;
+import org.jboss.tools.jst.jsp.contentassist.RedHatHtmlContentAssistProcessor;
import org.jboss.tools.jst.jsp.editor.IVisualController;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMException;
@@ -119,7 +120,16 @@
}
private String getQuery(String attributeName) {
- return "/" + fNode.getNodeName() + "@" + attributeName;
+ String tagName = fNode.getNodeName();
+ String jsfTagName = null;
+ if(fNode instanceof Element) {
+ jsfTagName = valueHelper.getFaceletJsfTag((Element)fNode);
+ }
+ if(jsfTagName != null) tagName = jsfTagName;
+ if(jsfTagName == null && valueHelper.isFacetets() && tagName.indexOf(':') < 0 && !RedHatHtmlContentAssistProcessor.JSFCAttributeName.equals(attributeName)) {
+ tagName = RedHatHtmlContentAssistProcessor.faceletHtmlPrefixStart + tagName;
+ }
+ return "/" + tagName + "@" + attributeName;
}
private IPropertyDescriptor[] createPropertyDescriptors() {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java 2007-10-12 15:18:23 UTC (rev 4165)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/ValueHelper.java 2007-10-12 15:50:40 UTC (rev 4166)
@@ -40,6 +40,7 @@
import org.jboss.tools.common.kb.KbConnectorFactory;
import org.jboss.tools.common.kb.KbConnectorType;
import org.jboss.tools.common.kb.KbException;
+import org.jboss.tools.common.kb.KbQuery;
import org.jboss.tools.common.kb.KbTldResource;
import org.jboss.tools.common.kb.TagDescriptor;
import org.jboss.tools.common.kb.wtp.JspWtpKbConnector;
@@ -53,6 +54,10 @@
import org.jboss.tools.jst.web.tld.TaglibData;
import org.jboss.tools.jst.web.tld.TaglibMapping;
import org.jboss.tools.jst.web.tld.VpeTaglibManager;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
public class ValueHelper {
private IEditorInput editorInput = null;
@@ -318,4 +323,21 @@
kbConnector.unregisterJspResource();
}
}
+
+ public String getFaceletJsfTag(Element element) {
+ if(!isFacelets) return null;
+ String name = element.getNodeName();
+ if(name.indexOf(':') >= 0) return null;
+
+ NamedNodeMap attributes = element.getAttributes();
+ Node jsfC = attributes.getNamedItem(RedHatHtmlContentAssistProcessor.JSFCAttributeName);
+ if(jsfC != null && (jsfC instanceof Attr)) {
+ Attr jsfCAttribute = (Attr)jsfC;
+ String jsfTagName = jsfCAttribute.getValue();
+ if(jsfTagName != null && jsfTagName.indexOf(':') > 0) {
+ return jsfTagName;
+ }
+ }
+ return null;
+ }
}
17 years, 3 months
JBoss Tools SVN: r4165 - in trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp: outline and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-12 11:18:23 -0400 (Fri, 12 Oct 2007)
New Revision: 4165
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java
Log:
JBIDE-525
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java 2007-10-12 15:17:56 UTC (rev 4164)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java 2007-10-12 15:18:23 UTC (rev 4165)
@@ -105,6 +105,9 @@
}
String query = new StringBuffer(KbQuery.TAG_SEPARATOR).append(tagName).append(KbQuery.ATTRIBUTE_SEPARATOR).append(attributeName).append(KbQuery.ENUMERATION_SEPARATOR).append(matchString).toString();
+ if(!isFacelets && tagName.indexOf(':') < 0) {
+ query = WtpKbConnector.ADD_HTML_PREFIX + query;
+ }
try {
Collection proposals = wtpKbConnector.getProposals(query);
if(proposals.size()==0 && htmlQuery!=null) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java 2007-10-12 15:17:56 UTC (rev 4164)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPDialogCellEditor.java 2007-10-12 15:18:23 UTC (rev 4165)
@@ -11,6 +11,8 @@
package org.jboss.tools.jst.jsp.outline;
import java.util.Properties;
+
+import org.jboss.tools.common.kb.wtp.WtpKbConnector;
import org.jboss.tools.common.model.ui.attribute.editor.DialogCellEditorEx;
import org.jboss.tools.common.model.ui.objecteditor.AttributeWrapper;
import org.jboss.tools.common.model.ui.objecteditor.ExtendedCellEditorProvider;
@@ -19,6 +21,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.contentassist.ContentAssistHandler;
import org.jboss.tools.common.meta.key.WizardKeys;
import org.jboss.tools.jst.jsp.contentassist.JSPDialogCellEditorContentAssistProcessor;
import org.jboss.tools.jst.jsp.contentassist.RedHatHtmlContentAssistProcessor;
@@ -34,7 +37,10 @@
Properties context;
ValueHelper valueHelper;
JSPDialogCellEditorContentAssistProcessor contentAssistentProcessor;
+ ContentAssistHandler handler = null;
+ boolean hasProposals = false;
+
public JSPDialogCellEditor(Composite parent, Properties context) {
super(parent);
this.context = context;
@@ -42,38 +48,47 @@
contentAssistentProcessor = new JSPDialogCellEditorContentAssistProcessor();
if(valueHelper != null) contentAssistentProcessor.setContext(context);
- ControlContentAssistHelper.createTextContentAssistant(getTextField(), contentAssistentProcessor);
+ handler = ContentAssistHandler.createHandlerForText(getTextField(), ControlContentAssistHelper.createJavaContentAssistant(contentAssistentProcessor));
}
public void activate() {
+ checkHasProposals();
checkButtonEnablement();
super.activate();
}
- private void checkButtonEnablement() {
+ void checkHasProposals() {
+ hasProposals = false;
if(context == null) return;
valueHelper = (ValueHelper)context.get("valueHelper");
if(valueHelper == null) return;
- Button button = getButtonControl();
- if(button == null || button.isDisposed()) return;
String attributeName = "" + context.getProperty("attributeName");
String nodeName = "" + context.getProperty("nodeName");
String query = "/";
- if(valueHelper.isFacetets()) {
+ if(valueHelper.isFacetets() && nodeName.indexOf(':') < 0) {
query += RedHatHtmlContentAssistProcessor.faceletHtmlPrefixStart;
}
query += nodeName + "@" + attributeName;
RootElement root = (RootElement)valueHelper.getInitalInput(query);
- boolean enabled = root != null && root.getChildren().length > 0;
- getButtonControl().setVisible(enabled);
+ hasProposals = root != null && root.getChildren().length > 0;
}
+
+ private void checkButtonEnablement() {
+ if(context == null) return;
+ valueHelper = (ValueHelper)context.get("valueHelper");
+ if(valueHelper == null) return;
+ Button button = getButtonControl();
+ if(button == null || button.isDisposed()) return;
+ button.setVisible(hasProposals);
+ handler.setEnabled(hasProposals);
+ }
protected Object openDialogBox(Control cellEditorWindow) {
externalEditing = true;
String attributeName = "" + context.getProperty("attributeName");
String nodeName = "" + context.getProperty("nodeName");
String query = "/";
- if(valueHelper != null && valueHelper.isFacetets()) {
+ if(valueHelper != null && valueHelper.isFacetets() && nodeName.indexOf(":") < 0) {
query += RedHatHtmlContentAssistProcessor.faceletHtmlPrefixStart;
}
query += nodeName + "@" + attributeName;
17 years, 3 months
JBoss Tools SVN: r4164 - in trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb: wtp and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-12 11:17:56 -0400 (Fri, 12 Oct 2007)
New Revision: 4164
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbHtmlStore.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/JspWtpKbConnector.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/WtpKbConnector.java
Log:
JBIDE-525
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbHtmlStore.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbHtmlStore.java 2007-10-12 14:16:33 UTC (rev 4163)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbHtmlStore.java 2007-10-12 15:17:56 UTC (rev 4164)
@@ -15,6 +15,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.Map;
import java.util.StringTokenizer;
@@ -439,11 +440,52 @@
}
}
}
+ if(enumeration.size() == 0) {
+ enumeration = getAttributeValueProposals(attributeType, valueMask);
+ }
}
return enumeration;
}
+ private ArrayList<KbProposal> getAttributeValueProposals(Element attributeType, String valueMask) {
+ ArrayList<KbProposal> proposals = new ArrayList<KbProposal>();
+
+ NodeList nodeList = attributeType.getElementsByTagName(SchemaNodeFactory.PROPOSAL_NODE);
+ for(int i = 0; i < nodeList.getLength(); i++) {
+ Element proposalElement = (Element)nodeList.item(i);
+ String type = proposalElement.getAttribute(SchemaNodeFactory.TYPE_ATTRIBUTE);
+ if(type.equals(SchemaNodeFactory.ENUMERATION_TYPE)) {
+ proposals.addAll(getEnumeration(proposalElement, valueMask));
+ continue;
+ }
+ }
+
+ return proposals;
+ }
+ private ArrayList<KbProposal> getEnumeration(Element proposalElement, String valueMask) {
+ ArrayList<KbProposal> enumeration = new ArrayList<KbProposal>();
+
+ NodeList nodeList = proposalElement.getElementsByTagName(SchemaNodeFactory.PARAM_NODE);
+ for(int i=0; i<nodeList.getLength(); i++) {
+ Element paramElement = (Element)nodeList.item(i);
+ String value = paramElement.getAttribute(SchemaNodeFactory.VALUE_ATTRIBUTE);
+ if(value.startsWith(valueMask)) {
+ KbProposal proposal = new KbProposal();
+ proposal.setLabel(value);
+ proposal.setReplacementString(value);
+ proposal.setContextInfo(null);
+ proposal.setIcon(KbIcon.ENUM_ITEM);
+ proposal.setPosition(value.length());
+
+ enumeration.add(proposal);
+ }
+ }
+
+ return enumeration;
+ }
+
+
private ArrayList<KbProposal> getAttributeProposal(ArrayList<Element> elements) {
return getProposal(elements, false);
}
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/JspWtpKbConnector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/JspWtpKbConnector.java 2007-10-12 14:16:33 UTC (rev 4163)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/JspWtpKbConnector.java 2007-10-12 15:17:56 UTC (rev 4164)
@@ -225,8 +225,13 @@
return (Collection)o;
}
}
+
+ KbStore store = KbTldStore.getInstance();
+ if(query.startsWith(ADD_HTML_PREFIX)) {
+ query = query.substring(ADD_HTML_PREFIX.length());
+ store = KbHtmlStore.getInstance();
+ }
- KbTldStore store = KbTldStore.getInstance();
KbQuery kbQuery = new KbQuery(query, registerResources, registretedDinamicResources);
Collection<KbProposal> proposals = store.queryProposal(kbQuery);
// Collection result = removeSameProposals(proposals);
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/WtpKbConnector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/WtpKbConnector.java 2007-10-12 14:16:33 UTC (rev 4163)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/WtpKbConnector.java 2007-10-12 15:17:56 UTC (rev 4164)
@@ -22,7 +22,8 @@
* @author Igels
*/
public interface WtpKbConnector extends KbConnector {
-
+ public static String ADD_HTML_PREFIX = "4YTR:";
+
/**
*
* @param query
17 years, 3 months