JBoss Tools SVN: r13542 - in trunk/jsf: plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-02-09 08:04:32 -0500 (Mon, 09 Feb 2009)
New Revision: 13542
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp.xml
Log:
RESOLVED - issue JBIDE-3755: Add support of attributes for rich:editor in VPE
https://jira.jboss.org/jira/browse/JBIDE-3755
- Support of attributes 'width', 'height', 'style', 'styleClass' has been added
- Resizer now works for rich:editor
- JUnit tests have been modified
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java 2009-02-09 11:16:18 UTC (rev 13541)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesEditorTemplate.java 2009-02-09 13:04:32 UTC (rev 13542)
@@ -11,10 +11,12 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMText;
@@ -31,9 +33,10 @@
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
- RichFacesEditorTemplateHelper editorTemplateHelper = new RichFacesEditorTemplateHelper(
- pageContext, (Element) sourceNode, visualDocument
- );
+ RichFacesEditorTemplateHelper editorTemplateHelper =
+ new RichFacesEditorTemplateHelper(
+ pageContext, (Element) sourceNode, visualDocument
+ );
nsIDOMElement mainElement = editorTemplateHelper.create();
VpeCreationData creationData = new VpeCreationData(mainElement);
@@ -70,12 +73,23 @@
public nsIDOMElement create() {
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "editor"); //$NON-NLS-1$
+
+ String style = sourceElement.getAttribute(RichFaces.ATTR_STYLE);
+ if (style == null) {
+ style = ""; //$NON-NLS-1$
+ }
+ String styleClass = sourceElement.getAttribute(RichFaces.ATTR_STYLE_CLASS);
+ if (styleClass == null) {
+ styleClass = ""; //$NON-NLS-1$
+ }
+
// create nodes
nsIDOMElement mainSpan = visualDocument.createElement(HTML.TAG_SPAN); {
- mainSpan.setAttribute(HTML.ATTR_CLASS, "richfacesSimpleSkin"); //$NON-NLS-1$
-
+ mainSpan.setAttribute(HTML.ATTR_CLASS, "richfacesSimpleSkin " + styleClass); //$NON-NLS-1$
+
// Yahor Radtsevich: Fix of JBIDE-3653: inFlasher doesn't shows for rich:editor component
- mainSpan.setAttribute(HTML.ATTR_STYLE, "display: table;"); //$NON-NLS-1$
+ // (style "display: table;" has been added)
+ mainSpan.setAttribute(HTML.ATTR_STYLE, "display: table;" + style); //$NON-NLS-1$
}
nsIDOMElement mainTable = createMainTable();
nsIDOMElement textContainer = createTextContainer();
@@ -92,19 +106,31 @@
/**
* Creates {@code
- * <table cellspacing="0" cellpadding="0" class="mceLayout" style="width: 400px; height: 300px;"/>
+ * <table cellspacing="0" cellpadding="0" class="mceLayout" style="width: ???px; height: ???px;"/>
* }
* @return created element
*/
private nsIDOMElement createMainTable() {
+ // evaluate width and height
+ String style = "width: 183px; height: 100px;"; //$NON-NLS-1$
+ String width = sourceElement.getAttribute(RichFaces.ATTR_WIDTH);
+ if (width != null) {
+ width = VpeStyleUtil.addPxIfNecessary(width);
+ style = VpeStyleUtil.setParameterInStyle(style, HTML.STYLE_PARAMETER_WIDTH, width);
+ }
+ String height = sourceElement.getAttribute(RichFaces.ATTR_HEIGHT);
+ if (height != null) {
+ height = VpeStyleUtil.addPxIfNecessary(height);
+ style = VpeStyleUtil.setParameterInStyle(style, HTML.STYLE_PARAMETER_HEIGHT, height);
+ }
+
nsIDOMElement mainTable = visualDocument.createElement(HTML.TAG_TABLE); {
mainTable.setAttribute(HTML.ATTR_CELLSPACING, "0"); //$NON-NLS-1$
mainTable.setAttribute(HTML.ATTR_CELLPADDING, "0"); //$NON-NLS-1$
mainTable.setAttribute(HTML.ATTR_CLASS, "mceLayout"); //$NON-NLS-1$
- // TODO: change the witdh and height attributes
- mainTable.setAttribute(HTML.ATTR_STYLE, "width: 400px; height: 300px;"); //$NON-NLS-1$
+ mainTable.setAttribute(HTML.ATTR_STYLE, style);
}
-
+
return mainTable;
}
@@ -204,4 +230,4 @@
return outerTR;
}
-}
\ No newline at end of file
+}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2009-02-09 11:16:18 UTC (rev 13541)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2009-02-09 13:04:32 UTC (rev 13542)
@@ -84,6 +84,7 @@
public static final String ATTR_VISIBLE = "visible"; //$NON-NLS-1$
/** The Constant ATTR_WIDTH. */
public static final String ATTR_WIDTH = "width"; //$NON-NLS-1$
+ public static final String ATTR_HEIGHT = "height"; //$NON-NLS-1$
public static final String ATTR_HORIZONTAL_OFFSET = "horizontalOffset"; //$NON-NLS-1$
public static final String ATTR_VERTICAL_OFFSET = "verticalOffset"; //$NON-NLS-1$
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2009-02-09 11:16:18 UTC (rev 13541)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2009-02-09 13:04:32 UTC (rev 13542)
@@ -743,6 +743,10 @@
<vpe:if test="tld_version('min=3.3')">
<vpe:template children="no" modify="no"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesEditorTemplate">
+ <vpe:resize>
+ <vpe:width width-attr="width" />
+ <vpe:height height-attr="height" />
+ </vpe:resize>
<vpe:dnd>
<vpe:drag start-enable="yes" />
<vpe:drop container="no"/>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp 2009-02-09 11:16:18 UTC (rev 13541)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp 2009-02-09 13:04:32 UTC (rev 13542)
@@ -5,11 +5,16 @@
<html>
<head>
+<style type="text/css">
+ .blue-border {
+ color:blue;
+ }
+</style>
</head>
<body>
<f:view>
<h:form>
- <rich:editor id="richEditor"/>
+ <rich:editor id="richEditor" width="391" height="347" styleClass="blue-border" style="border: 5px dotted;"/>
</h:form>
</f:view>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp.xml 2009-02-09 11:16:18 UTC (rev 13541)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp.xml 2009-02-09 13:04:32 UTC (rev 13542)
@@ -1,8 +1,8 @@
<tests>
<test id="richEditor">
- <SPAN CLASS="richfacesSimpleSkin" STYLE="display: table;">
+ <SPAN CLASS="richfacesSimpleSkin blue-border" STYLE="border: 5px dotted ; display: table;">
<TABLE CELLSPACING="0" CELLPADDING="0" CLASS="mceLayout"
- STYLE="width: 400px; height: 300px;">
+ STYLE="width: 391px; height: 347px;">
<TR STYLE="height: 100%;">
<TD>
<DIV CLASS="mceIframeContainer" STYLE="height: 100%;">
14 years, 1 month
JBoss Tools SVN: r13541 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-02-09 06:16:18 -0500 (Mon, 09 Feb 2009)
New Revision: 13541
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsLabelProvider.java
Log:
JBIDE-3764
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsLabelProvider.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsLabelProvider.java 2009-02-09 10:35:53 UTC (rev 13540)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsLabelProvider.java 2009-02-09 11:16:18 UTC (rev 13541)
@@ -47,6 +47,17 @@
String s = o.getAttributeValue("location").replace('\\', '/');
return s.substring(s.lastIndexOf('/') + 1);
}
+
+ //of jar
+ XModelObject p = o.getParent();
+ while(p != null && p.getFileType() != XModelObject.SYSTEM) p = p.getParent();
+ if(p != null && p.getModelEntity().getName().equals("FileSystemJar")) {
+ String n = p.getAttributeValue("name");
+ if(n != null && n.startsWith("lib-")) n = n.substring(4);
+ String addition = (n != null) ? " - " + n : "";
+ return super.getText(element) + addition;
+ }
+
return super.getText(element);
}
14 years, 1 month
JBoss Tools SVN: r13540 - trunk/seam/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-02-09 05:35:53 -0500 (Mon, 09 Feb 2009)
New Revision: 13540
Modified:
trunk/seam/docs/reference/en/modules/directory_structure.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-581 - adding the "Changing the Seam Version" section;
Modified: trunk/seam/docs/reference/en/modules/directory_structure.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/directory_structure.xml 2009-02-09 10:35:20 UTC (rev 13539)
+++ trunk/seam/docs/reference/en/modules/directory_structure.xml 2009-02-09 10:35:53 UTC (rev 13540)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="directory_str" xreflabel="directory_str" >
+<chapter id="directory_str" xreflabel="directory_str">
<?dbhtml filename="directory_structure.html"?>
<chapterinfo>
<keywordset>
@@ -55,7 +55,8 @@
tests via <emphasis><property>Run As > TestNG Test</property>.</emphasis></para>
<para>In order to deploy WAR project on server, right-click on the project and select <emphasis>
<property>Run As > Run on Server</property>.</emphasis> Studio will deploy
- WAR project into one web application on server to <property>deploy</property> folder.</para>
+ WAR project into one web application on server to <property>deploy</property>
+ folder.</para>
</section>
@@ -83,6 +84,65 @@
and <property>war</property> modules of the EAR project.</para>
</section>
+ <section id="seam_version_changing">
+ <title>Changing the Seam Version</title>
+
+ <para>To upgrade or downgrade your projects Seam version use the facet preferences. You
+ should right-click your project and choose <emphasis>
+ <property>Project Facets</property>
+ </emphasis> category. Next select <emphasis>
+ <property>Seam</property>
+ </emphasis> and change its version to needed one.</para>
+
+ <figure>
+ <title>Changing the Seam Facet Version</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/directory_structure/directory_structure_3.png"
+ scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After pressing <emphasis>
+ <property>Apply</property>
+ </emphasis> the wizard for adjusting new Seam runtime settings appears.</para>
+
+ <figure>
+ <title>Changing the Seam Facet Version</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/directory_structure/directory_structure_4.png"
+ scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If you need to update the libraries for you project, check the <emphasis>
+ <property>Update libraries</property>
+ </emphasis> option. All libraries you checked will be removed and the libraries from the
+ new Seam distribution will be added after clicking <emphasis>
+ <property>Ok</property>.</emphasis></para>
+
+ <figure>
+ <title>Changing the Seam Facet Version</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/directory_structure/directory_structure_5.png"
+ scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+
+ <para>The note "Seam configuration files and their XSDs won't be changed" is meant that
+ the libraries, Seam facet and runtime version will be changed, but configuration files that refer to
+ the old version will have to be manually updated.</para>
+ </note>
+ </section>
+
<section id="renaming_projects_folders">
<title>Renaming the Projects and Folders</title>
@@ -107,9 +167,9 @@
</emphasis> (or <emphasis>
<property>Shift + Alt + V</property>
</emphasis>), if you need to move
- <emphasis><project_name>/WebContent</emphasis> folder,
- <emphasis><project_name>/ejbModule</emphasis> folder or
- <emphasis><project_name>/test-src</emphasis> folder in the other place
+ <emphasis><project_name>/WebContent</emphasis> folder,
+ <emphasis><project_name>/ejbModule</emphasis> folder or
+ <emphasis><project_name>/test-src</emphasis> folder in the other place
within the Project structure.</para>
</section>
</chapter>
14 years, 1 month
JBoss Tools SVN: r13539 - trunk/seam/docs/reference/en/images/directory_structure.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-02-09 05:35:20 -0500 (Mon, 09 Feb 2009)
New Revision: 13539
Added:
trunk/seam/docs/reference/en/images/directory_structure/directory_structure_3.png
trunk/seam/docs/reference/en/images/directory_structure/directory_structure_4.png
trunk/seam/docs/reference/en/images/directory_structure/directory_structure_5.png
Log:
https://jira.jboss.org/jira/browse/JBDS-581 - adding new screens;
Added: trunk/seam/docs/reference/en/images/directory_structure/directory_structure_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/docs/reference/en/images/directory_structure/directory_structure_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/docs/reference/en/images/directory_structure/directory_structure_4.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/docs/reference/en/images/directory_structure/directory_structure_4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/docs/reference/en/images/directory_structure/directory_structure_5.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/docs/reference/en/images/directory_structure/directory_structure_5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
14 years, 1 month
JBoss Tools SVN: r13538 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core: META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-02-09 04:26:58 -0500 (Mon, 09 Feb 2009)
New Revision: 13538
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/JPAPostInstallFasetListener.java
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateFactory.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3664
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF 2009-02-09 04:09:54 UTC (rev 13537)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/META-INF/MANIFEST.MF 2009-02-09 09:26:58 UTC (rev 13538)
@@ -13,7 +13,8 @@
org.eclipse.jdt.launching;bundle-version="3.4.0",
org.eclipse.debug.core;bundle-version="3.4.0",
org.eclipse.emf.ecore;bundle-version="2.4.0",
- org.eclipse.jdt.core;bundle-version="3.4.0"
+ org.eclipse.jdt.core;bundle-version="3.4.0",
+ org.eclipse.wst.common.project.facet.core;bundle-version="1.3.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.hibernate.jpt.core.internal,
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml 2009-02-09 04:09:54 UTC (rev 13537)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/plugin.xml 2009-02-09 09:26:58 UTC (rev 13538)
@@ -11,5 +11,12 @@
id="hibernate"
label="Hibernate"/>
</extension>
+ <extension
+ point="org.eclipse.wst.common.project.facet.core.listeners">
+ <listener
+ class="org.jboss.tools.hibernate.jpt.core.internal.JPAPostInstallFasetListener"
+ eventTypes="POST_INSTALL">
+ </listener>
+ </extension>
</plugin>
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateFactory.java 2009-02-09 04:09:54 UTC (rev 13537)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateFactory.java 2009-02-09 09:26:58 UTC (rev 13538)
@@ -41,30 +41,4 @@
return new HibernatePersistenceUnit(parent, persistenceUnit);
}
-
- @Override
- public JpaDataSource buildJpaDataSource(JpaProject jpaProject, String connectionProfileName) {
- try {
- buildConsoleConfiguration(jpaProject, connectionProfileName);
- } catch (CoreException e) {
- //logErrorMessage("Can't create console configuration for project " + jpaProject.getName(), e);
- }
- return super.buildJpaDataSource(jpaProject, connectionProfileName);
- }
-
- protected void buildConsoleConfiguration(JpaProject jpaProject, String connectionProfileName) throws CoreException{
- if (connectionProfileName == null || connectionProfileName.length() == 0) return;
- ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType lct = lm.getLaunchConfigurationType(ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID);
- ILaunchConfigurationWorkingCopy wc = lct.newInstance(null, jpaProject.getName());
-
- wc.setAttribute(IConsoleConfigurationLaunchConstants.CONFIGURATION_FACTORY, ConfigurationMode.JPA.toString());
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, jpaProject.getName());
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, true );
- wc.setAttribute(IConsoleConfigurationLaunchConstants.FILE_MAPPINGS, (List<String>)null);
- //wc.setAttribute(IConsoleConfigurationLaunchConstants.CONNECTION_PROFILE_NAME, connectionProfileName);
- wc.setAttribute(IConsoleConfigurationLaunchConstants.USE_JPA_PROJECT_PROFILE, "true");//$NON-NLS-1$
-
- wc.doSave();
- }
}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/JPAPostInstallFasetListener.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/JPAPostInstallFasetListener.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/JPAPostInstallFasetListener.java 2009-02-09 09:26:58 UTC (rev 13538)
@@ -0,0 +1,99 @@
+package org.jboss.tools.hibernate.jpt.core.internal;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent;
+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectListener;
+import org.eclipse.wst.common.project.facet.core.events.IProjectFacetActionEvent;
+import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent.Type;
+import org.hibernate.console.preferences.ConsoleConfigurationPreferences.ConfigurationMode;
+import org.hibernate.eclipse.console.utils.ProjectUtils;
+import org.hibernate.eclipse.launch.ICodeGenerationLaunchConstants;
+import org.hibernate.eclipse.launch.IConsoleConfigurationLaunchConstants;
+
+public class JPAPostInstallFasetListener implements IFacetedProjectListener {
+
+ public void handleEvent(IFacetedProjectEvent event) {
+ if (event.getType() == Type.POST_INSTALL){
+ IProject project = event.getProject().getProject();
+ IProjectFacetActionEvent pEvent = (IProjectFacetActionEvent)event;
+ if (pEvent.getProjectFacet().getId().equals(JptCorePlugin.FACET_ID)
+ && HibernatePlatform.ID.equals(JptCorePlugin.getJpaPlatformId(project))){
+ if (checkPreConditions(project)){
+ buildConsoleConfiguration(project);
+ }
+ }
+ }
+ }
+
+ /**
+ *
+ * @param project
+ * @return true if need to create new ConsoleConfiguration, false - otherwise.
+ */
+ protected boolean checkPreConditions(IProject project){
+ try {
+ ILaunchConfiguration lc = getLaunchConfiguration(project);
+ if (lc != null){
+ ProjectUtils.toggleHibernateOnProject(project, true, lc.getName());
+ return false;
+ }
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ return true;
+ }
+
+ private ILaunchConfiguration getLaunchConfiguration(IProject project) throws CoreException{
+ ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
+ ILaunchConfigurationType lct = lm.getLaunchConfigurationType(ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID);
+ List<ILaunchConfiguration> configs = new ArrayList<ILaunchConfiguration>();
+ for (int i = 0; i < lm.getLaunchConfigurations(lct).length; i++){
+ ILaunchConfiguration lc = lm.getLaunchConfigurations(lct)[i];
+ if (project.getName().equals(
+ lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""))){//lc uses this project
+ if (project.getName().equals(lc.getName())) return lc;
+ configs.add(lc);
+ }
+ }
+ //select best launch configuration "projectName (1)"
+ Pattern p = Pattern.compile(project.getName() + " \\(\\d+\\)");
+ for (int i = 0; i < configs.size(); i++) {
+ ILaunchConfiguration lc = configs.get(i);
+ if (p.matcher(lc.getName()).matches()) return lc;
+ }
+ return configs.size() > 0 ? configs.get(0) : null;
+ }
+
+ protected void buildConsoleConfiguration(IProject project){
+ ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
+ ILaunchConfigurationType lct = lm.getLaunchConfigurationType(ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID);
+ String launchName = lm.generateUniqueLaunchConfigurationNameFrom(project.getName());
+ ILaunchConfigurationWorkingCopy wc;
+ try {
+ wc = lct.newInstance(null, launchName);
+ wc.setAttribute(IConsoleConfigurationLaunchConstants.CONFIGURATION_FACTORY, ConfigurationMode.JPA.toString());
+ wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, project.getName());
+ wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, true );
+ wc.setAttribute(IConsoleConfigurationLaunchConstants.FILE_MAPPINGS, (List<String>)null);
+ wc.setAttribute(IConsoleConfigurationLaunchConstants.USE_JPA_PROJECT_PROFILE, "true");//$NON-NLS-1$
+
+ wc.doSave();
+ ProjectUtils.toggleHibernateOnProject(project, true, launchName);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/JPAPostInstallFasetListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
14 years, 1 month
JBoss Tools SVN: r13537 - workspace/grid/esb-example.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2009-02-08 23:09:54 -0500 (Sun, 08 Feb 2009)
New Revision: 13537
Modified:
workspace/grid/esb-example/transform_XML2POJO.zip
workspace/grid/esb-example/transform_XML2XML_date_manipulation.zip
Log:
JBIDE-3654: remove some temp files
Modified: workspace/grid/esb-example/transform_XML2POJO.zip
===================================================================
(Binary files differ)
Modified: workspace/grid/esb-example/transform_XML2XML_date_manipulation.zip
===================================================================
(Binary files differ)
14 years, 1 month
JBoss Tools SVN: r13536 - workspace/grid/esb-example.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2009-02-08 22:26:23 -0500 (Sun, 08 Feb 2009)
New Revision: 13536
Modified:
workspace/grid/esb-example/transform_XML2POJO.zip
workspace/grid/esb-example/transform_XML2XML_date_manipulation.zip
Log:
JBIDE-3654: change the smooks date tranlator for local date
Modified: workspace/grid/esb-example/transform_XML2POJO.zip
===================================================================
(Binary files differ)
Modified: workspace/grid/esb-example/transform_XML2XML_date_manipulation.zip
===================================================================
(Binary files differ)
14 years, 1 month
JBoss Tools SVN: r13535 - trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-02-06 16:08:32 -0500 (Fri, 06 Feb 2009)
New Revision: 13535
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
Log:
serialization / deserialization of label location
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-02-06 18:37:52 UTC (rev 13534)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-02-06 21:08:32 UTC (rev 13535)
@@ -234,24 +234,50 @@
private void addGraphics(ConnectionWrapper wrapper, Element element) {
String graphics = element.getAttribute("g");
if (graphics != null) {
- StringTokenizer bendpoints = new StringTokenizer(graphics, ";");
- int index = 0;
- while (bendpoints.hasMoreTokens()) {
- StringTokenizer bendpoint = new StringTokenizer(bendpoints.nextToken(), ",");
- if (bendpoint.countTokens() != 2) {
- Logger.logInfo(
- "Wrong info in attribute 'g' while determining bendpoints.");
- } else {
- int x = convertStringToInt(bendpoint.nextToken());
- int y = convertStringToInt(bendpoint.nextToken());
- wrapper.addBendpoint(index++, new Point(x, y));
- }
+ int pos = graphics.lastIndexOf(':');
+ String labelInfo, bendpointInfo = null;
+ if (pos != -1) {
+ labelInfo = graphics.substring(pos + 1);
+ bendpointInfo = graphics.substring(0, pos);
+ } else {
+ labelInfo = graphics;
+ }
+ if (labelInfo != null) {
+ addLabelInfo(wrapper, labelInfo);
+ }
+ if (bendpointInfo != null) {
+ addBendpointInfo(wrapper, bendpointInfo);
+ }
+ }
+ }
+ private void addBendpointInfo(ConnectionWrapper wrapper, String bendpointInfo) {
+ StringTokenizer bendpoints = new StringTokenizer(bendpointInfo, ";");
+ int index = 0;
+ while (bendpoints.hasMoreTokens()) {
+ StringTokenizer bendpoint = new StringTokenizer(bendpoints.nextToken(), ",");
+ if (bendpoint.countTokens() != 2) {
+ Logger.logInfo(
+ "Wrong info in attribute 'g' while determining bendpoints.");
+ } else {
+ int x = convertStringToInt(bendpoint.nextToken());
+ int y = convertStringToInt(bendpoint.nextToken());
+ wrapper.addBendpoint(index++, new Point(x, y));
}
}
-
}
+ private void addLabelInfo(ConnectionWrapper wrapper, String labelInfo) {
+ StringTokenizer label = new StringTokenizer(labelInfo, ",");
+ if (label.countTokens() != 2) {
+ Logger.logInfo("Wrong info in attribute 'g' while determining label location.");
+ } else {
+ int x = convertStringToInt(label.nextToken());
+ int y = convertStringToInt(label.nextToken());
+ wrapper.getLabel().setLocation(new Point(x, y));
+ }
+ }
+
private void addGraphics(NodeWrapper wrapper, Element element) {
String graphics = element.getAttribute("g");
Rectangle constraint = new Rectangle(0, 0, 80, 40);
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-02-06 18:37:52 UTC (rev 13534)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-02-06 21:08:32 UTC (rev 13535)
@@ -24,6 +24,7 @@
import org.jboss.tools.flow.common.wrapper.ConnectionWrapper;
import org.jboss.tools.flow.common.wrapper.ContainerWrapper;
import org.jboss.tools.flow.common.wrapper.FlowWrapper;
+import org.jboss.tools.flow.common.wrapper.LabelWrapper;
import org.jboss.tools.flow.common.wrapper.NodeWrapper;
import org.jboss.tools.flow.common.wrapper.Wrapper;
import org.jboss.tools.flow.jpdl4.Logger;
@@ -212,15 +213,31 @@
buffer.append(" to=\"" + value + "\"");
}
protected void appendGraphics(StringBuffer buffer, ConnectionWrapper wrapper) {
+ StringBuffer bendPointBuffer = new StringBuffer();
List<Point> bendPoints = wrapper.getBendpoints();
- if (bendPoints == null || bendPoints.size() == 0) return;
+ if (bendPoints != null && bendPoints.size() > 0) {
+ for (int i = 0; i < bendPoints.size(); i++) {
+ bendPointBuffer.append(bendPoints.get(i).x);
+ bendPointBuffer.append(",");
+ bendPointBuffer.append(bendPoints.get(i).y);
+ if (i < bendPoints.size() - 1) bendPointBuffer.append(";");
+ }
+ }
+ StringBuffer labelBuffer = new StringBuffer();
+ LabelWrapper labelWrapper = wrapper.getLabel();
+ if (labelWrapper != null) {
+ Point location = labelWrapper.getLocation();
+ if (location != null) {
+ labelBuffer.append(location.x);
+ labelBuffer.append(',');
+ labelBuffer.append(location.y);
+ }
+ }
+ if (bendPointBuffer.length() + labelBuffer.length() == 0) return;
buffer.append(" g=\"");
- for (int i = 0; i < bendPoints.size(); i++) {
- buffer.append(bendPoints.get(i).x);
- buffer.append(",");
- buffer.append(bendPoints.get(i).y);
- if (i < bendPoints.size() - 1) buffer.append(";");
- }
+ buffer.append(bendPointBuffer);
+ if (bendPointBuffer.length() > 0) buffer.append(':');
+ buffer.append(labelBuffer);
buffer.append("\"");
}
}
14 years, 1 month
JBoss Tools SVN: r13534 - trunk/documentation/qa/docs/Test_Cases.
by jbosstools-commits@lists.jboss.org
Author: anis
Date: 2009-02-06 13:37:52 -0500 (Fri, 06 Feb 2009)
New Revision: 13534
Added:
trunk/documentation/qa/docs/Test_Cases/ServerUsage.doc
Log:
Added a file remotely
Added: trunk/documentation/qa/docs/Test_Cases/ServerUsage.doc
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/qa/docs/Test_Cases/ServerUsage.doc
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
14 years, 1 month
JBoss Tools SVN: r13533 - trunk/documentation/qa/docs/Test_Cases.
by jbosstools-commits@lists.jboss.org
Author: anis
Date: 2009-02-06 13:37:37 -0500 (Fri, 06 Feb 2009)
New Revision: 13533
Removed:
trunk/documentation/qa/docs/Test_Cases/ServerUsage.doc
Log:
Removed file/folder
Deleted: trunk/documentation/qa/docs/Test_Cases/ServerUsage.doc
===================================================================
(Binary files differ)
14 years, 1 month