JBoss Tools SVN: r3294 - in trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates: jsf-1.1/JSFBlankWithLibs/JavaSource and 11 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-08-23 09:08:13 -0400 (Thu, 23 Aug 2007)
New Revision: 3294
Added:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/lib/jsf-tlds.jar
Removed:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/JavaSource/tmp
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsBlankWithoutLibs/WebContent/WEB-INF/lib/tmp
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithoutLibs/WebContent/WEB-INF/lib/tmp
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/JavaSource/tmp
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/WebContent/WEB-INF/classes/tmp
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/WebContent/WEB-INF/lib/tmp
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStartWithoutLibs/WebContent/WEB-INF/classes/tmp
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStartWithoutLibs/WebContent/WEB-INF/lib/tmp
Modified:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-680 Refactor templates. New names: "with libs" and "without libs"
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml 2007-08-23 12:28:58 UTC (rev 3293)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml 2007-08-23 13:08:13 UTC (rev 3294)
@@ -1,6 +1,6 @@
<versions>
<version displayName="JSF 1.1.02 - Reference Implementation">
- <lib type="common" location="../lib/ApacheCommon2.3" />
+ <lib type="core" location="../lib/ApacheCommon2.3" />
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-1.1" />
</version>
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/JavaSource/tmp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/JavaSource/tmp 2007-08-23 12:28:58 UTC (rev 3293)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/JavaSource/tmp 2007-08-23 13:08:13 UTC (rev 3294)
@@ -1 +0,0 @@
-
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/web.xml 2007-08-23 12:28:58 UTC (rev 3293)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/web.xml 2007-08-23 13:08:13 UTC (rev 3294)
@@ -14,12 +14,6 @@
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
-#if ($runtimeType == "org.jboss.ide.eclipse.as.runtime.42")
- <context-param>
- <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
- <param-value>true</param-value>
- </context-param>
-#end
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/web.xml 2007-08-23 12:28:58 UTC (rev 3293)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/web.xml 2007-08-23 13:08:13 UTC (rev 3294)
@@ -14,12 +14,6 @@
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
-#if ($runtimeType == "org.jboss.ide.eclipse.as.runtime.42")
- <context-param>
- <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
- <param-value>true</param-value>
- </context-param>
-#end
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/lib/jsf-tlds.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/lib/jsf-tlds.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml 2007-08-23 12:28:58 UTC (rev 3293)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/web.xml 2007-08-23 13:08:13 UTC (rev 3294)
@@ -14,12 +14,6 @@
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
-#if ($runtimeType == "org.jboss.ide.eclipse.as.runtime.42")
- <context-param>
- <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
- <param-value>true</param-value>
- </context-param>
-#end
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/JavaSource/tmp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/JavaSource/tmp 2007-08-23 12:28:58 UTC (rev 3293)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/JavaSource/tmp 2007-08-23 13:08:13 UTC (rev 3294)
@@ -1 +0,0 @@
-
\ No newline at end of file
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/WebContent/WEB-INF/classes/tmp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/WebContent/WEB-INF/classes/tmp 2007-08-23 12:28:58 UTC (rev 3293)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/WebContent/WEB-INF/classes/tmp 2007-08-23 13:08:13 UTC (rev 3294)
@@ -1 +0,0 @@
-
\ No newline at end of file
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/WebContent/WEB-INF/lib/tmp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/WebContent/WEB-INF/lib/tmp 2007-08-23 12:28:58 UTC (rev 3293)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/WebContent/WEB-INF/lib/tmp 2007-08-23 13:08:13 UTC (rev 3294)
@@ -1 +0,0 @@
-
\ No newline at end of file
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStartWithoutLibs/WebContent/WEB-INF/classes/tmp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStartWithoutLibs/WebContent/WEB-INF/classes/tmp 2007-08-23 12:28:58 UTC (rev 3293)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStartWithoutLibs/WebContent/WEB-INF/classes/tmp 2007-08-23 13:08:13 UTC (rev 3294)
@@ -1 +0,0 @@
-
\ No newline at end of file
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStartWithoutLibs/WebContent/WEB-INF/lib/tmp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStartWithoutLibs/WebContent/WEB-INF/lib/tmp 2007-08-23 12:28:58 UTC (rev 3293)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStartWithoutLibs/WebContent/WEB-INF/lib/tmp 2007-08-23 13:08:13 UTC (rev 3294)
@@ -1 +0,0 @@
-
\ No newline at end of file
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsBlankWithoutLibs/WebContent/WEB-INF/lib/tmp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsBlankWithoutLibs/WebContent/WEB-INF/lib/tmp 2007-08-23 12:28:58 UTC (rev 3293)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsBlankWithoutLibs/WebContent/WEB-INF/lib/tmp 2007-08-23 13:08:13 UTC (rev 3294)
@@ -1 +0,0 @@
-
\ No newline at end of file
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithoutLibs/WebContent/WEB-INF/lib/tmp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithoutLibs/WebContent/WEB-INF/lib/tmp 2007-08-23 12:28:58 UTC (rev 3293)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithoutLibs/WebContent/WEB-INF/lib/tmp 2007-08-23 13:08:13 UTC (rev 3294)
@@ -1 +0,0 @@
-
\ No newline at end of file
17 years, 4 months
JBoss Tools SVN: r3293 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam: internal/core and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-23 08:28:58 -0400 (Thu, 23 Aug 2007)
New Revision: 3293
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamElement.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPackage.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractSeamDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentMethod.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaContextVariable.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamObject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPackage.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProperty.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamScope.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueList.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueMap.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueMapEntry.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueString.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlFactory.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java
Log:
JBIDE-820
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamElement.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamElement.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamElement.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -12,6 +12,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
+import org.jboss.tools.seam.internal.core.SeamObject;
/**
* Common interface for objects of seam model.
@@ -43,5 +44,7 @@
* @return resource
*/
public IResource getResource();
+
+ public ISeamElement copy();
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPackage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPackage.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPackage.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.seam.core;
+import java.util.Collection;
import java.util.Set;
/**
@@ -19,6 +20,10 @@
public String getName();
+ public String getQualifiedName();
+
public Set<ISeamComponent> getComponents();
+ public Collection<ISeamPackage> getPackages();
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractContextVariable.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -75,4 +75,10 @@
setScopeAsString(value == null ? null : value.getValue());
}
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ AbstractContextVariable f = (AbstractContextVariable)copy;
+ f.scope = scope;
+ f.scopeType = scopeType;
+ }
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractSeamDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractSeamDeclaration.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/AbstractSeamDeclaration.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -79,4 +79,10 @@
return s1 == null ? s2 == null : s1.equals(s2);
}
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ AbstractSeamDeclaration d = (AbstractSeamDeclaration)copy;
+ d.name = name;
+ d.attributes.putAll(attributes);
+ }
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/BijectedAttribute.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -14,7 +14,6 @@
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
-import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
import org.jboss.tools.seam.core.event.Change;
/**
@@ -73,4 +72,12 @@
}
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ if(copy instanceof BijectedAttribute) {
+ BijectedAttribute sf = (BijectedAttribute)copy;
+ sf.types = types;
+ }
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamAnnotatedFactory.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -72,4 +72,13 @@
public void setParentDeclaration(SeamJavaComponentDeclaration parentDeclaration) {
this.parentDeclaration = parentDeclaration;
}
-}
\ No newline at end of file
+
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ SeamAnnotatedFactory f = (SeamAnnotatedFactory)copy;
+ f.autoCreate = autoCreate;
+ //we need not new copy here but reference!
+ f.parentDeclaration = parentDeclaration == null ? null : (SeamJavaComponentDeclaration)parentDeclaration.copy();
+ }
+
+}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentMethod.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentMethod.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamComponentMethod.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -100,4 +100,11 @@
}
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ SeamComponentMethod m = (SeamComponentMethod)copy;
+ m.types.addAll(types);
+ m.javaSource = javaSource;
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -395,4 +395,26 @@
}
}
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ SeamJavaComponentDeclaration d = (SeamJavaComponentDeclaration)copy;
+ d.className = className;
+ d.scopeType = scopeType;
+ if(types != null) {
+ d.types = new HashMap<BeanType, IValueInfo>();
+ d.types.putAll(types);
+ }
+ d.precedence = precedence;
+ d.type = type;
+ for (IBijectedAttribute a : bijectedAttributes) {
+ d.addBijectedAttribute((IBijectedAttribute)a.copy());
+ }
+ for (ISeamComponentMethod m : componentMethods) {
+ d.addMethod((ISeamComponentMethod)m.copy());
+ }
+ for (IRole r : roles) {
+ d.addRole((IRole)r.copy());
+ }
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaContextVariable.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaContextVariable.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaContextVariable.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -68,4 +68,12 @@
return changes;
}
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ if(copy instanceof SeamJavaContextVariable) {
+ SeamJavaContextVariable sf = (SeamJavaContextVariable)copy;
+ sf.javaSource = javaSource;
+ }
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamObject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamObject.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamObject.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -125,5 +125,25 @@
//value for null, before using it.
return null;
}
+
+ public final SeamObject copy() {
+ SeamObject result = null;
+ try {
+ result = (SeamObject)this.getClass().newInstance();
+ copyTo(result);
+ } catch (InstantiationException e1) {
+
+ } catch (IllegalAccessException e2) {
+
+ }
+ return result;
+ }
+
+ public void copyTo(SeamObject copy) {
+ copy.source = source;
+ copy.id = id;
+ copy.resource = resource;
+ //do not copy parent
+ }
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPackage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPackage.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPackage.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -11,7 +11,10 @@
package org.jboss.tools.seam.internal.core;
+import java.util.Collection;
+import java.util.HashMap;
import java.util.HashSet;
+import java.util.Map;
import java.util.Set;
import org.jboss.tools.seam.core.ISeamComponent;
@@ -19,6 +22,8 @@
public class SeamPackage extends SeamObject implements ISeamPackage {
Set<ISeamComponent> components = new HashSet<ISeamComponent>();
+ Map<String, ISeamPackage> packages = new HashMap<String, ISeamPackage>();
+
public String name;
public SeamPackage() {}
@@ -40,4 +45,15 @@
setId(name);
}
+ public Collection<ISeamPackage> getPackages() {
+ return packages.values();
+ }
+
+ public String getQualifiedName() {
+ if(parent instanceof ISeamPackage) {
+ return ((ISeamPackage)parent).getQualifiedName() + "." + getName();
+ }
+ return getName();
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -66,6 +66,9 @@
SeamScope[] scopes = new SeamScope[ScopeType.values().length];
Map<ScopeType, SeamScope> scopesMap = new HashMap<ScopeType, SeamScope>();
+ Set<SeamProject> dependsOn = new HashSet<SeamProject>();
+ Set<SeamProject> usedBy = new HashSet<SeamProject>();
+
{
ScopeType[] types = ScopeType.values();
for (int i = 0; i < scopes.length; i++) {
@@ -137,6 +140,42 @@
// load();
}
+ public void addSeamProject(SeamProject p) {
+ if(dependsOn.contains(p)) return;
+ dependsOn.add(p);
+ p.addDependentSeamProject(this);
+ if(!p.isStorageResolved) {
+ p.resolve();
+ } else {
+ Map<IPath,LoadedDeclarations> map = p.getAllDeclarations();
+ for (IPath source : map.keySet()) {
+ LoadedDeclarations ds = map.get(source);
+ registerComponents(ds, source);
+ }
+ }
+ }
+
+ public Set<SeamProject> getSeamProjects() {
+ return dependsOn;
+ }
+
+ public void addDependentSeamProject(SeamProject p) {
+ usedBy.add(p);
+ }
+
+ public void removeSeamProject(SeamProject p) {
+ if(!dependsOn.contains(p)) return;
+ p.usedBy.remove(this);
+ dependsOn.remove(p);
+ IPath[] ps = sourcePaths.toArray(new IPath[0]);
+ for (int i = 0; i < ps.length; i++) {
+ IPath pth = ps[i];
+ if(p.getSourcePath().isPrefixOf(pth)) {
+ pathRemoved(pth);
+ }
+ }
+ }
+
public ClassPath getClassPath() {
return classPath;
}
@@ -171,6 +210,7 @@
if(file == null || !file.isFile()) return;
Element root = XMLUtilities.getElement(file, null);
if(root != null) {
+ loadProjectDependencies(root);
loadSourcePaths(root);
getValidationContext().load(root);
}
@@ -190,7 +230,9 @@
file.getParentFile().mkdirs();
Element root = XMLUtilities.createDocumentElement("seam-project");
+ storeProjectDependencies(root);
storeSourcePaths(root);
+
if(validationContext != null) validationContext.store(root);
XMLUtilities.serialize(root, file.getAbsolutePath());
@@ -204,6 +246,21 @@
}
}
+ private void storeProjectDependencies(Element root) {
+ Element dependsOnElement = XMLUtilities.createElement(root, "depends-on-projects");
+ for (ISeamProject p : dependsOn) {
+ if(!p.getProject().isAccessible()) continue;
+ Element pathElement = XMLUtilities.createElement(dependsOnElement, "project");
+ pathElement.setAttribute("name", p.getProject().getName());
+ }
+ Element usedElement = XMLUtilities.createElement(root, "used-by-projects");
+ for (ISeamProject p : usedBy) {
+ if(!p.getProject().isAccessible()) continue;
+ Element pathElement = XMLUtilities.createElement(usedElement, "project");
+ pathElement.setAttribute("name", p.getProject().getName());
+ }
+ }
+
private void loadSourcePaths(Element root) {
Element sourcePathsElement = XMLUtilities.getUniqueChild(root, "source-paths");
if(sourcePathsElement == null) return;
@@ -220,6 +277,38 @@
}
}
+ private void loadProjectDependencies(Element root) {
+ Element dependsOnElement = XMLUtilities.getUniqueChild(root, "depends-on-projects");
+ if(dependsOnElement != null) {
+ Element[] paths = XMLUtilities.getChildren(dependsOnElement, "project");
+ for (int i = 0; i < paths.length; i++) {
+ String p = paths[i].getAttribute("name");
+ if(p == null || p.trim().length() == 0) continue;
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(p);
+ if(project == null || !project.isAccessible()) continue;
+ SeamProject sp = (SeamProject)SeamCorePlugin.getSeamProject(project, false);
+ if(sp != null) {
+ dependsOn.add(sp);
+ sp.addDependentSeamProject(this);
+ }
+ }
+ }
+
+ Element usedElement = XMLUtilities.getUniqueChild(root, "used-by-projects");
+ if(usedElement != null) {
+ Element[] paths = XMLUtilities.getChildren(usedElement, "project");
+ for (int i = 0; i < paths.length; i++) {
+ String p = paths[i].getAttribute("name");
+ if(p == null || p.trim().length() == 0) continue;
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(p);
+ if(project == null || !project.isAccessible()) continue;
+ SeamProject sp = (SeamProject)SeamCorePlugin.getSeamProject(project, false);
+ if(sp != null) usedBy.add(sp);
+ }
+ }
+
+ }
+
private File getStorageFile() {
IPath path = SeamCorePlugin.getDefault().getStateLocation();
File file = new File(path.toFile(), "projects/" + project.getName());
@@ -361,8 +450,27 @@
fireChanges(addedFactories);
factoryDeclarationsRemoved(currentFactories);
+
+ registerComponentsInDependentProjects(ds, source);
}
+ public void registerComponentsInDependentProjects(LoadedDeclarations ds, IPath source) {
+ if(usedBy.size() == 0) return;
+ if(source.toString().endsWith(".jar")) return;
+
+ for (SeamProject p : usedBy) {
+ p.resolve();
+ LoadedDeclarations ds1 = new LoadedDeclarations();
+ for (SeamComponentDeclaration d: ds.getComponents()) {
+ ds1.getComponents().add((SeamComponentDeclaration)d.copy());
+ }
+ for (ISeamFactory f : ds.getFactories()) {
+ ds1.getFactories().add((ISeamFactory)f.copy());
+ }
+ p.registerComponents(ds1, source);
+ }
+ }
+
boolean stringsEqual(String s1, String s2) {
return s1 == null ? s2 == null : s1.equals(s2);
}
@@ -872,7 +980,33 @@
return p;
}
-
+ Map<IPath, LoadedDeclarations> getAllDeclarations() {
+ Map<IPath, LoadedDeclarations> map = new HashMap<IPath, LoadedDeclarations>();
+ for (ISeamComponent c : allComponents.values()) {
+ for (ISeamComponentDeclaration d : c.getAllDeclarations()) {
+ IPath p = d.getSourcePath();
+ if(p == null || p.toString().endsWith(".jar")) continue;
+ LoadedDeclarations ds = map.get(p);
+ if(ds == null) {
+ ds = new LoadedDeclarations();
+ map.put(p, ds);
+ }
+ ds.getComponents().add((SeamComponentDeclaration)d.copy());
+ }
+ }
+ for (ISeamFactory f : allFactories) {
+ IPath p = f.getSourcePath();
+ if(p == null || p.toString().endsWith(".jar")) continue;
+ LoadedDeclarations ds = map.get(p);
+ if(ds == null) {
+ ds = new LoadedDeclarations();
+ map.put(p, ds);
+ }
+ ds.getFactories().add((ISeamFactory)f.copy());
+ }
+ return map;
+ }
+
protected void addToBuildSpec(String builderID) throws CoreException {
IProjectDescription description = getProject().getDescription();
ICommand command = null;
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPropertiesDeclaration.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -122,4 +122,14 @@
}
}
+
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ SeamPropertiesDeclaration d = (SeamPropertiesDeclaration)copy;
+ for (String name : properties.keySet()) {
+ ISeamProperty p = (ISeamProperty)properties.get(name).copy();
+ d.addProperty(p);
+ }
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProperty.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProperty.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProperty.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -80,4 +80,10 @@
return s1 == null ? s2 == null : s1.equals(s2);
}
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ SeamProperty p = (SeamProperty)copy;
+ p.value = value == null ? null : (ISeamValue)value.copy();
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamScope.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamScope.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamScope.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -25,9 +25,11 @@
import org.jboss.tools.seam.core.event.Change;
public class SeamScope extends SeamObject implements ISeamScope {
+ //Contains all components for that scope.
private List<ISeamComponent> components = new ArrayList<ISeamComponent>();
private ScopeType scopeType = null;
+ //Contains first level packages for that scope
Map<String, ISeamPackage> packages = new HashMap<String, ISeamPackage>();
SeamScope(SeamProject project, ScopeType scopeType) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueList.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueList.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueList.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -50,4 +50,12 @@
return changes;
}
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ SeamValueList vl = (SeamValueList)copy;
+ for (ISeamValueString v : values) {
+ vl.addValue((SeamValueString)v.copy());
+ }
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueMap.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueMap.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueMap.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -50,4 +50,12 @@
return changes;
}
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ SeamValueMap vl = (SeamValueMap)copy;
+ for (ISeamValueMapEntry v : entries) {
+ vl.addEntry((SeamValueMapEntry)v.copy());
+ }
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueMapEntry.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueMapEntry.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueMapEntry.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -65,4 +65,11 @@
return changes;
}
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ SeamValueMapEntry vl = (SeamValueMapEntry)copy;
+ vl.key = key == null ? null : (SeamValueString)key.copy();
+ vl.value = value == null ? null : (SeamValueString)value.copy();
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueString.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueString.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamValueString.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -46,4 +46,11 @@
return changes;
}
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ SeamValueString vl = (SeamValueString)copy;
+ vl.value = value;
+ vl.currentValue = currentValue;
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlComponentDeclaration.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -161,4 +161,14 @@
return changes;
}
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ SeamXmlComponentDeclaration d = (SeamXmlComponentDeclaration)copy;
+ d.className = className;
+ d.autoCreate = autoCreate;
+ d.installed = installed;
+ d.jndiName = jndiName;
+ d.precedence = precedence;
+ d.scope = scope;
+ }
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlFactory.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamXmlFactory.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -64,4 +64,12 @@
return changes;
}
+
+ public void copyTo(SeamObject copy) {
+ super.copyTo(copy);
+ SeamXmlFactory xf = (SeamXmlFactory)copy;
+ xf.value = value;
+ xf.method = method;
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java 2007-08-23 12:11:07 UTC (rev 3292)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/ClassPath.java 2007-08-23 12:28:58 UTC (rev 3293)
@@ -22,6 +22,7 @@
import java.util.Set;
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.Path;
@@ -35,6 +36,7 @@
import org.jboss.tools.common.model.filesystems.impl.JarSystemImpl;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.model.util.XModelObjectUtil;
+import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.internal.core.InnerModelHelper;
import org.jboss.tools.seam.internal.core.SeamProject;
@@ -182,6 +184,27 @@
}
if(c != null) componentsLoaded(c, new Path(p));
}
+
+ List<SeamProject> ps = null;
+
+ try {
+ ps = getSeamProjects(project.getProject());
+ } catch (CoreException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
+ if(ps != null) {
+ Set<SeamProject> set = project.getSeamProjects();
+ Set<SeamProject> removable = new HashSet<SeamProject>();
+ removable.addAll(set);
+ removable.removeAll(ps);
+ ps.removeAll(set);
+ for (SeamProject p : ps) {
+// project.addSeamProject(p);
+ }
+ for (SeamProject p : removable) {
+ project.removeSeamProject(p);
+ }
+ }
}
void componentsLoaded(LoadedDeclarations c, IPath path) {
@@ -248,5 +271,20 @@
}
return l;
}
+
+ List<SeamProject> getSeamProjects(IProject project) throws CoreException {
+ List<SeamProject> list = new ArrayList<SeamProject>();
+ IJavaProject javaProject = JavaCore.create(project);
+ IClasspathEntry[] es = javaProject.getResolvedClasspath(true);
+ for (int i = 0; i < es.length; i++) {
+ if(es[i].getEntryKind() == IClasspathEntry.CPE_PROJECT) {
+ IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject(es[i].getPath().lastSegment());
+ if(p == null || !p.isAccessible()) continue;
+ ISeamProject sp = SeamCorePlugin.getSeamProject(p, false);
+ if(sp != null) list.add((SeamProject)sp);
+ }
+ }
+ return list;
+ }
}
17 years, 4 months
JBoss Tools SVN: r3292 - in trunk: vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ayukhovich
Date: 2007-08-23 08:11:07 -0400 (Thu, 23 Aug 2007)
New Revision: 3292
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-815
add functionality for restoting maxinum tab number
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2007-08-23 11:06:28 UTC (rev 3291)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2007-08-23 12:11:07 UTC (rev 3292)
@@ -158,7 +158,8 @@
selectedPageIndex = 0;
else {
int qi = Integer.parseInt(q);
- if (qi >= 0 && qi <= 2)
+
+ if (qi >= 0 && qi < getTabFolder().getItemCount())
selectedPageIndex = qi;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java 2007-08-23 11:06:28 UTC (rev 3291)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java 2007-08-23 12:11:07 UTC (rev 3292)
@@ -12,24 +12,22 @@
import java.util.ArrayList;
import java.util.Iterator;
-import org.eclipse.core.runtime.SafeRunner;
-import org.jboss.tools.common.core.resources.XModelObjectEditorInput;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.util.Assert;
+import org.eclipse.jface.util.SafeRunnable;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
-import org.eclipse.swt.events.*;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Item;
-
-import org.eclipse.jface.util.Assert;
-import org.eclipse.jface.util.SafeRunnable;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-
import org.eclipse.ui.IEditorActionBarContributor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -39,12 +37,11 @@
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
-
-import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.part.EditorPart;
import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
import org.eclipse.ui.part.MultiPageEditorSite;
import org.eclipse.ui.part.MultiPageSelectionProvider;
+import org.jboss.tools.common.core.resources.XModelObjectEditorInput;
/**
*
@@ -194,7 +191,7 @@
return getItem(pageIndex).getText();
}
- private CTabFolder getTabFolder() {
+ protected CTabFolder getTabFolder() {
return container;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2007-08-23 11:06:28 UTC (rev 3291)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2007-08-23 12:11:07 UTC (rev 3292)
@@ -64,626 +64,626 @@
import org.jboss.tools.vpe.selbar.SelectionBar;
public class VpeEditorPart extends EditorPart implements ITextEditor,
- ITextEditorExtension, IReusableEditor, IVisualEditor {
- private SashForm container;
- private StructuredTextEditor sourceEditor = null;
- private MozillaEditor visualEditor;
- private IEditorPart activeEditor;
- private VpeController controller;
- private XModelTreeListener listener;
- XModelObject optionsObject;
- private SelectionBar selectionBar = new SelectionBar();
- private ActivationListener activationListener = new ActivationListener();
- private int visualMode = 0;
- private EditorPart multiPageEditor;
- private static final QualifiedName SPLITTER_POSITION_KEY1 = new QualifiedName(
- "", "splitter_position1");
- private static final QualifiedName SPLITTER_POSITION_KEY2 = new QualifiedName(
- "", "splitter_position2");
- private static final QualifiedName SPLITTER_POSITION_KEY3 = new QualifiedName(
- "", "splitter_position3");
- private int controlCount = 0;
+ ITextEditorExtension, IReusableEditor, IVisualEditor {
+ private SashForm container;
+ private StructuredTextEditor sourceEditor = null;
+ private MozillaEditor visualEditor;
+ private IEditorPart activeEditor;
+ private VpeController controller;
+ private XModelTreeListener listener;
+ XModelObject optionsObject;
+ private SelectionBar selectionBar = new SelectionBar();
+ private ActivationListener activationListener = new ActivationListener();
+ private int visualMode = 0;
+ private EditorPart multiPageEditor;
+ private static final QualifiedName SPLITTER_POSITION_KEY1 = new QualifiedName(
+ "", "splitter_position1");
+ private static final QualifiedName SPLITTER_POSITION_KEY2 = new QualifiedName(
+ "", "splitter_position2");
+ private static final QualifiedName SPLITTER_POSITION_KEY3 = new QualifiedName(
+ "", "splitter_position3");
+ private int controlCount = 0;
- /** default web-browser */
- private MozillaPreview previewWebBrowser = null;
+ /** default web-browser */
+ private MozillaPreview previewWebBrowser = null;
- /** preview content */
- private Composite previewContent = null;
+ /** preview content */
+ private Composite previewContent = null;
- public StructuredTextEditor getSourceEditor() {
- return sourceEditor;
- }
+ public StructuredTextEditor getSourceEditor() {
+ return sourceEditor;
+ }
- // returns JSPMultipageEditor for closing by ctrl+F4 and ctrl+shift+F4 keys
- public EditorPart getParentEditor() {
- return multiPageEditor;
- }
+ // returns JSPMultipageEditor for closing by ctrl+F4 and ctrl+shift+F4 keys
+ public EditorPart getParentEditor() {
+ return multiPageEditor;
+ }
- public void close(boolean save) {
- if (sourceEditor != null)
- sourceEditor.close(save);
- }
+ public void close(boolean save) {
+ if (sourceEditor != null)
+ sourceEditor.close(save);
+ }
- public void doRevertToSaved() {
- if (sourceEditor != null)
- sourceEditor.doRevertToSaved();
- }
+ public void doRevertToSaved() {
+ if (sourceEditor != null)
+ sourceEditor.doRevertToSaved();
+ }
- public IDocumentProvider getDocumentProvider() {
- if (sourceEditor != null)
- return sourceEditor.getDocumentProvider();
- else {
- return null;
+ public IDocumentProvider getDocumentProvider() {
+ if (sourceEditor != null)
+ return sourceEditor.getDocumentProvider();
+ else {
+ return null;
+ }
}
- }
- public IRegion getHighlightRange() {
- if (sourceEditor != null)
- return sourceEditor.getHighlightRange();
- else {
- return null;
+ public IRegion getHighlightRange() {
+ if (sourceEditor != null)
+ return sourceEditor.getHighlightRange();
+ else {
+ return null;
+ }
}
- }
- public ISelectionProvider getSelectionProvider() {
- if (sourceEditor != null)
- return sourceEditor.getSelectionProvider();
- else {
- return null;
+ public ISelectionProvider getSelectionProvider() {
+ if (sourceEditor != null)
+ return sourceEditor.getSelectionProvider();
+ else {
+ return null;
+ }
}
- }
- public boolean isEditable() {
- if (sourceEditor != null)
- return sourceEditor.isEditable();
- else {
- return false;
+ public boolean isEditable() {
+ if (sourceEditor != null)
+ return sourceEditor.isEditable();
+ else {
+ return false;
+ }
}
- }
- public void removeActionActivationCode(String actionId) {
- if (sourceEditor != null)
- sourceEditor.removeActionActivationCode(actionId);
- }
+ public void removeActionActivationCode(String actionId) {
+ if (sourceEditor != null)
+ sourceEditor.removeActionActivationCode(actionId);
+ }
- public void resetHighlightRange() {
- if (sourceEditor != null)
- sourceEditor.resetHighlightRange();
- }
+ public void resetHighlightRange() {
+ if (sourceEditor != null)
+ sourceEditor.resetHighlightRange();
+ }
- public void selectAndReveal(int offset, int length) {
- if (sourceEditor != null)
- sourceEditor.selectAndReveal(offset, length);
- }
+ public void selectAndReveal(int offset, int length) {
+ if (sourceEditor != null)
+ sourceEditor.selectAndReveal(offset, length);
+ }
- public void setAction(String actionID, IAction action) {
- if (sourceEditor != null)
- sourceEditor.setAction(actionID, action);
- }
+ public void setAction(String actionID, IAction action) {
+ if (sourceEditor != null)
+ sourceEditor.setAction(actionID, action);
+ }
- public void setActionActivationCode(String actionId,
- char activationCharacter, int activationKeyCode,
- int activationStateMask) {
- if (sourceEditor != null)
- sourceEditor.setActionActivationCode(actionId, activationCharacter,
- activationKeyCode, activationStateMask);
- }
+ public void setActionActivationCode(String actionId,
+ char activationCharacter, int activationKeyCode,
+ int activationStateMask) {
+ if (sourceEditor != null)
+ sourceEditor.setActionActivationCode(actionId, activationCharacter,
+ activationKeyCode, activationStateMask);
+ }
- public void setHighlightRange(int offset, int length, boolean moveCursor) {
- if (sourceEditor != null)
- sourceEditor.setHighlightRange(offset, length, moveCursor);
- }
+ public void setHighlightRange(int offset, int length, boolean moveCursor) {
+ if (sourceEditor != null)
+ sourceEditor.setHighlightRange(offset, length, moveCursor);
+ }
- public void showHighlightRangeOnly(boolean showHighlightRangeOnly) {
- if (sourceEditor != null)
- sourceEditor.showHighlightRangeOnly(showHighlightRangeOnly);
- }
+ public void showHighlightRangeOnly(boolean showHighlightRangeOnly) {
+ if (sourceEditor != null)
+ sourceEditor.showHighlightRangeOnly(showHighlightRangeOnly);
+ }
- public boolean showsHighlightRangeOnly() {
- if (sourceEditor != null)
- return sourceEditor.showsHighlightRangeOnly();
- else {
- return false;
+ public boolean showsHighlightRangeOnly() {
+ if (sourceEditor != null)
+ return sourceEditor.showsHighlightRangeOnly();
+ else {
+ return false;
+ }
}
- }
- public void addRulerContextMenuListener(IMenuListener listener) {
- if (sourceEditor != null)
- sourceEditor.addRulerContextMenuListener(listener);
- }
+ public void addRulerContextMenuListener(IMenuListener listener) {
+ if (sourceEditor != null)
+ sourceEditor.addRulerContextMenuListener(listener);
+ }
- public boolean isEditorInputReadOnly() {
- if (sourceEditor != null)
- return sourceEditor.isEditorInputReadOnly();
- else {
- return false;
+ public boolean isEditorInputReadOnly() {
+ if (sourceEditor != null)
+ return sourceEditor.isEditorInputReadOnly();
+ else {
+ return false;
+ }
}
- }
- public void removeRulerContextMenuListener(IMenuListener listener) {
- if (sourceEditor != null)
- sourceEditor.removeRulerContextMenuListener(listener);
- }
+ public void removeRulerContextMenuListener(IMenuListener listener) {
+ if (sourceEditor != null)
+ sourceEditor.removeRulerContextMenuListener(listener);
+ }
- public void setStatusField(IStatusField field, String category) {
- if (visualMode == VISUAL_MODE) {
- if (field != null) {
- field.setImage(null);
- field.setText(null);
- }
- } else if (sourceEditor != null)
- sourceEditor.setStatusField(field, category);
- }
+ public void setStatusField(IStatusField field, String category) {
+ if (visualMode == VISUAL_MODE) {
+ if (field != null) {
+ field.setImage(null);
+ field.setText(null);
+ }
+ } else if (sourceEditor != null)
+ sourceEditor.setStatusField(field, category);
+ }
- public VpeEditorPart(EditorPart multiPageEditor,
- StructuredTextEditor textEditor, boolean visualMode) {
- sourceEditor = textEditor;
- // this.visualMode = visualMode;
- this.multiPageEditor = multiPageEditor;
- }
+ public VpeEditorPart(EditorPart multiPageEditor,
+ StructuredTextEditor textEditor, boolean visualMode) {
+ sourceEditor = textEditor;
+ // this.visualMode = visualMode;
+ this.multiPageEditor = multiPageEditor;
+ }
- public IAction getAction(String actionID) {
- return sourceEditor.getAction(actionID);
- }
+ public IAction getAction(String actionID) {
+ return sourceEditor.getAction(actionID);
+ }
- public VpeEditorPart() {
- }
+ public VpeEditorPart() {
+ }
- public void doSave(IProgressMonitor monitor) {
- if (sourceEditor != null) {
- sourceEditor.doSave(monitor);
+ public void doSave(IProgressMonitor monitor) {
+ if (sourceEditor != null) {
+ sourceEditor.doSave(monitor);
+ }
}
- }
- public void doSaveAs() {
- if (sourceEditor != null) {
- sourceEditor.doSaveAs();
- setInput(sourceEditor.getEditorInput());
+ public void doSaveAs() {
+ if (sourceEditor != null) {
+ sourceEditor.doSaveAs();
+ setInput(sourceEditor.getEditorInput());
+ }
}
- }
- public void init(IEditorSite site, IEditorInput input)
- throws PartInitException {
- setSite(site);
- setInput(input);
- }
+ public void init(IEditorSite site, IEditorInput input)
+ throws PartInitException {
+ setSite(site);
+ setInput(input);
+ }
- public void setInput(IEditorInput input) {
- super.setInput(input);
- if (visualEditor != null && visualEditor.getEditorInput() != null
- && visualEditor.getEditorInput() != getEditorInput()) {
- visualEditor.setInput(input);
+ public void setInput(IEditorInput input) {
+ super.setInput(input);
+ if (visualEditor != null && visualEditor.getEditorInput() != null
+ && visualEditor.getEditorInput() != getEditorInput()) {
+ visualEditor.setInput(input);
+ }
}
- }
- public boolean isDirty() {
- if (sourceEditor != null) {
- return sourceEditor.isDirty();
- } else {
- return false;
+ public boolean isDirty() {
+ if (sourceEditor != null) {
+ return sourceEditor.isDirty();
+ } else {
+ return false;
+ }
}
- }
- public boolean isSaveAsAllowed() {
- if (sourceEditor != null) {
- return sourceEditor.isSaveAsAllowed();
- } else {
- return false;
+ public boolean isSaveAsAllowed() {
+ if (sourceEditor != null) {
+ return sourceEditor.isSaveAsAllowed();
+ } else {
+ return false;
+ }
}
- }
- protected int[] loadSplitterPosition() {
- int[] sizes = new int[3];
- try {
- IEditorInput input = getEditorInput();
- if (!(input instanceof IFileEditorInput))
- return null;
- IFile file = ((IFileEditorInput) input).getFile();
- String s = file.getPersistentProperty(SPLITTER_POSITION_KEY1);
- if (s != null) {
- sizes[0] = Integer.parseInt(s);
- } else
- return null;
- s = file.getPersistentProperty(SPLITTER_POSITION_KEY2);
- if (s != null) {
- sizes[1] = Integer.parseInt(s);
- } else
- return null;
- s = file.getPersistentProperty(SPLITTER_POSITION_KEY3);
- if (s != null) {
- sizes[2] = Integer.parseInt(s);
- } else
- return null;
- } catch (Exception e) {
- VpePlugin.getPluginLog().logError(e);
- return null;
+ protected int[] loadSplitterPosition() {
+ int[] sizes = new int[3];
+ try {
+ IEditorInput input = getEditorInput();
+ if (!(input instanceof IFileEditorInput))
+ return null;
+ IFile file = ((IFileEditorInput) input).getFile();
+ String s = file.getPersistentProperty(SPLITTER_POSITION_KEY1);
+ if (s != null) {
+ sizes[0] = Integer.parseInt(s);
+ } else
+ return null;
+ s = file.getPersistentProperty(SPLITTER_POSITION_KEY2);
+ if (s != null) {
+ sizes[1] = Integer.parseInt(s);
+ } else
+ return null;
+ s = file.getPersistentProperty(SPLITTER_POSITION_KEY3);
+ if (s != null) {
+ sizes[2] = Integer.parseInt(s);
+ } else
+ return null;
+ } catch (Exception e) {
+ VpePlugin.getPluginLog().logError(e);
+ return null;
+ }
+ return sizes;
}
- return sizes;
- }
- protected void saveSplitterPosition(int[] weights) {
- IEditorInput input = getEditorInput();
- if (!(input instanceof IFileEditorInput))
- return;
- IFile file = ((IFileEditorInput) input).getFile();
- try {
- String s = String.valueOf(weights[0]);
- file.setPersistentProperty(SPLITTER_POSITION_KEY1, s);
- s = String.valueOf(weights[1]);
- file.setPersistentProperty(SPLITTER_POSITION_KEY2, s);
- s = String.valueOf(weights[2]);
- file.setPersistentProperty(SPLITTER_POSITION_KEY3, s);
- } catch (Exception e) {
- VpePlugin.getPluginLog().logError(e);
+ protected void saveSplitterPosition(int[] weights) {
+ IEditorInput input = getEditorInput();
+ if (!(input instanceof IFileEditorInput))
+ return;
+ IFile file = ((IFileEditorInput) input).getFile();
+ try {
+ String s = String.valueOf(weights[0]);
+ file.setPersistentProperty(SPLITTER_POSITION_KEY1, s);
+ s = String.valueOf(weights[1]);
+ file.setPersistentProperty(SPLITTER_POSITION_KEY2, s);
+ s = String.valueOf(weights[2]);
+ file.setPersistentProperty(SPLITTER_POSITION_KEY3, s);
+ } catch (Exception e) {
+ VpePlugin.getPluginLog().logError(e);
+ }
}
- }
- Composite sourceContent = null;
- Composite visualContent = null;
+ Composite sourceContent = null;
+ Composite visualContent = null;
- public void setVisualMode(int type) {
- String showSelectionBar = VpePreference.SHOW_SELECTION_TAG_BAR
- .getValue();
- switch (type) {
- case VISUALSOURCE_MODE:
- selectionBar.showBar(showSelectionBar);
- if (sourceContent != null)
- sourceContent.setVisible(true);
- if (visualContent != null)
- visualContent.setVisible(true);
- if (previewContent != null) {
- previewContent.setVisible(false);
- }
- break;
+ public void setVisualMode(int type) {
+ String showSelectionBar = VpePreference.SHOW_SELECTION_TAG_BAR
+ .getValue();
+ switch (type) {
+ case VISUALSOURCE_MODE:
+ selectionBar.showBar(showSelectionBar);
+ if (sourceContent != null)
+ sourceContent.setVisible(true);
+ if (visualContent != null)
+ visualContent.setVisible(true);
+ if (previewContent != null) {
+ previewContent.setVisible(false);
+ }
+ break;
- case VISUAL_MODE:
- selectionBar.showBar(showSelectionBar);
- if (sourceContent != null)
- sourceContent.setVisible(false);
- if (visualContent != null)
- visualContent.setVisible(true);
- if (previewContent != null) {
- previewContent.setVisible(false);
- }
- break;
+ case VISUAL_MODE:
+ selectionBar.showBar(showSelectionBar);
+ if (sourceContent != null)
+ sourceContent.setVisible(false);
+ if (visualContent != null)
+ visualContent.setVisible(true);
+ if (previewContent != null) {
+ previewContent.setVisible(false);
+ }
+ break;
- case SOURCE_MODE:
- selectionBar.showBar(showSelectionBar);
- if (sourceContent != null)
- sourceContent.setVisible(true);
- if (visualContent != null)
- visualContent.setVisible(false);
- if (previewContent != null) {
- previewContent.setVisible(false);
- }
- break;
+ case SOURCE_MODE:
+ selectionBar.showBar(showSelectionBar);
+ if (sourceContent != null)
+ sourceContent.setVisible(true);
+ if (visualContent != null)
+ visualContent.setVisible(false);
+ if (previewContent != null) {
+ previewContent.setVisible(false);
+ }
+ break;
- case PREVIEW_MODE:
- if (selectionBar != null) {
- selectionBar.showBar("no");
- }
- if (sourceContent != null) {
- sourceContent.setVisible(false);
- }
+ case PREVIEW_MODE:
+ if (selectionBar != null) {
+ selectionBar.showBar("no");
+ }
+ if (sourceContent != null) {
+ sourceContent.setVisible(false);
+ }
- if (visualContent != null) {
- visualContent.setVisible(false);
- }
+ if (visualContent != null) {
+ visualContent.setVisible(false);
+ }
- if (previewContent != null) {
- previewWebBrowser.rebuildDom();
- previewContent.setVisible(true);
- }
- break;
+ if (previewContent != null) {
+ previewWebBrowser.rebuildDom();
+ previewContent.setVisible(true);
+ }
+ break;
+ }
+ container.layout();
+ if (visualMode == SOURCE_MODE && type != SOURCE_MODE) {
+ visualMode = type;
+ if (controller != null) {
+ controller.visualRefresh();
+ controller.sourceSelectionChanged();
+ }
+ }
+ visualMode = type;
}
- container.layout();
- if (visualMode == SOURCE_MODE && type != SOURCE_MODE) {
- visualMode = type;
- if (controller != null) {
- controller.visualRefresh();
- controller.sourceSelectionChanged();
- }
+
+ public int getVisualMode() {
+ return visualMode;
}
- visualMode = type;
- }
- public int getVisualMode() {
- return visualMode;
- }
+ public void createPartControl(Composite parent) {
+ controlCount++;
+ if (controlCount > 1)
+ return;
+ // //////////////////////////////////////////////////////////////
- public void createPartControl(Composite parent) {
- controlCount++;
- if (controlCount > 1)
- return;
- // //////////////////////////////////////////////////////////////
+ Composite cmpEdTl = new Composite(parent, SWT.NONE);
+ GridLayout layoutEdTl = new GridLayout(1, false);
+ layoutEdTl.verticalSpacing = 0;
+ layoutEdTl.marginHeight = 0;
+ layoutEdTl.marginBottom = 3;
+ layoutEdTl.marginWidth = 0;
+ cmpEdTl.setLayout(layoutEdTl);
+ cmpEdTl.setLayoutData(new GridData(GridData.FILL_BOTH));
- Composite cmpEdTl = new Composite(parent, SWT.NONE);
- GridLayout layoutEdTl = new GridLayout(1, false);
- layoutEdTl.verticalSpacing = 0;
- layoutEdTl.marginHeight = 0;
- layoutEdTl.marginBottom = 3;
- layoutEdTl.marginWidth = 0;
- cmpEdTl.setLayout(layoutEdTl);
- cmpEdTl.setLayoutData(new GridData(GridData.FILL_BOTH));
+ Composite cmpEd = new Composite(cmpEdTl, SWT.NATIVE);
+ GridLayout layoutEd = new GridLayout(1, false);
+ layoutEd.marginBottom = 0;
+ layoutEd.marginHeight = 1;
+ layoutEd.marginWidth = 0;
+ layoutEd.marginRight = 0;
+ layoutEd.marginLeft = 1;
+ layoutEd.verticalSpacing = 0;
+ layoutEd.horizontalSpacing = 0;
+ cmpEd.setLayout(layoutEd);
+ cmpEd.setLayoutData(new GridData(GridData.FILL_BOTH));
+ // /////////////////////////////////////////////////////////////////
+ container = new SashForm(cmpEd, SWT.VERTICAL);
+ container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ sourceContent = new Composite(container, SWT.NONE);
+ sourceContent.setLayout(new FillLayout());
+ visualContent = new Composite(container, SWT.NONE);
+ visualContent.setLayout(new FillLayout());
- Composite cmpEd = new Composite(cmpEdTl, SWT.NATIVE);
- GridLayout layoutEd = new GridLayout(1, false);
- layoutEd.marginBottom = 0;
- layoutEd.marginHeight = 1;
- layoutEd.marginWidth = 0;
- layoutEd.marginRight = 0;
- layoutEd.marginLeft = 1;
- layoutEd.verticalSpacing = 0;
- layoutEd.horizontalSpacing = 0;
- cmpEd.setLayout(layoutEd);
- cmpEd.setLayoutData(new GridData(GridData.FILL_BOTH));
- // /////////////////////////////////////////////////////////////////
- container = new SashForm(cmpEd, SWT.VERTICAL);
- container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- sourceContent = new Composite(container, SWT.NONE);
- sourceContent.setLayout(new FillLayout());
- visualContent = new Composite(container, SWT.NONE);
- visualContent.setLayout(new FillLayout());
+ // Create a preview content
+ previewContent = new Composite(container, SWT.NONE);
+ previewContent.setLayout(new FillLayout());
- // Create a preview content
- previewContent = new Composite(container, SWT.NONE);
- previewContent.setLayout(new FillLayout());
+ // ////////////////////////////////////////////////////
- // ////////////////////////////////////////////////////
+ selectionBar.createToolBarComposite(cmpEdTl, true);
+ // ///////////////////////////////////////////////////
+ if (sourceEditor == null)
+ sourceEditor = new StructuredTextEditor() {
+ public void safelySanityCheckState(IEditorInput input) {
+ super.safelySanityCheckState(input);
+ }
+ };
+ int[] weights = loadSplitterPosition();
+ if (weights != null)
+ container.setWeights(weights);
+ container.addWeightsChangeListener(new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent event) {
+ saveSplitterPosition(container.getWeights());
+ }
+ });
+ parent.addControlListener(new ControlListener() {
+ public void controlMoved(ControlEvent event) {
- selectionBar.createToolBarComposite(cmpEdTl, true);
- // ///////////////////////////////////////////////////
- if (sourceEditor == null)
- sourceEditor = new StructuredTextEditor() {
- public void safelySanityCheckState(IEditorInput input) {
- super.safelySanityCheckState(input);
+ }
+
+ public void controlResized(ControlEvent event) {
+ container.layout();
+ }
+ });
+ visualEditor = new MozillaEditor();
+ try {
+ visualEditor.init(getEditorSite(), getEditorInput());
+ } catch (Exception e) {
+ VpePlugin.reportProblem(e);
}
- };
- int[] weights = loadSplitterPosition();
- if (weights != null)
- container.setWeights(weights);
- container.addWeightsChangeListener(new PropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- saveSplitterPosition(container.getWeights());
- }
- });
- parent.addControlListener(new ControlListener() {
- public void controlMoved(ControlEvent event) {
- }
+ previewWebBrowser = new MozillaPreview(this, sourceEditor);
+ try {
+ previewWebBrowser.init(getEditorSite(), getEditorInput());
+ } catch (Exception e) {
+ VpePlugin.reportProblem(e);
+ }
- public void controlResized(ControlEvent event) {
- container.layout();
- }
- });
- visualEditor = new MozillaEditor();
- try {
- visualEditor.init(getEditorSite(), getEditorInput());
- } catch (Exception e) {
- VpePlugin.reportProblem(e);
- }
+ try {
+ sourceEditor.addPropertyListener(new IPropertyListener() {
+ public void propertyChanged(Object source, int propId) {
+ if (propId == IWorkbenchPartConstants.PROP_TITLE) {
+ VpeEditorPart.this.setPartName(sourceEditor.getTitle());
+ }
+ VpeEditorPart.this.firePropertyChange(propId);
+ }
+ });
+ sourceEditor.init(getEditorSite(), getEditorInput());
- previewWebBrowser = new MozillaPreview(this, sourceEditor);
- try {
- previewWebBrowser.init(getEditorSite(), getEditorInput());
- } catch (Exception e) {
- VpePlugin.reportProblem(e);
- }
+ if (sourceContent != null) {
+ sourceEditor.createPartControl(sourceContent);
+ }
+ if (visualEditor != null) {
+ visualEditor
+ .setEditorLoadWindowListener(new EditorLoadWindowListener() {
+ public void load() {
+ visualEditor.setEditorLoadWindowListener(null);
+ controller = new VpeController(
+ VpeEditorPart.this);
+ selectionBar.setVpeController(controller);
+ controller
+ .setSelectionBarController(selectionBar);
+ try {
+ controller.init(sourceEditor, visualEditor);
+ } catch (Exception e) {
+ VpePlugin.reportProblem(e);
+ }
+ }
+ });
+ visualEditor.createPartControl(visualContent);
+ }
- try {
- sourceEditor.addPropertyListener(new IPropertyListener() {
- public void propertyChanged(Object source, int propId) {
- if (propId == IWorkbenchPartConstants.PROP_TITLE) {
- VpeEditorPart.this.setPartName(sourceEditor.getTitle());
- }
- VpeEditorPart.this.firePropertyChange(propId);
- }
- });
- sourceEditor.init(getEditorSite(), getEditorInput());
+ if (previewWebBrowser != null) {
+ previewWebBrowser
+ .setEditorLoadWindowListener(new EditorLoadWindowListener() {
+ public void load() {
+ previewWebBrowser
+ .setEditorLoadWindowListener(null);
+ previewWebBrowser.buildDom();
+ }
+ });
+ previewWebBrowser.createPartControl(previewContent);
+ }
- if (sourceContent != null) {
- sourceEditor.createPartControl(sourceContent);
- }
- if (visualEditor != null) {
- visualEditor
- .setEditorLoadWindowListener(new EditorLoadWindowListener() {
- public void load() {
- visualEditor.setEditorLoadWindowListener(null);
- controller = new VpeController(
- VpeEditorPart.this);
- selectionBar.setVpeController(controller);
- controller
- .setSelectionBarController(selectionBar);
- try {
- controller.init(sourceEditor, visualEditor);
- } catch (Exception e) {
- VpePlugin.reportProblem(e);
+ activeEditor = sourceEditor;
+
+ sourceContent.addListener(SWT.Activate, new Listener() {
+ public void handleEvent(Event event) {
+ if (event.type == SWT.Activate) {
+ if (activeEditor != sourceEditor) {
+ activeEditor = sourceEditor;
+ setFocus();
+ }
+ }
}
- }
});
- visualEditor.createPartControl(visualContent);
- }
- if (previewWebBrowser != null) {
- previewWebBrowser
- .setEditorLoadWindowListener(new EditorLoadWindowListener() {
- public void load() {
- previewWebBrowser
- .setEditorLoadWindowListener(null);
- previewWebBrowser.buildDom();
- }
+ visualContent.addListener(SWT.Activate, new Listener() {
+ public void handleEvent(Event event) {
+ if (event.type == SWT.Activate) {
+ if (visualEditor != null
+ && activeEditor != visualEditor) {
+ activeEditor = visualEditor;
+ setFocus();
+ }
+ }
+ }
});
- previewWebBrowser.createPartControl(previewContent);
- }
- activeEditor = sourceEditor;
+ previewContent.addListener(SWT.Activate, new Listener() {
+ public void handleEvent(Event event) {
+ if (event.type == SWT.Activate) {
+ if (previewWebBrowser != null
+ && activeEditor != previewWebBrowser) {
+ activeEditor = previewWebBrowser;
+ setFocus();
+ }
+ }
+ }
+ });
- sourceContent.addListener(SWT.Activate, new Listener() {
- public void handleEvent(Event event) {
- if (event.type == SWT.Activate) {
- if (activeEditor != sourceEditor) {
- activeEditor = sourceEditor;
- setFocus();
- }
- }
+ IWorkbenchWindow window = getSite().getWorkbenchWindow();
+ window.getPartService().addPartListener(activationListener);
+ window.getShell().addShellListener(activationListener);
+
+ } catch (Exception e) {
+ VpePlugin.reportProblem(e);
}
- });
+ // setVisualMode(visualMode);
+ // ///////////////////////////////////////
+ // ///// Add preference listener
+ optionsObject = ModelUtilities.getPreferenceModel().getByPath(
+ VpePreference.EDITOR_PATH);
+ listener = new XModelTreeListener() {
- visualContent.addListener(SWT.Activate, new Listener() {
- public void handleEvent(Event event) {
- if (event.type == SWT.Activate) {
- if (visualEditor != null
- && activeEditor != visualEditor) {
- activeEditor = visualEditor;
- setFocus();
+ public void nodeChanged(XModelTreeEvent event) {
+ String showSelectionBar = VpePreference.SHOW_SELECTION_TAG_BAR
+ .getValue();
+ selectionBar.showBar(showSelectionBar);
}
- }
- }
- });
- previewContent.addListener(SWT.Activate, new Listener() {
- public void handleEvent(Event event) {
- if (event.type == SWT.Activate) {
- if (previewWebBrowser != null
- && activeEditor != previewWebBrowser) {
- activeEditor = previewWebBrowser;
- setFocus();
+ public void structureChanged(XModelTreeEvent event) {
}
- }
- }
- });
- IWorkbenchWindow window = getSite().getWorkbenchWindow();
- window.getPartService().addPartListener(activationListener);
- window.getShell().addShellListener(activationListener);
-
- } catch (Exception e) {
- VpePlugin.reportProblem(e);
+ };
+ optionsObject.getModel().addModelTreeListener(listener);
+ // ///////////////////////////////////////
+ cmpEd.layout();
}
- // setVisualMode(visualMode);
- // ///////////////////////////////////////
- // ///// Add preference listener
- optionsObject = ModelUtilities.getPreferenceModel().getByPath(
- VpePreference.EDITOR_PATH);
- listener = new XModelTreeListener() {
- public void nodeChanged(XModelTreeEvent event) {
- String showSelectionBar = VpePreference.SHOW_SELECTION_TAG_BAR
- .getValue();
- selectionBar.showBar(showSelectionBar);
- }
-
- public void structureChanged(XModelTreeEvent event) {
- }
-
- };
- optionsObject.getModel().addModelTreeListener(listener);
- // ///////////////////////////////////////
- cmpEd.layout();
- }
-
- public void setFocus() {
- if (activeEditor != null) {
- activeEditor.setFocus();
+ public void setFocus() {
+ if (activeEditor != null) {
+ activeEditor.setFocus();
+ }
}
- }
- public void dispose() {
- super.dispose();
- if (optionsObject != null) {
- optionsObject.getModel().removeModelTreeListener(listener);
- }
- if (activationListener != null) {
- IWorkbenchWindow window = getSite().getWorkbenchWindow();
- window.getPartService().removePartListener(activationListener);
- Shell shell = window.getShell();
- if (shell != null && !shell.isDisposed())
- shell.removeShellListener(activationListener);
- activationListener = null;
- }
- if (controller != null) {
- controller.dispose();
- controller = null;
- }
+ public void dispose() {
+ super.dispose();
+ if (optionsObject != null) {
+ optionsObject.getModel().removeModelTreeListener(listener);
+ }
+ if (activationListener != null) {
+ IWorkbenchWindow window = getSite().getWorkbenchWindow();
+ window.getPartService().removePartListener(activationListener);
+ Shell shell = window.getShell();
+ if (shell != null && !shell.isDisposed())
+ shell.removeShellListener(activationListener);
+ activationListener = null;
+ }
+ if (controller != null) {
+ controller.dispose();
+ controller = null;
+ }
- // editor will disposed as part of multipart editor
- if (sourceEditor != null) {
- sourceEditor.dispose();
- sourceEditor = null;
- }
+ // editor will disposed as part of multipart editor
+ if (sourceEditor != null) {
+ sourceEditor.dispose();
+ sourceEditor = null;
+ }
- if (visualEditor != null) {
- visualEditor.dispose();
- visualEditor = null;
- }
+ if (visualEditor != null) {
+ visualEditor.dispose();
+ visualEditor = null;
+ }
- if (previewContent != null) {
- previewContent.dispose();
- previewContent = null;
+ if (previewContent != null) {
+ previewContent.dispose();
+ previewContent = null;
+ }
}
- }
- public Object getAdapter(Class adapter) {
- if (sourceEditor != null) {
- return sourceEditor.getAdapter(adapter);
- } else {
- return null;
+ public Object getAdapter(Class adapter) {
+ if (sourceEditor != null) {
+ return sourceEditor.getAdapter(adapter);
+ } else {
+ return null;
+ }
}
- }
- private class ActivationListener extends ShellAdapter implements
- IPartListener {
- private IWorkbenchPart fActivePart;
- private boolean fIsHandlingActivation = false;
+ private class ActivationListener extends ShellAdapter implements
+ IPartListener {
+ private IWorkbenchPart fActivePart;
+ private boolean fIsHandlingActivation = false;
- public void partActivated(IWorkbenchPart part) {
- fActivePart = part;
- handleActivation();
- }
+ public void partActivated(IWorkbenchPart part) {
+ fActivePart = part;
+ handleActivation();
+ }
- public void partBroughtToTop(IWorkbenchPart part) {
- }
+ public void partBroughtToTop(IWorkbenchPart part) {
+ }
- public void partClosed(IWorkbenchPart part) {
- }
+ public void partClosed(IWorkbenchPart part) {
+ }
- public void partDeactivated(IWorkbenchPart part) {
- fActivePart = null;
- }
+ public void partDeactivated(IWorkbenchPart part) {
+ fActivePart = null;
+ }
- public void partOpened(IWorkbenchPart part) {
- }
+ public void partOpened(IWorkbenchPart part) {
+ }
- public void shellActivated(ShellEvent e) {
- e.widget.getDisplay().asyncExec(new Runnable() {
- public void run() {
- handleActivation();
+ public void shellActivated(ShellEvent e) {
+ e.widget.getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ handleActivation();
+ }
+ });
}
- });
- }
- private void handleActivation() {
- if (fIsHandlingActivation)
- return;
+ private void handleActivation() {
+ if (fIsHandlingActivation)
+ return;
- if (fActivePart == multiPageEditor) {
- fIsHandlingActivation = true;
- try {
- if (sourceEditor != null) {
- if (controller != null) {
- controller.refreshTemplates();
+ if (fActivePart == multiPageEditor) {
+ fIsHandlingActivation = true;
+ try {
+ if (sourceEditor != null) {
+ if (controller != null) {
+ controller.refreshTemplates();
+ }
+ sourceEditor.safelySanityCheckState(getEditorInput());
+ }
+ } finally {
+ fIsHandlingActivation = false;
+ }
}
- sourceEditor.safelySanityCheckState(getEditorInput());
- }
- } finally {
- fIsHandlingActivation = false;
}
- }
}
- }
- public VpeController getController() {
- return controller;
- }
+ public VpeController getController() {
+ return controller;
+ }
}
17 years, 4 months
JBoss Tools SVN: r3288 - in trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets: FaceletsKickStartWithRILibs/WebContent/WEB-INF/lib and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-08-23 07:00:41 -0400 (Thu, 23 Aug 2007)
New Revision: 3288
Added:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsBlankWithoutLibs/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithRILibs/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithRILibs/WebContent/WEB-INF/lib/el-api.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithRILibs/WebContent/WEB-INF/lib/el-ri.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithoutLibs/
Removed:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsBlank/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStart/
Log:
http://jira.jboss.com/jira/browse/JBIDE-680 Refactor templates. New names: "with libs" and "without libs"
Copied: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsBlankWithoutLibs (from rev 2172, trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsBlank)
Copied: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithRILibs (from rev 2172, trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/JSF1.2RI+Facelets+Tomcat5.5)
Copied: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithRILibs/WebContent/WEB-INF/lib/el-api.jar (from rev 2963, trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/JSF1.2RI+Facelets+Tomcat5.5/WebContent/WEB-INF/lib/el-api.jar)
===================================================================
(Binary files differ)
Copied: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithRILibs/WebContent/WEB-INF/lib/el-ri.jar (from rev 2963, trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/JSF1.2RI+Facelets+Tomcat5.5/WebContent/WEB-INF/lib/el-ri.jar)
===================================================================
(Binary files differ)
Copied: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStartWithoutLibs (from rev 2172, trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2-facelets/FaceletsKickStart)
17 years, 4 months
JBoss Tools SVN: r3287 - trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-08-23 06:59:11 -0400 (Thu, 23 Aug 2007)
New Revision: 3287
Added:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStartWithoutLibs/
Removed:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlank/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStart/
Log:
http://jira.jboss.com/jira/browse/JBIDE-680 Refactor templates. New names: "with libs" and "without libs"
Copied: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlankWithoutLibs (from rev 2172, trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFBlank)
Copied: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStartWithoutLibs (from rev 2172, trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.2/JSFKickStart)
17 years, 4 months
JBoss Tools SVN: r3286 - in trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1: JSFBlankWithLibs/WebContent/WEB-INF/classes and 12 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-08-23 06:58:28 -0400 (Thu, 23 Aug 2007)
New Revision: 3286
Added:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/lib/jsf-api.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/lib/jsf-impl.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/.preprocessing
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/.settings/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/.settings/org.jboss.tools.jst.web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/JavaSource/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/JavaSource/demo/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/JavaSource/demo/Messages.properties
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/JavaSource/demo/User.java
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/classes/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/faces-config.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/lib/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/lib/jsf-api.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/lib/jsf-impl.jar
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/web.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/index.jsp
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/pages/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/pages/hello.jsp
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/pages/inputUserName.jsp
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/ant/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/ant/build.xml
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs/
Removed:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlank/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/classes/tmp
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/lib/tmp
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStart/
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/classes/tmp
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/lib/tmp
Log:
http://jira.jboss.com/jira/browse/JBIDE-680 Refactor templates. New names: "with libs" and "without libs"
Copied: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs (from rev 2172, trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlank)
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/classes/tmp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlank/WebContent/WEB-INF/classes/tmp 2007-06-24 19:05:56 UTC (rev 2172)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/classes/tmp 2007-08-23 10:58:28 UTC (rev 3286)
@@ -1 +0,0 @@
-
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/lib/jsf-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/lib/jsf-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/lib/jsf-impl.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/lib/jsf-impl.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/lib/tmp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlank/WebContent/WEB-INF/lib/tmp 2007-06-24 19:05:56 UTC (rev 2172)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFBlankWithLibs/WebContent/WEB-INF/lib/tmp 2007-08-23 10:58:28 UTC (rev 3286)
@@ -1 +0,0 @@
-
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/.preprocessing
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/.preprocessing (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/.preprocessing 2007-08-23 10:58:28 UTC (rev 3286)
@@ -0,0 +1,2 @@
+ant/build.xml
+WebContent/WEB-INF/web.xml
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/.settings/org.jboss.tools.jst.web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/.settings/org.jboss.tools.jst.web.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/.settings/org.jboss.tools.jst.web.xml 2007-08-23 10:58:28 UTC (rev 3286)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FILESYSTEMS APPLICATION_NAME="" ENTITY="FileSystems" WORKSPACE_HOME="./WebContent/WEB-INF">
+ <FILESYSTEM ENTITY="FileSystemFolder" LOCATION="%redhat.workspace%" NAME="WEB-INF"/>
+ <FILESYSTEM ENTITY="FileSystemFolder" INFO="Content-Type=Web"
+ LOCATION="%redhat.workspace%/.." NAME="WEB-ROOT"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%redhat.workspace%/../../JavaSource" NAME="src"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%redhat.workspace%/lib" NAME="lib"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%redhat.workspace%/classes" NAME="classes"/>
+ <FILESYSTEM ENTITY="FileSystemFolder"
+ LOCATION="%redhat.workspace%/../../ant" NAME="build"/>
+ <WEB ENTITY="JstWeb" MODEL_PATH="/web.xml">
+ <MODULE ENTITY="WebJSFModule" MODEL_PATH="/faces-config.xml"
+ ROOT="WEB-ROOT" SRC="src" URI="/WEB-INF/faces-config.xml"/>
+ </WEB>
+</FILESYSTEMS>
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/JavaSource/demo/Messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/JavaSource/demo/Messages.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/JavaSource/demo/Messages.properties 2007-08-23 10:58:28 UTC (rev 3286)
@@ -0,0 +1,3 @@
+header=Hello Demo Application
+prompt_message=Name:
+hello_message=Hello
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/JavaSource/demo/User.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/JavaSource/demo/User.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/JavaSource/demo/User.java 2007-08-23 10:58:28 UTC (rev 3286)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package demo;
+
+/**
+ * Created by Red Hat Developer Studio
+ */
+public class User {
+
+ private String name;
+
+ /**
+ * @return User Name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param User Name
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+}
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/faces-config.xml 2007-08-23 10:58:28 UTC (rev 3286)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+ <description>User Name Bean</description>
+ <managed-bean-name>user</managed-bean-name>
+ <managed-bean-class>demo.User</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <managed-property>
+ <property-name>name</property-name>
+ <property-class>java.lang.String</property-class>
+ <value/>
+ </managed-property>
+ </managed-bean>
+ <navigation-rule>
+ <from-view-id>/pages/inputUserName.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>hello</from-outcome>
+ <to-view-id>/pages/hello.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+</faces-config>
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/lib/jsf-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/lib/jsf-api.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/lib/jsf-impl.jar
===================================================================
(Binary files differ)
Property changes on: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/lib/jsf-impl.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/WEB-INF/web.xml 2007-08-23 10:58:28 UTC (rev 3286)
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+#if ($servlet_version == "2.4")
+<web-app version="2.4"
+xmlns="http://java.sun.com/xml/ns/j2ee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+#else
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+#end
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+#if ($runtimeType == "org.jboss.ide.eclipse.as.runtime.42")
+ <context-param>
+ <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
+ <param-value>true</param-value>
+ </context-param>
+#end
+ <listener>
+ <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>
+
+ <!-- Faces Servlet -->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup> 1 </load-on-startup>
+ </servlet>
+
+
+ <!-- Faces Servlet Mapping -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+</web-app>
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/index.jsp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/index.jsp (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/index.jsp 2007-08-23 10:58:28 UTC (rev 3286)
@@ -0,0 +1,7 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+
+<html>
+ <body>
+ <jsp:forward page="/pages/inputUserName.jsf" />
+ </body>
+</html>
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/pages/hello.jsp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/pages/hello.jsp (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/pages/hello.jsp 2007-08-23 10:58:28 UTC (rev 3286)
@@ -0,0 +1,20 @@
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+
+<f:loadBundle var="Message" basename="demo.Messages" />
+
+<html>
+ <head>
+ <title>Hello!</title>
+ </head>
+
+ <body>
+ <f:view>
+ <h3>
+ <h:outputText value="#{Message.hello_message}" />,
+ <h:outputText value="#{user.name}" />!
+ </h3>
+ </f:view>
+ </body>
+
+</html>
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/pages/inputUserName.jsp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/pages/inputUserName.jsp (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/WebContent/pages/inputUserName.jsp 2007-08-23 10:58:28 UTC (rev 3286)
@@ -0,0 +1,28 @@
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+
+<f:loadBundle var="Message" basename="demo.Messages"/>
+
+<html>
+ <head>
+ <title>Input User Name Page</title>
+ </head>
+ <body>
+
+ <f:view>
+ <h1><h:outputText value="#{Message.header}"/></h1>
+
+ <h:messages style="color: red"/>
+
+ <h:form id="greetingForm">
+ <h:outputText value="#{Message.prompt_message}"/>
+ <h:inputText value="#{user.name}" required="true">
+ <f:validateLength maximum="30" minimum="3"/>
+ </h:inputText>
+
+ <h:commandButton action="hello" value="Say Hello!" />
+
+ </h:form>
+ </f:view>
+ </body>
+</html>
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/ant/build.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/ant/build.xml (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithLibs/ant/build.xml 2007-08-23 10:58:28 UTC (rev 3286)
@@ -0,0 +1,74 @@
+<project name="KickStart" default="deploy" basedir="../">
+
+ <!-- Project settings -->
+ <property file="${basedir}/ant/build.properties" />
+
+ <property name="project.name" value="KickStart" />
+ <property name="web.content.dir" value="${basedir}/WebContent" />
+ <property name="web-inf.dir" value="${web.content.dir}/WEB-INF" />
+ <property name="build.dir" value="build" />
+ <property name="war.name" value="${build.dir}/${project.name}.war" />
+
+ <!-- Define a folder for deployment -->
+ <property name="deploy.dir" value="deploy" />
+
+ <!-- Compile classpath -->
+ <path id="compile.classpath">
+ <fileset dir="${webinf.dir}/lib">
+ <include name="**/*.jar" />
+ </fileset>
+ <pathelement path="${classpath}" />
+ <pathelement path="${classpath.external}" />
+ <pathelement path="${webinf.dir}/classes" />
+ </path>
+
+ <!-- Copy any resource or configuration files -->
+ <target name="copyResources">
+ <copy todir="${web-inf.dir}/classes" includeEmptyDirs="no">
+ <fileset dir="JavaSource">
+ <patternset>
+ <include name="**/*.*" />
+ <exclude name="**/*.java" />
+ </patternset>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- Check timestamp on files -->
+ <target name="prepare">
+ <tstamp />
+ </target>
+
+ <!-- Remove classes directory for clean build -->
+ <target name="clean" description="Prepare for clean build">
+ <delete dir="${web-inf.dir}/classes" failonerror="false"/>
+ <mkdir dir="${web-inf.dir}/classes" />
+ </target>
+
+ <!-- Normal build of application -->
+ <target name="compile" depends="prepare, copyResources">
+ <javac srcdir="JavaSource" destdir="${web-inf.dir}/classes">
+ <classpath refid="compile.classpath" />
+ </javac>
+ </target>
+
+ <!-- Build Project -->
+ <target name="build" depends="prepare, compile" />
+
+ <!-- Rebuild Project -->
+ <target name="rebuild" depends="clean, prepare, compile" />
+
+ <!-- Build WAR -->
+ <target name="war" depends="build">
+ <mkdir dir="${build.dir}" />
+ <war warfile="${war.name}" basedir="${web.content.dir}" webxml="${web-inf.dir}/web.xml">
+ <exclude name="WEB-INF/web.xml" />
+ </war>
+ </target>
+
+ <target name="deploy" depends="war">
+ <delete dir="${deploy.dir}/${project.name}" failonerror="false"/>
+ <copy file="${war.name}" todir="${deploy.dir}" />
+ </target>
+
+</project>
\ No newline at end of file
Copied: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs (from rev 2172, trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStart)
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/classes/tmp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStart/WebContent/WEB-INF/classes/tmp 2007-06-24 19:05:56 UTC (rev 2172)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/classes/tmp 2007-08-23 10:58:28 UTC (rev 3286)
@@ -1 +0,0 @@
-
\ No newline at end of file
Deleted: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/lib/tmp
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStart/WebContent/WEB-INF/lib/tmp 2007-06-24 19:05:56 UTC (rev 2172)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/jsf-1.1/JSFKickStartWithoutLibs/WebContent/WEB-INF/lib/tmp 2007-08-23 10:58:28 UTC (rev 3286)
@@ -1 +0,0 @@
-
\ No newline at end of file
17 years, 4 months
JBoss Tools SVN: r3285 - trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-08-23 06:54:17 -0400 (Thu, 23 Aug 2007)
New Revision: 3285
Modified:
trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-833 removed jsf 1.0 version
Modified: trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml 2007-08-23 10:42:39 UTC (rev 3284)
+++ trunk/common/plugins/org.jboss.tools.common.projecttemplates/templates/JSFVersions.xml 2007-08-23 10:54:17 UTC (rev 3285)
@@ -1,12 +1,5 @@
<versions>
- <version displayName="JSF 1.0 - Reference Implementation">
- <lib type="core" location="../lib/jsf-1.0" />
- <lib type="common" location="../lib/ApacheCommon2.3" />
- <refLib type="servlet" location="../servlet" />
- <projectTempl location="./jsf-1.0" />
- </version>
<version displayName="JSF 1.1.02 - Reference Implementation">
- <lib type="core" location="../lib/jsf-1.1.02" />
<lib type="common" location="../lib/ApacheCommon2.3" />
<refLib type="servlet" location="../servlet" />
<projectTempl location="./jsf-1.1" />
17 years, 4 months