JBoss Tools SVN: r6321 - in trunk: vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-02-14 20:25:48 -0500 (Thu, 14 Feb 2008)
New Revision: 6321
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
Log:
adjust VPE editor loading. Call delay after openEditor() not needed anymore, because wait for visual part loading added in VPE. It will show up only when Visual and Source Parts completely initialized. It can lead to JVM errors during tests on hudson.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2008-02-14 23:14:19 UTC (rev 6320)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2008-02-15 01:25:48 UTC (rev 6321)
@@ -209,10 +209,10 @@
assertNotNull(part);
// wait for jobs
- TestUtil.waitForJobs();
+ //TestUtil.waitForJobs();
// wait full initialization of vpe
// commented by dgolovin to get rid of jvm error [libexpat.so.0+0xeff4]
- TestUtil.delay(1000);
+ //TestUtil.delay(1000);
return part;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-02-14 23:14:19 UTC (rev 6320)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-02-15 01:25:48 UTC (rev 6321)
@@ -27,6 +27,7 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
@@ -238,6 +239,15 @@
};
xulRunnerEditor.setURL(INIT_URL);
+ // Wait while visual part is loaded
+ BusyIndicator.showWhile(Display.getCurrent(), new Runnable() {
+ public void run() {
+ while(Display.getCurrent().readAndDispatch()
+ && getController()==null) {
+ // do nothing
+ }
+ }
+ });
xulRunnerEditor.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
}
catch (Exception e) {
16 years, 7 months
JBoss Tools SVN: r6320 - in trunk/as/plugins: org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3 and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-02-14 18:14:19 -0500 (Thu, 14 Feb 2008)
New Revision: 6320
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss32ServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss40ServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss42ServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss50ServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer50.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java
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/WebtoolsProjectJBossClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
JBIDE-1774 server startup, shutdown, and project classpath with 5.0 runtimes completed.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/plugin.xml 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/plugin.xml 2008-02-14 23:14:19 UTC (rev 6320)
@@ -32,6 +32,13 @@
<factory class="org.jboss.ide.eclipse.as.classpath.core.runtime.ProjectRuntimeClasspathProvider$Factory"/>
<type class="org.eclipse.jst.common.project.facet.core.IClasspathProvider"/>
</adapter>
+
+ <adapter>
+ <runtime-component
+ id="org.jboss.ide.eclipse.as.runtime.component" version="5.0"/>
+ <factory class="org.jboss.ide.eclipse.as.classpath.core.runtime.ProjectRuntimeClasspathProvider$Factory"/>
+ <type class="org.eclipse.jst.common.project.facet.core.IClasspathProvider"/>
+ </adapter>
</extension>
<extension
@@ -46,7 +53,7 @@
<extension point="org.eclipse.jst.server.core.runtimeClasspathProviders">
<runtimeClasspathProvider
id="org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget"
- runtimeTypeIds="org.jboss.ide.eclipse.as.runtime.32, org.jboss.ide.eclipse.as.runtime.40, org.jboss.ide.eclipse.as.runtime.42"
+ runtimeTypeIds="org.jboss.ide.eclipse.as.runtime.32, org.jboss.ide.eclipse.as.runtime.40, org.jboss.ide.eclipse.as.runtime.42,org.jboss.ide.eclipse.as.runtime.50"
class="org.jboss.ide.eclipse.as.classpath.core.runtime.ClientAllRuntimeClasspathProvider"/>
</extension>
<extension
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB30SupportVerifier.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -26,7 +26,7 @@
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.wst.server.core.IRuntime;
import org.jboss.ide.eclipse.as.classpath.core.runtime.WebtoolsProjectJBossClasspathContainerInitializer.WebtoolsProjectJBossClasspathContainer;
-import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
/**
*
@@ -35,7 +35,7 @@
*/
public class EJB30SupportVerifier {
public static boolean verify(IRuntime rt) {
- AbstractJBossServerRuntime ajbsr = (AbstractJBossServerRuntime)rt.loadAdapter(AbstractJBossServerRuntime.class, null);
+ IJBossServerRuntime ajbsr = (IJBossServerRuntime)rt.loadAdapter(IJBossServerRuntime.class, null);
// i refuse to verify. if they say they support, believe them
if( ajbsr == null ) return true;
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 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -33,7 +33,7 @@
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;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
/**
* This class uses the "throw everything you can find" strategy
@@ -54,8 +54,8 @@
if( runtime == null )
return new IClasspathEntry[0];
- AbstractJBossServerRuntime ajbsrt = (AbstractJBossServerRuntime)runtime.loadAdapter(AbstractJBossServerRuntime.class, new NullProgressMonitor());
- if( ajbsrt == null ) {
+ IJBossServerRuntime jbsrt = (IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
+ if( jbsrt == 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);
@@ -63,28 +63,30 @@
}
IPath loc = runtime.getLocation();
- String config = ajbsrt.getJBossConfiguration();
- if( runtime.getRuntimeType().getId().endsWith("32")) {
+ String config = jbsrt.getJBossConfiguration();
+ String version = runtime.getRuntimeType().getVersion();
+ if( "3.2".equals(version))
return get32(loc, config);
- } else if( runtime.getRuntimeType().getId().endsWith("40")) {
- return get40(loc, config);
- } else if( runtime.getRuntimeType().getId().endsWith("42")) {
- return get42(loc, config);
- }
+ if( "4.0".equals(version))
+ return get40(loc,config);
+ if("4.2".equals(version))
+ return get42(loc,config);
+ if("5.0".equals(version))
+ return get50(loc,config);
return null;
}
protected IClasspathEntry[] get32(IPath location, String config) {
- ArrayList list = new ArrayList();
+ ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
IPath configPath = location.append("server").append(config);
addEntries(location.append("client"), list);
addEntries(location.append("lib"), list);
addEntries(configPath.append("lib"), list);
- return (IClasspathEntry[]) list.toArray(new IClasspathEntry[list.size()]);
+ return list.toArray(new IClasspathEntry[list.size()]);
}
protected IClasspathEntry[] get40(IPath location, String config) {
- ArrayList list = new ArrayList();
+ ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
IPath configPath = location.append("server").append(config);
IPath deployPath = configPath.append("deploy");
addEntries(location.append("client"), list);
@@ -93,11 +95,11 @@
addEntries(deployPath.append("jboss-web.deployer").append("jsf-libs"), list);
addEntries(deployPath.append("jboss-aop-jdk50.deployer"), list);
addEntries(deployPath.append("ejb3.deployer"), list);
- return (IClasspathEntry[]) list.toArray(new IClasspathEntry[list.size()]);
+ return list.toArray(new IClasspathEntry[list.size()]);
}
protected IClasspathEntry[] get42(IPath location, String config) {
- ArrayList list = new ArrayList();
+ ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
IPath configPath = location.append("server").append(config);
IPath deployPath = configPath.append("deploy");
addEntries(location.append("client"), list);
@@ -106,14 +108,27 @@
addEntries(deployPath.append("jboss-web.deployer").append("jsf-libs"), list);
addEntries(deployPath.append("jboss-aop-jdk50.deployer"), list);
addEntries(deployPath.append("ejb3.deployer"), list);
- return (IClasspathEntry[]) list.toArray(new IClasspathEntry[list.size()]);
+ return list.toArray(new IClasspathEntry[list.size()]);
}
+ protected IClasspathEntry[] get50(IPath location, String config) {
+ ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
+ IPath configPath = location.append("server").append(config);
+ IPath deployerPath = configPath.append("deployers");
+ IPath deployPath = configPath.append("deploy");
+ addEntries(location.append("client"), list);
+ addEntries(location.append("lib"), list);
+ addEntries(configPath.append("lib"), list);
+ addEntries(deployPath.append("jbossweb.sar").append("jsf-libs"),list);
+ addEntries(deployerPath.append("jboss-aop-jboss5.deployer"), list);
+ addEntries(deployerPath.append("ejb3.deployer"), list);
+ return list.toArray(new IClasspathEntry[list.size()]);
+ }
protected IClasspathEntry getEntry(IPath path) {
return JavaRuntime.newArchiveRuntimeClasspathEntry(path).getClasspathEntry();
}
- protected void addEntries(IPath folder, ArrayList list) {
+ protected void addEntries(IPath folder, ArrayList<IClasspathEntry> list) {
if( folder.toFile().exists()) {
String[] files = folder.toFile().list();
for( int i = 0; i < files.length; i++ ) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -38,7 +38,7 @@
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.ServerCore;
-import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
/**
* This is a class that would ultimately try to respond to different facets
@@ -59,8 +59,8 @@
private static final IProjectFacet WEB_FACET = ProjectFacetsManager.getProjectFacet("jst.web");
private static final IProjectFacet EJB_FACET = ProjectFacetsManager.getProjectFacet("jst.ejb");
private static final IProjectFacet EAR_FACET = ProjectFacetsManager.getProjectFacet("jst.ear");
- private static final IProjectFacet UTILITY_FACET = ProjectFacetsManager.getProjectFacet("jst.utility");
- private static final IProjectFacet CONNECTOR_FACET = ProjectFacetsManager.getProjectFacet("jst.connector");
+// private static final IProjectFacet UTILITY_FACET = ProjectFacetsManager.getProjectFacet("jst.utility");
+// private static final IProjectFacet CONNECTOR_FACET = ProjectFacetsManager.getProjectFacet("jst.connector");
private static final IProjectFacet APP_CLIENT_FACET = ProjectFacetsManager.getProjectFacet("jst.appclient");
@@ -127,30 +127,32 @@
IRuntime runtime = ServerCore.findRuntime(runtimeId);
if( runtime == null ) return;
- Object serverRuntime = runtime.loadAdapter(AbstractJBossServerRuntime.class, null);
+ IJBossServerRuntime jbRuntime = (IJBossServerRuntime)runtime.loadAdapter(IJBossServerRuntime.class, null);
- if( serverRuntime == null ) return;
- AbstractJBossServerRuntime jbRuntime = (AbstractJBossServerRuntime)serverRuntime;
+ if( jbRuntime != null ) {
- String serverHome = runtime.getLocation().toOSString();
- String configName = jbRuntime.getJBossConfiguration();
-
- String jbossVersion = jbRuntime.getId();
-
- entries = loadClasspathEntries2(runtimeId, facetId, facetVersion,
- serverHome, configName, jbossVersion, jbRuntime);
+ String serverHome = runtime.getLocation().toOSString();
+ String configName = jbRuntime.getJBossConfiguration();
+
+ String jbossVersion = jbRuntime.getRuntime().getRuntimeType().getVersion();
+
+ entries = loadClasspathEntries2(runtimeId, facetId, facetVersion,
+ serverHome, configName, jbossVersion, jbRuntime);
+ }
}
protected IClasspathEntry[] loadClasspathEntries2(String runtimeId, String facetId,
String facetVersion, String serverHome, String configName, String jbVersion,
- AbstractJBossServerRuntime jbsRuntime) {
+ IJBossServerRuntime jbsRuntime) {
if( facetId.equals(JST_JAVA_FACET.getId())) {
return loadJREClasspathEntries(jbsRuntime);
- } else if( jbVersion.equals("4.2")) {
+ } else if("5.0".equals(jbVersion)) {
+ return loadClasspathEntriesDefault(facetId, facetVersion, serverHome, configName);
+ } else if( "4.2".equals(jbVersion)) {
return loadClasspathEntries42(facetId, facetVersion, serverHome, configName);
- } else if( jbVersion.equals("4.0"))
+ } else if( "4.0".equals(jbVersion)) {
return loadClasspathEntries40(facetId, facetVersion, serverHome, configName);
- if( jbVersion.equals("3.2"))
+ } else if( "3.2".equals(jbVersion))
return loadClasspathEntries32( facetId, facetVersion, serverHome, configName);
return loadClasspathEntriesDefault(facetId, facetVersion, serverHome, configName);
}
@@ -166,15 +168,15 @@
}
protected IClasspathEntry[] getEntries(IPath folder) {
String[] files = folder.toFile().list();
- ArrayList list = new ArrayList();
+ ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
for( int i = 0; i < files.length; i++ ) {
if( files[i].endsWith(".jar")) {
list.add(getEntry(folder.append(files[i])));
}
}
- return (IClasspathEntry[]) list.toArray(new IClasspathEntry[list.size()]);
+ return list.toArray(new IClasspathEntry[list.size()]);
}
- protected IClasspathEntry[] loadJREClasspathEntries(AbstractJBossServerRuntime jbsRuntime) {
+ protected IClasspathEntry[] loadJREClasspathEntries(IJBossServerRuntime jbsRuntime) {
IVMInstall vmInstall = jbsRuntime.getVM();
if (vmInstall != null) {
String name = vmInstall.getName();
@@ -187,7 +189,7 @@
protected IClasspathEntry[] loadClasspathEntries42(String facetId, String facetVersion, String serverHome, String configName) {
IPath homePath = new Path(serverHome);
IPath configPath = homePath.append("server").append(configName);
- ArrayList list = new ArrayList();
+ ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
if (facetId.equals(WEB_FACET.getId())) {
IPath jsfDir = configPath.append("deploy").append("jboss-web.deployer").append("jsf-libs");
list.add(getEntry(configPath.append("lib").append("jsp-api.jar")));
@@ -222,13 +224,13 @@
} else if( facetId.equals(APP_CLIENT_FACET.getId())) {
list.add(getEntry(homePath.append("client").append("jbossall-client.jar")));
}
- return (IClasspathEntry[]) list.toArray(new IClasspathEntry[list.size()]);
+ return list.toArray(new IClasspathEntry[list.size()]);
}
protected IClasspathEntry[] loadClasspathEntries40(String facetId, String facetVersion, String serverHome, String configName) {
IPath homePath = new Path(serverHome);
IPath configPath = homePath.append("server").append(configName);
- ArrayList list = new ArrayList();
+ ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
if (facetId.equals(WEB_FACET.getId())) {
IPath jsfDir = configPath.append("deploy").append("jbossweb-tomcat55.sar").append("jsf-libs");
list.add(getEntry(configPath.append("lib").append("javax.servlet.jsp.jar")));
@@ -259,14 +261,14 @@
} else if( facetId.equals(APP_CLIENT_FACET.getId())) {
list.add(JavaRuntime.newArchiveRuntimeClasspathEntry(homePath.append("client").append("jbossall-client.jar")).getClasspathEntry());
}
- return (IClasspathEntry[]) list.toArray(new IClasspathEntry[list.size()]);
+ return list.toArray(new IClasspathEntry[list.size()]);
}
protected IClasspathEntry[] loadClasspathEntries32(String facetId, String facetVersion, String serverHome, String configName) {
IPath homePath = new Path(serverHome);
IPath configPath = homePath.append("server").append(configName);
- ArrayList list = new ArrayList();
+ ArrayList<IClasspathEntry> list = new ArrayList<IClasspathEntry>();
if (facetId.equals(WEB_FACET.getId())) {
IPath p = configPath.append("deploy").append("jbossweb-tomcat50.sar");
list.add(getEntry(p.append("jsp-api.jar")));
@@ -277,7 +279,7 @@
} else if( facetId.equals(APP_CLIENT_FACET.getId())) {
list.add(getEntry(homePath.append("client").append("jbossall-client.jar")));
}
- return (IClasspathEntry[]) list.toArray(new IClasspathEntry[list.size()]);
+ return list.toArray(new IClasspathEntry[list.size()]);
}
protected IClasspathEntry[] loadClasspathEntriesDefault(String facetId, String facetVersion, String serverHome, String configName) {
return new IClasspathEntry[0];
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/descriptors/XPathModel.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -42,7 +42,7 @@
import org.eclipse.wst.server.core.IServerLifecycleListener;
import org.eclipse.wst.server.core.ServerCore;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
-import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
/**
@@ -91,8 +91,8 @@
return Status.OK_STATUS; // server has no runtime so we can't set this up.
}
- AbstractJBossServerRuntime ajbsr = (AbstractJBossServerRuntime)
- server2.getRuntime().loadAdapter(AbstractJBossServerRuntime.class, null);
+ LocalJBossServerRuntime ajbsr = (LocalJBossServerRuntime)
+ server2.getRuntime().loadAdapter(LocalJBossServerRuntime.class, null);
if(ajbsr != null ) {
IPath loc = server2.getRuntime().getLocation();
IPath configFolder = loc.append("server").append(ajbsr.getJBossConfiguration());
@@ -271,8 +271,8 @@
public void loadDefaults(IServer server, String configFolder) {
ArrayList<XPathCategory> retVal = new ArrayList<XPathCategory>();
- AbstractJBossServerRuntime ajbsr = (AbstractJBossServerRuntime)
- server.getRuntime().loadAdapter(AbstractJBossServerRuntime.class, new NullProgressMonitor());
+ LocalJBossServerRuntime ajbsr = (LocalJBossServerRuntime)
+ server.getRuntime().loadAdapter(LocalJBossServerRuntime.class, new NullProgressMonitor());
Path p = (Path)rtToPortsFile.get(server.getRuntime().getRuntimeType().getVersion());
if( p == null ) return;
URL url = FileLocator.find(JBossServerCorePlugin.getDefault().getBundle(), p, null);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerRuntime.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -39,4 +39,8 @@
public void setVM(IVMInstall install);
public String getJBossConfiguration();
public void setJBossConfiguration(String config);
+
+ // for startup
+ public String getDefaultRunArgs();
+ public String getDefaultRunVMArgs();
}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossServerRuntime.java 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossServerRuntime.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -1,108 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.core.server.internal;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.IVMInstallType;
-import org.eclipse.jdt.launching.JavaRuntime;
-import org.eclipse.wst.server.core.IRuntime;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.model.RuntimeDelegate;
-import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
-import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
-import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-
-public abstract class AbstractJBossServerRuntime extends RuntimeDelegate implements IJBossServerRuntime {
-
- public void setDefaults(IProgressMonitor monitor) {
- String location = Platform.getOS().equals(Platform.WS_WIN32)
- ? "c:/program files/jboss-" : "/usr/bin/jboss-";
- String version = getRuntime().getRuntimeType().getVersion();
- location += version + ".x";
- getRuntimeWorkingCopy().setLocation(new Path(location));
- getRuntimeWorkingCopy().setName(getNextRuntimeName());
- setAttribute(IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, IJBossServerConstants.DEFAULT_SERVER_NAME);
- setVM(null);
- }
-
- private String getNextRuntimeName() {
- String version = getRuntime().getRuntimeType().getVersion();
- String base = "JBoss " + version + " Runtime";
- IRuntime rt = ServerCore.findRuntime(base);
- if (rt == null)
- return base;
-
- int i = 0;
- while (rt != null) {
- rt = ServerCore.findRuntime(base + " " + ++i);
- }
- return base + " " + i;
- }
-
- public IStatus validate() {
- IStatus s = super.validate();
- if( !s.isOK()) return s;
-
- if( getJBossConfiguration().equals(""))
- return new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, 0, "Runtime Configuration Not Set", null);
-
- return Status.OK_STATUS;
- }
-
- public IVMInstall getVM() {
- String id = getAttribute(PROPERTY_VM_ID, (String)null);
- String type = getAttribute(PROPERTY_VM_TYPE_ID, (String)null);
-
- IVMInstallType vmInstallType = JavaRuntime.getVMInstallType(type);
- IVMInstall[] vmInstalls = vmInstallType.getVMInstalls();
-
- for (int i = 0; i < vmInstalls.length; i++) {
- if (id.equals(vmInstalls[i].getId()))
- return vmInstalls[i];
- }
-
- // not found, return default vm
- return JavaRuntime.getDefaultVMInstall();
- }
-
- public void setVM(IVMInstall selectedVM) {
- if( selectedVM == null )
- selectedVM = JavaRuntime.getDefaultVMInstall();
-
- setAttribute(IJBossServerRuntime.PROPERTY_VM_ID, selectedVM.getId());
- setAttribute(IJBossServerRuntime.PROPERTY_VM_TYPE_ID, selectedVM
- .getVMInstallType().getId());
- }
-
- public String getJBossConfiguration() {
- return getAttribute(PROPERTY_CONFIGURATION_NAME, (String)"");
- }
-
- public void setJBossConfiguration(String config) {
- setAttribute(IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, config);
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss32ServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss32ServerRuntime.java 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss32ServerRuntime.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -1,30 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.core.server.internal;
-
-
-public class JBoss32ServerRuntime extends AbstractJBossServerRuntime {
-
- public JBoss32ServerRuntime() {
- // TODO Auto-generated constructor stub
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss40ServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss40ServerRuntime.java 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss40ServerRuntime.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -1,29 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.core.server.internal;
-
-
-public class JBoss40ServerRuntime extends AbstractJBossServerRuntime {
-
- public JBoss40ServerRuntime() {
- }
-}
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss42ServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss42ServerRuntime.java 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss42ServerRuntime.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -1,6 +0,0 @@
-package org.jboss.ide.eclipse.as.core.server.internal;
-
-public class JBoss42ServerRuntime extends AbstractJBossServerRuntime {
- public JBoss42ServerRuntime() {
- }
-}
\ No newline at end of file
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss50ServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss50ServerRuntime.java 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBoss50ServerRuntime.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -1,6 +0,0 @@
-package org.jboss.ide.eclipse.as.core.server.internal;
-
-public class JBoss50ServerRuntime extends AbstractJBossServerRuntime {
- public JBoss50ServerRuntime() {
- }
-}
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -51,8 +51,8 @@
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.util.ArgsUtil;
/**
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer50.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer50.java 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer50.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -1,39 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.core.server.internal;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
-import org.jboss.ide.eclipse.as.core.extensions.polling.TimeoutPoller;
-import org.jboss.ide.eclipse.as.core.server.IServerPollingAttributes;
-
-/**
- * @author rob.stryker <rob.stryker(a)redhat.com>
- *
- */
-public class JBossServer50 extends JBossServer {
- public void setDefaults(IProgressMonitor monitor) {
- ServerWorkingCopy wc = (ServerWorkingCopy)getServerWorkingCopy();
- wc.setAttribute(IServerPollingAttributes.STARTUP_POLLER_KEY, TimeoutPoller.POLLER_ID);
- wc.setAttribute(IServerPollingAttributes.START_TIMEOUT, 60000);
- }
-}
Copied: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java (from rev 6311, trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/AbstractJBossServerRuntime.java)
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -0,0 +1,129 @@
+/**
+ * JBoss, a Division of Red Hat
+ * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+* This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ide.eclipse.as.core.server.internal;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.IVMInstallType;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.ServerCore;
+import org.eclipse.wst.server.core.model.RuntimeDelegate;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
+
+import sun.security.action.GetLongAction;
+
+public class LocalJBossServerRuntime extends RuntimeDelegate implements IJBossServerRuntime {
+
+ public void setDefaults(IProgressMonitor monitor) {
+ String location = Platform.getOS().equals(Platform.WS_WIN32)
+ ? "c:/program files/jboss-" : "/usr/bin/jboss-";
+ String version = getRuntime().getRuntimeType().getVersion();
+ location += version + ".x";
+ getRuntimeWorkingCopy().setLocation(new Path(location));
+ getRuntimeWorkingCopy().setName(getNextRuntimeName());
+ setAttribute(IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, IJBossServerConstants.DEFAULT_SERVER_NAME);
+ setVM(null);
+ }
+
+ private String getNextRuntimeName() {
+ String version = getRuntime().getRuntimeType().getVersion();
+ String base = "JBoss " + version + " Runtime";
+ IRuntime rt = ServerCore.findRuntime(base);
+ if (rt == null)
+ return base;
+
+ int i = 0;
+ while (rt != null) {
+ rt = ServerCore.findRuntime(base + " " + ++i);
+ }
+ return base + " " + i;
+ }
+
+ public IStatus validate() {
+ IStatus s = super.validate();
+ if( !s.isOK()) return s;
+
+ if( getJBossConfiguration().equals(""))
+ return new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, 0, "Runtime Configuration Not Set", null);
+
+ return Status.OK_STATUS;
+ }
+
+ public IVMInstall getVM() {
+ String id = getAttribute(PROPERTY_VM_ID, (String)null);
+ String type = getAttribute(PROPERTY_VM_TYPE_ID, (String)null);
+
+ IVMInstallType vmInstallType = JavaRuntime.getVMInstallType(type);
+ IVMInstall[] vmInstalls = vmInstallType.getVMInstalls();
+
+ for (int i = 0; i < vmInstalls.length; i++) {
+ if (id.equals(vmInstalls[i].getId()))
+ return vmInstalls[i];
+ }
+
+ // not found, return default vm
+ return JavaRuntime.getDefaultVMInstall();
+ }
+
+ public void setVM(IVMInstall selectedVM) {
+ if( selectedVM == null )
+ selectedVM = JavaRuntime.getDefaultVMInstall();
+
+ setAttribute(IJBossServerRuntime.PROPERTY_VM_ID, selectedVM.getId());
+ setAttribute(IJBossServerRuntime.PROPERTY_VM_TYPE_ID, selectedVM
+ .getVMInstallType().getId());
+ }
+
+ public String getJBossConfiguration() {
+ return getAttribute(PROPERTY_CONFIGURATION_NAME, (String)"");
+ }
+
+ public void setJBossConfiguration(String config) {
+ setAttribute(IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, config);
+ }
+
+ public String getDefaultRunArgs() {
+ return "--configuration=" + getJBossConfiguration() + " ";
+ }
+
+ public String getDefaultRunVMArgs() {
+ String name = getRuntime().getName();
+ String ret = "-Dprogram.name=\"JBossTools " + name + "\" ";
+ if( Platform.getOS().equals(Platform.OS_MACOSX))
+ ret += "-server ";
+ ret += "-Xms256m -Xmx512m -XX:MaxPermSize=256m ";
+ if( Platform.getOS().equals(Platform.OS_LINUX))
+ ret += "-Djava.net.preferIPv4Stack=true ";
+ ret += "-Dsun.rmi.dgc.client.gcInterval=3600000 ";
+ ret += "-Dsun.rmi.dgc.server.gcInterval=3600000 ";
+ ret += "-Djava.endorsed.dirs=" + (getRuntime().getLocation().append("lib").append("endorsed")) + " ";
+
+ return ret;
+ }
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -41,7 +41,6 @@
import org.eclipse.jdt.launching.StandardClasspathProvider;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.internal.ServerType;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
@@ -84,16 +83,17 @@
public static String getDefaultArgs(JBossServer jbs) throws CoreException {
IJBossServerRuntime rt = findJBossServerRuntime(jbs.getServer());
if (rt != null) {
- return "--configuration=" + rt.getJBossConfiguration();
+ return rt.getDefaultRunArgs();
}
throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Runtime not found"));
}
public static String getDefaultVMArgs(JBossServer jbs) throws CoreException {
- String ret = "-Xms256m -Xmx512m -XX:MaxPermSize=256m ";
- if( Platform.getOS().equals(Platform.OS_LINUX))
- ret += "-Djava.net.preferIPv4Stack=true";
- return ret;
+ IJBossServerRuntime rt = findJBossServerRuntime(jbs.getServer());
+ if (rt != null) {
+ return rt.getDefaultRunVMArgs();
+ }
+ throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Runtime not found"));
}
@@ -140,8 +140,7 @@
* if one does not already exist.
*/
public static ILaunchConfigurationWorkingCopy createLaunchConfiguration(IServer server) throws CoreException {
- ILaunchConfigurationType launchConfigType =
- ((ServerType) server.getServerType()).getLaunchConfigurationType();
+ ILaunchConfigurationType launchConfigType = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationType(LAUNCH_TYPE);
if (launchConfigType == null)
return null;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2008-02-14 23:14:19 UTC (rev 6320)
@@ -59,7 +59,7 @@
<serverType
behaviourClass="org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior"
- class="org.jboss.ide.eclipse.as.core.server.internal.JBossServer50"
+ class="org.jboss.ide.eclipse.as.core.server.internal.JBossServer"
description="%jboss.version.50.description"
hasConfiguration="false"
id="org.jboss.ide.eclipse.as.50"
@@ -73,13 +73,32 @@
startTimeout="450000"
stopTimeout="450000"
supportsRemoteHosts="false"/>
- </extension>
+
+ <serverType
+ behaviourClass="org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior"
+ class="org.jboss.ide.eclipse.as.core.server.internal.DeployableServer"
+ description="A server which only provides a deploy folder for publishing."
+ hasConfiguration="false"
+ id="org.jboss.ide.eclipse.as.systemCopyServer"
+ initialState="stopped"
+ launchConfigId="org.jboss.ide.eclipse.as.core.server.stripped.launchConfiguration"
+ launchModes="run"
+ name="JBoss Deploy-Only Server"
+ runtime="true"
+ runtimeTypeId="org.jboss.ide.eclipse.as.runtime.stripped"
+ startBeforePublish="false"
+ startTimeout="100000"
+ stopTimeout="100000"
+ supportsRemoteHosts="true"/>
+
+ </extension>
+
<extension
point="org.eclipse.wst.server.core.runtimeTypes">
<runtimeType
vendor="%providerName"
- class="org.jboss.ide.eclipse.as.core.server.internal.JBoss32ServerRuntime"
+ class="org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime"
description="%jboss.version.32.description"
name="JBoss 3.2 Runtime"
id="org.jboss.ide.eclipse.as.runtime.32"
@@ -102,7 +121,7 @@
</runtimeType>
<runtimeType
vendor="%providerName"
- class="org.jboss.ide.eclipse.as.core.server.internal.JBoss40ServerRuntime"
+ class="org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime"
description="%jboss.version.40.description"
name="JBoss 4.0 Runtime"
id="org.jboss.ide.eclipse.as.runtime.40"
@@ -131,7 +150,7 @@
</runtimeType>
<runtimeType
vendor="%providerName"
- class="org.jboss.ide.eclipse.as.core.server.internal.JBoss42ServerRuntime"
+ class="org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime"
description="%jboss.version.42.description"
name="JBoss 4.2 Runtime"
id="org.jboss.ide.eclipse.as.runtime.42"
@@ -160,7 +179,7 @@
</runtimeType>
<runtimeType
vendor="%providerName"
- class="org.jboss.ide.eclipse.as.core.server.internal.JBoss50ServerRuntime"
+ class="org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime"
description="%jboss.version.50.description"
name="JBoss 5.0 Runtime"
id="org.jboss.ide.eclipse.as.runtime.50"
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2008-02-14 23:14:19 UTC (rev 6320)
@@ -63,7 +63,7 @@
import org.eclipse.wst.server.ui.wizard.WizardFragment;
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.internal.AbstractJBossServerRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2008-02-14 20:55:44 UTC (rev 6319)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2008-02-14 23:14:19 UTC (rev 6320)
@@ -53,21 +53,19 @@
point="org.eclipse.wst.server.ui.wizardFragments">
<fragment
class="org.jboss.ide.eclipse.as.ui.wizards.JBossRuntimeWizardFragment"
- typeIds="org.jboss.ide.eclipse.as.runtime.32,org.jboss.ide.eclipse.as.runtime.40,org.jboss.ide.eclipse.as.runtime.42"
+ typeIds="org.jboss.ide.eclipse.as.runtime.32,org.jboss.ide.eclipse.as.runtime.40,org.jboss.ide.eclipse.as.runtime.42,org.jboss.ide.eclipse.as.runtime.50"
id="org.jboss.ide.eclipse.as.ui.jboss32RuntimeWizardFragmentragment"/>
-
<fragment
class="org.jboss.ide.eclipse.as.ui.wizards.JBossServerWizardFragment"
id="org.jboss.ide.eclipse.as.ui.jbossServerWizardFragment"
- typeIds="org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42"/>
- <fragment
+ typeIds="org.jboss.ide.eclipse.as.32,org.jboss.ide.eclipse.as.40,org.jboss.ide.eclipse.as.42,org.jboss.ide.eclipse.as.50"/>
+ <fragment
class="org.jboss.ide.eclipse.as.ui.wizards.StrippedServerWizardFragment"
id="org.jboss.ide.eclipse.as.ui.strippedServerWizardFragment"
typeIds="org.jboss.ide.eclipse.as.systemCopyServer"/>
</extension>
- <extension
- point="org.eclipse.ui.startup">
+ <extension point="org.eclipse.ui.startup">
<startup />
</extension>
16 years, 7 months
JBoss Tools SVN: r6319 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-02-14 15:55:44 -0500 (Thu, 14 Feb 2008)
New Revision: 6319
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/TypeInfoCollector.java
Log:
JBIDE-999
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2008-02-14 17:06:42 UTC (rev 6318)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamELCompletionEngine.java 2008-02-14 20:55:44 UTC (rev 6319)
@@ -108,22 +108,22 @@
Map<String, TypeInfoCollector.MethodInfo> unpairedGettersOrSetters;
Set<String> proposals;
private ELOperandToken lastResolvedToken;
- private boolean isMapOrBundleAmoungTheTokens = false;
+ private boolean isMapOrCollectionOrBundleAmoungTheTokens = false;
public SeamELOperandResolveStatus(List<ELOperandToken> tokens) {
this.tokens = tokens;
}
- public boolean isMapOrBundleAmoungTheTokens() {
- return this.isMapOrBundleAmoungTheTokens;
+ public boolean isMapOrCollectionOrBundleAmoungTheTokens() {
+ return this.isMapOrCollectionOrBundleAmoungTheTokens;
}
- public void setMapOrBundleAmoungTheTokens() {
- this.isMapOrBundleAmoungTheTokens = true;
+ public void setMapOrCollectionOrBundleAmoungTheTokens() {
+ this.isMapOrCollectionOrBundleAmoungTheTokens = true;
}
public boolean isOK() {
- return !getProposals().isEmpty() || isMapOrBundleAmoungTheTokens();
+ return !getProposals().isEmpty() || isMapOrCollectionOrBundleAmoungTheTokens();
}
public boolean isError() {
@@ -365,9 +365,9 @@
List<TypeInfoCollector.MemberInfo> newMembers = new ArrayList<TypeInfoCollector.MemberInfo>();
for (TypeInfoCollector.MemberInfo mbr : members) {
if (mbr.getMemberType() == null) continue;
- TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
- if (TypeInfoCollector.isMap(mbr.getMemberType()) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
- status.setMapOrBundleAmoungTheTokens();
+ TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr);
+ if (TypeInfoCollector.isMapOrNotParameterizedCollection(mbr.getMemberType()) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
+ status.setMapOrCollectionOrBundleAmoungTheTokens();
}
List<TypeInfoCollector.MemberInfo> properties = infos.getProperties();
for (TypeInfoCollector.MemberInfo property : properties) {
@@ -394,9 +394,9 @@
List<TypeInfoCollector.MemberInfo> newMembers = new ArrayList<TypeInfoCollector.MemberInfo>();
for (TypeInfoCollector.MemberInfo mbr : members) {
if (mbr.getMemberType() == null) continue;
- TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
- if (TypeInfoCollector.isMap(mbr.getMemberType()) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
- status.setMapOrBundleAmoungTheTokens();
+ TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr);
+ if (TypeInfoCollector.isMapOrNotParameterizedCollection(mbr.getMemberType()) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
+ status.setMapOrCollectionOrBundleAmoungTheTokens();
}
List<TypeInfoCollector.MemberInfo> methods = infos.getMethods();
for (TypeInfoCollector.MemberInfo method : methods) {
@@ -415,9 +415,9 @@
// return all the methods + properties
for (TypeInfoCollector.MemberInfo mbr : members) {
if (mbr.getMemberType() == null) continue;
- TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
- if (TypeInfoCollector.isMap(mbr.getMemberType()) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
- status.setMapOrBundleAmoungTheTokens();
+ TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr);
+ if (TypeInfoCollector.isMapOrNotParameterizedCollection(mbr.getMemberType()) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
+ status.setMapOrCollectionOrBundleAmoungTheTokens();
}
proposals.addAll(infos.getMethodPresentations());
proposals.addAll(infos.getPropertyPresentations(status.getUnpairedGettersOrSetters()));
@@ -429,9 +429,9 @@
Set<String> proposalsToFilter = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
for (TypeInfoCollector.MemberInfo mbr : members) {
if (mbr.getMemberType() == null) continue;
- TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
- if (TypeInfoCollector.isMap(mbr.getMemberType()) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
- status.setMapOrBundleAmoungTheTokens();
+ TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr);
+ if (TypeInfoCollector.isMapOrNotParameterizedCollection(mbr.getMemberType()) || TypeInfoCollector.isResourceBundle(mbr.getMemberType())) {
+ status.setMapOrCollectionOrBundleAmoungTheTokens();
}
proposalsToFilter.addAll(infos.getMethodPresentations());
proposalsToFilter.addAll(infos.getPropertyPresentations(status.getUnpairedGettersOrSetters()));
@@ -748,7 +748,7 @@
String name = token.getText();
List<TypeInfoCollector.MemberInfo> newMembers = new ArrayList<TypeInfoCollector.MemberInfo>();
for (TypeInfoCollector.MemberInfo mbr : members) {
- TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
+ TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr);
List<TypeInfoCollector.MemberInfo> properties = infos.getProperties();
for (TypeInfoCollector.MemberInfo property : properties) {
StringBuffer propertyName = new StringBuffer(property.getName());
@@ -771,7 +771,7 @@
}
List<TypeInfoCollector.MemberInfo> newMembers = new ArrayList<TypeInfoCollector.MemberInfo>();
for (TypeInfoCollector.MemberInfo mbr : members) {
- TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
+ TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr);
List<TypeInfoCollector.MemberInfo> methods = infos.getMethods();
for (TypeInfoCollector.MemberInfo method : methods) {
if (method instanceof TypeInfoCollector.MethodInfo
@@ -790,7 +790,7 @@
// return filtered methods + properties
Set<TypeInfoCollector.MemberInfo> javaElementInfosToFilter = new HashSet<TypeInfoCollector.MemberInfo>();
for (TypeInfoCollector.MemberInfo mbr : members) {
- TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr.getMemberType());
+ TypeInfoCollector infos = SeamExpressionResolver.collectTypeInfo(mbr);
javaElementInfosToFilter.addAll(infos.getMethods());
javaElementInfosToFilter.addAll(infos.getProperties());
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java 2008-02-14 17:06:42 UTC (rev 6318)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamExpressionResolver.java 2008-02-14 20:55:44 UTC (rev 6319)
@@ -16,7 +16,6 @@
import java.util.Set;
import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.IType;
import org.jboss.tools.seam.core.IBijectedAttribute;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamComponentMethod;
@@ -216,10 +215,9 @@
return member;
}
- public static TypeInfoCollector collectTypeInfo(IType type) {
- TypeInfoCollector typeInfo = new TypeInfoCollector(type);
+ public static TypeInfoCollector collectTypeInfo(TypeInfoCollector.MemberInfo member) {
+ TypeInfoCollector typeInfo = new TypeInfoCollector(member);
typeInfo.collectInfo();
return typeInfo;
}
-
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/TypeInfoCollector.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/TypeInfoCollector.java 2008-02-14 17:06:42 UTC (rev 6318)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/TypeInfoCollector.java 2008-02-14 20:55:44 UTC (rev 6319)
@@ -24,9 +24,10 @@
public class TypeInfoCollector {
IType fType;
+ MemberInfo fMember;
List<MethodInfo> fMethods;
List<FieldInfo> fFields;
-
+
public abstract static class MemberInfo {
private String fDeclaringTypeQualifiedName;
private String fName;
@@ -45,15 +46,15 @@
public void setSourceType(IType sourceType) {
fSourceType = sourceType;
}
-
+
public IType getSourceType() {
return fSourceType;
}
-
+
protected void setName (String name) {
this.fName = name;
}
-
+
public String getName() {
return fName;
}
@@ -61,7 +62,7 @@
protected void setDeclaringTypeQualifiedName (String declaringTypeQualifiedName) {
this.fDeclaringTypeQualifiedName = declaringTypeQualifiedName;
}
-
+
public String getDeclaringTypeQualifiedName() {
return fDeclaringTypeQualifiedName;
}
@@ -69,11 +70,11 @@
protected void setModifiers (int modifiers) {
this.fModifiers = modifiers;
}
-
+
public int getModifiers() {
return fModifiers;
}
-
+
public boolean isPublic() {
return Modifier.isPublic(fModifiers);
}
@@ -81,25 +82,24 @@
public boolean isStatic() {
return Modifier.isStatic(fModifiers);
}
-
+
public boolean isJavaLangObject() {
return "java.lang.Object".equals(getDeclaringTypeQualifiedName());
}
-
+
abstract public IType getMemberType();
-
+
abstract public IJavaElement getJavaElement();
-
}
public static class TypeInfo extends MemberInfo {
IType fType;
-
+
public TypeInfo(IType type) throws JavaModelException {
super(type.getDeclaringType(), (type.getDeclaringType() == null ? null : type.getDeclaringType().getFullyQualifiedName()), type.getFullyQualifiedName(), type.getFlags());
this.fType = type;
}
-
+
public IType getType() {
return fType;
}
@@ -114,40 +114,45 @@
return getType();
}
}
-
+
public static class FieldInfo extends MemberInfo {
-
private String fTypeQualifiedName;
+ private String[] fParametersOfReturnType;
+ private IType fType;
- public FieldInfo(IType sourceType, String declaringTypeQualifiedName, String name, int modifiers, String typeQualifiedName) {
+ public FieldInfo(IType sourceType, String declaringTypeQualifiedName, String name, int modifiers, String typeQualifiedName, String[] parametersOfReturnType) {
super(sourceType, declaringTypeQualifiedName, name, modifiers);
setTypeQualifiedName(typeQualifiedName);
+ setParametersOfReturnType(parametersOfReturnType);
}
-
+
public FieldInfo(IField field) throws JavaModelException {
this (field.getDeclaringType(), (field.getDeclaringType() == null ? null : field.getDeclaringType().getFullyQualifiedName()),
field.getElementName(),
field.getFlags(),
- EclipseJavaUtil.getMemberTypeAsString(field));
+ Signature.toString(Signature.getTypeErasure(field.getTypeSignature())),
+ getQualifiedClassNamesFromSignatureArray(Signature.getTypeArguments(field.getTypeSignature())));
}
-
+
protected void setTypeQualifiedName(String typeQualifiedName) {
fTypeQualifiedName = typeQualifiedName;
}
-
+
public String getTypeQualifiedName() {
return fTypeQualifiedName;
}
-
+
public IType getType() {
- try {
- return getSourceType().getJavaProject().findType(getTypeQualifiedName());
- } catch (JavaModelException e) {
- SeamCorePlugin.getPluginLog().logError(e);
- return null;
+ if(fType==null) {
+ try {
+ fType = getSourceType().getJavaProject().findType(getTypeQualifiedName());
+ } catch (JavaModelException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
}
+ return fType;
}
-
+
public IJavaElement getJavaElement () {
try {
IType declType = getSourceType().getJavaProject().findType(getDeclaringTypeQualifiedName());
@@ -163,37 +168,58 @@
return getType();
}
+ public String[] getParametersOfReturnType() {
+ return fParametersOfReturnType;
+ }
+
+ protected void setParametersOfReturnType(String[] parametersOfReturnType) {
+ fParametersOfReturnType = parametersOfReturnType;
+ }
}
-
+
public static class MethodInfo extends MemberInfo {
- String[] fParameterTypeQualifiedNames;
- String[] fParameterNames;
- String fReturnTypeQualifiedName;
+ private String[] fParameterTypeQualifiedNames;
+ private String[] fParameterNames;
+ private String fReturnTypeQualifiedName;
+ private String[] fParametersOfReturnType;
+ private MemberInfo fParentMember;
+ private String[] fParametersOfDeclaringType;
+ private IType fReturnType;
public MethodInfo(IType sourceType, String declaringTypeQualifiedName, String name,
int modifiers, String[] parameterTypeQualifiedNames,
String[] parameterNames,
- String returnTypeQualifiedName) {
+ String returnTypeQualifiedName,
+ String[] parametersOfReturnType) {
super(sourceType, declaringTypeQualifiedName, name, modifiers);
setParameterTypeQualifiedNames(parameterTypeQualifiedNames);
setParameterNames(parameterNames);
setReturnTypeQualifiedName(returnTypeQualifiedName);
+ setParametersOfReturnType(parametersOfReturnType);
}
- public MethodInfo(IMethod method) throws JavaModelException {
+ public MethodInfo(IMethod method, MemberInfo parentMember) throws JavaModelException {
this (method.getDeclaringType(), (method.getDeclaringType() == null ? null : method.getDeclaringType().getFullyQualifiedName()),
method.getElementName(),
method.getFlags(),
resolveSignatures(method.getDeclaringType(), method.getParameterTypes()),
method.getParameterNames(),
- EclipseJavaUtil.getMemberTypeAsString(method));
+ null,
+ null);
+ String returnTypeSignature = Signature.getReturnType(method.getSignature());
+// String[] signaturesOfParametersOfReturnType = Signature.getTypeArguments(returnTypeSignature);
+// String[] parametersOfReturnType = getQualifiedClassNamesFromSignatureArray(signaturesOfParametersOfReturnType);
+ setReturnTypeQualifiedName(Signature.toString(returnTypeSignature));
+ setParametersOfReturnType(Signature.getTypeArguments(method.getReturnType()));
+ this.fParentMember = parentMember;
+ this.fParametersOfDeclaringType = getTypeErasureFromSignatureArray(method.getDeclaringType().getTypeParameterSignatures());
}
protected void setParameterTypeQualifiedNames(String[] parameterTypeQualifiedNames) {
fParameterTypeQualifiedNames = (parameterTypeQualifiedNames == null ?
new String[0] : parameterTypeQualifiedNames);
}
-
+
public String[] getParameterTypeQualifiedNames() {
return fParameterTypeQualifiedNames;
}
@@ -218,21 +244,22 @@
public int getNumberOfParameters() {
return (getParameterNames() == null ? 0 : getParameterNames().length);
}
-
+
public IType getReturnType() {
- try {
- IType result = getSourceType().getJavaProject().findType(getReturnTypeQualifiedName());
- return result;
- } catch (JavaModelException e) {
- SeamCorePlugin.getPluginLog().logError(e);
- return null;
+ if(fReturnType==null) {
+ try {
+ fReturnType = getSourceType().getJavaProject().findType(getReturnTypeQualifiedName());
+ } catch (JavaModelException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
}
+ return fReturnType;
}
-
+
public boolean isConstructor () {
return getDeclaringTypeQualifiedName().equals(getName());
}
-
+
public boolean isGetter() {
return (getName().startsWith("get") && !getName().equals("get")) || getName().startsWith("is");
}
@@ -246,13 +273,21 @@
return getReturnType();
}
+ public String[] getParametersOfReturnType() {
+ return fParametersOfReturnType;
+ }
+
+ protected void setParametersOfReturnType(String[] parametersOfReturnType) {
+ fParametersOfReturnType = parametersOfReturnType;
+ }
+
@Override
public IJavaElement getJavaElement () {
try {
IType declType = getSourceType().getJavaProject().findType(getDeclaringTypeQualifiedName());
-
+
IMethod[] allMethods = declType.getMethods();
-
+
// filter methods by name
List<IMethod> methods = new ArrayList<IMethod>();
for (int i = 0; allMethods != null && i < allMethods.length; i++) {
@@ -264,7 +299,7 @@
return null;
if (methods.size() == 1)
return methods.get(0);
-
+
// filter methods by number of parameters
List<IMethod> filteredMethods = new ArrayList<IMethod>();
for (IMethod method : methods) {
@@ -275,9 +310,9 @@
return null;
if (filteredMethods.size() == 1)
return filteredMethods.get(0);
-
+
methods = filteredMethods;
-
+
// filter methods by parameter types
for(IMethod method : methods) {
String[] methodParameterTypes =
@@ -316,31 +351,44 @@
case CompletionProposal.FIELD_REF:
{
char[] declarationSignature = proposal.getDeclarationSignature();
- char[] signature = proposal.getSignature();
- String type = String.valueOf(Signature.toCharArray(signature));
String declarationType = String.valueOf(Signature.toCharArray(declarationSignature));
+
+ char[] fullSignature = proposal.getSignature();
+ String type = String.valueOf(Signature.toCharArray(Signature.getTypeErasure(fullSignature)));
+ char[][] signaturesOfParametersOfType = Signature.getTypeArguments(fullSignature);
+ String[] parametersOfType = getQualifiedClassNameFromCharArray(signaturesOfParametersOfType);
+
FieldInfo info = new FieldInfo(TypeInfoCollector.this.fType,
declarationType,
String.valueOf(proposal.getName()), proposal.getFlags(),
- type);
+ type,
+ parametersOfType);
fFields.add(info);
}
break;
case CompletionProposal.METHOD_REF:
{
- char[][] parameterNames = proposal.findParameterNames(null);
+ String[] parameterNames = convertToStringArray(proposal.findParameterNames(null));
+
char[] declarationSignature = proposal.getDeclarationSignature();
+ String declarationType = String.valueOf(Signature.toCharArray(Signature.getTypeErasure(declarationSignature)));
+
char[] signature = proposal.getSignature();
char[][] parametesSignatures = Signature.getParameterTypes(signature);
- String returnType = String.valueOf(Signature.toCharArray(Signature.getReturnType(signature)));
- String declarationType = String.valueOf(Signature.toCharArray(declarationSignature));
+ String[] parametersTypes = getQualifiedClassNameFromCharArray(parametesSignatures);
+ char[] fullReturnTypeSignature = Signature.getReturnType(signature);
+ String returnType = String.valueOf(Signature.toCharArray(Signature.getTypeErasure(fullReturnTypeSignature)));
+ char[][] signaturesOfParametersOfReturnType = Signature.getTypeArguments(fullReturnTypeSignature);
+ String[] parametersOfReturnType = getQualifiedClassNameFromCharArray(signaturesOfParametersOfReturnType);
+
MethodInfo info = new MethodInfo(TypeInfoCollector.this.fType,
declarationType,
String.valueOf(proposal.getName()), proposal.getFlags(),
- getQualifiedClassNameFromCharArray(parametesSignatures),
- convertToStringArray(parameterNames),
- returnType);
+ parametersTypes,
+ parameterNames,
+ returnType,
+ parametersOfReturnType);
fMethods.add(info);
}
break;
@@ -358,14 +406,15 @@
}
};
- public TypeInfoCollector(IType type) {
- this.fType = type;
+ public TypeInfoCollector(MemberInfo member) {
+ this.fMember = member;
+ this.fType = member.getMemberType();
}
-
+
public IType getType() {
return this.fType;
}
-
+
public void collectInfo() {
if (fMethods == null) {
fMethods = new ArrayList<MethodInfo>();
@@ -383,7 +432,6 @@
return;
try {
fType.codeComplete("".toCharArray(), -1, 0, new char[0][0], new char[0][0], new int[0], false, fRequestor);
-
IType binType = fType;
while (binType != null) {
IMethod[] binMethods = binType.getMethods();
@@ -391,7 +439,7 @@
if (binMethods[i].isConstructor()) continue;
MethodInfo[] infos = findMethodInfos(binMethods[i]);
if (infos == null || infos.length == 0) {
- fMethods.add(new MethodInfo(binMethods[i]));
+ fMethods.add(new MethodInfo(binMethods[i], fMember));
}
}
binType = getSuperclass(binType);
@@ -421,9 +469,10 @@
}
}
- public static boolean isMap(IType type) {
+ public static boolean isMapOrNotParameterizedCollection(IType type) {
try {
- return isInstanceofType(type, "java.util.Map");
+ String name = type.getFullyQualifiedParameterizedName();
+ return isInstanceofType(type, "java.util.Map") || (isInstanceofType(type, "java.util.Collection") && name.indexOf('<')==-1);
} catch (JavaModelException e) {
return false;
}
@@ -451,13 +500,15 @@
"size", Modifier.PUBLIC,
new String[0],
new String[0],
- "int"));
+ "int",
+ new String[0]));
fMethods.add(new MethodInfo(fType,
fType.getFullyQualifiedName(),
"isEmpty", Modifier.PUBLIC,
new String[0],
new String[0],
- "boolean"));
+ "boolean",
+ new String[0]));
}
private static IType getSuperclass(IType type) throws JavaModelException {
@@ -476,7 +527,6 @@
return null;
}
-
public MethodInfo[] findMethodInfos(IMethod iMethod) {
List<MethodInfo> methods = new ArrayList<MethodInfo>();
@@ -489,9 +539,11 @@
if (methods.isEmpty())
return new MethodInfo[0];
+ EclipseJavaUtil.getMemberTypeAsString(iMethod);
+
if (methods.size() == 1)
return methods.toArray(new MethodInfo[0]);
-
+
// filter methods by number of parameters
List<MethodInfo> filteredMethods = new ArrayList<MethodInfo>();
for (MethodInfo method : methods) {
@@ -502,9 +554,9 @@
return new MethodInfo[0];
if (filteredMethods.size() == 1)
return filteredMethods.toArray(new MethodInfo[0]);
-
+
methods = filteredMethods;
-
+
// filter methods by parameter types
filteredMethods = new ArrayList<MethodInfo>();
for(MethodInfo method : methods) {
@@ -530,7 +582,7 @@
}
return filteredMethods.toArray(new MethodInfo[0]);
}
-
+
/**
* Returns the methods for the type specified
*
@@ -546,7 +598,7 @@
}
return methods;
}
-
+
/**
* Returns the method presentation strings for the type specified
*
@@ -561,7 +613,7 @@
continue;
MethodInfo method = (MethodInfo)info;
-
+
StringBuffer name = new StringBuffer(method.getName());
// Add method as 'foo'
@@ -594,7 +646,7 @@
&& (info.isGetter() || info.isSetter()))
properties.add(info);
}
-
+
/*
* The following code was excluded due to the following issue:
*
@@ -607,11 +659,10 @@
properties.add(info);
}
*/
-
+
return properties;
}
-
-
+
/**
* Returns the property presentation strings for the type specified
*
@@ -620,7 +671,7 @@
public Set<String> getPropertyPresentations() {
return getPropertyPresentations(null);
}
-
+
/**
* Returns the property presentation strings for the type specified
*
@@ -669,34 +720,33 @@
}
return properties;
}
-
+
public static MemberInfo createMemberInfo(IMember member) {
-
try {
if (member instanceof IType)
return new TypeInfo((IType)member);
else if (member instanceof IField)
return new FieldInfo((IField)member);
else if (member instanceof IMethod)
- return new MethodInfo((IMethod)member);
+ return new MethodInfo((IMethod)member, null);
} catch (JavaModelException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
-
+
return null;
}
-
+
static String[] resolveSignatures (IType type, String[] signatures) {
if (signatures == null || signatures.length == 0)
return new String[0];
-
+
String[] resolvedSignatures = new String[signatures.length];
for (int i = 0; i < signatures.length; i++) {
resolvedSignatures[i] = EclipseJavaUtil.resolveTypeAsString(type, signatures[i]);
}
return resolvedSignatures;
}
-
+
static String[] convertToStringArray(char[][] names) {
if (names == null || names.length == 0)
return new String[0];
@@ -707,24 +757,24 @@
return sNames;
}
- static String[] getClassNameFromCharArray (char[][] packageNames, char[][] classNames) {
- if (packageNames == null || packageNames.length == 0)
+ static String[] getTypeErasureFromSignatureArray(String[] signatures) {
+ if (signatures == null || signatures.length == 0)
return new String[0];
- String[] qualifiedNames = new String[packageNames.length];
- for (int i = 0; i < qualifiedNames.length; i++) {
- qualifiedNames[i] = getQualifiedClassNameFromChars(packageNames[i], classNames[i]);
+ String[] result = new String[signatures.length];
+ for (int i = 0; i < signatures.length; i++) {
+ result[i] = Signature.getTypeErasure(signatures[i]);
}
- return qualifiedNames;
+ return result;
}
- static String[] getQualifiedClassNameFromCharArray (char[][] packageNames, char[][] classNames) {
- if (packageNames == null || packageNames.length == 0)
+ static String[] getQualifiedClassNamesFromSignatureArray(String[] signatureTypes) {
+ if (signatureTypes == null || signatureTypes.length == 0)
return new String[0];
- String[] qualifiedNames = new String[packageNames.length];
- for (int i = 0; i < qualifiedNames.length; i++) {
- qualifiedNames[i] = getQualifiedClassNameFromChars(packageNames[i], classNames[i]);
+ String[] qualifiedTypes = new String[signatureTypes.length];
+ for (int i = 0; i < signatureTypes.length; i++) {
+ qualifiedTypes[i] = Signature.toString(signatureTypes[i]);
}
- return qualifiedNames;
+ return qualifiedTypes;
}
static String[] getQualifiedClassNameFromCharArray(char[][] signatureTypes) {
@@ -736,20 +786,4 @@
}
return qualifiedTypes;
}
-
- public static String getQualifiedClassNameFromChars (char[] packageName, char[] className) {
- StringBuffer qualifiedName = new StringBuffer();
- if (packageName != null && packageName.length > 0)
- qualifiedName.append(packageName).append('.');
- qualifiedName.append(className);
- return qualifiedName.toString();
- }
-
- public static String getQualifiedClassName (String packageName, String className) {
- StringBuffer qualifiedName = new StringBuffer();
- if (packageName != null && packageName.length() > 0)
- qualifiedName.append(packageName).append('.');
- qualifiedName.append(className);
- return qualifiedName.toString();
- }
}
\ No newline at end of file
16 years, 7 months
JBoss Tools SVN: r6318 - trunk/as/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-02-14 12:06:42 -0500 (Thu, 14 Feb 2008)
New Revision: 6318
Modified:
trunk/as/docs/reference/en/modules/perspective.xml
trunk/as/docs/reference/en/modules/quick_start.xml
trunk/as/docs/reference/en/modules/runtimes_servers.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-199 - making changes according to remarks oF Svetlana Mukhina
Modified: trunk/as/docs/reference/en/modules/perspective.xml
===================================================================
--- trunk/as/docs/reference/en/modules/perspective.xml 2008-02-14 17:05:04 UTC (rev 6317)
+++ trunk/as/docs/reference/en/modules/perspective.xml 2008-02-14 17:06:42 UTC (rev 6318)
@@ -44,9 +44,9 @@
</figure>
- <para>The view's toolbar shown below provides quick access to starting a server (in debug
- mode, run mode, or profile mode), restarting a server, stopping a server, or publishing
- to a server.</para>
+ <para>The view's toolbar provides quick access to starting a server (in debug mode, run
+ mode, or profile mode), restarting a server, stopping a server, or publishing to a
+ server.</para>
<figure>
<title>The JBoss Server View Toolbar</title>
<mediaobject>
@@ -132,14 +132,14 @@
</tgroup>
</table>
- <para>By double-clicking on any server an editor window will appear allowing you to edit
- parts of that server. The editor will also link you to modify that server's launch
- configuration, set command line arguments, and other things that are relevant to
- launching the server.</para>
+ <para>By double-clicking on any server, an editor window will appear allowing you to
+ edit parts of that server. The editor will also link you to modify that server's
+ launch configuration, set command line arguments, and other things that are relevant
+ to launching the server.</para>
- <para>On the figure below you can see that a username/password is available in the UI
- when configuring the server. If you get an SecurityException when trying to launch
- the server, it is most likely because your server is protected and hence you need to
+ <para>On the figure you can see that a username/password is available in the UI when
+ configuring the server. If you get an SecurityException when trying to launch the
+ server, it is most likely because your server is protected and hence you need to
fill the username/password fields with appropriate values.</para>
<figure>
@@ -151,9 +151,8 @@
</mediaobject>
</figure>
- <para>As the JBoss servers have few properties to edit in the editor, a shortcut to the
- launch configuration has been provided in the context menu when right-clicking on a
- server.</para>
+ <para>As the JBoss servers have few properties to edit here, a shortcut to the launch
+ configuration has been provided in the context menu when right-clicking on a server.</para>
<figure>
<title>Launch Configuration</title>
@@ -189,7 +188,7 @@
<para>New Server</para>
</entry>
<entry>
- <para>The option allows to define a new server.</para>
+ <para>The option allows to define a new server</para>
</entry>
</row>
@@ -198,8 +197,7 @@
<para>Delete</para>
</entry>
<entry>
- <para>Standard option that allows to delete the chosen
- server.</para>
+ <para>Standard option that allows to delete the chosen server</para>
</entry>
</row>
@@ -208,7 +206,7 @@
<para>Start</para>
</entry>
<entry>
- <para>The action for stating a server in a run mode.</para>
+ <para>The action for stating a server in a run mode</para>
</entry>
</row>
@@ -217,7 +215,7 @@
<para>Debug</para>
</entry>
<entry>
- <para>The action for stating a server in a debug mode.</para>
+ <para>The action for stating a server in a debug mode</para>
</entry>
</row>
@@ -226,7 +224,7 @@
<para>Stop</para>
</entry>
<entry>
- <para>The action for stopping a declared server.</para>
+ <para>The action for stopping a declared server</para>
</entry>
</row>
@@ -236,7 +234,7 @@
</entry>
<entry>
<para>The action for synching the publish information between the
- server and workspace.</para>
+ server and workspace</para>
</entry>
</row>
@@ -245,7 +243,7 @@
<para>Clean</para>
</entry>
<entry>
- <para>The option for complete redeploying the resources.</para>
+ <para>The option for complete redeploying the resources</para>
</entry>
</row>
@@ -255,7 +253,7 @@
</entry>
<entry>
<para>The option provides a dialog for running Twiddle commands
- against the Twiddle Server.</para>
+ against the Twiddle Server</para>
</entry>
</row>
@@ -265,7 +263,7 @@
</entry>
<entry>
<para>The option that provides an editor for editing launch
- configuration properties of the proper server.</para>
+ configuration properties of the proper server</para>
</entry>
</row>
@@ -275,7 +273,7 @@
</entry>
<entry>
<para>The option allows to publish a new project to the server (if
- its type is supported).</para>
+ its type is supported)</para>
</entry>
</row>
</tbody>
@@ -284,6 +282,12 @@
<para>Mentioned above Twiddle is a JMX library that comes with JBoss, and you can use it
to access any variables that exposed via the JBoss JMX interfaces.</para>
+
+ <section>
+ <title>Relevant Resources Links</title>
+ <para>Find more about XPath in the <ulink url="http://www.w3.org/TR/xpath20/">XPath
+ Documentation</ulink>.</para>
+ </section>
</section>
<section>
@@ -372,11 +376,11 @@
<property>XML Configuration</property>
</emphasis> category allows you to quickly browse to descriptor files in your
server's deploy directory and check or change the values. Its use requires the
- <property>Properties view</property>. Basically, <emphasis>
+ <property>Properties view</property>. Basically, <emphasis>
<property>XML Configuration</property>
</emphasis> includes XML XPaths where a xpath is a path used to access some specific
part of an xml document. </para>
-
+
<figure>
<title>XML Configuration and Properties View</title>
<mediaobject>
@@ -386,8 +390,10 @@
</mediaobject>
</figure>
- <note><para>You are assumed to be familiar with XPath. If not, we highly suggested that you
- look through an appropriate manual or tutorial on the topic.</para></note>
+ <note>
+ <para>You are assumed to be familiar with XPath. If not, we highly suggested that
+ you look through an appropriate manual or tutorial on the topic.</para>
+ </note>
<para>The <emphasis>
<property>XML Configuration</property>
@@ -613,7 +619,8 @@
<title>Creating a FileSet</title>
<para>To create a new fileset, you click on an available target location such as an
archive, a nested archive, or a folder within an archive, and select <emphasis>
- <property>New Fileset</property></emphasis>.</para>
+ <property>New Fileset</property>
+ </emphasis>.</para>
<figure>
<title>Adding a New FileSet</title>
Modified: trunk/as/docs/reference/en/modules/quick_start.xml
===================================================================
--- trunk/as/docs/reference/en/modules/quick_start.xml 2008-02-14 17:05:04 UTC (rev 6317)
+++ trunk/as/docs/reference/en/modules/quick_start.xml 2008-02-14 17:06:42 UTC (rev 6318)
@@ -1,50 +1,55 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="quick_start">
<title>Quick Start with JBoss Server</title>
-
- <para>This chapter covers the basics of working with the JBoss server. If you already have installed JBoss server and runtime you can quickly learn
- how to configure, start, stop the server, to know deployment and archiving processes. How to install runtimes and servers read in the
- <link linkend="runtimes_servers">Runtimes and Servers in the JBoss AS plugin</link> chapter.</para>
-
- <para>To start working with JBoss AS, select a <property>JBoss AS Perspective</property> via
- <emphasis><property>Window > Open Perspective > Other > JBoss AS</property>.</emphasis></para>
-
-<section id="starting">
- <title>Starting JBoss server</title>
-
- <para>Starting JBoss server is quite simple. You can control the server behaviour with the help of a special toolbar in the
- <property>JBoss Server View</property> where you could <property>start</property> it in a regular or debug mode,
- <property>stop</property> it or <property>restart</property> it, <property>publish</property> to the server.</para>
-
- <figure>
- <title>JBoss Server Toolbar</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To launch the server click the green-with-white-arrow icon on the <property>JBoss Server View </property>or right click server name in this view and
- select <emphasis><property>Start</property></emphasis>. If this view is not open, select <emphasis><property>Window > Show View > Other > Server >
- JBoss Server View</property>.</emphasis></para>
-
- <figure>
- <title>Start JBoss Server</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/quick_start/quick_start2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
-</section>
-
+
+ <para>This chapter covers the basics of working with the JBoss server. If you already have
+ installed JBoss server and runtime you can quickly learn how to configure, start, stop the
+ server, to know deployment and archiving processes. How to install runtimes and servers read in
+ the <link linkend="runtimes_servers">Runtimes and Servers in the JBoss AS plugin</link> chapter.</para>
+
+ <para>To start working with JBoss AS, select a <property>JBoss AS Perspective</property> via
+ <emphasis><property>Window > Open Perspective > Other > JBoss AS</property>.</emphasis></para>
+
+ <section id="starting">
+ <title>Starting JBoss server</title>
+
+ <para>Starting JBoss server is quite simple. You can control the server behaviour with the help
+ of a special toolbar in the <property>JBoss Server View</property> where you could
+ <property>start</property> it in a regular or debug mode, <property>stop</property> it or
+ <property>restart</property> it, <property>publish</property> to the server.</para>
+
+ <figure>
+ <title>JBoss Server Toolbar</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To launch the server click the green-with-white-arrow icon on the <property>JBoss Server
+ View </property>or right click server name in this view and select <emphasis>
+ <property>Start</property>
+ </emphasis>. If this view is not open, select <emphasis><property>Window > Show View
+ > Other > Server > JBoss Server View</property>.</emphasis></para>
+
+ <figure>
+ <title>Start JBoss Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
<section id="stopping">
<title>Stopping JBoss Server</title>
-
- <para>To stop the server, click the <property>Stop</property> icon in JBoss Server View or right click the server name and press <property>Stop</property>.</para>
-
+
+ <para>To stop the server, click the <property>Stop</property> icon in JBoss Server View or right
+ click the server name and press <property>Stop</property>.</para>
+
<figure>
<title>Stop JBoss Server</title>
<mediaobject>
@@ -53,19 +58,23 @@
</imageobject>
</mediaobject>
</figure>
-
- <para>When the server is stopped you will see <property>Stopped</property> next to its name in the State column.</para>
+
+ <para>When the server is stopped you will see <property>Stopped</property> next to its name in
+ the State column.</para>
<para>Learn more about the JBoss Server View <link linkend="JBossServerView">here</link>.</para>
</section>
-
+
<section id="archiving">
-
+
<title>Project Archiving</title>
-
- <para>JBoss Tools comes with our own archives tool. The Project Archives plugin consists primarily of a view to set up each packaging configuration
- (<emphasis><property>Window > Show View > Other > JBoss Tools > Project archives</property></emphasis>).</para>
- <para>Right clicking in the Project archives view you can create War, EJB War or EAR archive.</para>
-
+
+ <para>JBoss Tools comes with our own archives tool. The Project Archives plugin consists
+ primarily of a view to set up each packaging configuration (<emphasis>
+ <property>Window > Show View > Other > JBoss Tools > Project archives</property>
+ </emphasis>).</para>
+ <para>Right clicking in the <property>Project Archives View</property> you can create War, EJB
+ War or EAR archive.</para>
+
<figure>
<title>Archive Creating</title>
<mediaobject>
@@ -74,10 +83,11 @@
</imageobject>
</mediaobject>
</figure>
-
- <para>Using the context menu on the item you can initiate a full <property>build</property> on archive, <property>edit</property>,
- <property>delete</property> or <property>publish</property> it.</para>
-
+
+ <para>Using the context menu on the item you can initiate a full <property>build</property> on
+ archive, <property>edit</property>, <property>delete</property> or
+ <property>publish</property> it.</para>
+
<figure>
<title>Context Menu on the Item</title>
<mediaobject>
@@ -86,22 +96,32 @@
</imageobject>
</mediaobject>
</figure>
-
- <para>Learn more about the <property>Project archives View</property> <link linkend="Project_archivesView">here</link>.</para>
-
+
+ <para>Learn more about the <property>Project Archives View</property>
+ <link linkend="Project_archivesView">here</link>.</para>
+
</section>
<section id="deployment">
<title>Deploying an Application to a Server</title>
-
+
<para>There are two times to deploy your application:</para>
<itemizedlist>
- <listitem><para>While creating it</para></listitem>
- <listitem><para>After it already exists</para></listitem>
+ <listitem>
+ <para>While creating it</para>
+ </listitem>
+ <listitem>
+ <para>After it already exists</para>
+ </listitem>
</itemizedlist>
-
- <para>When you create a new project (Seam, JSF or Struts) with the New Project or Import Project wizards, the one of wizards steps
- has a Target Runtime and Target Server sections. You can deploy the application through the appropriate selection in these sections.</para>
-
+
+ <para>When you create a new project (Seam, JSF or Struts) with the New Project or Import Project
+ wizards, the one of wizards steps has a <emphasis>
+ <property>Target Runtime</property>
+ </emphasis> and <emphasis>
+ <property>Target Server</property>
+ </emphasis> sections. You can deploy the application through the appropriate selection in
+ these sections.</para>
+
<figure>
<title>Runtime and Server Sections in the New Project Wizard</title>
<mediaobject>
@@ -110,10 +130,11 @@
</imageobject>
</mediaobject>
</figure>
-
- <para>You can deploy an existing application to a server by right-clicking the target defined server in the <property>JBoss Servers View</property>
- and then selecting <property>Add and Remove Projects</property> from the context menu.</para>
-
+
+ <para>You can deploy an existing application to a server by right-clicking the target defined
+ server in the <property>JBoss Servers View</property> and then selecting <property>Add and
+ Remove Projects</property> from the context menu.</para>
+
<figure>
<title>Add and Remove Projects From the Context Menu.</title>
<mediaobject>
@@ -122,10 +143,11 @@
</imageobject>
</mediaobject>
</figure>
-
- <para>If this application is not assigned to a server, it will be in the left-hand available projects list. Clicking on the <property>Add ></property> button will add it to
- the right-hand configured projects list and deploy the application to this server.</para>
-
+
+ <para>If this application is not assigned to a server, it will be in the left-hand available
+ projects list. Clicking on the <property>Add ></property> button will add it to the right-hand
+ configured projects list and deploy the application to this server.</para>
+
<figure>
<title>Modifying The Projects that are Configured on the Server</title>
<mediaobject>
@@ -134,8 +156,9 @@
</imageobject>
</mediaobject>
</figure>
-
-
- </section>
-
-</chapter>
+
+
+ </section>
+ <para>Here, we have just performed the basic steps you should know to quick start with JBoss
+ server. In fact, there are more functionalities which you can make use of. Further we will talk about them in detail.</para>
+</chapter>
Modified: trunk/as/docs/reference/en/modules/runtimes_servers.xml
===================================================================
--- trunk/as/docs/reference/en/modules/runtimes_servers.xml 2008-02-14 17:05:04 UTC (rev 6317)
+++ trunk/as/docs/reference/en/modules/runtimes_servers.xml 2008-02-14 17:06:42 UTC (rev 6318)
@@ -14,17 +14,16 @@
<para>In this chapter we will discuss how to install runtimes and servers.</para>
- <para>The JBoss AS plugin makes use of WTP. This includes starting and stopping servers in run or
+ <para>First of all it's necessary to mention that the JBoss AS plugin makes use of WTP. This includes starting and stopping servers in run or
debug mode. It also includes targeting WTP projects, such as Dynamic Web Projects, to certain
server runtimes in order to ensure that the proper jars from a specific server are added to the
project's classpath properly.</para>
- <para>In order to get started creating, running, and debugging J2EE applications, we must start
- with creating our <property>runtime</property> and <property>server</property> instances.</para>
+ <para>In order to get started creating, running, and debugging J2EE applications, we should create our <property>runtime</property> and <property>server</property> instances.</para>
<section>
<title>Runtimes</title>
<para>In JBoss Tools, the main purpose of Server Runtimes is to point to a server installation
- somewhere on disk. In our case, this will be a JBoss installation, and it can than be used for
+ somewhere on disk. In our case, this will be a JBoss installation, and it can then be used for
two primary purposes:</para>
<itemizedlist>
<listitem>
@@ -57,7 +56,7 @@
<para>To create a JBoss runtime click <emphasis>
<property>Add</property>
- </emphasis> button and choose necessary type of runtime from the appeared dialog. </para>
+ </emphasis> button and choose a necessary type of runtime from the appeared dialog. </para>
<figure>
<title>Adding a Runtime</title>
@@ -68,7 +67,7 @@
</mediaobject>
</figure>
- <para>As seen above, <property>JBoss Tools</property> provides
+ <para>As shown on the above figure, <property>JBoss Tools</property> provides
its own updated and supported adapters such as JBoss 3.2, 4.0, and 4.2.
You'll also note a Deploy-Only Runtime type. This type provides no classpath for WTP
projects. It is used solely by its server type for the purpose of setting up a deploy
@@ -109,7 +108,7 @@
<para>Name</para>
</entry>
<entry>
- <para>The name of a new Runtime for chosen server. We suggest that you
+ <para>The name of a new Runtime for a chosen server. We suggest that you
don't leave a default value. It's better to give descriptive
names that will help to distinguish one runtime from another.</para>
</entry>
@@ -132,7 +131,7 @@
<para>The proper Java Runtime Environment. Because of the open-source nature of
JBoss, a user is likely to want to modify and repackage some of the
configuration-specific jboss jars and create their own configuration. Thus, rather
- than forcing the user to copy his entire JBoss installation, the structure of the
+ than forcing you to copy his entire JBoss installation, the structure of the
wizard allows to create only a new configuration instead.</para>
</entry>
</row>
@@ -142,7 +141,7 @@
<para>Configuration</para>
</entry>
<entry>
- <para>The lists of configurations (all, default, minimal) that is updated as soon as you browse to a valid
+ <para>The list of configurations (all, default, minimal) that is updated as soon as you browse to a valid
runtime installation folder. After the runtime is created the configuration
becomes an unchanging property of that runtime. To
compile against a different configuration's jars, you will need to create a new runtime from
@@ -154,13 +153,6 @@
</tgroup>
</table>
- <!--para>Once the runtime is created, the configuration is an unchanging property of that
- runtime. This is because many of the jars necessary to provide for classpaths, such as the
- ejb3 jar locations or the servlet jar locations, are located in deploy directories of each
- configurations (depending on which version of JBoss is being used). Because of this, to
- compile against a different configuration's jars, you will need to create a new runtime from
- that configuration.</para-->
-
<para>As a result of having each runtime represent a specific configuration rather than the
server installation as a whole, it is very likely you'll create several different runtimes
to test each of your configurations. It becomes important to ensure your runtimes, and later
@@ -222,8 +214,8 @@
linkend="add_runtime_figure">the previous section</link> will ask you to create the
associated runtime.</para>
<para>Either way, after targeting your server to a runtime, the final screen in this wizard is
- largely confirmational, giving the user a chance to verify that he's selected the
- appropriate runtime. It also allows the user to name the server appropriately. </para>
+ largely confirmational, giving you a chance to verify that you've selected the
+ appropriate runtime. It also allows to name the server appropriately. </para>
<figure>
<title>Installed Server Runtime Environments</title>
16 years, 7 months
JBoss Tools SVN: r6317 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-02-14 12:05:04 -0500 (Thu, 14 Feb 2008)
New Revision: 6317
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1759 Empty CA if there is no space between inverted commas in atribute value.
The fix is applied on the version 2.1.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java 2008-02-14 16:00:11 UTC (rev 6316)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/RedHatJSPContentAssistProcessor.java 2008-02-14 17:05:04 UTC (rev 6317)
@@ -665,9 +665,11 @@
String text = contentAssistRequest.getText();
String matchString = contentAssistRequest.getMatchString();
- if (matchString.length() > StringUtils.strip(text).length() &&
- ( (matchString.startsWith("\"") && matchString.endsWith("\""))
- || (matchString.startsWith("'") && matchString.endsWith("\"")))) {
+ if (matchString.length() > StringUtils.strip(text).length() &&
+ ( (matchString.startsWith("\"") && matchString.endsWith("\"") &&
+ (matchString.indexOf("\"") != matchString.lastIndexOf("\"")))
+ || (matchString.startsWith("'") && matchString.endsWith("\"") &&
+ (matchString.indexOf("\"") != matchString.lastIndexOf("\""))))) {
return;
}
16 years, 7 months
JBoss Tools SVN: r6316 - in trunk/vpe/plugins/org.jboss.tools.vpe: src/org/jboss/tools/vpe/editor/util and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-02-14 11:00:11 -0500 (Thu, 14 Feb 2008)
New Revision: 6316
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableElements.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1744
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java 2008-02-14 14:42:05 UTC (rev 6315)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableColumnCreator.java 2008-02-14 16:00:11 UTC (rev 6316)
@@ -60,6 +60,7 @@
info.addSourceChild(columnElements.getHeader());
}
creatorInfo.addChildrenInfo(info);
+ setCellClass(cell, getColumnAttrValue(sourceNode, "headerClass"));
visualColumnElements.setHeaderCell(cell);
cell = VpeDataTableElements.makeCell(visualDataTableElements.getColumnsFooterRow(), index, HTML.TAG_TD, visualDocument);
@@ -68,6 +69,7 @@
info.addSourceChild(columnElements.getFooter());
}
creatorInfo.addChildrenInfo(info);
+ setCellClass(cell, getColumnAttrValue(sourceNode, "footerClass"));
visualColumnElements.setFooterCell(cell);
cell = VpeDataTableElements.makeCell(visualDataTableElements.getBodyRow(), index, HTML.TAG_TD, visualDocument);
@@ -144,4 +146,22 @@
int ind = name2.indexOf(":");
return ind < name2.length() && name1.equals(name2.substring(ind >= 0 ? ind + 1 : 0));
}
+
+ private void setCellClass(nsIDOMNode cell, String className) {
+ if (cell != null) {
+ if (className != null && className.trim().length() > 0) {
+ ((nsIDOMElement)cell).setAttribute("class", className);
+ }
+ }
+ }
+
+ private String getColumnAttrValue(Node columnNode, String attrName) {
+ if (columnNode != null) {
+ Node attr = columnNode.getAttributes().getNamedItem(attrName);
+ if (attr != null) {
+ return attr.getNodeValue();
+ }
+ }
+ return null;
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableCreator.java 2008-02-14 14:42:05 UTC (rev 6315)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableCreator.java 2008-02-14 16:00:11 UTC (rev 6316)
@@ -104,6 +104,7 @@
}
}
}
+
}
public VpeCreatorInfo create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument, nsIDOMElement visualElement, Map visualNodeMap) {
@@ -115,6 +116,20 @@
VpeCreatorInfo creatorInfo = new VpeCreatorInfo(visualTable);
nsIDOMElement section = null, row = null, cell = null;
+
+ nsIDOMElement caption;
+ if (true || sourceElements.hasTableCaption()) {
+ caption = visualDocument.createElement(HTML.TAG_CAPTION);
+ visualElements.setTableCaptionTag(caption);
+ if (sourceElements.getTableCaption() != null) {
+ VpeChildrenInfo info = new VpeChildrenInfo(caption);
+ info.addSourceChild(sourceElements.getTableCaption());
+ creatorInfo.addChildrenInfo(info);
+ }
+ }
+ visualTable.appendChild(caption);
+ visualElements.setCaption(caption);
+
if (true || sourceElements.hasHeaderSection()) {
section = visualDocument.createElement(HTML.TAG_THEAD);
if (true || sourceElements.hasTableHeader()) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableElements.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableElements.java 2008-02-14 14:42:05 UTC (rev 6315)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeDataTableElements.java 2008-02-14 16:00:11 UTC (rev 6316)
@@ -30,6 +30,7 @@
// }
public static class SourceDataTableElements {
+ private Node tableCaption;
private Node tableHeader;
private List<SourceColumnElements> columns;
private Node tableFooter;
@@ -52,6 +53,8 @@
tableHeader = node;
} else if (!isColumn && isFacet && attrName != null && "footer".equals(attrName.getNodeValue())) {
tableFooter = node;
+ } else if (!isColumn && isFacet && attrName != null && "caption".equals(attrName.getNodeValue())) {
+ tableCaption = node;
} else if (isColumn) {
if (columns == null) columns = new ArrayList<SourceColumnElements>();
columns.add(new SourceColumnElements(node));
@@ -98,6 +101,10 @@
public boolean hasTableFooter() {
return tableFooter != null;
}
+
+ public boolean hasTableCaption() {
+ return tableCaption != null;
+ }
public boolean hasColumnsHeader() {
for (int i = 0; i < getColumnCount(); i++) {
@@ -130,6 +137,14 @@
public void setTableHeader(Node tableHeader) {
this.tableHeader = tableHeader;
}
+
+ public Node getTableCaption() {
+ return tableCaption;
+ }
+
+ public void setTableCaption(Node tableCaption) {
+ this.tableCaption = tableCaption;
+ }
}
public static class SourceColumnElements {
@@ -229,6 +244,9 @@
}
public static class VisualDataTableElements {
+ private nsIDOMElement caption;
+ private nsIDOMElement tableCaptionTag;
+
private nsIDOMElement header;
private nsIDOMElement tableHeaderRow;
private nsIDOMElement columnsHeaderRow;
@@ -280,6 +298,14 @@
public void setColumnsHeaderRow(nsIDOMElement columnsHeaderRow) {
this.columnsHeaderRow = columnsHeaderRow;
}
+
+ public nsIDOMElement getTableCaptionTag() {
+ return tableCaptionTag;
+ }
+
+ public void setTableCaptionTag(nsIDOMElement tableCaptionTag) {
+ this.tableCaptionTag = tableCaptionTag;
+ }
public nsIDOMElement getFooter() {
return footer;
@@ -296,7 +322,15 @@
public void setHeader(nsIDOMElement header) {
this.header = header;
}
+
+ public nsIDOMElement getCaption() {
+ return caption;
+ }
+ public void setCaption(nsIDOMElement caption) {
+ this.caption = caption;
+ }
+
public nsIDOMElement getTableFooterRow() {
return tableFooterRow;
}
@@ -377,6 +411,7 @@
VpeDataTableElements.getNamedChild(visualParent, HTML.TAG_TFOOT)
);
+ visualDataTableElements.setTableCaptionTag(VpeDataTableElements.getNamedChild(visualDataTableElements.getCaption(), "caption"));
visualDataTableElements.setTableHeaderRow(VpeDataTableElements.getNamedChild(visualDataTableElements.getHeader(), "tr"));
visualDataTableElements.setColumnsHeaderRow(VpeDataTableElements.getNamedChild(visualDataTableElements.getHeader(), "tr", 1));
visualDataTableElements.setBodyRow(VpeDataTableElements.getNamedChild(visualDataTableElements.getBody(), "tr"));
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java 2008-02-14 14:42:05 UTC (rev 6315)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeFacetCreator.java 2008-02-14 16:00:11 UTC (rev 6316)
@@ -34,15 +34,19 @@
public VpeCreatorInfo create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument, nsIDOMElement visualElement, Map visualNodeMap) {
VpeCreatorInfo creatorInfo = null;
- boolean isHeader = false, isFooter = false;
+ boolean isHeader = false;
+ boolean isFooter = false;
+ boolean isCaption = false;
+
Node nameAttr = sourceNode.getAttributes().getNamedItem("name");
if (nameAttr != null) {
String name = nameAttr.getNodeValue();
isHeader = name.equals("header");
isFooter = name.equals("footer");
+ isCaption = name.equals("caption");
}
- if (isHeader || isFooter) {
+ if (isHeader || isFooter || isCaption) {
Node sourceParent = sourceNode.getParentNode();
if (sourceParent != null) {
nsIDOMNode visualParent = null;
@@ -51,9 +55,11 @@
visualParent = pageContext.getDomMapping().getVisualNode(sourceParent);
}
- nsIDOMNode header = null, footer = null;
+ nsIDOMNode header = null;
+ nsIDOMNode footer = null;
+ nsIDOMNode caption = null;
+
if (visualParent != null && visualParent.getNodeName().equalsIgnoreCase("table")) {
-
nsIDOMNodeList children = visualParent.getChildNodes();
long count = children != null ? children.getLength() : 0;
if (count > 0) {
@@ -78,12 +84,17 @@
cell = makeCell(columnsCount, HTML.TAG_TH, visualDocument);
} else if (isFooter) {
cell = makeCell(columnsCount, HTML.TAG_TD, visualDocument);
+ } else if (isCaption) {
+ cell = visualDocument.createElement(HTML.TAG_CAPTION);
}
if (cell != null) {
if (isHeader) {
setCellClass(cell, getTableAttrValue(sourceParent, "headerClass"));
} else if (isFooter) {
setCellClass(cell, getTableAttrValue(sourceParent, "footerClass"));
+ } else if (isCaption) {
+ setCellClass(cell, getTableAttrValue(sourceParent, "captionClass"));
+ setCaptionStyle(cell, getTableAttrValue(sourceParent, "captionStyle"));
}
creatorInfo = new VpeCreatorInfo(cell);
}
@@ -107,6 +118,14 @@
}
}
}
+
+ private void setCaptionStyle(nsIDOMNode cell, String styleName) {
+ if (cell != null) {
+ if (styleName != null && styleName.trim().length() > 0) {
+ ((nsIDOMElement)cell).setAttribute("style", styleName);
+ }
+ }
+ }
private String getTableAttrValue(Node dataTableNode, String attrName) {
if (dataTableNode != null) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2008-02-14 14:42:05 UTC (rev 6315)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeTemplateManager.java 2008-02-14 16:00:11 UTC (rev 6316)
@@ -153,7 +153,7 @@
static final String ATTR_DATATABLE_FOOTER_CLASS = "footerClass";
static final String ATTR_DATATABLE_ROW_CLASSES = "rowClasses";
static final String ATTR_DATATABLE_COLUMN_CLASSES = "columnClasses";
- static final String[] ATTR_DATATABLE_PROPERTIES = {"bgcolor","border","cellpadding","cellspacing","frame","rules","class","style","title"};
+ static final String[] ATTR_DATATABLE_PROPERTIES = {"width", "bgcolor","border","cellpadding","cellspacing","frame","rules","class","style","title"};
public static final String ATTR_LINK_HREF = "href";
public static final String ATTR_LINK_REL = "rel";
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-02-14 14:42:05 UTC (rev 6315)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-02-14 16:00:11 UTC (rev 6316)
@@ -32,6 +32,7 @@
public static final String TAG_TBODY = "TBODY"; //$NON-NLS-1$
public static final String TAG_THEAD = "THEAD"; //$NON-NLS-1$
public static final String TAG_TFOOT = "TFOOT"; //$NON-NLS-1$
+ public static final String TAG_CAPTION = "CAPTION"; //$NON-NLS-1$
public static final String TAG_TH = "TH"; //$NON-NLS-1$
public static final String TAG_TR = "TR"; //$NON-NLS-1$
public static final String TAG_TD = "TD"; //$NON-NLS-1$
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml 2008-02-14 14:42:05 UTC (rev 6315)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml 2008-02-14 16:00:11 UTC (rev 6316)
@@ -935,7 +935,7 @@
<vpe:tag name="h:dataTable" case-sensitive="yes">
<vpe:template children="yes" modify="no">
- <vpe:datatable bgcolor="{@bgcolor}" border="{@border}"
+ <vpe:datatable width="{@width}" bgcolor="{@bgcolor}" border="{@border}"
cellpadding="{@cellpadding}" cellspacing="{@cellspacing}"
columnClasses="{@columnClasses}" footerClass="{@footerClass}" headerClass="{@headerClass}"
rowClasses="{@rowClasses}"
16 years, 7 months
JBoss Tools SVN: r6315 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-02-14 09:42:05 -0500 (Thu, 14 Feb 2008)
New Revision: 6315
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/OpenSeamComponentDialog.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-518
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/OpenSeamComponentDialog.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/OpenSeamComponentDialog.java 2008-02-14 14:35:23 UTC (rev 6314)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/OpenSeamComponentDialog.java 2008-02-14 14:42:05 UTC (rev 6315)
@@ -11,12 +11,16 @@
package org.jboss.tools.seam.ui.wizard;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
import java.util.Comparator;
import java.util.Iterator;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.DialogSettings;
@@ -34,6 +38,7 @@
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.internal.core.SeamComponent;
+import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.SeamUiImages;
import org.jboss.tools.seam.ui.views.SeamReferencedFilter;
@@ -43,17 +48,19 @@
*
*/
public class OpenSeamComponentDialog extends FilteredItemsSelectionDialog {
- private static SeamComponentSelectionHistory history = null;
+ private static final String fileName="OpenSeamComponentHistory.xml";
public OpenSeamComponentDialog(Shell shell) {
super(shell);
- if(history == null)
- history = new SeamComponentSelectionHistory();
+ setSelectionHistory(new SeamComponentSelectionHistory());
- setSelectionHistory(history);
setListLabelProvider(new SeamComponentLabelProvider());
setDetailsLabelProvider(new SeamComponentLabelProvider());
+
+ XMLMemento memento = load();
+ if(memento != null)
+ getSelectionHistory().load(memento);
}
protected Control createExtendedContentArea(Composite parent) {
@@ -63,7 +70,7 @@
protected ItemsFilter createFilter() {
return new SeamComponentFilter();
}
-
+
protected void fillContentProvider(AbstractContentProvider contentProvider,
ItemsFilter itemsFilter, IProgressMonitor progressMonitor)
throws CoreException {
@@ -90,6 +97,24 @@
}
progressMonitor.done();
}
+
+ public XMLMemento load() {
+ XMLMemento memento=null;
+ IPath stateLocation= SeamGuiPlugin.getDefault().getStateLocation().append(fileName);
+ File file= new File(stateLocation.toOSString());
+ if(file.exists()){
+ FileReader reader= null;
+ try {
+ reader = new FileReader(file);
+
+ memento = XMLMemento.createReadRoot(reader);
+ reader.close();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+ return memento;
+ }
protected IDialogSettings getDialogSettings() {
return new DialogSettings(SeamUIMessages.OPEN_SEAM_COMPONENT_DIALOG_NAME);
@@ -174,6 +199,7 @@
}
public class SeamComponentSelectionHistory extends SelectionHistory{
+
public SeamComponentSelectionHistory(){
super();
}
@@ -185,10 +211,14 @@
String componentName = mem.getString("ComponentName");
if(componentName == null) return null;
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
- ISeamComponent component = seamProject.getComponent(componentName);
-
- return component;
+ if(project != null){
+ ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
+ if(seamProject != null){
+ ISeamComponent component = seamProject.getComponent(componentName);
+ return component;
+ }
+ }
+ return null;
}
@Override
@@ -199,6 +229,24 @@
mem.putString("ComponentName", component.getName());
}
+ public void save(IMemento memento) {
+ super.save(memento);
+ if(!(memento instanceof XMLMemento)) return;
+ XMLMemento xmlMemento = (XMLMemento)memento;
+ IPath stateLocation= SeamGuiPlugin.getDefault().getStateLocation().append(fileName);
+ File file= new File(stateLocation.toOSString());
+ FileWriter writer= null;
+ try {
+ writer = new FileWriter(file);
+
+ xmlMemento.save(writer);
+ writer.close();
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+
+
}
public class SeamComponentLabelProvider implements ILabelProvider{
16 years, 7 months
JBoss Tools SVN: r6314 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test: resources/jsfTest/WebContent/pages/JBIDE/788 and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-02-14 09:35:23 -0500 (Thu, 14 Feb 2008)
New Revision: 6314
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/788/templates/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/788/templates/common.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/788/testCAMessageBundlesAndEL.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/WEB-INF/faces-config.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/788/testCAforHtml.html
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE788Test.java
Log:
junit tests for CA http://jira.jboss.com/jira/browse/JBIDE-788
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/WEB-INF/faces-config.xml 2008-02-14 10:51:19 UTC (rev 6313)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/WEB-INF/faces-config.xml 2008-02-14 14:35:23 UTC (rev 6314)
@@ -1,7 +1,15 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xi="http://www.w3.org/2001/XInclude"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
-
-</faces-config>
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+ <managed-bean>
+ <managed-bean-name>user</managed-bean-name>
+ <managed-bean-class>demo.User</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>name</property-name>
+ <value />
+ </managed-property>
+ </managed-bean>
+</faces-config>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/788/templates/common.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/788/templates/common.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/788/templates/common.xhtml 2008-02-14 14:35:23 UTC (rev 6314)
@@ -0,0 +1,68 @@
+<!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="resources" var="msg" />
+ <head>
+ <title><ui:insert name="pageTitle">Page Title</ui:insert></title>
+ <style type="text/css">
+ body {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 14px;
+ }
+ .header {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 18px;
+ }
+ .bottom {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 9px;
+ text-align: center;
+ vertical-align: middle;
+ color: #8E969D;
+ }
+ .mystyle {
+ ba
+ }
+ </style>
+ </head>
+
+<body bgcolor="#ffffff">
+<table style="border:1px solid #CAD6E0" align="center" cellpadding="0" cellspacing="0" border="0" width="400">
+<tbody>
+
+ <tr>
+ <td class="header" height="42" align="center" valign="middle" width="100%" bgcolor="#E4EBEB">
+ <ui:insert name="pageHeader">Page Header</ui:insert>
+ </td>
+ </tr>
+ <tr>
+ <td height="1" width="100%" bgcolor="#CAD6E0"></td>
+ </tr>
+
+ <tr>
+ <td width="100%" colspan="2">
+ <table width="100%" style="height:150px" align="left" cellpadding="0" cellspacing="0" border="0">
+ <tbody>
+ <tr>
+ <td align="center" width="100%" valign="middle">
+
+ <ui:insert name="body">Page Body</ui:insert>
+
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2" valign="bottom" height="1" width="100%" bgcolor="#CAD6E0"></td>
+ </tr>
+</tbody>
+</table>
+</body>
+
+</html>
\ No newline at end of file
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/788/testCAMessageBundlesAndEL.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/788/testCAMessageBundlesAndEL.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/788/testCAMessageBundlesAndEL.xhtml 2008-02-14 14:35:23 UTC (rev 6314)
@@ -0,0 +1,32 @@
+<!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"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:s="http://jboss.com/products/seam/taglib">
+
+ <f:loadBundle basename="resources" var="msg" />
+
+ <ui:composition template="./templates/common.xhtml">
+
+ <ui:define name="pageTitle">JSF 1.2 and Facelets under Tomcat. KickStart Application</ui:define>
+
+ <ui:define name="pageHeader">JSF 1.2 Hello Application</ui:define>
+
+ <ui:define name="body">
+ <h:message showSummary="true" showDetail="false" style="color: red; font-weight: bold;" for="name" />
+ <form jsfc="h:form" id="helloForm">
+ ${msg.prompt}
+ <input label="Name" jsfc="h:inputText" required="true" id="name" value="#{person.name}" />
+ <input type="submit" jsfc="h:commandButton" id="submit"
+ action="greeting" value="Say Hello" />
+ <h:outputText value="#{person.name}" />
+ </form>
+
+ <form jsfc="" id="Test Form">
+ <h:outputText value="" />
+ </form>
+ </ui:define>
+ </ui:composition>
+</html>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/788/testCAforHtml.html
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/788/testCAforHtml.html 2008-02-14 10:51:19 UTC (rev 6313)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/788/testCAforHtml.html 2008-02-14 14:35:23 UTC (rev 6314)
@@ -2,6 +2,6 @@
<head>
</head>
<body>
- Test
+ Test
</body>
</html>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE788Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE788Test.java 2008-02-14 10:51:19 UTC (rev 6313)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE788Test.java 2008-02-14 14:35:23 UTC (rev 6314)
@@ -33,11 +33,52 @@
public class JBIDE788Test extends VpeTest{
private static final String IMPORT_PROJECT_NAME = "jsfTest";
+
+ private static final String CA_NAME = "org.eclipse.wst.html.HTML_DEFAULT";
public JBIDE788Test(String name) {
super(name);
}
/**
+ * Tests CA for Messages Bundles and EL Values
+ * @throws Throwable
+ */
+ public void testCAforMessageBundlesAndELExpressions() throws Throwable {
+ // wait
+ TestUtil.waitForJobs();
+ // set exception
+ setException(null);
+ //Tests CA
+
+ baseCheckofCA(CA_NAME, "JBIDE/788/testCAMessageBundlesAndEL.xhtml", 1245, 2);
+
+ // check exception
+ if (getException() != null) {
+
+ throw getException();
+ }
+ }
+
+ /**
+ * Tests CA for proposals for JSFC
+ * @throws Throwable
+ */
+ public void testCAforForJSFCProposals() throws Throwable {
+ // wait
+ TestUtil.waitForJobs();
+ // set exception
+ setException(null);
+ //Tests CA
+ baseCheckofCA(CA_NAME, "JBIDE/788/testCAMessageBundlesAndEL.xhtml", 1200, 101);
+
+ // check exception
+ if (getException() != null) {
+
+ throw getException();
+ }
+
+ }
+ /**
* Tests CA on html files
* @throws Throwable
*/
@@ -47,7 +88,7 @@
// set exception
setException(null);
//Tests CA
- baseCheckofCA("org.eclipse.wst.html.HTML_DEFAULT", "JBIDE/788/testCAforHtml.html", 32, 79);
+ baseCheckofCA(CA_NAME, "JBIDE/788/testCAforHtml.html", 39, 79);
// check exception
if (getException() != null) {
@@ -65,7 +106,7 @@
// set exception
setException(null);
//Tests CA
- baseCheckofCA("org.eclipse.wst.html.HTML_DEFAULT", "JBIDE/788/testCAforJSP.jsp", 1000, 110);
+ baseCheckofCA(CA_NAME, "JBIDE/788/testCAforJSP.jsp", 1000, 110);
// check exception
if (getException() != null) {
@@ -82,7 +123,7 @@
// set exception
setException(null);
//Tests CA
- baseCheckofCA("org.eclipse.wst.html.HTML_DEFAULT", "JBIDE/788/testCAforXHTML.xhtml", 745, 96);
+ baseCheckofCA(CA_NAME, "JBIDE/788/testCAforXHTML.xhtml", 745, 96);
// check exception
if (getException() != null) {
@@ -111,6 +152,9 @@
// open and get editor
JSPMultiPageEditor part = openEditor(input);
+
+ //sets cursor position
+ part.getSourceEditor().getTextViewer().getTextWidget().setCaretOffset(position);
TestUtil.waitForJobs();
TestUtil.delay(2000);
SourceViewerConfiguration sourceViewerConfiguration = ((JSPTextEditor)part.getSourceEditor()).getSourceViewerConfigurationForTest();
16 years, 7 months
JBoss Tools SVN: r6313 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-02-14 05:51:19 -0500 (Thu, 14 Feb 2008)
New Revision: 6313
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/SourceEditorPageContext.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-788
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2008-02-14 10:19:05 UTC (rev 6312)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2008-02-14 10:51:19 UTC (rev 6313)
@@ -73,14 +73,13 @@
import org.eclipse.wst.sse.ui.internal.IModelProvider;
import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
+import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.sse.ui.internal.contentoutline.ConfigurableContentOutlinePage;
import org.eclipse.wst.sse.ui.internal.properties.ConfigurablePropertySheetPage;
import org.eclipse.wst.sse.ui.internal.provisional.extensions.ConfigurationPointCalculator;
import org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration;
import org.eclipse.wst.xml.core.internal.document.AttrImpl;
-import org.eclipse.wst.xml.core.internal.document.DOMModelImpl;
import org.eclipse.wst.xml.core.internal.document.ElementImpl;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
import org.jboss.tools.common.core.resources.XModelObjectEditorInput;
import org.jboss.tools.common.meta.action.XActionInvoker;
import org.jboss.tools.common.model.XModelBuffer;
@@ -88,7 +87,6 @@
import org.jboss.tools.common.model.XModelTransferBuffer;
import org.jboss.tools.common.model.filesystems.impl.FileAnyImpl;
import org.jboss.tools.common.model.filesystems.impl.FolderImpl;
-import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.dnd.ModelTransfer;
import org.jboss.tools.common.model.ui.editor.IModelObjectEditorInput;
import org.jboss.tools.common.model.ui.editors.dnd.DropCommandFactory;
@@ -185,7 +183,12 @@
pageContext = new SourceEditorPageContext();
}
IDocument document = getTextViewer().getDocument();
- pageContext.setDocument(document);
+ int offset = this.getTextViewer().getTextWidget().getCaretOffset();
+ IndexedRegion treeNode = ContentAssistUtils.getNodeAt(this.getTextViewer(), offset);
+ Node node = (Node) treeNode;
+ pageContext.setReferenceNode(node);
+ pageContext.setDocument(document);
+
return pageContext;
}
@@ -631,6 +634,7 @@
//Fix for JBIDE-788
if (getEditor() != null) {
if(getEditor().getPageContext() instanceof VpeTaglibManager)
+
return (VpeTaglibManager)getEditor().getPageContext();
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/SourceEditorPageContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/SourceEditorPageContext.java 2008-02-14 10:19:05 UTC (rev 6312)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/SourceEditorPageContext.java 2008-02-14 10:51:19 UTC (rev 6313)
@@ -25,7 +25,6 @@
import org.jboss.tools.jst.web.tld.TaglibData;
import org.jboss.tools.jst.web.tld.VpeTaglibListener;
import org.jboss.tools.jst.web.tld.VpeTaglibManager;
-import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -143,10 +142,13 @@
Iterator<TaglibData> iter = getTaglibs() .iterator();
while (iter.hasNext()) {
TaglibData taglib = (TaglibData)iter.next();
- if (!taglib.inList(clone)) {
- clone.add(taglib);
- }
+ //Max Areshkau we doesn't need double check
+// if (!taglib.inList(clone)) {
+// clone.add(taglib.clone());
+// }
+ clone.add(taglib);
}
+
return clone;
}
16 years, 7 months