JBoss Tools SVN: r4506 - in trunk/documentation/GettingStartedGuide/docs/userguide/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sabrashevich
Date: 2007-10-25 07:31:46 -0400 (Thu, 25 Oct 2007)
New Revision: 4506
Added:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/choosingruntime23.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG10a.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG29.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG30.png
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject4.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject5.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/startingfromserversview.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG1.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG2.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/webxmlsource.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/testNG.xml
Log:
minor changes
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/choosingruntime23.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/choosingruntime23.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject4.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/newproject5.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/startingfromserversview.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG1.png
===================================================================
(Binary files differ)
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG10a.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG10a.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG2.png
===================================================================
(Binary files differ)
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG29.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG29.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG30.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/testNG30.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/webxmlsource.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml 2007-10-25 11:29:16 UTC (rev 4505)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml 2007-10-25 11:31:46 UTC (rev 4506)
@@ -212,7 +212,18 @@
</imageobject>
</mediaobject>
</figure>
- <itemizedlist continuation="continues">
+<itemizedlist>
+ <listitem><para>In the next dialog verify a <property>JBoss</property> runtime information and if something is unfair go back and correct it.</para></listitem>
+ </itemizedlist>
+ <figure>
+<title>Configuring Projects</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/choosingruntime23.png"/>
+ </imageobject>
+</mediaobject>
+</figure>
+ <itemizedlist>
<listitem><para>In the last wizard's dialog modify the projects that are configured on the server and click <emphasis><property>Finish</property></emphasis>.</para></listitem>
</itemizedlist>
<figure>
@@ -319,7 +330,7 @@
</mediaobject>
</figure>
<para>The <property>XML Configuration</property> category allows you to quickly browse to descriptor files in your server's deploy directory and
- check or change the values. It's use requires the Properties view. Basically, XML Configuration are XML XPaths where a xpath is a path used to access
+ check or change the values. Its use requires the Properties view. Basically, XML Configuration are XML XPaths where a xpath is a path used to access
some specific part of an xml document.</para>
<figure>
<title>XML Configuration and Properties View</title>
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/testNG.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/testNG.xml 2007-10-25 11:29:16 UTC (rev 4505)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/testNG.xml 2007-10-25 11:31:46 UTC (rev 4506)
@@ -10,20 +10,20 @@
</chapterinfo>
<title>Using TestNG project</title>
<section>
- <title>What is it TestNG?</title>
+ <title>What is TestNG?</title>
<para><property>TestNG</property> ("Testing, the Next Generation") is a Java unit testing framework that aims to overcome many limitations of JUnit.
<property>TestNG</property> introduces some new functionalities that make it more powerful and easier to use, such as:</para>
<itemizedlist>
- <listitem><para>JDK 5 Annotations (JDK 1.4 is also supported with JavaDoc annotations).</para></listitem>
- <listitem><para>Flexible test configuration.</para></listitem>
- <listitem><para>Support for data-driven testing (with @DataProvider).</para></listitem>
- <listitem><para>Support for parameters.</para></listitem>
- <listitem><para>Allows distribution of tests on slave machines.</para></listitem>
- <listitem><para>Powerful execution model (no more TestSuite).</para></listitem>
- <listitem><para>Supported by a variety of tools and plug-ins (Eclipse, IDEA, Maven, etc...).</para></listitem>
- <listitem><para>Embeds BeanShell for further flexibility.</para></listitem>
- <listitem><para>Default JDK functions for runtime and logging (no dependencies).</para></listitem>
- <listitem><para>Dependent methods for application server testing.</para></listitem>
+ <listitem><para>JDK 5 Annotations (JDK 1.4 is also supported with JavaDoc annotations)</para></listitem>
+ <listitem><para>Flexible test configuration</para></listitem>
+ <listitem><para>Support for data-driven testing (with @DataProvider)</para></listitem>
+ <listitem><para>Support for parameters</para></listitem>
+ <listitem><para>Allows distribution of tests on slave machines</para></listitem>
+ <listitem><para>Powerful execution model (no more TestSuite)</para></listitem>
+ <listitem><para>Supported by a variety of tools and plug-ins (Eclipse, IDEA, Maven, etc...)</para></listitem>
+ <listitem><para>Embeds BeanShell for further flexibility</para></listitem>
+ <listitem><para>Default JDK functions for runtime and logging (no dependencies)</para></listitem>
+ <listitem><para>Dependent methods for application server testing</para></listitem>
</itemizedlist>
<para>More information can be found on home page: <ulink url="http://testng.org">www.testng.org</ulink></para>
@@ -41,7 +41,7 @@
<title>How to use the generated Seam-test project to run Seam tests in Red Hat Developer Studio</title>
<itemizedlist>
- <listitem><para>Create a new Seam Web Project using New Project wizard or main menu <emphasis><property>File > New > Seam Web Project</property>.</emphasis></para></listitem>
+ <listitem><para>Create a new Seam Web Project using New Project wizard or main menu <emphasis>File > New > Project > Seam > Seam Web Project</emphasis></para></listitem>
</itemizedlist>
<figure>
@@ -54,7 +54,7 @@
</figure>
<itemizedlist>
- <listitem><para>Name your project and follow the next wizard steps keeping default settings.</para></listitem>
+ <listitem><para>Name your project and follow the next wizard steps keeping default settings</para></listitem>
</itemizedlist>
<figure>
@@ -66,8 +66,34 @@
</mediaobject>
</figure>
+<itemizedlist>
+ <listitem><para>Check the needed boxes and click <emphasis>Next</emphasis></para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>New Seam Project Facets</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG29.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+<itemizedlist>
+ <listitem><para>Click <emphasis>Next</emphasis> in the "Web Module" wizard's dialog</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>New Seam Project Facets</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG30.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
<itemizedlist>
- <listitem><para>Check <emphasis><property>Server Supplied JSF Implementation</property>.</emphasis></para></listitem>
+ <listitem><para>Check <emphasis>Server Supplied JSF Implementation</emphasis></para></listitem>
</itemizedlist>
<figure>
@@ -80,7 +106,7 @@
</figure>
<itemizedlist>
- <listitem><para>Select <property>EAR</property> next to <emphasis><property>Deploy as:</property></emphasis> field.</para></listitem>
+ <listitem><para>Select <emphasis>ear</emphasis> next to <emphasis>Deploy as:</emphasis> field</para></listitem>
</itemizedlist>
<figure>
@@ -93,7 +119,7 @@
</figure>
<itemizedlist>
- <listitem><para>After project is created you will have the generated Seam-test project that is setup to run TestNG directly against the proper libraries and server runtime libraries.</para></listitem>
+ <listitem><para>After project is created you will have the generated Seam-test project that is setup to run <property>TestNG</property> directly against the proper libraries and server runtime libraries</para></listitem>
</itemizedlist>
<figure>
@@ -106,7 +132,7 @@
</figure>
<itemizedlist>
- <listitem><para>Add Seam Action to your project via <emphasis><property>File > New > Seam Action</property>.</emphasis></para></listitem>
+ <listitem><para>Add Seam Action to your project via <emphasis>New > Seam Action</emphasis></para></listitem>
</itemizedlist>
<figure>
@@ -119,7 +145,7 @@
</figure>
<itemizedlist>
- <listitem><para>Fill out the wizard fields. Seam Action wizard will create resources and place them in the apropriate folders dependent on EAR project structure.</para></listitem>
+ <listitem><para>Fill out the wizard fields. Seam Action wizard will create resources and place them in the apropriate folders dependent on EAR project structure</para></listitem>
</itemizedlist>
<figure>
@@ -131,21 +157,19 @@
</mediaobject>
</figure>
- <itemizedlist>
- <listitem><para></para></listitem>
- </itemizedlist>
-
+ <para>When Action is created you will see it in Package Explorer view.</para>
+
<figure>
- <title></title>
+ <title>Created Action</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/testNG8.png"/>
</imageobject>
</mediaobject>
</figure>
-
+ <para>Below are generated Java classes:</para>
<figure>
- <title></title>
+ <title>Java Classes</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/testNG9.png"/>
@@ -154,11 +178,11 @@
</figure>
<itemizedlist>
- <listitem><para>Select <property>ActionLocalTest.xml</property> in Seam-test project and run the test via right click <emphasis><property>Run As > TestNG Suite</property>.</emphasis></para></listitem>
+ <listitem><para>Select <emphasis>ActionLocalTest.xml</emphasis> in Seam-test project and run the test via right click <emphasis>Run As > TestNG Suite</emphasis></para></listitem>
</itemizedlist>
<figure>
- <title></title>
+ <title>Run TestNG</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/testNG10.png"/>
@@ -166,39 +190,51 @@
</mediaobject>
</figure>
+ <para>The test process will start and its ouput will be written in Console. After the messages in the Console tabbed view stop scrollig <property>TestNG</property> is finished.</para>
+
+
+ <figure>
+ <title>Test is finished</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/testNG10a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
<itemizedlist>
- <listitem><para>After running TestNG you will have the test results in <emphasis><property>test-output</property></emphasis> folder in Seam-test project (press F5 to refresh the Package Explorer view). Open <property>index.html</property> file with web browser.</para></listitem>
+ <listitem><para>After running <property>TestNG</property> you will have the test results in <emphasis>test-output</emphasis> folder in Seam-test project (press F5 to refresh the Package Explorer view). Open <emphasis><property>index.html</property></emphasis> file with web browser</para></listitem>
</itemizedlist>
<figure>
- <title>Opening test results in web browser</title>
+ <title>Opening TestNG Results in Web Browser</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/testNG11.png"/>
</imageobject>
</mediaobject>
</figure>
-
+ <para>Now you can see the test results in web browser:</para>
<figure>
- <title>Test results</title>
+ <title>TestNG Results</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/testNG12.png"/>
</imageobject>
</mediaobject>
</figure>
-
+ <para>The <property>TestNG</property> information is split up into two panes in browser. You can select a result on the left-hand pane and its details will be displayed on the right-hand one.</para>
<figure>
- <title></title>
+ <title>TestNG Information</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/testNG13.png"/>
</imageobject>
</mediaobject>
</figure>
-
+ <para>See the details of the test on right-hand pane:</para>
<figure>
- <title></title>
+ <title>ActionLocal Test Details</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/testNG14.png"/>
17 years, 2 months
JBoss Tools SVN: r4505 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-25 07:29:16 -0400 (Thu, 25 Oct 2007)
New Revision: 4505
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FileSystemsHelper.java
Log:
JBIDE-1182
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FileSystemsHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FileSystemsHelper.java 2007-10-25 11:04:52 UTC (rev 4504)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FileSystemsHelper.java 2007-10-25 11:29:16 UTC (rev 4505)
@@ -13,21 +13,22 @@
import org.jboss.tools.common.model.*;
public class FileSystemsHelper {
+ public static final String FILE_SYSTEMS = "FileSystems";
public static XModelObject getFileSystems(XModel model) {
- return model.getByPath("FileSystems");
+ return model.getByPath(FILE_SYSTEMS);
}
public static XModelObject getFileSystem(XModel model, String name) {
- return model.getByPath("FileSystems/" + name);
+ return model.getByPath(FILE_SYSTEMS + "/" + name);
}
public static XModelObject getWebRoot(XModel model) {
- return model.getByPath("FileSystems/WEB-ROOT");
+ return model.getByPath(FILE_SYSTEMS + "/WEB-ROOT");
}
public static XModelObject getWebInf(XModel model) {
- return model.getByPath("FileSystems/WEB-INF");
+ return model.getByPath(FILE_SYSTEMS + "/WEB-INF");
}
}
17 years, 2 months
JBoss Tools SVN: r4504 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/navigator.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-25 07:04:52 -0400 (Thu, 25 Oct 2007)
New Revision: 4504
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/navigator/NavigatorMenuInvoker.java
Log:
JBIDE-1181
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/navigator/NavigatorMenuInvoker.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/navigator/NavigatorMenuInvoker.java 2007-10-25 10:02:53 UTC (rev 4503)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/navigator/NavigatorMenuInvoker.java 2007-10-25 11:04:52 UTC (rev 4504)
@@ -14,6 +14,7 @@
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.Point;
import org.jboss.tools.common.meta.action.XActionInvoker;
+import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.util.FindObjectHelper;
@@ -25,7 +26,7 @@
import org.jboss.tools.common.model.ui.navigator.*;
public class NavigatorMenuInvoker extends TreeViewerMenuInvoker {
- private static XModelObject eclipseWorkspace = PreferenceModelUtilities.getPreferenceModel().createModelObject("EclipseWorkspace", null);
+ private static XModelObject eclipseWorkspace = null;
public XModelObject getModelObjectAt(Point p) {
XModelObject o = super.getModelObjectAt(p);
@@ -33,6 +34,12 @@
}
protected XModelObject getWorkspaceObject() {
+ if(eclipseWorkspace == null) {
+ XModel model = PreferenceModelUtilities.getPreferenceModel();
+ if(model != null) {
+ eclipseWorkspace = model.createModelObject("EclipseWorkspace", null);
+ }
+ }
return eclipseWorkspace;
}
17 years, 2 months
JBoss Tools SVN: r4503 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-10-25 06:02:53 -0400 (Thu, 25 Oct 2007)
New Revision: 4503
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1168 Use file.isSynchronized(IResource.DEPTH_ZERO) instead of try{}catch()
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2007-10-25 09:38:25 UTC (rev 4502)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2007-10-25 10:02:53 UTC (rev 4503)
@@ -18,6 +18,7 @@
import java.util.Set;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
@@ -124,10 +125,14 @@
String ext = file.getFileExtension();
String content = null;
try {
+ if(!file.isSynchronized(IResource.DEPTH_ZERO)) {
+ // The resource is out of sync with the file system
+ // Just ignore this resource.
+ return;
+ }
content = FileUtil.readStream(file.getContents());
} catch (CoreException e) {
- // It could be because of resource is out of sync with the file system
- // Just ignore this.
+ SeamCorePlugin.getPluginLog().logError(e);
return;
}
if(ext.equalsIgnoreCase("java")) { //$NON-NLS-1$
17 years, 2 months
JBoss Tools SVN: r4502 - in trunk/as/plugins: org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-25 05:38:25 -0400 (Thu, 25 Oct 2007)
New Revision: 4502
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/DirectoryLibraryContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/DirectoryLibraryPage.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/plugin.xml
Log:
Added preliminary work for the "automatic scan directory for lib/zip files'-classpath container. Not done yet since it does not react to resource changes (add/remove lib files)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/plugin.xml 2007-10-25 09:27:07 UTC (rev 4501)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/plugin.xml 2007-10-25 09:38:25 UTC (rev 4502)
@@ -74,6 +74,17 @@
class="org.jboss.ide.eclipse.as.classpath.core.jee.J2EE50ClasspathContainerInitializer"
id="org.jboss.ide.eclipse.as.classpath.core.javaee-5.0">
</classpathContainerInitializer>
- </extension>
+ </extension>
+ <!--
+ Cannot be enabled before resource change listening is implemented.(max)
+ <extension
+ point="org.eclipse.jdt.core.classpathContainerInitializer">
+ <classpathContainerInitializer
+ class="org.jboss.ide.eclipse.as.classpath.core.DirectoryLibraryContainerInitializer"
+ id="org.jboss.ide.eclipse.as.classpath.core.DirectoryLibraryContainer">
+ </classpathContainerInitializer>
+ </extension>
+ -->
+
</plugin>
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/DirectoryLibraryContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/DirectoryLibraryContainerInitializer.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/DirectoryLibraryContainerInitializer.java 2007-10-25 09:38:25 UTC (rev 4502)
@@ -0,0 +1,110 @@
+package org.jboss.ide.eclipse.as.classpath.core;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceProxy;
+import org.eclipse.core.resources.IResourceProxyVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.ClasspathContainerInitializer;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+
+// Can't extend abstractclasspathcontainer since it assumes libraries are within our plugins
+// TODO: need to implement resource change listeners like done in FlexibleProjectContainer to be usefull.
+public class DirectoryLibraryContainerInitializer extends ClasspathContainerInitializer {
+
+ public static final String CONTAINER_ID = "org.jboss.ide.eclipse.as.classpath.core.DirectoryLibraryContainer";
+
+ @Override
+ public void initialize(IPath containerPath, IJavaProject project)
+ throws CoreException {
+ int size = containerPath.segmentCount();
+ if (size > 0)
+ {
+ if (containerPath.segment(0).equals(this.getClasspathContainerID()))
+ {
+ IClasspathContainer container = this.createClasspathContainer(project, containerPath.removeFirstSegments(1));
+ JavaCore.setClasspathContainer(containerPath, new IJavaProject[]
+ {project}, new IClasspathContainer[]
+ {container}, null);
+ }
+ }
+ }
+
+ private IClasspathContainer createClasspathContainer(IJavaProject project, IPath containerPath) {
+ return new DirectoryLibraryContainer(project, containerPath);
+ }
+
+ private String getClasspathContainerID() {
+ return CONTAINER_ID;
+ }
+
+ static class DirectoryLibraryContainer implements IClasspathContainer {
+
+ private final IResource file;
+
+ final IClasspathEntry[] entries;
+
+ private final IPath containerPath;
+
+ private final IJavaProject project;
+
+ public DirectoryLibraryContainer(IJavaProject project, IPath containerPath) {
+ this.project = project;
+ this.containerPath = containerPath;
+
+ this.file = project.getProject().getWorkspace().getRoot().getFolder(containerPath);
+
+
+ final List<IClasspathEntry> libraries = new ArrayList<IClasspathEntry>();
+
+ try {
+ if(file!=null && file.exists()) {
+ file.accept(new IResourceProxyVisitor() {
+ public boolean visit(IResourceProxy proxy) /* throws CoreException */{
+ switch(proxy.getType()) {
+ case IResource.FILE :
+ if (proxy.getName().endsWith(".jar") || proxy.getName().endsWith(".zip")) {
+ libraries.add(JavaCore.newLibraryEntry(proxy.requestFullPath(), null, null));
+ }
+ return false;
+ case IResource.FOLDER :
+ //TODO: recursive by default or ?
+ return true;
+ }
+ return true;
+ }
+ }
+ , IResource.NONE);
+ }
+ } catch (CoreException e) {
+ // TODO: log
+ e.printStackTrace();
+ }
+
+ entries = libraries.toArray(new IClasspathEntry[0]);
+ }
+
+ public IClasspathEntry[] getClasspathEntries() {
+ return entries;
+ }
+
+ public String getDescription() {
+ return "Libraries found in " + ((file==null)?"[No directory specified]":file.getProjectRelativePath().toString());
+ }
+
+ public int getKind() {
+ return K_APPLICATION;
+ }
+
+ public IPath getPath() {
+ return file.getProjectRelativePath();
+ }
+ }
+
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/plugin.xml 2007-10-25 09:27:07 UTC (rev 4501)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/plugin.xml 2007-10-25 09:38:25 UTC (rev 4502)
@@ -7,6 +7,13 @@
class="org.jboss.ide.eclipse.as.classpath.ui.ejb3.JBossEJB3LibrariesPage"
id="org.jboss.ide.eclipse.as.classpath.ui.ejb3.containerPage"
name="JBoss EJB3 Libraries"/>
+ <!-- Cannot be enabled before resource change listening is implementd (max)
+ <classpathContainerPage
+ class="org.jboss.ide.eclipse.as.classpath.ui.DirectoryLibraryPage"
+ id="org.jboss.ide.eclipse.as.classpath.ui.libraryDirectoryPage"
+ name="Directory with libraries">
+ </classpathContainerPage>
+ -->
</extension>
<extension
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/DirectoryLibraryPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/DirectoryLibraryPage.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/DirectoryLibraryPage.java 2007-10-25 09:38:25 UTC (rev 4502)
@@ -0,0 +1,119 @@
+package org.jboss.ide.eclipse.as.classpath.ui;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.ui.wizards.IClasspathContainerPage;
+import org.eclipse.jdt.ui.wizards.IClasspathContainerPageExtension;
+import org.eclipse.jdt.ui.wizards.NewElementWizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.jboss.ide.eclipse.as.classpath.core.DirectoryLibraryContainerInitializer;
+
+public class DirectoryLibraryPage extends NewElementWizardPage implements
+ IClasspathContainerPage, IClasspathContainerPageExtension {
+ private IProject ownerProject;
+ private String libsProjectName;
+ private Combo projectsCombo;
+
+ public DirectoryLibraryPage() {
+ super("DirectoryLibrariesContainerPage"); //$NON-NLS-1$
+
+ setTitle("Directory library");
+ setDescription("A classpath container that automatically adds all .jar and .zip files found in a directory to the classpath.");
+ }
+
+ public IClasspathEntry getSelection() {
+ IPath path = new Path(DirectoryLibraryContainerInitializer.CONTAINER_ID);
+
+ final int index = this.projectsCombo.getSelectionIndex();
+ final String selectedProjectName = this.projectsCombo.getItem(index);
+
+ if (this.ownerProject == null
+ || !selectedProjectName.equals(this.ownerProject.getName())) {
+ path = path.append(selectedProjectName);
+ }
+
+ return JavaCore.newContainerEntry(path);
+ }
+
+ public void setSelection(final IClasspathEntry cpentry) {
+ final IPath path = cpentry == null ? null : cpentry.getPath();
+
+ if (path == null || path.segmentCount() == 1) {
+ if (this.ownerProject != null) {
+ this.libsProjectName = this.ownerProject.getName();
+ }
+ } else {
+ this.libsProjectName = path.segment(1);
+ }
+ }
+
+ public void createControl(final Composite parent) {
+ final Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout(2, false));
+
+ final Label label = new Label(composite, SWT.NONE);
+ label.setText("Project:");
+
+ final String[] webProjects = getWebProjects();
+
+ this.projectsCombo = new Combo(composite, SWT.READ_ONLY);
+ this.projectsCombo.setItems(webProjects);
+
+ final int index;
+
+ if (this.ownerProject != null) {
+ index = indexOf(webProjects, this.libsProjectName);
+ } else {
+ if (this.projectsCombo.getItemCount() > 0) {
+ index = 0;
+ } else {
+ index = -1;
+ }
+ }
+
+ if (index != -1) {
+ this.projectsCombo.select(index);
+ }
+
+ final GridData gd = new GridData();
+ gd.grabExcessHorizontalSpace = true;
+ gd.minimumWidth = 100;
+
+ this.projectsCombo.setLayoutData(gd);
+
+ setControl(composite);
+ }
+
+ public boolean finish() {
+ return true;
+ }
+
+ public void initialize(final IJavaProject project,
+ final IClasspathEntry[] currentEntries) {
+ this.ownerProject = (project == null ? null : project.getProject());
+ }
+
+ private static String[] getWebProjects() {
+ return new String[] { "test" };
+ }
+
+ private static int indexOf(final String[] array, final String str) {
+ for (int i = 0; i < array.length; i++) {
+ if (array[i].equals(str)) {
+ return i;
+ }
+ }
+
+ return -1;
+ }
+
+}
\ No newline at end of file
17 years, 2 months
JBoss Tools SVN: r4501 - trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-10-25 05:27:07 -0400 (Thu, 25 Oct 2007)
New Revision: 4501
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1158
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2007-10-25 00:22:12 UTC (rev 4500)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2007-10-25 09:27:07 UTC (rev 4501)
@@ -70,6 +70,11 @@
private Browser browser = null;
private nsIWebBrowser webBrowser = null;
private long chrome_flags = nsIWebBrowserChrome.CHROME_ALL;
+
+ /**
+ * used to indicate that xulrunner was loaded
+ */
+ private static boolean XULRUNNER_LOADING_INDICATOR=false;
static {
XULRUNNER_BUNDLE = (new StringBuffer("org.mozilla.xulrunner")) // $NON-NLS-1$
@@ -161,16 +166,26 @@
}
public synchronized static String getXulRunnerPath() throws XulRunnerException {
+ //this function should be call
String xulRunnerPath = System.getProperty(XULRUNNER_PATH);
if (xulRunnerPath == null) {
+
GREVersionRange[] greRanges = {new GREVersionRange(XULRUNNER_LOWER_VERSION, true, XULRUNNER_HIGHER_VERSION, true)};
File xulRunnerFile = null;
try {
- xulRunnerFile = Mozilla.getGREPathWithProperties(greRanges, null);
+ if(!XULRUNNER_LOADING_INDICATOR) {
+
+ XULRUNNER_LOADING_INDICATOR=true;
+ //this function should be call
+ xulRunnerFile = Mozilla.getGREPathWithProperties(greRanges, null);
+ } else {
+
+ xulRunnerFile = null;
+ }
} catch (FileNotFoundException fnfe) {
// Ignre this exception. Will try to get XULRunner from plugin
- }
+ }
if (xulRunnerFile == null
|| !xulRunnerFile.exists()) {
17 years, 2 months
JBoss Tools SVN: r4500 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-24 20:22:12 -0400 (Wed, 24 Oct 2007)
New Revision: 4500
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java
Log:
Code clean up.
new Integer() replaced for Integer.valueOf()
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-10-25 00:22:08 UTC (rev 4499)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamJavaComponentDeclaration.java 2007-10-25 00:22:12 UTC (rev 4500)
@@ -350,11 +350,11 @@
static final Map<String, Integer> NAMED_PRECEDENCES = new HashMap<String, Integer>();
static {
- NAMED_PRECEDENCES.put("Install.BUILT_IN", new Integer(0)); //$NON-NLS-1$
- NAMED_PRECEDENCES.put("Install.FRAMEWORK", new Integer(10)); //$NON-NLS-1$
- NAMED_PRECEDENCES.put("Install.APPLICATION", new Integer(20)); //$NON-NLS-1$
- NAMED_PRECEDENCES.put("Install.DEPLOYMENT", new Integer(30)); //$NON-NLS-1$
- NAMED_PRECEDENCES.put("Install.MOCK", new Integer(40)); //$NON-NLS-1$
+ NAMED_PRECEDENCES.put("Install.BUILT_IN", Integer.valueOf(0)); //$NON-NLS-1$
+ NAMED_PRECEDENCES.put("Install.FRAMEWORK", Integer.valueOf(10)); //$NON-NLS-1$
+ NAMED_PRECEDENCES.put("Install.APPLICATION", Integer.valueOf(20)); //$NON-NLS-1$
+ NAMED_PRECEDENCES.put("Install.DEPLOYMENT", Integer.valueOf(30)); //$NON-NLS-1$
+ NAMED_PRECEDENCES.put("Install.MOCK", Integer.valueOf(40)); //$NON-NLS-1$
}
public void setPrecedence(IValueInfo value) {
17 years, 2 months
JBoss Tools SVN: r4499 - in trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common: model/filesystems/impl and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-24 20:22:08 -0400 (Wed, 24 Oct 2007)
New Revision: 4499
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelEntityImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/EntityComparator.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableElementImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EntityXMLRegistration.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/FindObjectHelper.java
Log:
Code clean up.
new Integer() replaced for Integer.valueOf()
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelEntityImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelEntityImpl.java 2007-10-25 00:22:02 UTC (rev 4498)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XModelEntityImpl.java 2007-10-25 00:22:08 UTC (rev 4499)
@@ -287,7 +287,7 @@
synchronized (registered) {
io = registered.get(name);
if(io == null) {
- io = new Integer(registered.size());
+ io = Integer.valueOf(registered.size());
registered.put(name, io);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java 2007-10-25 00:22:02 UTC (rev 4498)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java 2007-10-25 00:22:08 UTC (rev 4499)
@@ -83,7 +83,7 @@
}
String ep = "ERROR: " + FindObjectHelper.makeRef(getPath() + ":" + ln1, ln + ":" + pos) + " " + er;
if(iln < 0) markers.lines.remove(ep);
- else markers.lines.put(ep, new Integer(iln));
+ else markers.lines.put(ep, Integer.valueOf(iln));
sb.append(ep).append('\n');
this.errors[i] = ep;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/EntityComparator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/EntityComparator.java 2007-10-25 00:22:02 UTC (rev 4498)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/EntityComparator.java 2007-10-25 00:22:08 UTC (rev 4499)
@@ -32,7 +32,7 @@
public EntityComparator(XChild[] c) {
entities = new Hashtable<String,Integer>(c.length);
for (int i = 0; i < c.length; i++) {
- entities.put(c[i].getName(), new Integer(i * 100));
+ entities.put(c[i].getName(), Integer.valueOf(i * 100));
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableElementImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableElementImpl.java 2007-10-25 00:22:02 UTC (rev 4498)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableElementImpl.java 2007-10-25 00:22:08 UTC (rev 4499)
@@ -382,7 +382,7 @@
public SharableComparator(XChild[] c) {
entities = new Hashtable<String,Integer>(c.length);
for (int i = 0; i < c.length; i++) {
- entities.put(c[i].getName(), new Integer(i * 100));
+ entities.put(c[i].getName(), Integer.valueOf(i * 100));
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EntityXMLRegistration.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EntityXMLRegistration.java 2007-10-25 00:22:02 UTC (rev 4498)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EntityXMLRegistration.java 2007-10-25 00:22:08 UTC (rev 4499)
@@ -40,24 +40,24 @@
if(a != null && isResolvingSchema) {
return resolveSchema(entity, a);
}
- resolved.put(entity, new Integer(UNRESOLVED));
+ resolved.put(entity, Integer.valueOf(UNRESOLVED));
return UNRESOLVED;
}
private int resolveDTD(XModelEntity entity, XAttribute a) {
String v = a.getDefaultValue();
if(XMLEntityResolver.getInstance().isResolved(v, null)) {
- resolved.put(entity, new Integer(DTD));
+ resolved.put(entity, Integer.valueOf(DTD));
return DTD;
}
ExtensibleURIResolver r = new ExtensibleURIResolver();
String s = r.resolve(null, v, null);
if(s != null && s.length() > 0) {
- resolved.put(entity, new Integer(DTD));
+ resolved.put(entity, Integer.valueOf(DTD));
XMLEntityResolver.registerPublicEntity(v, s);
return DTD;
}
- resolved.put(entity, new Integer(MISSING));
+ resolved.put(entity, Integer.valueOf(MISSING));
return MISSING;
}
@@ -65,7 +65,7 @@
String v = a.getDefaultValue();
String[] vs = v.split(" ");
if(vs == null || vs.length < 2) {
- resolved.put(entity, new Integer(MISSING));
+ resolved.put(entity, Integer.valueOf(MISSING));
return MISSING;
}
String location = null;
@@ -81,7 +81,7 @@
location = r.resolve(null, vs[0], vs[1]);
}
if(location != null && location.length() > 0) {
- resolved.put(entity, new Integer(SCHEMA));
+ resolved.put(entity, Integer.valueOf(SCHEMA));
return SCHEMA;
}
return SCHEMA;
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/FindObjectHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/FindObjectHelper.java 2007-10-25 00:22:02 UTC (rev 4498)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/FindObjectHelper.java 2007-10-25 00:22:08 UTC (rev 4499)
@@ -35,7 +35,7 @@
public static int findModelObject(XModelObject o, int where) {
if(o == null) return 1;
SpecialWizard wizard = createSelectWizard();
- wizard.setObject(new Integer(where));
+ wizard.setObject(Integer.valueOf(where));
wizard.setObject(o);
return wizard.execute();
}
@@ -43,7 +43,7 @@
public static int findModelObject(XModelObject o, int where, String preferredPage) {
if(o == null) return 1;
SpecialWizard wizard = createSelectWizard();
- wizard.setObject(new Integer(where));
+ wizard.setObject(Integer.valueOf(where));
wizard.setObject(o);
wizard.setObject(preferredPage);
return wizard.execute();
17 years, 2 months
JBoss Tools SVN: r4498 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-24 20:22:02 -0400 (Wed, 24 Oct 2007)
New Revision: 4498
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataFilterSliderTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSeparatorTemplate.java
Log:
Code clean up.
new Integer() replaced for Integer.valueOf()
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataFilterSliderTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataFilterSliderTemplate.java 2007-10-25 00:21:58 UTC (rev 4497)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataFilterSliderTemplate.java 2007-10-25 00:22:02 UTC (rev 4498)
@@ -350,7 +350,7 @@
}
try {
num = num.trim();
- Integer i = new Integer(num);
+ Integer i = Integer.valueOf(num);
return i.intValue();
} catch (NumberFormatException e) {
return 0;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java 2007-10-25 00:21:58 UTC (rev 4497)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableScrollerTemplate.java 2007-10-25 00:22:02 UTC (rev 4498)
@@ -281,7 +281,7 @@
}
try {
num = num.trim();
- Integer i = new Integer(num);
+ Integer i = Integer.valueOf(num);
return i.intValue();
} catch (NumberFormatException e) {
return 0;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSeparatorTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSeparatorTemplate.java 2007-10-25 00:21:58 UTC (rev 4497)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSeparatorTemplate.java 2007-10-25 00:22:02 UTC (rev 4498)
@@ -269,7 +269,7 @@
*/
private boolean isNumber(String num) {
try {
- new Integer(num);
+ Integer.valueOf(num);
return true;
} catch (NumberFormatException e) {
return false;
17 years, 2 months
JBoss Tools SVN: r4497 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core: hibernate and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-24 20:21:58 -0400 (Wed, 24 Oct 2007)
New Revision: 4497
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/AbstractConfigurationResource.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/OrmPropertyDescriptorsHolder.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/hibernate/XMLFileReader.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/hibernate/automapping/HibernateAutoMappingHelper.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/hibernate/automapping/ReversStatistic.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/BeanPropertySourceBase.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/ChangebleIntegerPropertyDescriptor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/DBTablePropertyDescriptor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/ListPropertyDescriptor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/util/TypeUtils.java
Log:
Code clean up.
new Integer() replaced for Integer.valueOf()
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/AbstractConfigurationResource.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/AbstractConfigurationResource.java 2007-10-25 00:21:48 UTC (rev 4496)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/AbstractConfigurationResource.java 2007-10-25 00:21:58 UTC (rev 4497)
@@ -119,7 +119,7 @@
StringTokenizer stringTokenizer1 = new StringTokenizer(out
.toString(), "\r\n");
while (stringTokenizer1.hasMoreTokens())
- hm.put(new Integer(i++), stringTokenizer1.nextToken());
+ hm.put(Integer.valueOf(i++), stringTokenizer1.nextToken());
boolean[] flag = new boolean[hm.size()];
StringTokenizer stringTokenizer2 = new StringTokenizer(
new String(output.toByteArray()), "\r\n");
@@ -129,27 +129,27 @@
String str3 = stringTokenizer2.nextToken();
String str4 = (new StringTokenizer(str3, "=")).nextToken();
for (i = 0; i < hm.size(); i++) {
- String str = (String) hm.get(new Integer(i));
+ String str = (String) hm.get(Integer.valueOf(i));
String str2 = str4;
if (str.startsWith(str2) && "\r\n".indexOf(str) == -1) {
- hm.put(new Integer(i), str3);
+ hm.put(Integer.valueOf(i), str3);
flag[i] = true;
break;
}
}
if (i == hm.size())
- hm2.put(new Integer(j++), str3);
+ hm2.put(Integer.valueOf(j++), str3);
}
i = j = 0;
String newStrOutput = new String();
while (hm.size() != 0) {
- String str5 = (String) hm.remove(new Integer(i++)) + '\n';
+ String str5 = (String) hm.remove(Integer.valueOf(i++)) + '\n';
if (str5.startsWith("#") || str5.indexOf((int) '=') == -1
|| flag[i - 1])
newStrOutput += str5;
}
while (hm2.size() != 0)
- newStrOutput += (String) hm2.remove(new Integer(j++)) + '\n';
+ newStrOutput += (String) hm2.remove(Integer.valueOf(j++)) + '\n';
res.setContents(new ByteArrayInputStream(newStrOutput
.getBytes()), IResource.NONE, null);
// #changed#
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/OrmPropertyDescriptorsHolder.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/OrmPropertyDescriptorsHolder.java 2007-10-25 00:21:48 UTC (rev 4496)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/OrmPropertyDescriptorsHolder.java 2007-10-25 00:21:58 UTC (rev 4497)
@@ -351,7 +351,7 @@
setDefaultPropertyValue(pd.getId(),OrmConfiguration.DEFAULT_SELECT_BEFORE_UPDATE);
// pd=new TextPropertyDescriptor(OrmConfiguration.CLASS_BATCH_SIZE,"fetching \"batch size\"");
- pd=new TextPropertyDescriptorWithType(OrmConfiguration.CLASS_BATCH_SIZE,Messages.OrmPropertyDescriptorsHolder_ClassBatchSizeN,true,true,false,new Integer(1),null);
+ pd=new TextPropertyDescriptorWithType(OrmConfiguration.CLASS_BATCH_SIZE,Messages.OrmPropertyDescriptorsHolder_ClassBatchSizeN,true,true,false,Integer.valueOf(1),null);
pd.setDescription(Messages.OrmPropertyDescriptorsHolder_ClassBatchSizeD);
addPropertyDescriptor(pd);
pd.setCategory(CLASS_MAPPING_CATEGORY);
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/hibernate/XMLFileReader.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/hibernate/XMLFileReader.java 2007-10-25 00:21:48 UTC (rev 4496)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/hibernate/XMLFileReader.java 2007-10-25 00:21:58 UTC (rev 4497)
@@ -158,9 +158,9 @@
boolean cacheable = "true".equals( subnode.attributeValue( "cacheable" ) );
String region = subnode.attributeValue( "cache-region" );
Attribute tAtt = subnode.attribute( "timeout" );
- Integer timeout = tAtt == null ? null : new Integer( tAtt.getValue() );
+ Integer timeout = tAtt == null ? null : Integer.valueOf( tAtt.getValue() );
Attribute fsAtt = subnode.attribute( "fetch-size" );
- Integer fetchSize = fsAtt == null ? null : new Integer( fsAtt.getValue() );
+ Integer fetchSize = fsAtt == null ? null : Integer.valueOf( fsAtt.getValue() );
String flushMode = subnode.attributeValue( "flush-mode" );
// edit tau - add storage in parametr for new NamedQueryDefinition(storage,...
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/hibernate/automapping/HibernateAutoMappingHelper.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/hibernate/automapping/HibernateAutoMappingHelper.java 2007-10-25 00:21:48 UTC (rev 4496)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/hibernate/automapping/HibernateAutoMappingHelper.java 2007-10-25 00:21:58 UTC (rev 4497)
@@ -251,10 +251,10 @@
String output=Messages.HibernateAutoMappingHelper_ReportString1+
Messages.HibernateAutoMappingHelper_ReportString2+
- Messages.HibernateAutoMappingHelper_ReportString3+(new Integer(tablesNumber-skippedTablesNumber-linkTablesNumber)).toString()+Messages.HibernateAutoMappingHelper_ReportString4+
+ Messages.HibernateAutoMappingHelper_ReportString3+(Integer.valueOf(tablesNumber-skippedTablesNumber-linkTablesNumber)).toString()+Messages.HibernateAutoMappingHelper_ReportString4+
Messages.HibernateAutoMappingHelper_ReportString5+
- Messages.HibernateAutoMappingHelper_ReportString6+(new Integer(skippedTablesNumber)).toString()+Messages.HibernateAutoMappingHelper_ReportString7+
- Messages.HibernateAutoMappingHelper_ReportString8+(new Integer(linkTablesNumber)).toString()+Messages.HibernateAutoMappingHelper_ReportString9+
+ Messages.HibernateAutoMappingHelper_ReportString6+(Integer.valueOf(skippedTablesNumber)).toString()+Messages.HibernateAutoMappingHelper_ReportString7+
+ Messages.HibernateAutoMappingHelper_ReportString8+(Integer.valueOf(linkTablesNumber)).toString()+Messages.HibernateAutoMappingHelper_ReportString9+
Messages.HibernateAutoMappingHelper_ReportString10;
InputStream input = new ByteArrayInputStream(output.getBytes());
// edit tau 18.01.2006
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/hibernate/automapping/ReversStatistic.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/hibernate/automapping/ReversStatistic.java 2007-10-25 00:21:48 UTC (rev 4496)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/hibernate/automapping/ReversStatistic.java 2007-10-25 00:21:58 UTC (rev 4497)
@@ -72,9 +72,9 @@
public String[] getAllResults()
{
String[] res={
- (new Integer(tablesNumber-skippedTablesNumber-linkTablesNumber)).toString(),
- (new Integer(skippedTablesNumber)).toString(),
- (new Integer(linkTablesNumber)).toString()
+ (Integer.valueOf(tablesNumber-skippedTablesNumber-linkTablesNumber)).toString(),
+ (Integer.valueOf(skippedTablesNumber)).toString(),
+ (Integer.valueOf(linkTablesNumber)).toString()
};
return res;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/BeanPropertySourceBase.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/BeanPropertySourceBase.java 2007-10-25 00:21:48 UTC (rev 4496)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/BeanPropertySourceBase.java 2007-10-25 00:21:58 UTC (rev 4497)
@@ -144,7 +144,7 @@
if (value==null || value.toString().length()==0) {
//akuzmin
if(pd instanceof ChangebleIntegerPropertyDescriptor)
- value=new Integer(-1);
+ value = Integer.valueOf(-1);
else
value=oldValue;
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/ChangebleIntegerPropertyDescriptor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/ChangebleIntegerPropertyDescriptor.java 2007-10-25 00:21:48 UTC (rev 4496)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/ChangebleIntegerPropertyDescriptor.java 2007-10-25 00:21:58 UTC (rev 4497)
@@ -43,11 +43,11 @@
newvalue=((String)changedValue);
if ((techvalue==null)||(!(techvalue instanceof Integer))||(!isValidValue(techvalue)))
if (isValidValue(newvalue))
- setTechvalue(new Integer(StringConverter.asInt(newvalue)));
+ setTechvalue(Integer.valueOf(StringConverter.asInt(newvalue)));
else if (StringConverter.asInt(newvalue)==defvalue)
{
- newvalue=(new Integer(defvalue+1)).toString();
- setTechvalue(new Integer(StringConverter.asInt(newvalue)));
+ newvalue=(Integer.valueOf(defvalue+1)).toString();
+ setTechvalue(Integer.valueOf(StringConverter.asInt(newvalue)));
}
}
@@ -69,7 +69,7 @@
if (!isValidValue(propertyValue))
if (newvalue!=null)
{
- setTechvalue(new Integer(StringConverter.asInt(newvalue)));
+ setTechvalue(Integer.valueOf(StringConverter.asInt(newvalue)));
if (isValidValue(newvalue))
return newvalue;
else return "";
@@ -80,7 +80,7 @@
{
if ((techvalue==null)||(!(techvalue instanceof Integer))||(!isValidValue(techvalue)))
if (isValidValue(propertyValue))
- setTechvalue(new Integer(StringConverter.asInt(propertyValue.toString())));
+ setTechvalue(Integer.valueOf(StringConverter.asInt(propertyValue.toString())));
return super.getEditValue(propertyValue);
}
@@ -111,7 +111,7 @@
* @return Returns the defvalue.
*/
public Object getDefvalue() {
- return new Integer(defvalue);
+ return Integer.valueOf(defvalue);
}
/**
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/DBTablePropertyDescriptor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/DBTablePropertyDescriptor.java 2007-10-25 00:21:48 UTC (rev 4496)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/DBTablePropertyDescriptor.java 2007-10-25 00:21:58 UTC (rev 4497)
@@ -41,8 +41,8 @@
public Object getEditValue(Object propertyValue){
for(int i=0;i<getPropertyValues().length;++i)
- if(getPropertyValues()[i]==propertyValue || (propertyValue!=null && propertyValue.equals(getPropertyValues()[i])))return new Integer(i);
- return new Integer(0);
+ if(getPropertyValues()[i]==propertyValue || (propertyValue!=null && propertyValue.equals(getPropertyValues()[i])))return Integer.valueOf(i);
+ return Integer.valueOf(0);
}
public Object getPropertyValue(Object editValue){
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/ListPropertyDescriptor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/ListPropertyDescriptor.java 2007-10-25 00:21:48 UTC (rev 4496)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/properties/ListPropertyDescriptor.java 2007-10-25 00:21:58 UTC (rev 4497)
@@ -38,8 +38,8 @@
public Object getEditValue(Object propertyValue){
for(int i=0;i<propertyValues.length;++i)
- if(propertyValues[i]==propertyValue || (propertyValue!=null && propertyValue.equals(propertyValues[i])))return new Integer(i);
- return new Integer(0);
+ if(propertyValues[i]==propertyValue || (propertyValue!=null && propertyValue.equals(propertyValues[i])))return Integer.valueOf(i);
+ return Integer.valueOf(0);
}
public Object getPropertyValue(Object editValue){
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/util/TypeUtils.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/util/TypeUtils.java 2007-10-25 00:21:48 UTC (rev 4496)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.core/src/org/jboss/tools/hibernate/internal/core/util/TypeUtils.java 2007-10-25 00:21:58 UTC (rev 4497)
@@ -230,7 +230,7 @@
public static String SQLTypeToName(int jdbcType) {
// Return the JDBC type name
- return (String)jdbcConstantsMap.get(new Integer(jdbcType));
+ return (String)jdbcConstantsMap.get(Integer.valueOf(jdbcType));
}
// akuzmin 09.06.2005
public static int getSQLTypeCodeToName(String fQTypeName)
17 years, 2 months