JBoss Tools SVN: r21724 - trunk/jsf/docs/userguide/en-US.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2010-04-27 09:26:50 -0400 (Tue, 27 Apr 2010)
New Revision: 21724
Modified:
trunk/jsf/docs/userguide/en-US/editors.xml
Log:
https://jira.jboss.org/jira/browse/TOOLSDOC-6 Show java-doc is shown for EL content assist item. Text has been corrected.
Modified: trunk/jsf/docs/userguide/en-US/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en-US/editors.xml 2010-04-27 12:02:56 UTC (rev 21723)
+++ trunk/jsf/docs/userguide/en-US/editors.xml 2010-04-27 13:26:50 UTC (rev 21724)
@@ -251,9 +251,9 @@
<section id="CodeAssistAndDynamicCodeAssist42BasedOnProjectData">
<title>Content Assist</title>
<para><property>Content assist</property> is available when working with</para>
- <itemizedlist>
+ <itemizedlist>
<listitem>
- <para> Seam project files </para>
+ <para> <ulink url="../../seam/html_single/index.html#ContentAssist">Seam project files</ulink> </para>
</listitem>
<listitem>
<para>
@@ -281,13 +281,18 @@
</para>
</listitem>
<listitem>
- <para> ESB XML files </para>
+ <para> <ulink url="../../esb_ref_guide/html_single/index.html#ESBContentAssist">ESB XML files</ulink> </para>
</listitem>
<listitem>
<para>
<link linkend="ContentAssistForInsertTag">Insert Tag Wizard</link>
</para>
</listitem>
+ <listitem>
+ <para>
+ <link linkend="ContentAssistForExpressionLanguageShowsJavaDoc">JavaDoc for EL</link>
+ </para>
+ </listitem>
</itemizedlist>
<para>Notice, that code completion for EL variables has icons illustrating what they are
from. The most of this icons are described in the table below.</para>
@@ -308,11 +313,11 @@
<row>
<entry>
<para><inlinemediaobject><imageobject>
- <imagedata
- fileref="images/editors_features/icons_enumaration.png"
- />
- </imageobject>
- </inlinemediaobject>
+ <imagedata
+ fileref="images/editors_features/icons_enumaration.png"
+ />
+ </imageobject>
+ </inlinemediaobject>
</para>
</entry>
<entry>
@@ -326,11 +331,11 @@
<row>
<entry>
<para><inlinemediaobject><imageobject>
- <imagedata
- fileref="images/editors_features/icons_seam_el.png"
- />
- </imageobject>
- </inlinemediaobject>
+ <imagedata
+ fileref="images/editors_features/icons_seam_el.png"
+ />
+ </imageobject>
+ </inlinemediaobject>
</para>
</entry>
<entry>
@@ -344,10 +349,10 @@
<row>
<entry>
<para><inlinemediaobject><imageobject>
- <imagedata
- fileref="images/editors_features/icons_jsf_el.png"/>
- </imageobject>
- </inlinemediaobject>
+ <imagedata
+ fileref="images/editors_features/icons_jsf_el.png"/>
+ </imageobject>
+ </inlinemediaobject>
</para>
</entry>
<entry>
@@ -362,11 +367,11 @@
<row>
<entry>
<para><inlinemediaobject><imageobject>
- <imagedata
- fileref="images/editors_features/icons_jsf_actions.png"
- />
- </imageobject>
- </inlinemediaobject>
+ <imagedata
+ fileref="images/editors_features/icons_jsf_actions.png"
+ />
+ </imageobject>
+ </inlinemediaobject>
</para>
</entry>
<entry>
@@ -374,17 +379,17 @@
</entry>
<entry>
<para>Used to show navigation rules defined in the <property
- >faces-config.xml</property> . </para>
+ >faces-config.xml</property> . </para>
</entry>
</row>
<row>
<entry>
<para><inlinemediaobject><imageobject>
- <imagedata
- fileref="images/editors_features/icons_message_bundles.png"
- />
- </imageobject>
- </inlinemediaobject>
+ <imagedata
+ fileref="images/editors_features/icons_message_bundles.png"
+ />
+ </imageobject>
+ </inlinemediaobject>
</para>
</entry>
<entry>
@@ -398,11 +403,11 @@
<row>
<entry>
<para><inlinemediaobject><imageobject>
- <imagedata
- fileref="images/editors_features/icons_resource_paths.png"
- />
- </imageobject>
- </inlinemediaobject>
+ <imagedata
+ fileref="images/editors_features/icons_resource_paths.png"
+ />
+ </imageobject>
+ </inlinemediaobject>
</para>
</entry>
<entry>
@@ -432,7 +437,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>Also the ranking and sorting are available in EL code
+ <para>The ranking and sorting are available in EL code
completions.</para>
<para>As you can see, together with proposals content assist also provides descriptions
of selected tags or attributes.</para>
@@ -445,7 +450,7 @@
</imageobject>
</mediaobject>
</figure>
- <section id="JSFProjectFiles3087">
+ <section id="JSFProjectFiles3087">
<title>JSF Project Files</title>
<para>When working with JSF project in JBoss Developer Studio, you can use various
<property>Content Assist features</property> while developing:</para>
@@ -844,7 +849,7 @@
</mediaobject>
</figure>
</section>
- <section id="AddingDynamicCodeAssistToCustomComponents8745">
+ <section id="AddingDynamicCodeAssistToCustomComponents8745">
<title>Adding dynamic code assist to custom components that were added to JBoss
Tools Palette</title>
<para>Here is what you need to do to add project based code assist to a custom
@@ -963,7 +968,20 @@
</listitem>
</itemizedlist>
</section>
- </section>
+ <section id="ContentAssistForExpressionLanguageShowsJavaDoc">
+ <title>JavaDoc for Expression Language</title>
+ <para>Content assist for expression language shows Java doc if available for referenced methods.</para>
+ <figure>
+ <title>Expression Language Content assist shows Java doc</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_33.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
<section id="FullControlOverSourceFiles-SynchronizedSourcAndVisualEditing74">
<title>Synchronized Source and Visual Editing</title>
<para><property>JBoss Developer Studio</property> offers the flexibility to edit any
14 years, 8 months
JBoss Tools SVN: r21723 - branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-27 08:02:56 -0400 (Tue, 27 Apr 2010)
New Revision: 21723
Modified:
branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6206
Modified: branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java
===================================================================
--- branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java 2010-04-27 11:37:35 UTC (rev 21722)
+++ branches/jbosstools-3.1.x/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java 2010-04-27 12:02:56 UTC (rev 21723)
@@ -86,7 +86,9 @@
public String getTitle() {
String title = WizardKeys.getHeader(getHelpKey());
if(title != null) return title;
- title = WizardKeys.getHeader(action, getEntityData()[0].getModelEntity()); // no step id
+ if(getEntityData().length > 0) {
+ title = WizardKeys.getHeader(action, getEntityData()[0].getModelEntity()); // no step id
+ }
if(title != null) return title;
String n = (action == null) ? "" : "" + action.getDisplayName(); //$NON-NLS-1$ //$NON-NLS-2$
if(n.endsWith("...")) n = n.substring(0, n.length() - 3); //$NON-NLS-1$
@@ -100,7 +102,7 @@
String key1 = key.substring(0, key.length() - 2);
t = WizardKeys.getTitle(key1);
}
- if(t == null) {
+ if(t == null && getEntityData().length > 0) {
t = WizardKeys.getTitle(action, getEntityData()[0].getModelEntity()); // no step id
}
return t;
14 years, 8 months
JBoss Tools SVN: r21722 - branches/jbosstools-3.1.x/struts/plugins/org.jboss.tools.struts/resources/help.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-27 07:37:35 -0400 (Tue, 27 Apr 2010)
New Revision: 21722
Modified:
branches/jbosstools-3.1.x/struts/plugins/org.jboss.tools.struts/resources/help/keys-struts.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-6206
Modified: branches/jbosstools-3.1.x/struts/plugins/org.jboss.tools.struts/resources/help/keys-struts.properties
===================================================================
--- branches/jbosstools-3.1.x/struts/plugins/org.jboss.tools.struts/resources/help/keys-struts.properties 2010-04-27 11:35:12 UTC (rev 21721)
+++ branches/jbosstools-3.1.x/struts/plugins/org.jboss.tools.struts/resources/help/keys-struts.properties 2010-04-27 11:37:35 UTC (rev 21722)
@@ -369,7 +369,7 @@
StrutsForward12_CreateSetProperty.Title=Set Property
StrutsForward12_EditPath.WindowTitle=Edit Path
-StrutsForward1_EditPath.Title=Struts Forward
+StrutsForward12_EditPath.Title=Struts Forward
StrutsForward12_EditPath_0.WindowTitle=Edit Path
StrutsForward12_EditPath_0.Title=Struts Forward
@@ -606,12 +606,15 @@
Wizard_SelectKey.WindowTitle=Key
#Edit Path
-StrutsAction10_EditPath_0.WindowTitle=Edit Path
-StrutsGlobalForwards10_EditPath_0.WindowTitle=Edit Path
-StrutsAction11_EditPath_0.WindowTitle=Edit Path
-StrutsGlobalForwards11_EditPath_0.WindowTitle=Edit Path
-StrutsGlobalExceptions11_EditPath_0.WindowTitle=Edit Path
+StrutsAction10_EditPath_0.Title=Struts Action
+StrutsGlobalForwards10_EditPath_0.Title=Global Forward
+StrutsAction11_EditPath_0.Title=Struts Action
+StrutsAction12_EditPath_0.Title=Struts Action
+StrutsGlobalForwards11_EditPath_0.Title=Global Forward
+StrutsGlobalForwards12_EditPath_0.WindowTitle=Edit Path
+StrutsGlobalExceptions11_EditPath_0.Title=Global Exception
+
#################################### Title
WebPrjRoot_OpenProject_1.Title=Red Hat Struts Project
@@ -639,13 +642,6 @@
Wizard_SelectKey.Title=Key
-#Edit Path
-StrutsAction10_EditPath_0.Title=Struts Action
-StrutsGlobalForwards10_EditPath_0.Title=Global Forward
-StrutsAction11_EditPath_0.Title=Struts Action
-StrutsGlobalForwards11_EditPath_0.Title=Global Forward
-StrutsGlobalExceptions11_EditPath_0.Title=Global Exception
-
#Tomcat JVM
TomcatVMHelper.vm=Path to JDK
14 years, 8 months
JBoss Tools SVN: r21721 - in trunk: common/tests/org.jboss.tools.common.model.ui.test/src/org/jboss/tools/common/model/ui/jarproperties and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-04-27 07:35:12 -0400 (Tue, 27 Apr 2010)
New Revision: 21721
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NamedBeanRefactoringTest.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java
trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractRefactorTest.java
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NamedBeanRefactoringTest.java.fixme
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/AbstractRefactorTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/ELVariableRefactoringTest.java
Modified:
trunk/common/tests/org.jboss.tools.common.model.ui.test/src/org/jboss/tools/common/model/ui/jarproperties/JarPropertiesTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringTest.java
Log:
In order to avoid cyclic dependencies
Copied: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NamedBeanRefactoringTest.java (from rev 21679, trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NamedBeanRefactoringTest.java.fixme)
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NamedBeanRefactoringTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NamedBeanRefactoringTest.java 2010-04-27 11:35:12 UTC (rev 21721)
@@ -0,0 +1,96 @@
+package org.jboss.tools.cdi.core.test.tck;
+
+import java.util.ArrayList;
+import java.util.Set;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.cdi.core.CDICoreNature;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.core.IBean;
+import org.jboss.tools.cdi.core.ICDIProject;
+import org.jboss.tools.cdi.internal.core.refactoring.RenameNamedBeanProcessor;
+import org.jboss.tools.tests.AbstractRefactorTest;
+
+public class NamedBeanRefactoringTest extends AbstractRefactorTest {
+ private static final String PROJECT_NAME = "/tests/jbt/refactoring";
+ private static final String FILE_NAME1 = "JavaSource/org/jboss/jsr299/tck/tests/jbt/refactoring/Game.java";
+ private static final String FILE_NAME2 = "JavaSource/org/jboss/jsr299/tck/tests/jbt/refactoring/Generator.java";
+ private static final String FILE_NAME3 = "WebContent/HomePage.xhtml";
+ private static final String FILE_NAME4 = "WebContent/index.jsp";
+ static IProject project;
+
+ public NamedBeanRefactoringTest() {
+ super("Named Bean Refactoring Test");
+ }
+
+ public static Test suite() {
+ return new TestSuite(NamedBeanRefactoringTest.class);
+ }
+
+ public void testNamedBeanRename() throws Exception {
+ IProject project = TCKTest.importPreparedProject(PROJECT_NAME);
+ doTest(project);
+ TCKTest.cleanProject(PROJECT_NAME);
+ }
+
+ public void doTest(IProject project) throws CoreException {
+ final String newName = "abcd";
+ ArrayList<TestChangeStructure> list = new ArrayList<TestChangeStructure>();
+
+ TestChangeStructure structure = new TestChangeStructure(project
+ .getProject(), FILE_NAME1);
+ TestTextChange change = new TestTextChange(328, 4, newName);
+ structure.addTextChange(change);
+ list.add(structure);
+
+ structure = new TestChangeStructure(project, FILE_NAME2);
+ change = new TestTextChange(526, 4, newName);
+ structure.addTextChange(change);
+ list.add(structure);
+
+ structure = new TestChangeStructure(project, FILE_NAME3);
+ change = new TestTextChange(789, 4, newName);
+ structure.addTextChange(change);
+ change = new TestTextChange(923, 4, newName);
+ structure.addTextChange(change);
+ list.add(structure);
+
+ structure = new TestChangeStructure(project, FILE_NAME4);
+ change = new TestTextChange(293, 4, newName);
+ structure.addTextChange(change);
+ list.add(structure);
+
+ IFile sourceFile = project.getProject().getFile(FILE_NAME1);
+
+ IBean bean = getBean(sourceFile, "game");
+ assertNotNull("Can't get the bean.", bean);
+
+ RenameNamedBeanProcessor processor = new RenameNamedBeanProcessor(bean);
+ processor.setNewName(newName);
+
+ checkRename(processor, list);
+ }
+
+ private IBean getBean(IFile file, String name) {
+ CDICoreNature cdiNature = CDICorePlugin.getCDI(file.getProject(), true);
+ assertNotNull("Can't get CDI nature.", cdiNature);
+
+ ICDIProject cdiProject = cdiNature.getDelegate();
+
+ assertNotNull("Can't get CDI project.", cdiProject);
+
+ Set<IBean> beans = cdiProject.getBeans(file.getFullPath());
+
+ for (IBean bean : beans) {
+ if (bean.getName() != null && name.equals(bean.getName())) {
+ return bean;
+ }
+ }
+ return null;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NamedBeanRefactoringTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NamedBeanRefactoringTest.java.fixme
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NamedBeanRefactoringTest.java.fixme 2010-04-27 11:20:18 UTC (rev 21720)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/NamedBeanRefactoringTest.java.fixme 2010-04-27 11:35:12 UTC (rev 21721)
@@ -1,96 +0,0 @@
-package org.jboss.tools.cdi.core.test.tck;
-
-import java.util.ArrayList;
-import java.util.Set;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.jboss.tools.cdi.core.CDICoreNature;
-import org.jboss.tools.cdi.core.CDICorePlugin;
-import org.jboss.tools.cdi.core.IBean;
-import org.jboss.tools.cdi.core.ICDIProject;
-import org.jboss.tools.cdi.internal.core.refactoring.RenameNamedBeanProcessor;
-import org.jboss.tools.tests.AbstractRefactorTest;
-
-public class NamedBeanRefactoringTest extends AbstractRefactorTest {
- private static final String PROJECT_NAME = "/tests/jbt/refactoring";
- private static final String FILE_NAME1 = "JavaSource/org/jboss/jsr299/tck/tests/jbt/refactoring/Game.java";
- private static final String FILE_NAME2 = "JavaSource/org/jboss/jsr299/tck/tests/jbt/refactoring/Generator.java";
- private static final String FILE_NAME3 = "WebContent/HomePage.xhtml";
- private static final String FILE_NAME4 = "WebContent/index.jsp";
- static IProject project;
-
- public NamedBeanRefactoringTest() {
- super("Named Bean Refactoring Test");
- }
-
- public static Test suite() {
- return new TestSuite(NamedBeanRefactoringTest.class);
- }
-
- public void testNamedBeanRename() throws Exception {
- IProject project = TCKTest.importPreparedProject(PROJECT_NAME);
- doTest(project);
- TCKTest.cleanProject(PROJECT_NAME);
- }
-
- public void doTest(IProject project) throws CoreException {
- final String newName = "abcd";
- ArrayList<TestChangeStructure> list = new ArrayList<TestChangeStructure>();
-
- TestChangeStructure structure = new TestChangeStructure(project
- .getProject(), FILE_NAME1);
- TestTextChange change = new TestTextChange(328, 4, newName);
- structure.addTextChange(change);
- list.add(structure);
-
- structure = new TestChangeStructure(project, FILE_NAME2);
- change = new TestTextChange(526, 4, newName);
- structure.addTextChange(change);
- list.add(structure);
-
- structure = new TestChangeStructure(project, FILE_NAME3);
- change = new TestTextChange(789, 4, newName);
- structure.addTextChange(change);
- change = new TestTextChange(923, 4, newName);
- structure.addTextChange(change);
- list.add(structure);
-
- structure = new TestChangeStructure(project, FILE_NAME4);
- change = new TestTextChange(293, 4, newName);
- structure.addTextChange(change);
- list.add(structure);
-
- IFile sourceFile = project.getProject().getFile(FILE_NAME1);
-
- IBean bean = getBean(sourceFile, "game");
- assertNotNull("Can't get the bean.", bean);
-
- RenameNamedBeanProcessor processor = new RenameNamedBeanProcessor(bean);
- processor.setNewName(newName);
-
- checkRename(processor, list);
- }
-
- private IBean getBean(IFile file, String name) {
- CDICoreNature cdiNature = CDICorePlugin.getCDI(file.getProject(), true);
- assertNotNull("Can't get CDI nature.", cdiNature);
-
- ICDIProject cdiProject = cdiNature.getDelegate();
-
- assertNotNull("Can't get CDI project.", cdiProject);
-
- Set<IBean> beans = cdiProject.getBeans(file.getFullPath());
-
- for (IBean bean : beans) {
- if (bean.getName() != null && name.equals(bean.getName())) {
- return bean;
- }
- }
- return null;
- }
-}
\ No newline at end of file
Modified: trunk/common/tests/org.jboss.tools.common.model.ui.test/src/org/jboss/tools/common/model/ui/jarproperties/JarPropertiesTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.model.ui.test/src/org/jboss/tools/common/model/ui/jarproperties/JarPropertiesTest.java 2010-04-27 11:20:18 UTC (rev 21720)
+++ trunk/common/tests/org.jboss.tools.common.model.ui.test/src/org/jboss/tools/common/model/ui/jarproperties/JarPropertiesTest.java 2010-04-27 11:35:12 UTC (rev 21721)
@@ -17,7 +17,7 @@
import org.jboss.tools.common.model.ui.editor.IModelObjectEditorInput;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.propertieseditor.PropertiesCompoundEditor;
-import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.test.util.TestProjectProvider;
import junit.framework.TestCase;
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java 2010-04-27 11:35:12 UTC (rev 21721)
@@ -0,0 +1,53 @@
+package org.jboss.tools.jsf.test.refactoring;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.jboss.tools.jsf.el.refactoring.RenameELVariableProcessor;
+import org.jboss.tools.test.util.ProjectImportTestSetup;
+import org.jboss.tools.tests.AbstractRefactorTest;
+
+public class ELVariableRefactoringTest extends AbstractRefactorTest {
+ static String projectName = "JSFKickStartOldFormat";
+ static IProject project;
+
+ public ELVariableRefactoringTest(){
+ super("EL Variable Refactoring Test");
+ }
+
+ protected void setUp() throws Exception {
+ project = ProjectImportTestSetup.loadProject(projectName);
+ project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ }
+
+ public void testELVariableRename() throws CoreException {
+ ArrayList<TestChangeStructure> list = new ArrayList<TestChangeStructure>();
+
+ TestChangeStructure structure = new TestChangeStructure(project.getProject(), "/WebContent/pages/hello.jsp");
+ TestTextChange change = new TestTextChange(349, 8, "customer");
+ structure.addTextChange(change);
+ list.add(structure);
+
+ structure = new TestChangeStructure(project, "/WebContent/WEB-INF/faces-config.xml");
+ change = new TestTextChange(1815, 8, "customer");
+ structure.addTextChange(change);
+ list.add(structure);
+
+ structure = new TestChangeStructure(project, "/WebContent/pages/inputUserName.jsp");
+ change = new TestTextChange(494, 8, "customer");
+ structure.addTextChange(change);
+ list.add(structure);
+
+ IFile sourceFile = project.getProject().getFile("/WebContent/pages/hello.jsp");
+
+ RenameELVariableProcessor processor = new RenameELVariableProcessor(sourceFile, "user");
+ processor.setNewName("customer");
+
+ checkRename(processor, list);
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/refactoring/ELVariableRefactoringTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2010-04-27 11:20:18 UTC (rev 21720)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2010-04-27 11:35:12 UTC (rev 21721)
@@ -93,7 +93,7 @@
public static final String SYS_PROP_IS_NOT_DEFINED = "System property {0} is not defined";
protected File getSeamHomeFolder() {
- String seamHomeFolder = System.getProperty(getSystemPropertyName());
+ String seamHomeFolder = "C:\\JBoss\\jboss-seam-1.2.1.GA";//System.getProperty(getSystemPropertyName());
if(seamHomeFolder==null) {
throw new IllegalStateException(
MessageFormat.format(SYS_PROP_IS_NOT_DEFINED, getSystemPropertyName())
Deleted: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/AbstractRefactorTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/AbstractRefactorTest.java 2010-04-27 11:20:18 UTC (rev 21720)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/AbstractRefactorTest.java 2010-04-27 11:35:12 UTC (rev 21721)
@@ -1,144 +0,0 @@
-package org.jboss.tools.seam.core.test.refactoring;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.ltk.core.refactoring.TextFileChange;
-import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.jboss.tools.common.util.FileUtil;
-import org.jboss.tools.test.util.JobUtils;
-
-public class AbstractRefactorTest extends TestCase{
-
- public AbstractRefactorTest(String name){
- super(name);
- }
-
- protected void checkRename(RenameProcessor processor, List<TestChangeStructure> changeList) throws CoreException{
- JobUtils.waitForIdle(2000);
-
- // Test before renaming
- for(TestChangeStructure changeStructure : changeList){
- IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
- String content = null;
- try {
- content = FileUtil.readStream(file);
- } catch (CoreException e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
-
- for(TestTextChange change : changeStructure.getTextChanges()){
- assertNotSame(change.getText(), content.substring(change.getOffset(), change.getOffset()+change.getLength()));
- }
- }
-
- // Rename
- processor.checkInitialConditions(new NullProgressMonitor());
- processor.checkFinalConditions(new NullProgressMonitor(), null);
- CompositeChange rootChange = (CompositeChange)processor.createChange(new NullProgressMonitor());
-
- assertEquals("There is unexpected number of changes",changeList.size(), rootChange.getChildren().length);
-
- for(int i = 0; i < rootChange.getChildren().length;i++){
- TextFileChange fileChange = (TextFileChange)rootChange.getChildren()[i];
-
- MultiTextEdit edit = (MultiTextEdit)fileChange.getEdit();
-
- TestChangeStructure change = findChange(changeList, fileChange.getFile());
- if(change != null){
- assertEquals(change.size(), edit.getChildrenSize());
- }
- }
-
- rootChange.perform(new NullProgressMonitor());
- JobUtils.waitForIdle(2000);
-
-
- // Test results
- for(TestChangeStructure changeStructure : changeList){
- IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
- String content = null;
- content = FileUtil.readStream(file);
- for(TestTextChange change : changeStructure.getTextChanges()){
- assertEquals("There is unexpected change in resource - "+file.getName(),change.getText(), content.substring(change.getOffset(), change.getOffset()+change.getLength()));
- }
- }
- }
-
-
- protected TestChangeStructure findChange(List<TestChangeStructure> changeList, IFile file){
- for(TestChangeStructure tcs : changeList){
- if(tcs.getFileName().equals("/"+file.getFullPath().removeFirstSegments(1).toString()))
- return tcs;
- }
- return null;
- }
-
-
- public class TestChangeStructure{
- private IProject project;
- private String fileName;
- ArrayList<TestTextChange> textChanges = new ArrayList<TestTextChange>();
-
-
- public TestChangeStructure(IProject project, String fileName){
- this.project = project;
- this.fileName = fileName;
- }
-
- public IProject getProject(){
- return project;
- }
-
- public String getFileName(){
- return fileName;
- }
-
- public ArrayList<TestTextChange> getTextChanges(){
- return textChanges;
- }
-
- public void addTextChange(TestTextChange change){
- textChanges.add(change);
- }
-
- public int size(){
- return textChanges.size();
- }
-
- }
-
- public class TestTextChange{
- private int offset;
- private int length;
- private String text;
-
- public TestTextChange(int offset, int length, String text){
- this.offset = offset;
- this.length = length;
- this.text = text;
- }
-
- public int getOffset(){
- return offset;
- }
-
- public int getLength(){
- return length;
- }
-
- public String getText(){
- return text;
- }
- }
-
-}
Deleted: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/ELVariableRefactoringTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/ELVariableRefactoringTest.java 2010-04-27 11:20:18 UTC (rev 21720)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/ELVariableRefactoringTest.java 2010-04-27 11:35:12 UTC (rev 21721)
@@ -1,52 +0,0 @@
-package org.jboss.tools.seam.core.test.refactoring;
-
-import java.util.ArrayList;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.jboss.tools.jsf.el.refactoring.RenameELVariableProcessor;
-import org.jboss.tools.test.util.ProjectImportTestSetup;
-
-public class ELVariableRefactoringTest extends AbstractRefactorTest {
- static String projectName = "JSFKickStartOldFormat";
- static IProject project;
-
- public ELVariableRefactoringTest(){
- super("EL Variable Refactoring Test");
- }
-
- protected void setUp() throws Exception {
- project = ProjectImportTestSetup.loadProject(projectName);
- project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
- }
-
- public void testELVariableRename() throws CoreException {
- ArrayList<TestChangeStructure> list = new ArrayList<TestChangeStructure>();
-
- TestChangeStructure structure = new TestChangeStructure(project.getProject(), "/WebContent/pages/hello.jsp");
- TestTextChange change = new TestTextChange(349, 8, "customer");
- structure.addTextChange(change);
- list.add(structure);
-
- structure = new TestChangeStructure(project, "/WebContent/WEB-INF/faces-config.xml");
- change = new TestTextChange(1815, 8, "customer");
- structure.addTextChange(change);
- list.add(structure);
-
- structure = new TestChangeStructure(project, "/WebContent/pages/inputUserName.jsp");
- change = new TestTextChange(494, 8, "customer");
- structure.addTextChange(change);
- list.add(structure);
-
- IFile sourceFile = project.getProject().getFile("/WebContent/pages/hello.jsp");
-
- RenameELVariableProcessor processor = new RenameELVariableProcessor(sourceFile, "user");
- processor.setNewName("customer");
-
- checkRename(processor, list);
- }
-
-}
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringTest.java 2010-04-27 11:20:18 UTC (rev 21720)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringTest.java 2010-04-27 11:35:12 UTC (rev 21721)
@@ -12,6 +12,7 @@
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ProjectImportTestSetup;
+import org.jboss.tools.tests.AbstractRefactorTest;
public class SeamRefactoringTest extends AbstractRefactorTest {
static String warProjectName = "Test1";
Added: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractRefactorTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractRefactorTest.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractRefactorTest.java 2010-04-27 11:35:12 UTC (rev 21721)
@@ -0,0 +1,181 @@
+package org.jboss.tools.tests;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.ltk.core.refactoring.CompositeChange;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+import org.eclipse.ltk.core.refactoring.participants.RenameProcessor;
+import org.eclipse.text.edits.MultiTextEdit;
+import org.jboss.tools.test.util.JobUtils;
+
+public class AbstractRefactorTest extends TestCase{
+
+ public AbstractRefactorTest(String name){
+ super(name);
+ }
+
+ protected void checkRename(RenameProcessor processor, List<TestChangeStructure> changeList) throws CoreException{
+ JobUtils.waitForIdle(2000);
+
+ // Test before renaming
+ for(TestChangeStructure changeStructure : changeList){
+ IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
+ String content = null;
+ try {
+ content = readStream(file);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
+
+ for(TestTextChange change : changeStructure.getTextChanges()){
+ assertNotSame(change.getText(), content.substring(change.getOffset(), change.getOffset()+change.getLength()));
+ }
+ }
+
+ // Rename
+ processor.checkInitialConditions(new NullProgressMonitor());
+ processor.checkFinalConditions(new NullProgressMonitor(), null);
+ CompositeChange rootChange = (CompositeChange)processor.createChange(new NullProgressMonitor());
+
+ assertEquals("There is unexpected number of changes",changeList.size(), rootChange.getChildren().length);
+
+ for(int i = 0; i < rootChange.getChildren().length;i++){
+ TextFileChange fileChange = (TextFileChange)rootChange.getChildren()[i];
+
+ MultiTextEdit edit = (MultiTextEdit)fileChange.getEdit();
+
+ TestChangeStructure change = findChange(changeList, fileChange.getFile());
+ if(change != null){
+ assertEquals(change.size(), edit.getChildrenSize());
+ }
+ }
+
+ rootChange.perform(new NullProgressMonitor());
+ JobUtils.waitForIdle(2000);
+
+
+ // Test results
+ for(TestChangeStructure changeStructure : changeList){
+ IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
+ String content = null;
+ content = readStream(file);
+ for(TestTextChange change : changeStructure.getTextChanges()){
+ assertEquals("There is unexpected change in resource - "+file.getName(),change.getText(), content.substring(change.getOffset(), change.getOffset()+change.getLength()));
+ }
+ }
+ }
+
+
+ protected TestChangeStructure findChange(List<TestChangeStructure> changeList, IFile file){
+ for(TestChangeStructure tcs : changeList){
+ if(tcs.getFileName().equals("/"+file.getFullPath().removeFirstSegments(1).toString()))
+ return tcs;
+ }
+ return null;
+ }
+
+
+ public class TestChangeStructure{
+ private IProject project;
+ private String fileName;
+ ArrayList<TestTextChange> textChanges = new ArrayList<TestTextChange>();
+
+
+ public TestChangeStructure(IProject project, String fileName){
+ this.project = project;
+ this.fileName = fileName;
+ }
+
+ public IProject getProject(){
+ return project;
+ }
+
+ public String getFileName(){
+ return fileName;
+ }
+
+ public ArrayList<TestTextChange> getTextChanges(){
+ return textChanges;
+ }
+
+ public void addTextChange(TestTextChange change){
+ textChanges.add(change);
+ }
+
+ public int size(){
+ return textChanges.size();
+ }
+
+ }
+
+ public class TestTextChange{
+ private int offset;
+ private int length;
+ private String text;
+
+ public TestTextChange(int offset, int length, String text){
+ this.offset = offset;
+ this.length = length;
+ this.text = text;
+ }
+
+ public int getOffset(){
+ return offset;
+ }
+
+ public int getLength(){
+ return length;
+ }
+
+ public String getText(){
+ return text;
+ }
+ }
+
+ public static String readStream(InputStream is) {
+ StringBuffer sb = new StringBuffer(""); //$NON-NLS-1$
+ try {
+ byte[] b = new byte[4096];
+ while(true) {
+ int l = is.read(b, 0, b.length);
+ if(l < 0) break;
+ sb.append(new String(b, 0, l));
+ }
+ is.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
+ return sb.toString();
+ }
+
+ public static String readStream(IFile file) throws CoreException {
+ String content = null;
+ InputStream in = null;
+ try {
+ in = file.getContents();
+ content = readStream(in);
+ } finally {
+ if(in!=null) {
+ try {
+ in.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
+ }
+ }
+ return content;
+ }
+
+}
Property changes on: trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/tests/AbstractRefactorTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 8 months
JBoss Tools SVN: r21720 - trunk/struts/plugins/org.jboss.tools.struts/resources/help.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-27 07:20:18 -0400 (Tue, 27 Apr 2010)
New Revision: 21720
Modified:
trunk/struts/plugins/org.jboss.tools.struts/resources/help/keys-struts.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-6206
Modified: trunk/struts/plugins/org.jboss.tools.struts/resources/help/keys-struts.properties
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/resources/help/keys-struts.properties 2010-04-27 10:50:16 UTC (rev 21719)
+++ trunk/struts/plugins/org.jboss.tools.struts/resources/help/keys-struts.properties 2010-04-27 11:20:18 UTC (rev 21720)
@@ -369,7 +369,7 @@
StrutsForward12_CreateSetProperty.Title=Set Property
StrutsForward12_EditPath.WindowTitle=Edit Path
-StrutsForward1_EditPath.Title=Struts Forward
+StrutsForward12_EditPath.Title=Struts Forward
StrutsForward12_EditPath_0.WindowTitle=Edit Path
StrutsForward12_EditPath_0.Title=Struts Forward
@@ -606,12 +606,15 @@
Wizard_SelectKey.WindowTitle=Key
#Edit Path
-StrutsAction10_EditPath_0.WindowTitle=Edit Path
-StrutsGlobalForwards10_EditPath_0.WindowTitle=Edit Path
-StrutsAction11_EditPath_0.WindowTitle=Edit Path
-StrutsGlobalForwards11_EditPath_0.WindowTitle=Edit Path
-StrutsGlobalExceptions11_EditPath_0.WindowTitle=Edit Path
+StrutsAction10_EditPath_0.Title=Struts Action
+StrutsGlobalForwards10_EditPath_0.Title=Global Forward
+StrutsAction11_EditPath_0.Title=Struts Action
+StrutsAction12_EditPath_0.Title=Struts Action
+StrutsGlobalForwards11_EditPath_0.Title=Global Forward
+StrutsGlobalForwards12_EditPath_0.WindowTitle=Edit Path
+StrutsGlobalExceptions11_EditPath_0.Title=Global Exception
+
#################################### Title
WebPrjRoot_OpenProject_1.Title=Red Hat Struts Project
@@ -639,13 +642,6 @@
Wizard_SelectKey.Title=Key
-#Edit Path
-StrutsAction10_EditPath_0.Title=Struts Action
-StrutsGlobalForwards10_EditPath_0.Title=Global Forward
-StrutsAction11_EditPath_0.Title=Struts Action
-StrutsGlobalForwards11_EditPath_0.Title=Global Forward
-StrutsGlobalExceptions11_EditPath_0.Title=Global Exception
-
#Tomcat JVM
TomcatVMHelper.vm=Path to JDK
14 years, 8 months
JBoss Tools SVN: r21719 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-04-27 06:50:16 -0400 (Tue, 27 Apr 2010)
New Revision: 21719
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-6206
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java 2010-04-27 07:00:54 UTC (rev 21718)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/SpecialWizardSupport.java 2010-04-27 10:50:16 UTC (rev 21719)
@@ -86,7 +86,9 @@
public String getTitle() {
String title = WizardKeys.getHeader(getHelpKey());
if(title != null) return title;
- title = WizardKeys.getHeader(action, getEntityData()[0].getModelEntity()); // no step id
+ if(getEntityData().length > 0) {
+ title = WizardKeys.getHeader(action, getEntityData()[0].getModelEntity()); // no step id
+ }
if(title != null) return title;
String n = (action == null) ? "" : "" + action.getDisplayName(); //$NON-NLS-1$ //$NON-NLS-2$
if(n.endsWith("...")) n = n.substring(0, n.length() - 3); //$NON-NLS-1$
@@ -100,7 +102,7 @@
String key1 = key.substring(0, key.length() - 2);
t = WizardKeys.getTitle(key1);
}
- if(t == null) {
+ if(t == null && getEntityData().length > 0) {
t = WizardKeys.getTitle(action, getEntityData()[0].getModelEntity()); // no step id
}
return t;
14 years, 8 months
JBoss Tools SVN: r21718 - trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2010-04-27 03:00:54 -0400 (Tue, 27 Apr 2010)
New Revision: 21718
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/UserLibraryHelper.java
Log:
UserLibraryHelper added
Added: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/UserLibraryHelper.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/UserLibraryHelper.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/UserLibraryHelper.java 2010-04-27 07:00:54 UTC (rev 21718)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.ui.bot.ext.helper;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jdt.core.ClasspathContainerInitializer;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.JavaCore;
+
+/**
+ * Helper for adding User Libraries (avoiding native dialogs)
+ *
+ * @author jpeterka
+ *
+ */
+public class UserLibraryHelper {
+
+ static Logger log = Logger.getLogger(UserLibraryHelper.class);
+
+ /**
+ * Provides list of jars on given lib path
+ *
+ * @param libPath
+ * path to jar libraries
+ * @return
+ */
+ public static String[] getJarList(String libPath) {
+ File folder = new File(libPath);
+ File[] listOfFiles = folder.listFiles();
+ List<String> filePaths = new ArrayList<String>();
+
+ for (int i = 0; i < listOfFiles.length; i++) {
+ if (listOfFiles[i].isFile()
+ && listOfFiles[i].getName().endsWith(".jar")) {
+ filePaths.add(listOfFiles[i].getAbsolutePath());
+ }
+ }
+ String[] ret = new String[filePaths.size()];
+ return filePaths.toArray(ret);
+ }
+
+ /**
+ * Creates user library with given identifiers and given jar list
+ *
+ * @param libName
+ * @param jarPaths
+ */
+ public static void addUserLibrary(final String libName,
+ final String[] jarPaths) {
+
+ ClasspathContainerInitializer initializer = JavaCore
+ .getClasspathContainerInitializer(JavaCore.USER_LIBRARY_CONTAINER_ID);
+
+ IPath containerPath = new Path(JavaCore.USER_LIBRARY_CONTAINER_ID);
+ try {
+ initializer.requestClasspathContainerUpdate(containerPath
+ .append(libName), null, new IClasspathContainer() {
+
+ public IClasspathEntry[] getClasspathEntries() {
+ IClasspathEntry entry[] = new IClasspathEntry[jarPaths.length];
+ for (int i = 0; i < entry.length; i++) {
+ entry[i] = JavaCore.newLibraryEntry(new Path(
+ jarPaths[i]), null, null);
+ }
+ return entry;
+ }
+
+ public String getDescription() {
+ return libName;
+ }
+
+ public int getKind() {
+ return K_APPLICATION;
+ }
+
+ public IPath getPath() {
+ return new Path(JavaCore.USER_LIBRARY_CONTAINER_ID)
+ .append(libName);
+ }
+ });
+ log.info("User Library: " + libName + " defined");
+ } catch (CoreException e) {
+ log.error("Unable to add user library");
+ log.error(e.getMessage());
+ }
+ }
+}
Property changes on: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/UserLibraryHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 8 months
JBoss Tools SVN: r21717 - branches/modular_build/jbpm.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-04-26 19:33:06 -0400 (Mon, 26 Apr 2010)
New Revision: 21717
Modified:
branches/modular_build/jbpm/pom.xml
Log:
remove site from pom.xml; not ready yet
Modified: branches/modular_build/jbpm/pom.xml
===================================================================
--- branches/modular_build/jbpm/pom.xml 2010-04-26 23:17:25 UTC (rev 21716)
+++ branches/modular_build/jbpm/pom.xml 2010-04-26 23:33:06 UTC (rev 21717)
@@ -14,8 +14,7 @@
<modules>
<module>features</module>
<module>plugins</module>
- <module>site</module>
<module>tests</module>
</modules>
</project>
-
\ No newline at end of file
+
14 years, 8 months
JBoss Tools SVN: r21716 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-04-26 19:17:25 -0400 (Mon, 26 Apr 2010)
New Revision: 21716
Modified:
branches/modular_build/build/build.xml
Log:
switch back to using <info> because <wcversion> doesn't look at server
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-04-26 23:16:14 UTC (rev 21715)
+++ branches/modular_build/build/build.xml 2010-04-26 23:17:25 UTC (rev 21716)
@@ -182,10 +182,7 @@
<!-- Store svn info so we can compare it later and thus not need to update or checkout every time -->
<svn javahl="false" svnkit="true" failonerror="false">
- <!--
<info target="${WORKINGDIR}/@{COMPONENT}" propprefix="svn.info.@{COMPONENT}" verbose="false" />
- -->
- <wcVersion path="${WORKINGDIR}/@{COMPONENT}" prefix="svn.info.@{COMPONENT}." />
</svn>
<if>
<isset property="svn.info.(a){COMPONENT}.rev" />
14 years, 8 months
JBoss Tools SVN: r21715 - branches/modular_build/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-04-26 19:16:14 -0400 (Mon, 26 Apr 2010)
New Revision: 21715
Modified:
branches/modular_build/build/build.xml
Log:
switch back to using <info> because <wcversion> doesn't look at server
Modified: branches/modular_build/build/build.xml
===================================================================
--- branches/modular_build/build/build.xml 2010-04-26 23:13:37 UTC (rev 21714)
+++ branches/modular_build/build/build.xml 2010-04-26 23:16:14 UTC (rev 21715)
@@ -188,18 +188,11 @@
<wcVersion path="${WORKINGDIR}/@{COMPONENT}" prefix="svn.info.@{COMPONENT}." />
</svn>
<if>
- <!--
<isset property="svn.info.(a){COMPONENT}.rev" />
<then>
<echo file="${WORKINGDIR}/svn.info-(a){COMPONENT}.txt">svn.info.(a){COMPONENT}.rev = ${svn.info.(a){COMPONENT}.rev}
</echo>
</then>
- -->
- <isset property="svn.info.(a){COMPONENT}.revision.max" />
- <then>
- <echo file="${WORKINGDIR}/svn.info-(a){COMPONENT}.txt">svn.info.(a){COMPONENT}.revision.max = ${svn.info.(a){COMPONENT}.revision.max}
-</echo>
- </then>
</if>
<echo file="build.cfg" message="@{COMPONENT}," append="true" />
</sequential>
@@ -224,18 +217,12 @@
<property file="${WORKINGDIR}/svn.info-(a){COMPONENT}.txt" />
<!-- check svn info; if new version found, svn up -->
<svn javahl="false" svnkit="true" failonerror="false">
- <!--
<info target="${WORKINGDIR}/@{COMPONENT}"
propprefix="svn.info.(a){COMPONENT}.check"
verbose="false"
/>
- -->
- <wcVersion path="${WORKINGDIR}/@{COMPONENT}"
- prefix="svn.info.(a){COMPONENT}.check."
- />
</svn>
<if>
- <!--
<or>
<not>
<isset property="svn.info.(a){COMPONENT}.rev" />
@@ -249,20 +236,6 @@
/>
</not>
</or>
- -->
- <or>
- <not>
- <isset property="svn.info.(a){COMPONENT}.revision.max" />
- </not>
- <not>
- <isset property="svn.info.(a){COMPONENT}.check.revision.max" />
- </not>
- <not>
- <equals arg1="${svn.info.(a){COMPONENT}.revision.max}"
- arg2="${svn.info.(a){COMPONENT}.check.revision.max}"
- />
- </not>
- </or>
<then>
<svn.fetch component="@{COMPONENT}" op="up" />
</then>
14 years, 8 months