JBoss Tools SVN: r3517 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core: jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-10 21:44:15 -0400 (Mon, 10 Sep 2007)
New Revision: 3517
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/schema/pollerTimeoutListener.exsd
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
Removed an outdated extension point. It was never used.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java 2007-09-11 00:59:37 UTC (rev 3516)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/server/polling/PollThread.java 2007-09-11 01:44:15 UTC (rev 3517)
@@ -171,7 +171,6 @@
currentState = getTimeoutBehavior();
poller.cleanup();
alertEventLogTimeout();
- fireTimeoutEvent();
finalAlert = false;
}
alertBehavior(currentState, finalAlert);
@@ -204,15 +203,7 @@
return expectedState;
}
-
- protected void fireTimeoutEvent() {
-// IServerPollerTimeoutListener[] listeners =
-// JBossServerCore.getDefault().getTimeoutListeners(poller.getClass().getName());
-// for( int i = 0; i < listeners.length; i++ ) {
-// listeners[i].serverTimedOut(getServer(), expectedState);
-// }
- }
-
+
protected IServer getServer() {
return behavior.getServer();
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-09-11 00:59:37 UTC (rev 3516)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-09-11 01:44:15 UTC (rev 3517)
@@ -3,7 +3,6 @@
<plugin>
<extension-point id="pollers" name="org.jboss.ide.eclipse.as.core.runtime.server.pollers" schema="schema/pollers.exsd"/>
- <extension-point id="pollerTimeoutListener" name="org.jboss.ide.eclipse.as.core.pollerTimeoutListener" schema="schema/pollerTimeoutListener.exsd"/>
<extension
point="org.eclipse.wst.server.core.serverTypes">
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/schema/pollerTimeoutListener.exsd
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/schema/pollerTimeoutListener.exsd 2007-09-11 00:59:37 UTC (rev 3516)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/schema/pollerTimeoutListener.exsd 2007-09-11 01:44:15 UTC (rev 3517)
@@ -1,113 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.jboss.ide.eclipse.as.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.jboss.ide.eclipse.as.core" id="pollerTimeoutListener" name="org.jboss.ide.eclipse.as.core.pollerTimeoutListener"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="pollerTimeoutListener" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
-
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="pollerTimeoutListener">
- <complexType>
- <attribute name="pollerType" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="listener" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute kind="java" basedOn="org.jboss.ide.eclipse.as.core.runtime.server.IServerPollerTimeoutListener"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
17 years, 4 months
JBoss Tools SVN: r3516 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-10 20:59:37 -0400 (Mon, 10 Sep 2007)
New Revision: 3516
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
Added a ports property default list for jboss 3.2 servers.
Modified plugin.xml for as.core and as.ui to more closely resemble the generic structure with regards to runtime vs runtime component
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-09-11 00:59:35 UTC (rev 3515)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-09-11 00:59:37 UTC (rev 3516)
@@ -105,7 +105,7 @@
<extension point="org.eclipse.wst.common.project.facet.core.runtimes">
<adapter>
- <runtime-component id="org.jboss.ide.eclipse.as.runtime.component.42"/>
+ <runtime-component id="org.jboss.ide.eclipse.as.runtime.component"/>
<factory class="org.eclipse.jst.server.ui.internal.RuntimeLabelProvider$Factory"/>
<type class="org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider"/>
</adapter>
17 years, 4 months
JBoss Tools SVN: r3515 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core: properties and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-10 20:59:35 -0400 (Mon, 10 Sep 2007)
New Revision: 3515
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/properties/jboss.32.default.ports.properties
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
Added a ports property default list for jboss 3.2 servers.
Modified plugin.xml for as.core and as.ui to more closely resemble the generic structure with regards to runtime vs runtime component
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-09-11 00:50:41 UTC (rev 3514)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-09-11 00:59:35 UTC (rev 3515)
@@ -317,16 +317,16 @@
<extension
point="org.eclipse.jst.server.core.runtimeFacetMappings">
<runtimeFacetMapping
- runtime-component="org.jboss.ide.eclipse.as.runtime.component.32"
runtimeTypeId="org.jboss.ide.eclipse.as.runtime.32"
+ runtime-component="org.jboss.ide.eclipse.as.runtime.component"
version="3.2"/>
<runtimeFacetMapping
- runtime-component="org.jboss.ide.eclipse.as.runtime.component.40"
runtimeTypeId="org.jboss.ide.eclipse.as.runtime.40"
+ runtime-component="org.jboss.ide.eclipse.as.runtime.component"
version="4.0"/>
<runtimeFacetMapping
- runtime-component="org.jboss.ide.eclipse.as.runtime.component.42"
runtimeTypeId="org.jboss.ide.eclipse.as.runtime.42"
+ runtime-component="org.jboss.ide.eclipse.as.runtime.component"
version="4.2"/>
</extension>
@@ -335,17 +335,15 @@
<extension
point="org.eclipse.wst.common.project.facet.core.runtimes">
- <runtime-component-type id="org.jboss.ide.eclipse.as.runtime.component.32"/>
- <runtime-component-type id="org.jboss.ide.eclipse.as.runtime.component.40"/>
- <runtime-component-type id="org.jboss.ide.eclipse.as.runtime.component.42"/>
+ <runtime-component-type id="org.jboss.ide.eclipse.as.runtime.component"/>
<runtime-component-version
- type="org.jboss.ide.eclipse.as.runtime.component.32"
+ type="org.jboss.ide.eclipse.as.runtime.component"
version="3.2"/>
<runtime-component-version
- type="org.jboss.ide.eclipse.as.runtime.component.40"
+ type="org.jboss.ide.eclipse.as.runtime.component"
version="4.0"/>
<runtime-component-version
- type="org.jboss.ide.eclipse.as.runtime.component.42"
+ type="org.jboss.ide.eclipse.as.runtime.component"
version="4.2"/>
@@ -353,7 +351,7 @@
<supported>
<runtime-component
- id="org.jboss.ide.eclipse.as.runtime.component.32"
+ id="org.jboss.ide.eclipse.as.runtime.component"
version="3.2"/>
<facet id="jst.web" version="2.2,2.3,2.4"/>
<facet id="jst.java" version="1.3,1.4,5.0"/>
@@ -366,7 +364,7 @@
<supported>
<runtime-component
- id="org.jboss.ide.eclipse.as.runtime.component.40"
+ id="org.jboss.ide.eclipse.as.runtime.component"
version="4.0"/>
<facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
<facet id="jst.java" version="1.3,1.4,5.0"/>
@@ -378,7 +376,7 @@
<supported>
<runtime-component
- id="org.jboss.ide.eclipse.as.runtime.component.42"
+ id="org.jboss.ide.eclipse.as.runtime.component"
version="4.2"/>
<facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
<facet id="jst.java" version="1.3,1.4,5.0"/>
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/properties/jboss.32.default.ports.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/properties/jboss.32.default.ports.properties (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/properties/jboss.32.default.ports.properties 2007-09-11 00:59:35 UTC (rev 3515)
@@ -0,0 +1,6 @@
+JNDI=//server/mbean[@name='jboss:service=Naming']/attribute[@name='Port']
+JNDI_FILE=**/jboss-service.xml
+JBoss_Web=//Server/Service[@name='jboss.web']/Connector[count(@sslProtocol) = 0 and (count(@protocol) = 0 or @protocol = 'HTTP/1.1')]
+JBoss_Web_ATTRIBUTE=port
+JBoss_Web_FILE=**/*server.xml
+JNDI_RMI=//server/mbean[@name='jboss:service=Naming']/attribute[@name='RmiPort']
17 years, 4 months
JBoss Tools SVN: r3514 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/model/descriptor.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-10 20:50:41 -0400 (Mon, 10 Sep 2007)
New Revision: 3514
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/model/descriptor/XPathFileResult.java
Log:
attribute of the empty string forced hasAttribute() to return true.
This was a bug.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/model/descriptor/XPathFileResult.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/model/descriptor/XPathFileResult.java 2007-09-10 22:07:03 UTC (rev 3513)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/model/descriptor/XPathFileResult.java 2007-09-11 00:50:41 UTC (rev 3514)
@@ -56,7 +56,7 @@
this.node = node;
this.attribute = attribute;
this.index = index;
- this.hasAttribute = attribute == null ? false : true;
+ this.hasAttribute = attribute == null || attribute.equals("") ? false : true;
}
public int getIndex() {
17 years, 4 months
JBoss Tools SVN: r3513 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-10 18:07:03 -0400 (Mon, 10 Sep 2007)
New Revision: 3513
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
JBIDE-822 part 2
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2007-09-10 18:54:43 UTC (rev 3512)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2007-09-10 22:07:03 UTC (rev 3513)
@@ -33,22 +33,13 @@
org.eclipse.ui.ide,
org.eclipse.jst.server.core,
org.eclipse.wst.common.project.facet.core,
- org.eclipse.jst.server.tomcat.core,
org.eclipse.jst.servlet.ui,
org.eclipse.jst.j2ee,
org.eclipse.jst.j2ee.ui,
org.eclipse.wst.web.ui,
org.eclipse.wst.common.frameworks.ui,
- org.eclipse.jst.server.tomcat.ui,
org.eclipse.core.variables,
org.eclipse.search,
- org.eclipse.jst.ws,
- org.eclipse.jst.ws.ui,
- org.eclipse.jst.ws.consumption,
- org.eclipse.jst.ws.consumption.ui,
- org.eclipse.jst.ws.axis.creation.ui,
- org.eclipse.wst.ws,
- org.eclipse.wst.ws.ui,
org.apache.ant,
org.jboss.ide.eclipse.as.core,
org.jboss.ide.eclipse.firstrun;resolution:=optional,
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-09-10 18:54:43 UTC (rev 3512)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-09-10 22:07:03 UTC (rev 3513)
@@ -103,6 +103,13 @@
</extension>
+ <extension point="org.eclipse.wst.common.project.facet.core.runtimes">
+ <adapter>
+ <runtime-component id="org.jboss.ide.eclipse.as.runtime.component.42"/>
+ <factory class="org.eclipse.jst.server.ui.internal.RuntimeLabelProvider$Factory"/>
+ <type class="org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider"/>
+ </adapter>
+ </extension>
17 years, 4 months
JBoss Tools SVN: r3512 - in trunk/seam/plugins/org.jboss.tools.seam.core: src/org/jboss/tools/seam/internal/core and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-10 14:54:43 -0400 (Mon, 10 Sep 2007)
New Revision: 3512
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.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/project/facet/SeamFacetInstallDelegete.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear/.settings/org.eclipse.wst.common.component
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear/EarContent/META-INF/application.xml
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ejb/.classpath
Log:
fixes for :
http://jira.jboss.org/jira/browse/JBIDE-759
http://jira.jboss.org/jira/browse/JBIDE-351
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java 2007-09-10 18:54:35 UTC (rev 3511)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java 2007-09-10 18:54:43 UTC (rev 3512)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.seam.core.project.facet;
-import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -18,10 +17,8 @@
import java.util.Map;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
-import org.jboss.tools.seam.internal.core.SeamPreferenceInitializer;
import org.jboss.tools.seam.internal.core.project.facet.SeamFacetPreferenceInitializer;
/**
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-09-10 18:54:35 UTC (rev 3511)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-09-10 18:54:43 UTC (rev 3512)
@@ -63,18 +63,23 @@
* @author Viacheslav Kabanovich
*/
public class SeamProject extends SeamObject implements ISeamProject, IProjectNature {
+
IProject project;
+
ClassPath classPath = new ClassPath(this);
SeamRuntime runtime = null;
Set<IPath> sourcePaths = new HashSet<IPath>();
+
private boolean isStorageResolved = false;
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>();
{
@@ -86,8 +91,11 @@
}
Map<String, SeamComponent> allComponents = new HashMap<String, SeamComponent>();
+
protected Set<ISeamFactory> allFactories = new HashSet<ISeamFactory>();
+
Set<ISeamContextVariable> allVariables = new HashSet<ISeamContextVariable>();
+
Map<String, SeamJavaComponentDeclaration> javaDeclarations = new HashMap<String, SeamJavaComponentDeclaration>();
Map<String, ISeamPackage> packages = new HashMap<String, ISeamPackage>();
@@ -96,20 +104,35 @@
SeamValidationContext validationContext;
+ /**
+ *
+ */
public SeamProject() {}
+ /**
+ *
+ */
public void configure() throws CoreException {
addToBuildSpec(SeamCoreBuilder.BUILDER_ID);
}
+ /**
+ *
+ */
public void deconfigure() throws CoreException {
removeFromBuildSpec(SeamCoreBuilder.BUILDER_ID);
}
+ /**
+ *
+ */
public IProject getProject() {
return project;
}
+ /**
+ *
+ */
public SeamRuntime getRuntime() {
return runtime;
}
@@ -137,25 +160,40 @@
return scopesMap.get(scopeType);
}
+ /**
+ *
+ */
public Collection<ISeamPackage> getPackages() {
return packages.values();
}
+ /**
+ *
+ */
public Collection<ISeamPackage> getAllPackages() {
List<ISeamPackage> list = new ArrayList<ISeamPackage>();
SeamPackageUtil.collectAllPackages(packages, list);
return list;
}
+ /**
+ *
+ */
public ISeamPackage getPackage(ISeamComponent c) {
String pkg = SeamPackageUtil.getPackageName(c);
return SeamPackageUtil.findPackage(this, packages, pkg);
}
+ /**
+ *
+ */
public ISeamProject getSeamProject() {
return this;
}
+ /**
+ *
+ */
public void setProject(IProject project) {
this.project = project;
setSourcePath(project.getFullPath());
@@ -165,6 +203,9 @@
// load();
}
+ /**
+ *
+ */
void loadRuntime() {
IEclipsePreferences prefs = getSeamPreferences();
if(prefs == null) return;
@@ -177,11 +218,19 @@
}
}
+ /**
+ *
+ * @return
+ */
public IEclipsePreferences getSeamPreferences() {
IScopeContext projectScope = new ProjectScope(project);
return projectScope.getNode(SeamCorePlugin.PLUGIN_ID);
}
+ /**
+ *
+ * @param p
+ */
public void addSeamProject(SeamProject p) {
if(dependsOn.contains(p)) return;
dependsOn.add(p);
@@ -202,14 +251,26 @@
}
}
+ /**
+ *
+ * @return
+ */
public Set<SeamProject> getSeamProjects() {
return dependsOn;
}
+ /**
+ *
+ * @param p
+ */
public void addDependentSeamProject(SeamProject p) {
usedBy.add(p);
}
+ /**
+ *
+ * @param p
+ */
public void removeSeamProject(SeamProject p) {
if(!dependsOn.contains(p)) return;
p.usedBy.remove(this);
@@ -223,10 +284,18 @@
}
}
+ /**
+ *
+ * @return
+ */
public ClassPath getClassPath() {
return classPath;
}
+ /**
+ *
+ * @param load
+ */
public void resolveStorage(boolean load) {
if(isStorageResolved) return;
if(load) {
@@ -236,6 +305,9 @@
}
}
+ /**
+ *
+ */
public void resolve() {
resolveStorage(true);
}
@@ -285,6 +357,9 @@
XMLUtilities.serialize(root, file.getAbsolutePath());
}
+ /**
+ *
+ */
void storeRuntime() {
IEclipsePreferences prefs = getSeamPreferences();
String runtimeName = prefs.get(RUNTIME_NAME, null);
@@ -305,6 +380,9 @@
}
}
+ /*
+ *
+ */
private void storeSourcePaths(Element root) {
Element sourcePathsElement = XMLUtilities.createElement(root, "source-paths");
for (IPath path : sourcePaths) {
@@ -313,6 +391,9 @@
}
}
+ /*
+ *
+ */
private void storeProjectDependencies(Element root) {
Element dependsOnElement = XMLUtilities.createElement(root, "depends-on-projects");
for (ISeamProject p : dependsOn) {
@@ -328,6 +409,9 @@
}
}
+ /*
+ *
+ */
private void loadSourcePaths(Element root) {
Element sourcePathsElement = XMLUtilities.getUniqueChild(root, "source-paths");
if(sourcePathsElement == null) return;
@@ -344,6 +428,9 @@
}
}
+ /*
+ *
+ */
private void loadProjectDependencies(Element root) {
Element dependsOnElement = XMLUtilities.getUniqueChild(root, "depends-on-projects");
if(dependsOnElement != null) {
@@ -376,12 +463,19 @@
}
+ /*
+ *
+ */
private File getStorageFile() {
IPath path = SeamCorePlugin.getDefault().getStateLocation();
File file = new File(path.toFile(), "projects/" + project.getName());
return file;
}
+ /**
+ *
+ * @return
+ */
public SeamValidationContext getValidationContext() {
if(validationContext==null) {
validationContext = new SeamValidationContext();
@@ -389,10 +483,18 @@
return validationContext;
}
+ /**
+ *
+ * @param name
+ * @return
+ */
public ISeamComponent getComponentByName(String name) {
return allComponents.get(name);
}
+ /**
+ *
+ */
public Set<ISeamComponent> getComponents() {
Set<ISeamComponent> result = new HashSet<ISeamComponent>();
result.addAll(allComponents.values());
@@ -525,6 +627,12 @@
}
}
+ /**
+ *
+ * @param ds
+ * @param source
+ * @throws CloneNotSupportedException
+ */
public void registerComponentsInDependentProjects(LoadedDeclarations ds, IPath source) throws CloneNotSupportedException {
if(usedBy.size() == 0) return;
if(source.toString().endsWith(".jar")) return;
@@ -542,16 +650,31 @@
}
}
+ /**
+ *
+ * @param s1
+ * @param s2
+ * @return
+ */
boolean stringsEqual(String s1, String s2) {
return s1 == null ? s2 == null : s1.equals(s2);
}
+ /*
+ *
+ * @param oldClassName
+ * @param newClassName
+ * @return
+ */
private boolean isClassNameChanged(String oldClassName, String newClassName) {
if(oldClassName == null || oldClassName.length() == 0) return false;
if(newClassName == null || newClassName.length() == 0) return false;
return !oldClassName.equals(newClassName);
}
+ /*
+ *
+ */
private void onXMLLoadedDeclaration(SeamComponent c, String oldClassName, ISeamXmlComponentDeclaration xml) {
String className = xml.getClassName();
List<Change> changes = null;
@@ -619,6 +742,11 @@
}
}
+ /**
+ *
+ * @param source
+ * @return
+ */
public Map<Object,ISeamComponentDeclaration> findComponentDeclarations(IPath source) {
Map<Object,ISeamComponentDeclaration> map = new HashMap<Object, ISeamComponentDeclaration>();
for (SeamComponent c: allComponents.values()) {
@@ -630,6 +758,10 @@
return map;
}
+ /**
+ *
+ * @param removed
+ */
void componentDeclarationsRemoved(Map<Object,ISeamComponentDeclaration> removed) {
Collection<ISeamComponentDeclaration> declarations = removed.values();
for (ISeamComponentDeclaration declaration: declarations) {
@@ -662,6 +794,9 @@
}
}
+ /*
+ *
+ */
private List<Change> removeEmptyComponent(SeamComponent c) {
List<Change> changes = null;
ISeamElement p = c.getParent();
@@ -674,6 +809,9 @@
return changes;
}
+ /*
+ *
+ */
private boolean isComponentEmpty(SeamComponent c) {
if(c.getAllDeclarations().size() == 0) return true;
for (ISeamComponentDeclaration d: c.getAllDeclarations()) {
@@ -682,6 +820,11 @@
return true;
}
+ /**
+ *
+ * @param source
+ * @return
+ */
public Map<Object,ISeamFactory> findFactoryDeclarations(IPath source) {
Map<Object,ISeamFactory> map = new HashMap<Object, ISeamFactory>();
for (ISeamFactory c: allFactories) {
@@ -691,6 +834,10 @@
return map;
}
+ /**
+ *
+ * @param removed
+ */
void factoryDeclarationsRemoved(Map<Object,ISeamFactory> removed) {
Iterator<ISeamFactory> iterator = allFactories.iterator();
List<Change> changes = null;
@@ -725,6 +872,9 @@
return getComponentsByScope(type, false);
}
+ /**
+ *
+ */
public Set<ISeamComponent> getComponentsByScope(ScopeType type, boolean addVisibleScopes) {
Set<ISeamComponent> result = new HashSet<ISeamComponent>();
for(SeamComponent component: allComponents.values()) {
@@ -776,6 +926,9 @@
return getVariablesByScope(scope, false);
}
+ /**
+ *
+ */
public Set<ISeamContextVariable> getVariablesByScope(ScopeType scope, boolean addVisibleScopes) {
Set<ISeamContextVariable> result = new HashSet<ISeamContextVariable>();
for (ISeamContextVariable v: allVariables) {
@@ -786,6 +939,13 @@
return result;
}
+ /**
+ *
+ * @param v
+ * @param scope
+ * @param addVisibleScopes
+ * @return
+ */
private boolean isVisibleInScope(ISeamContextVariable v, ScopeType scope, boolean addVisibleScopes) {
if(scope == v.getScope()) {
return true;
@@ -797,14 +957,23 @@
return false;
}
+ /**
+ *
+ */
public void addFactory(ISeamFactory factory) {
allFactories.add(factory);
}
+ /**
+ *
+ */
public Set<ISeamFactory> getFactories() {
return allFactories;
}
+ /**
+ *
+ */
public Set<ISeamFactory> getFactories(String name, ScopeType scope) {
Set<ISeamFactory> result = new HashSet<ISeamFactory>();
for (ISeamFactory f: allFactories) {
@@ -813,6 +982,9 @@
return result;
}
+ /**
+ *
+ */
public Set<ISeamFactory> getFactoriesByName(String name) {
Set<ISeamFactory> result = new HashSet<ISeamFactory>();
for (ISeamFactory f: allFactories) {
@@ -821,10 +993,16 @@
return result;
}
+ /**
+ *
+ */
public Set<ISeamFactory> getFactoriesByScope(ScopeType scope) {
return getFactoriesByScope(scope, false);
}
+ /**
+ *
+ */
public Set<ISeamFactory> getFactoriesByScope(ScopeType scope, boolean addVisibleScopes) {
Set<ISeamFactory> result = new HashSet<ISeamFactory>();
for (ISeamFactory f: allFactories) {
@@ -835,7 +1013,7 @@
return result;
}
- /* (non-Javadoc)
+ /**
* @see org.jboss.tools.seam.core.ISeamProject#getFactoriesByPath(org.eclipse.core.runtime.IPath)
*/
public Set<ISeamFactory> getFactoriesByPath(IPath path) {
@@ -848,6 +1026,9 @@
return result;
}
+ /**
+ *
+ */
public void removeFactory(ISeamFactory factory) {
allFactories.remove(factory);
allVariables.remove(factory);
@@ -877,10 +1058,19 @@
return set;
}
+ /**
+ *
+ */
public SeamComponent getComponent(String name) {
return name == null ? null : allComponents.get(name);
}
+ /**
+ *
+ * @param name
+ * @param scopeType
+ * @return
+ */
SeamComponent newComponent(String name, ScopeType scopeType) {
SeamComponent c = new SeamComponent();
c.setName(name);
@@ -890,6 +1080,10 @@
return c;
}
+ /**
+ *
+ * @param changes
+ */
void fireChanges(List<Change> changes) {
if(changes == null || changes.size() == 0) return;
SeamProjectChangeEvent event = new SeamProjectChangeEvent(this, changes);
@@ -904,11 +1098,17 @@
}
}
+ /**
+ *
+ */
public synchronized void addSeamProjectListener(ISeamProjectChangeListener listener) {
if(listeners.contains(listener)) return;
listeners.add(listener);
}
+ /**
+ *
+ */
public synchronized void removeSeamProjectListener(ISeamProjectChangeListener listener) {
listeners.remove(listener);
}
@@ -956,14 +1156,23 @@
return result;
}
+ /**
+ *
+ */
int revalidateLock = 0;
+ /**
+ *
+ */
void revalidate() {
if(revalidateLock > 0) return;
revalidateScopes();
revalidatePackages();
}
+ /**
+ *
+ */
void revalidateScopes() {
List<Change> changes = null;
for(SeamComponent c : allComponents.values()) {
@@ -984,11 +1193,19 @@
fireChanges(changes);
}
+ /**
+ *
+ */
void revalidatePackages() {
List<Change> changes = SeamPackageUtil.revalidatePackages(this, allComponents, getComponents(), packages);
fireChanges(changes);
}
+ /**
+ *
+ * @return
+ * @throws CloneNotSupportedException
+ */
Map<IPath, LoadedDeclarations> getAllDeclarations() throws CloneNotSupportedException {
Map<IPath, LoadedDeclarations> map = new HashMap<IPath, LoadedDeclarations>();
for (ISeamComponent c : allComponents.values()) {
@@ -1016,6 +1233,11 @@
return map;
}
+ /**
+ *
+ * @param builderID
+ * @throws CoreException
+ */
protected void addToBuildSpec(String builderID) throws CoreException {
IProjectDescription description = getProject().getDescription();
ICommand command = null;
@@ -1036,9 +1258,21 @@
}
}
+ /**
+ *
+ */
static String EXTERNAL_TOOL_BUILDER = "org.eclipse.ui.externaltools.ExternalToolBuilder";
+
+ /**
+ *
+ */
static final String LAUNCH_CONFIG_HANDLE = "LaunchConfigHandle";
+ /**
+ *
+ * @param builderID
+ * @throws CoreException
+ */
protected void removeFromBuildSpec(String builderID) throws CoreException {
IProjectDescription description = getProject().getDescription();
ICommand[] commands = description.getBuildSpec();
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java 2007-09-10 18:54:35 UTC (rev 3511)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java 2007-09-10 18:54:43 UTC (rev 3512)
@@ -291,6 +291,9 @@
// ********************************************************************************************
AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,"seam.properties"), srcFolder, true);
+ WtpUtils.createSourceFolder(project, new Path("src/test"),new Path("src"));
+ WtpUtils.createSourceFolder(project, new Path("src/action"),new Path("src"));
+ WtpUtils.createSourceFolder(project, new Path("src/model"),new Path("src"));
// Copy sources to src
AntCopyUtils.copyFileToFile(
new File(seamGenHomeFolder,"src/Authenticator.java"),
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java 2007-09-10 18:54:35 UTC (rev 3511)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/WtpUtils.java 2007-09-10 18:54:43 UTC (rev 3512)
@@ -129,7 +129,7 @@
return "";
}
- public static IResource createSourceFolder (IProject project, IPath path) {
+ public static IResource createSourceFolder (IProject project, IPath path, IPath exclude) {
IJavaProject javaProject;
IClasspathEntry[] javaProjectEntries;
IPath outputLocation;
@@ -152,30 +152,8 @@
IPath projPath= javaProject.getProject().getFullPath();
IPath newSourceFolderPath = projPath.append(path);
+ IPath excludeSourceFolderPath = projPath.append(exclude);
- IStatus validate= workspaceRoot.getWorkspace().validatePath(newSourceFolderPath.toString(), IResource.FOLDER);
- if (validate.matches(IStatus.ERROR))
- return null;
-
- IResource res= workspaceRoot.findMember(newSourceFolderPath);
- if (res != null) {
- if (res.getType() != IResource.FOLDER) {
- return null;
- }
- } else {
- URI projLocation= javaProject.getProject().getLocationURI();
- if (projLocation != null) {
- try {
- IFileStore store= EFS.getStore(projLocation).getChild(path.toString());
- if (store.fetchInfo().exists()) {
- return null;
- }
- } catch (CoreException e) {
- // Ignore if we cannot check that the file exists.
- // Assume that it doesn't
- }
- }
- }
ArrayList newEntries= new ArrayList(javaProjectEntries.length + 1);
int projectEntryIndex= -1;
@@ -187,7 +165,10 @@
}
if (projPath.equals(curr.getPath())) {
projectEntryIndex= i;
- }
+ }
+ if (excludeSourceFolderPath.equals(curr.getPath())) {
+ continue;
+ }
}
newEntries.add(curr);
}
@@ -216,9 +197,9 @@
}
}
- IFolder newSourceFolder= javaProject.getProject().getFolder(newSourceFolderPath);
+ IFolder newSourceFolder= javaProject.getProject().getFolder(path);
if (!newSourceFolder.exists()) {
- CoreUtility.createFolder(newSourceFolder, true, true, null);
+ CoreUtility.createFolder(newSourceFolder, true, true, new NullProgressMonitor());
}
javaProject.setRawClasspath(newClasspathEntries, newOutputLocation, new NullProgressMonitor());
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear/.settings/org.eclipse.wst.common.component 2007-09-10 18:54:35 UTC (rev 3511)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear/.settings/org.eclipse.wst.common.component 2007-09-10 18:54:43 UTC (rev 3512)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
-<wb-module deploy-name="@projectName@">
+<wb-module deploy-name="@projectName@-ear">
<wb-resource deploy-path="/" source-path="/EarContent"/>
<dependent-module deploy-path="/" handle="module:/resource/@projectName@-ejb/@projectName@-ejb">
<dependency-type>uses</dependency-type>
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear/EarContent/META-INF/application.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear/EarContent/META-INF/application.xml 2007-09-10 18:54:35 UTC (rev 3511)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear/EarContent/META-INF/application.xml 2007-09-10 18:54:43 UTC (rev 3512)
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
version="5">
- <display-name>t2</display-name>
+ <display-name>@projectName@-ear</display-name>
<module>
<web>
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/templates/ejb/.classpath
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/ejb/.classpath 2007-09-10 18:54:35 UTC (rev 3511)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/ejb/.classpath 2007-09-10 18:54:43 UTC (rev 3512)
@@ -2,7 +2,6 @@
<classpath>
<classpathentry kind="src" path="ejbModule"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.generic.runtimeTarget/@runtimeName@"/>
- <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.jboss.ide.eclipse.as.classpath.core.runtime.ProjectRuntimeInitializer/@runtimeName@"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
17 years, 4 months
JBoss Tools SVN: r3511 - trunk/seam/plugins/org.jboss.tools.seam.ui.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-10 14:54:35 -0400 (Mon, 10 Sep 2007)
New Revision: 3511
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/.classpath
Log:
fixes for :
http://jira.jboss.org/jira/browse/JBIDE-759
http://jira.jboss.org/jira/browse/JBIDE-351
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/.classpath
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/.classpath 2007-09-10 18:54:30 UTC (rev 3510)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/.classpath 2007-09-10 18:54:35 UTC (rev 3511)
@@ -4,5 +4,6 @@
<classpathentry kind="src" path="resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.swt"/>
<classpathentry kind="output" path="bin"/>
</classpath>
17 years, 4 months
JBoss Tools SVN: r3510 - in trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web: context and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-10 14:54:30 -0400 (Mon, 10 Sep 2007)
New Revision: 3510
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/AbstractBrowserContext.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/AdoptWebProjectContext.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java
Log:
fixes for :
http://jira.jboss.org/jira/browse/JBIDE-759
http://jira.jboss.org/jira/browse/JBIDE-351
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/AbstractBrowserContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/AbstractBrowserContext.java 2007-09-10 18:54:26 UTC (rev 3509)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/AbstractBrowserContext.java 2007-09-10 18:54:30 UTC (rev 3510)
@@ -73,7 +73,7 @@
}
} else updateRunPath();
synchronized (monitor) {
- try { monitor.notifyAll(); } catch (Exception e) {}
+ monitor.notifyAll();
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/AdoptWebProjectContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/AdoptWebProjectContext.java 2007-09-10 18:54:26 UTC (rev 3509)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/AdoptWebProjectContext.java 2007-09-10 18:54:30 UTC (rev 3510)
@@ -11,6 +11,7 @@
package org.jboss.tools.jst.web.context;
import java.io.File;
+import java.io.IOException;
import java.util.Properties;
import java.util.StringTokenizer;
@@ -19,6 +20,7 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
import org.jboss.tools.common.util.FileUtil;
+import org.jboss.tools.jst.web.WebModelPlugin;
import org.jboss.tools.jst.web.project.WebModuleConstants;
import org.jboss.tools.jst.web.project.WebModuleImpl;
@@ -139,7 +141,9 @@
if(parent.indexOf("..") >= 0)
try {
parent = new File(parent).getCanonicalPath().replace('\\', '/');
- } catch (Exception t) {}
+ } catch (IOException t) {
+ WebModelPlugin.getPluginLog().logError(t);
+ }
Properties p = new Properties();
p.setProperty("name", name);
p.setProperty("URI", uri);
@@ -200,9 +204,13 @@
src = loc + "/../../JavaSource";
sf = new File(src);
if(sf.isDirectory()) {
- try {
- return sf.getCanonicalPath().replace('\\', '/');
- } catch (Exception e) {}
+
+ try {
+ return sf.getCanonicalPath().replace('\\', '/');
+ } catch (IOException e) {
+ WebModelPlugin.getPluginLog().logError(e);
+ }
+
return src;
}
return null;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java 2007-09-10 18:54:26 UTC (rev 3509)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebDirProjectContext.java 2007-09-10 18:54:30 UTC (rev 3510)
@@ -12,12 +12,15 @@
import java.io.File;
import java.util.Properties;
+
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.loaders.impl.SerializingLoader;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
import org.jboss.tools.common.util.FileUtil;
+import org.jboss.tools.jst.web.WebModelPlugin;
import org.jboss.tools.jst.web.messages.xpl.WebUIMessages;
public abstract class ImportWebDirProjectContext extends ImportWebProjectContext {
@@ -189,7 +192,9 @@
try {
IProject p = getProjectHandle();
if(p.exists()) p.refreshLocal(IProject.DEPTH_INFINITE, null);
- } catch (Exception e) {}
+ } catch (CoreException e) {
+ WebModelPlugin.getPluginLog().logError(e);
+ }
}
public abstract String getNatureID();
17 years, 4 months
JBoss Tools SVN: r3509 - trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-10 14:54:26 -0400 (Mon, 10 Sep 2007)
New Revision: 3509
Modified:
trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
Log:
fixes for :
http://jira.jboss.org/jira/browse/JBIDE-759
http://jira.jboss.org/jira/browse/JBIDE-351
Modified: trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2007-09-10 18:54:22 UTC (rev 3508)
+++ trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2007-09-10 18:54:26 UTC (rev 3509)
@@ -170,7 +170,7 @@
String id = prop.getAttribute("id"); //$NON-NLS-1$
String value = prop.getAttribute("value"); //$NON-NLS-1$
- props.setProperty(id, value == null ? new String()
+ props.setProperty(id, value == null ? ""
: value);
}
props.setProperty(DTP_DB_URL_PROPERTY_ID, "jdbc:hsqldb:.");
17 years, 4 months
JBoss Tools SVN: r3508 - in trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp: jspeditor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-10 14:54:22 -0400 (Mon, 10 Sep 2007)
New Revision: 3508
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/drop/treeviewer/model/ModelElement.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java
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/JSPTextEditor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/AttributeSorter.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPContentOutlineConfiguration.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/ui/action/JSPFormatter.java
Log:
fixes for :
http://jira.jboss.org/jira/browse/JBIDE-759
http://jira.jboss.org/jira/browse/JBIDE-351
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/drop/treeviewer/model/ModelElement.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/drop/treeviewer/model/ModelElement.java 2007-09-10 14:50:21 UTC (rev 3507)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/drop/treeviewer/model/ModelElement.java 2007-09-10 18:54:22 UTC (rev 3508)
@@ -71,8 +71,8 @@
return name;
}
- public static int EQUAL_VALUES = 0;
- public static int NOT_EQUAL_VALUES = Integer.MAX_VALUE;
+ public static final int EQUAL_VALUES = 0;
+ public static final int NOT_EQUAL_VALUES = Integer.MAX_VALUE;
/**
* Returns value of this element for comparison with other value. See compareValue().
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java 2007-09-10 14:50:21 UTC (rev 3507)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageContributor.java 2007-09-10 18:54:22 UTC (rev 3508)
@@ -188,13 +188,9 @@
cleanActionBarStatus();
actionBars.updateActionBars();
}
+ fToggleOccurencesMarkUp.setEditor(getTextEditor(part));
+ fToggleOccurencesMarkUp.update();
- try {
- fToggleOccurencesMarkUp.setEditor(getTextEditor(part));
- fToggleOccurencesMarkUp.update();
- } catch (Exception x) {
- }
-
updateStatus();
}
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-09-10 14:50:21 UTC (rev 3507)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditor.java 2007-09-10 18:54:22 UTC (rev 3508)
@@ -18,6 +18,7 @@
import org.eclipse.core.resources.IResourceChangeListener;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Platform;
@@ -174,10 +175,11 @@
private void saveSelectedTab() {
IFile file = getFile();
+ String q = "" + selectedPageIndex;
try {
- String q = "" + selectedPageIndex;
file.setPersistentProperty(persistentTabQualifiedName, q);
- } catch (Exception e) {
+ } catch (CoreException e) {
+ JspEditorPlugin.getPluginLog().logWarning(e);
}
}
@@ -251,12 +253,13 @@
}
private void updateFile() {
- IFile file = getFile();
- if (file != null)
- try {
- file.refreshLocal(0, null);
- } catch (Exception e) {
- }
+ try {
+ IFile file = getFile();
+ if (file != null)
+ file.refreshLocal(0, null);
+ } catch (CoreException e) {
+ JspEditorPlugin.getPluginLog().logWarning(e);
+ }
}
private IFile getFile() {
@@ -377,11 +380,8 @@
// switchOutlineToJSPEditor();
}
loadSelectedTab();
- try {
- setActivePage(selectedPageIndex);
- pageChange(selectedPageIndex);
- } catch (Exception e) {
- }
+ setActivePage(selectedPageIndex);
+ pageChange(selectedPageIndex);
new ResourceChangeListener(this, getContainer());
if (getModelObject() != null) {
@@ -454,12 +454,12 @@
sourceEditor.addPropertyListener(pcl);
sourceEditor.doSaveAs();
sourceEditor.removePropertyListener(pcl);
- if (old.isModified())
- try {
+ try {
+ if (old.isModified())
new DiscardFileHandler().executeHandler(old, new Properties());
- } catch (Exception e) {
-
- }
+ } catch (Exception e) {
+ JspEditorPlugin.getPluginLog().logError(e);
+ }
}
public void gotoMarker(final IMarker marker) {
@@ -467,8 +467,9 @@
pageChange(sourceIndex);
IGotoMarker adapter = (IGotoMarker) sourceEditor
.getAdapter(IGotoMarker.class);
- if (adapter != null)
+ if (adapter != null) {
adapter.gotoMarker(marker);
+ }
}
public boolean isSaveAsAllowed() {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2007-09-10 14:50:21 UTC (rev 3507)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2007-09-10 18:54:22 UTC (rev 3508)
@@ -271,7 +271,6 @@
dropTarget.addDropListener(new DropTargetAdapter() {
private FreeCaretStyledText getFreeCaretControl(
Object sourceOrTarget) {
- try {
if (sourceOrTarget == null)
return null;
@@ -288,8 +287,6 @@
if (control instanceof FreeCaretStyledText)
return (FreeCaretStyledText) control;
- } catch (Exception x) {
- }
return null;
}
@@ -322,45 +319,26 @@
}
public void dragEnter(DropTargetEvent event) {
- try {
- getFreeCaretControl(event.widget).enableFreeCaret(
- true);
- } catch (Exception x) {
- }
+ getFreeCaretControl(event.widget).enableFreeCaret(true);
}
public void dragLeave(DropTargetEvent event) {
- try {
- getFreeCaretControl(event.widget).enableFreeCaret(
- false);
- } catch (Exception x) {
- }
+ getFreeCaretControl(event.widget).enableFreeCaret(false);
}
public void dragOperationChanged(DropTargetEvent event) {
- try {
- getFreeCaretControl(event.widget).enableFreeCaret(
- false);
- } catch (Exception x) {
- }
+ getFreeCaretControl(event.widget).enableFreeCaret(false);
}
public void dragOver(DropTargetEvent event) {
- try {
- FreeCaretStyledText fcst = getFreeCaretControl(event.widget);
- int pos = getPosition(fcst, event.x, event.y);
- Point p = fcst.getLocationAtOffset(pos);
- fcst.myRedraw(p.x, p.y);
- } catch (Exception x) {
- }
+ FreeCaretStyledText fcst = getFreeCaretControl(event.widget);
+ int pos = getPosition(fcst, event.x, event.y);
+ Point p = fcst.getLocationAtOffset(pos);
+ fcst.myRedraw(p.x, p.y);
}
public void drop(DropTargetEvent event) {
- try {
- getFreeCaretControl(event.widget).enableFreeCaret(
- false);
- } catch (Exception x) {
- }
+ getFreeCaretControl(event.widget).enableFreeCaret(false);
}
});
}
@@ -383,17 +361,18 @@
class TextFocusListener extends FocusAdapter {
public void focusLost(FocusEvent e) {
- if (!JSPTextEditor.super.isDirty())
- return;
- Display.getDefault().syncExec(new Runnable() {
- public void run() {
- try {
- Thread.sleep(200);
- } catch (Exception exc) {
+ if (JSPTextEditor.super.isDirty()) {
+ Display.getDefault().syncExec(new Runnable() {
+ public void run() {
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException exc) {
+ JspEditorPlugin.getPluginLog().logError(exc);
+ }
+ save();
}
- save();
- }
- });
+ });
+ }
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/AttributeSorter.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/AttributeSorter.java 2007-09-10 14:50:21 UTC (rev 3507)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/AttributeSorter.java 2007-09-10 18:54:22 UTC (rev 3508)
@@ -28,7 +28,7 @@
}
public void setWeight(String displayName, int weight) {
- weights.put(displayName, new Integer(weight));
+ weights.put(displayName, Integer.valueOf(weight));
}
public int getWeight(String displayName) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPContentOutlineConfiguration.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPContentOutlineConfiguration.java 2007-09-10 14:50:21 UTC (rev 3507)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPContentOutlineConfiguration.java 2007-09-10 18:54:22 UTC (rev 3508)
@@ -271,7 +271,7 @@
public Object getProperty(String propertyName) {
if (propertyName.equals(HTMLCMProperties.IS_XHTML))
- return new Boolean(false);
+ return Boolean.FALSE;
return null;
}
@@ -342,9 +342,9 @@
public Object getProperty(String propertyName) {
if (propertyName.equals(HTMLCMProperties.SHOULD_IGNORE_CASE))
- return new Boolean(true);
+ return Boolean.TRUE;
else if (propertyName.equals(HTMLCMProperties.IS_SCRIPTABLE)) {
- return getAttrType().getDataTypeName() == HTMLCMDataType.SCRIPT ? new Boolean(true) : new Boolean(false);
+ return getAttrType().getDataTypeName() == HTMLCMDataType.SCRIPT ? Boolean.TRUE : Boolean.FALSE;
}
return super.getProperty(propertyName);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2007-09-10 14:50:21 UTC (rev 3507)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/JSPPropertySourceAdapter.java 2007-09-10 18:54:22 UTC (rev 3508)
@@ -56,7 +56,7 @@
public class JSPPropertySourceAdapter implements INodeAdapter, IPropertySource, IPropertySourceExtension, IPropertySource2 {//extends XMLPropertySourceAdapter {
protected final static String CATEGORY_ATTRIBUTES = XMLUIMessages.XMLPropertySourceAdapter_0;
- private static final boolean fSetExpertFilter = false;
+ private static final boolean SET_EXPERT_FILTER = false;
AttributeSorter sorter = null;
private Node fNode = null;
@@ -291,7 +291,7 @@
TextPropertyDescriptor descriptor = new TextPropertyDescriptor(attributeName, attributeName);
descriptor.setCategory(getCategory(null));
descriptor.setDescription(attributeName);
-// if (hideOnFilter && fSetExpertFilter)
+// if (hideOnFilter && SET_EXPERT_FILTER)
// descriptor.setFilterFlags(new String[]{IPropertySheetEntry.FILTER_ID_EXPERT});
return descriptor;
}
@@ -731,7 +731,7 @@
TextPropertyDescriptor descriptor = new TextPropertyDescriptor(name, name);
descriptor.setCategory(category);
descriptor.setDescription(name);
- if (usage != CMAttributeDeclaration.REQUIRED && fSetExpertFilter)
+ if (usage != CMAttributeDeclaration.REQUIRED && SET_EXPERT_FILTER)
descriptor.setFilterFlags(new String[]{IPropertySheetEntry.FILTER_ID_EXPERT});
return descriptor;
}
@@ -741,7 +741,7 @@
EnumeratedStringPropertyDescriptor descriptor = new EnumeratedStringPropertyDescriptor(attrDecl.getAttrName(), attrDecl.getAttrName(), _getValidStrings(attrDecl, valuesHelper));
descriptor.setCategory(getCategory(attrDecl));
descriptor.setDescription(attrDecl.getAttrName());
- if (attrDecl.getUsage() != CMAttributeDeclaration.REQUIRED && fSetExpertFilter)
+ if (attrDecl.getUsage() != CMAttributeDeclaration.REQUIRED && SET_EXPERT_FILTER)
descriptor.setFilterFlags(new String[]{IPropertySheetEntry.FILTER_ID_EXPERT});
return descriptor;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/ui/action/JSPFormatter.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/ui/action/JSPFormatter.java 2007-09-10 14:50:21 UTC (rev 3507)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/ui/action/JSPFormatter.java 2007-09-10 18:54:22 UTC (rev 3508)
@@ -14,12 +14,12 @@
import org.eclipse.jface.text.*;
public class JSPFormatter {
- static int ROOT = 0;
- static int TEXT = 1;
- static int TAG = 2;
- static int TAG_CLOSING = 3;
- static int JSP = 4;
- static int COMMENT = 5;
+ static final int ROOT = 0;
+ static final int TEXT = 1;
+ static final int TAG = 2;
+ static final int TAG_CLOSING = 3;
+ static final int JSP = 4;
+ static final int COMMENT = 5;
String text;
StringBuffer sb = new StringBuffer();
17 years, 4 months