JBoss Tools SVN: r9358 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-07-28 10:30:34 -0400 (Mon, 28 Jul 2008)
New Revision: 9358
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
Fix bugs https://jira.jboss.org/jira/browse/JBIDE-2464
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 2008-07-28 14:13:55 UTC (rev 9357)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-07-28 14:30:34 UTC (rev 9358)
@@ -98,10 +98,10 @@
<vpe:tag name="rich:inplaceSelect" case-sensitive="yes">
<vpe:template children="no" modify="no"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesInplaceSelectTemplate">
- <vpe:resize>
+ <!--vpe:resize>
<vpe:width width-attr="style.width" />
<vpe:height height-attr="style.height" />
- </vpe:resize>
+ </vpe:resize-->
<vpe:dnd>
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
15 years, 9 months
JBoss Tools SVN: r9357 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-07-28 10:13:55 -0400 (Mon, 28 Jul 2008)
New Revision: 9357
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java
Log:
Fix bugs https://jira.jboss.org/jira/browse/JBIDE-2464
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java 2008-07-28 13:57:05 UTC (rev 9356)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesAbstractInplaceTemplate.java 2008-07-28 14:13:55 UTC (rev 9357)
@@ -44,7 +44,7 @@
/**
*
*/
- private static final String CONTROLS_VERTICAL_POSITION_DEFAULT_VALUE = "center";
+ protected static final String CONTROLS_VERTICAL_POSITION_DEFAULT_VALUE = "center";
/**
*
@@ -290,7 +290,7 @@
*
* @param source the source
*/
- protected void prepareData(Element source) {
+ protected void prepareData(VpePageContext pageContext,Element source) {
this.styleClass = source.getAttribute(RichFaces.ATTR_STYLE_CLASS);
this.editClass = source.getAttribute("editClass");
this.viewClass = source.getAttribute("viewClass");
@@ -304,7 +304,16 @@
if (ComponentUtil.isBlank(this.sourceValue)) {
this.sourceValue = DEFAULT_NULL_VALUE;
}
+ if ((source.getAttributeNode("value") != null) && ComponentUtil.isNotBlank(this.sourceValue)
+ && (this.sourceValue != DEFAULT_NULL_VALUE) && this.sourceValue.startsWith("#{")) {
+ this.sourceValue = ComponentUtil.getBundleValue(pageContext, source.getAttributeNode("value"));
+ }
+ if ((source.getAttributeNode("defaultLabel") != null) && ComponentUtil.isNotBlank(this.defaultLabel)
+ && (this.defaultLabel != DEFAULT_NULL_VALUE) && this.defaultLabel.startsWith("#{")) {
+ this.defaultLabel = ComponentUtil.getBundleValue(pageContext, source.getAttributeNode("defaultLabel"));
+ }
+
this.showControls = Boolean.parseBoolean(source.getAttribute("showControls"));
this.controlsVerticalPosition = source.getAttribute("controlsVerticalPosition");
if (ComponentUtil.isBlank(this.controlsVerticalPosition) || !isInKeySet(controlsVerticalPositions, this.controlsVerticalPosition)) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java 2008-07-28 13:57:05 UTC (rev 9356)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceInputTemplate.java 2008-07-28 14:13:55 UTC (rev 9357)
@@ -18,7 +18,6 @@
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
-import org.jboss.tools.vpe.xulrunner.browser.util.DOMTreeDumper;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
@@ -57,7 +56,7 @@
// <span id="j_id5" class="rich-inplace rich-inplace-view" style="">
ComponentUtil.setCSSLink(pageContext, getCssStyle(), getCssExtension());
final Element source = (Element) sourceNode;
- prepareData(source);
+ prepareData(pageContext,source);
final nsIDOMElement rootSpan = createRootSpanTemplateMethod(source, visualDocument);
final nsIDOMElement innerInput1 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_INPUT);
@@ -98,7 +97,7 @@
} else {
innerInput1.setAttribute(HTML.ATTR_VALUE, this.sourceValue);
}
-// final DOMTreeDumper dumper = new DOMTreeDumper();
+// final DOMTreeDumper dumper = new DOMTreeDumper();
// dumper.dumpToStream(System.err, rootSpan);
return data;
@@ -166,14 +165,15 @@
*
* @param source the source
*/
- protected void prepareData(Element source) {
+ protected void prepareData(VpePageContext pageContext,Element source) {
try {
this.inputWidth = String.valueOf(ComponentUtil.parseWidthHeightValue(source.getAttribute("inputWidth")));
} catch (NumberFormatException e) {
this.inputWidth = DEFAULT_INPUT_WIDTH_VALUE;
}
this.controlsHorizontalPositions.put("right", this.inputWidth);
- super.prepareData(source);
+ this.controlsHorizontalPositions.put(CONTROLS_VERTICAL_POSITION_DEFAULT_VALUE, "18px");
+ super.prepareData(pageContext,source);
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java 2008-07-28 13:57:05 UTC (rev 9356)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesInplaceSelectTemplate.java 2008-07-28 14:13:55 UTC (rev 9357)
@@ -20,7 +20,6 @@
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
-import org.jboss.tools.vpe.xulrunner.browser.util.DOMTreeDumper;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
@@ -60,7 +59,7 @@
// <span id="j_id5" class="rich-inplace rich-inplace-view" style="">
ComponentUtil.setCSSLink(pageContext, getCssStyle(), getCssExtension());
final Element source = (Element) sourceNode;
- prepareData(source);
+ prepareData(pageContext,source);
final nsIDOMElement rootSpan = createRootSpanTemplateMethod(source, visualDocument);
if (isToggle) {
@@ -291,8 +290,8 @@
* the source
*/
@Override
- protected void prepareData(Element source) {
- super.prepareData(source);
+ protected void prepareData(VpePageContext pageContext,Element source) {
+ super.prepareData(pageContext,source);
}
15 years, 9 months
JBoss Tools SVN: r9356 - trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-07-28 09:57:05 -0400 (Mon, 28 Jul 2008)
New Revision: 9356
Removed:
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/WorkflowProcess.java
Log:
Flow implements NodeContainer
Deleted: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/WorkflowProcess.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/WorkflowProcess.java 2008-07-28 13:56:22 UTC (rev 9355)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/WorkflowProcess.java 2008-07-28 13:57:05 UTC (rev 9356)
@@ -1,27 +0,0 @@
-package org.jboss.tools.flow.common.core;
-
-/*
- * Copyright 2005 JBoss Inc
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-/**
- * Represents a RuleFlow process.
- *
- * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
- */
-public interface WorkflowProcess extends Flow, NodeContainer {
-
-}
15 years, 9 months
JBoss Tools SVN: r9355 - in trunk/flow/plugins/org.jboss.tools.flow.common.core: .settings and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-07-28 09:56:22 -0400 (Mon, 28 Jul 2008)
New Revision: 9355
Added:
trunk/flow/plugins/org.jboss.tools.flow.common.core/.classpath
trunk/flow/plugins/org.jboss.tools.flow.common.core/.project
trunk/flow/plugins/org.jboss.tools.flow.common.core/.settings/
trunk/flow/plugins/org.jboss.tools.flow.common.core/.settings/org.eclipse.jdt.core.prefs
trunk/flow/plugins/org.jboss.tools.flow.common.core/META-INF/
trunk/flow/plugins/org.jboss.tools.flow.common.core/META-INF/MANIFEST.MF
trunk/flow/plugins/org.jboss.tools.flow.common.core/build.properties
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Connection.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Flow.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Node.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/NodeContainer.java
trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/WorkflowProcess.java
Log:
initial upload
Added: trunk/flow/plugins/org.jboss.tools.flow.common.core/.classpath
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/.classpath (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/.classpath 2008-07-28 13:56:22 UTC (rev 9355)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="target"/>
+</classpath>
Added: trunk/flow/plugins/org.jboss.tools.flow.common.core/.project
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/.project (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/.project 2008-07-28 13:56:22 UTC (rev 9355)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.flow.common.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/flow/plugins/org.jboss.tools.flow.common.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/.settings/org.eclipse.jdt.core.prefs 2008-07-28 13:56:22 UTC (rev 9355)
@@ -0,0 +1,7 @@
+#Mon Jul 28 15:25:33 CEST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/flow/plugins/org.jboss.tools.flow.common.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/META-INF/MANIFEST.MF (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/META-INF/MANIFEST.MF 2008-07-28 13:56:22 UTC (rev 9355)
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Core Plug-in
+Bundle-SymbolicName: org.jboss.tools.flow.common.core
+Bundle-Version: 1.0.0
+Bundle-Vendor: JBoss, a Division of Red Hat
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Added: trunk/flow/plugins/org.jboss.tools.flow.common.core/build.properties
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/build.properties (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/build.properties 2008-07-28 13:56:22 UTC (rev 9355)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = target/
+bin.includes = META-INF/,\
+ .
Added: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Connection.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Connection.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Connection.java 2008-07-28 13:56:22 UTC (rev 9355)
@@ -0,0 +1,56 @@
+package org.jboss.tools.flow.common.core;
+
+/*
+ * Copyright 2005 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Represents a connection between two nodes in a workflow.
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
+ */
+public interface Connection {
+
+ /**
+ * Returns the from node of the connection.
+ * @return the from node of the connection.
+ */
+ Node getFrom();
+
+ /**
+ * Returns the to node of the connection
+ * @return the to node of the connection
+ */
+ Node getTo();
+
+ /**
+ * Returns the type of the connection at the from node
+ *
+ * @return the type of the connection at the from node
+ */
+ String getFromType();
+
+ /**
+ * Returns the type of the connection at the to node
+ *
+ * @return the type of the connection at the to node
+ */
+ String getToType();
+
+ void setMetaData(String name, Object value);
+
+ Object getMetaData(String name);
+
+}
Added: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Flow.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Flow.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Flow.java 2008-07-28 13:56:22 UTC (rev 9355)
@@ -0,0 +1,99 @@
+package org.jboss.tools.flow.common.core;
+
+/*
+ * Copyright 2005 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Represents a some process definition.
+ * A process has a name and a unique id.
+ * When a new version of a process is created, the name stays the same,
+ * but the id and the version of the process should be different.
+ * Different types of processes could be defined (e.g. RuleFlow).
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
+ */
+public interface Flow extends NodeContainer {
+
+ /**
+ * Sets the id of this process.
+ * The id should uniquely identify this process.
+ * @param id the id of the process
+ */
+ void setId(String id);
+
+ /**
+ * Returns the id of this process.
+ * @return the id of this process
+ */
+ String getId();
+
+ /**
+ * Sets the name of this process.
+ * @param name the name of this process
+ */
+ void setName(String name);
+
+ /**
+ * Returns the name of this process.
+ * If no name is specified, null is returned.
+ * @return the name of this process
+ */
+ String getName();
+
+ /**
+ * Sets the version of this process.
+ * @param version the version of this process
+ */
+ void setVersion(String version);
+
+ /**
+ * Returns the version of this process.
+ * If no version is specified, null is returned.
+ * @return the version of this process
+ */
+ String getVersion();
+
+ /**
+ * Sets the type of this process.
+ * @param type the type of this process
+ */
+ void setType(String type);
+
+ /**
+ * Returns the type of this process.
+ * @return the type of this process
+ */
+ String getType();
+
+ /**
+ * Sets the package name of this RuleFlow process
+ *
+ * @param packageName the package name of this RuleFlow process
+ */
+ void setPackageName(String packageName);
+
+ /**
+ * Returns the package name of this RuleFlow process
+ *
+ * @return the package name of this RuleFlow process
+ */
+ String getPackageName();
+
+ void setMetaData(String name, Object value);
+
+ Object getMetaData(String name);
+
+}
Added: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Node.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Node.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/Node.java 2008-07-28 13:56:22 UTC (rev 9355)
@@ -0,0 +1,91 @@
+package org.jboss.tools.flow.common.core;
+
+/*
+ * Copyright 2005 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Represents a node in a workflow process.
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
+ */
+public interface Node {
+
+ /**
+ * Returns the id of the node
+ *
+ * @return the id of the node
+ */
+ long getId();
+
+ /**
+ * Method for setting the id of the node
+ *
+ * @param id the id of the node
+ */
+ void setId(long id);
+
+ /**
+ * Returns the name of the node
+ *
+ * @return the name of the node
+ */
+ String getName();
+
+ /**
+ * Method for setting the name of the node
+ *
+ * @param name the name of the node
+ */
+ void setName(String name);
+
+ /**
+ * Returns the incoming connections
+ *
+ * @return the incoming connections
+ */
+ Map<String, List<Connection>> getIncomingConnections();
+
+ /**
+ * Returns the outgoing connections
+ *
+ * @return the outgoing connections
+ */
+ Map<String, List<Connection>> getOutgoingConnections();
+
+ void addIncomingConnection(String type, Connection connection);
+
+ void addOutgoingConnection(String type, Connection connection);
+
+ void removeIncomingConnection(String type, Connection connection);
+
+ void removeOutgoingConnection(String type, Connection connection);
+
+ List<Connection> getIncomingConnections(String type);
+
+ List<Connection> getOutgoingConnections(String type);
+
+ NodeContainer getNodeContainer();
+
+ void setNodeContainer(NodeContainer nodeContainer);
+
+ void setMetaData(String name, Object value);
+
+ Object getMetaData(String name);
+
+}
Added: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/NodeContainer.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/NodeContainer.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/NodeContainer.java 2008-07-28 13:56:22 UTC (rev 9355)
@@ -0,0 +1,45 @@
+package org.jboss.tools.flow.common.core;
+
+/**
+ * A container of nodes.
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
+ */
+public interface NodeContainer {
+
+ /**
+ * Returns the nodes of this node container.
+ *
+ * @return the nodes of this node container
+ */
+ Node[] getNodes();
+
+ /**
+ * Returns the node with the given id
+ *
+ * @param id
+ * the node id
+ * @return the node with the given id
+ * @throws IllegalArgumentException
+ * if an unknown id is passed
+ */
+ Node getNode(long id);
+
+ /**
+ * Method for adding a node to this node container.
+ * Note that the node will get an id unique for this node container.
+ *
+ * @param node the node to be added
+ * @throws IllegalArgumentException if <code>node</code> is null
+ */
+ void addNode(Node node);
+
+ /**
+ * Method for removing a node from this node container
+ *
+ * @param node the node to be removed
+ * @throws IllegalArgumentException if <code>node</code> is null or unknown
+ */
+ void removeNode(Node node);
+
+}
Added: trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/WorkflowProcess.java
===================================================================
--- trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/WorkflowProcess.java (rev 0)
+++ trunk/flow/plugins/org.jboss.tools.flow.common.core/src/main/java/org/jboss/tools/flow/common/core/WorkflowProcess.java 2008-07-28 13:56:22 UTC (rev 9355)
@@ -0,0 +1,27 @@
+package org.jboss.tools.flow.common.core;
+
+/*
+ * Copyright 2005 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+/**
+ * Represents a RuleFlow process.
+ *
+ * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
+ */
+public interface WorkflowProcess extends Flow, NodeContainer {
+
+}
15 years, 9 months
JBoss Tools SVN: r9354 - trunk/flow/plugins.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2008-07-28 09:55:22 -0400 (Mon, 28 Jul 2008)
New Revision: 9354
Added:
trunk/flow/plugins/org.jboss.tools.flow.common.core/
Log:
Initial import.
15 years, 9 months
JBoss Tools SVN: r9353 - queries and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: msorokin
Date: 2008-07-28 09:07:40 -0400 (Mon, 28 Jul 2008)
New Revision: 9353
Modified:
trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.htm
trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.swf
Log:
The movie was resized and the corporate styles were added.
Modified: trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.htm
===================================================================
--- trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.htm 2008-07-28 13:00:36 UTC (rev 9352)
+++ trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.htm 2008-07-28 13:07:40 UTC (rev 9353)
@@ -1,13 +1,22 @@
<!-- saved from url=(0014)about:internet -->
<HTML>
+<head>
+<link rel="stylesheet" href="../resources/tools.css" type="text/css"/>
+<link xmlns="" rel="shortcut icon" type="image/vnd.microsoft.icon" href="../resources/images/favicon.ico"/>
+</head>
<BODY>
-<center><OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="940" HEIGHT="780" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=7,0,0,0">
-<PARAM NAME=movie VALUE="HQL_JPA-QL_queries.swf">
+<div class="book">
+<p id="title"><a href="http://www.jboss.org" class="site_href">
+<strong>JBoss.org</strong></a><a href="http://docs.jboss.org/" class="doc_href">
+<strong >Community Demos</strong></a></p>
+
+<center><OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="898" HEIGHT="618" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=7,0,0,0">
+<PARAM NAME=movie VALUE="cust_tag_lib_to_palette.swf">
<PARAM NAME=play VALUE=true>
<PARAM NAME=loop VALUE=false>
<PARAM NAME=wmode VALUE=transparent>
<PARAM NAME=quality VALUE=low>
-<EMBED SRC="HQL_JPA-QL_queries.swf" WIDTH=940 HEIGHT=780 quality=low loop=false wmode=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=Sh...">
+<EMBED SRC="HQL_JPA-QL_queries.swf" WIDTH=752 HEIGHT=628 quality=low loop=false wmode=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=Sh...">
</EMBED>
</OBJECT></center>
<SCRIPT src='HQL_JPA-QL_queries.js'></script>
Modified: trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.swf
===================================================================
(Binary files differ)
15 years, 9 months
JBoss Tools SVN: r9352 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-07-28 09:00:36 -0400 (Mon, 28 Jul 2008)
New Revision: 9352
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2561
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java 2008-07-28 12:39:48 UTC (rev 9351)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java 2008-07-28 13:00:36 UTC (rev 9352)
@@ -180,11 +180,13 @@
CriteriaEditorInput hei = (CriteriaEditorInput)getEditorInput();
super.showEditorInput( editorInput );
IStorage storage = ((CriteriaEditorInput)editorInput).getStorage();
- if (storage instanceof CriteriaEditorStorage) {
- CriteriaEditorStorage sqlEditorStorage = (CriteriaEditorStorage) storage;
- IDocument document = getDocumentProvider().getDocument( hei );
- document.set( sqlEditorStorage.getContentsString() );
- }
+ if (storage instanceof CriteriaEditorStorage) {
+ CriteriaEditorStorage sqlEditorStorage = (CriteriaEditorStorage) storage;
+ IDocument document = getDocumentProvider().getDocument( hei );
+ if (document.get().compareTo(sqlEditorStorage.getContentsString()) != 0) {
+ document.set( sqlEditorStorage.getContentsString() );
+ }
+ }
}
15 years, 9 months
JBoss Tools SVN: r9351 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui: src/org/jboss/tools/hibernate/jpt/ui/internal/platform and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-07-28 08:39:48 -0400 (Mon, 28 Jul 2008)
New Revision: 9351
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernatePlatformUI.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateDdlWizard.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateEntitiesWizard.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2344
https://jira.jboss.org/jira/browse/JBIDE-2345
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF 2008-07-28 12:26:26 UTC (rev 9350)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/META-INF/MANIFEST.MF 2008-07-28 12:39:48 UTC (rev 9351)
@@ -20,7 +20,9 @@
org.eclipse.jdt.core;bundle-version="3.4.0",
org.eclipse.jpt.db;bundle-version="1.1.1",
org.eclipse.jdt.ui;bundle-version="3.4.0",
- org.eclipse.jpt.db.ui;bundle-version="1.0.1"
+ org.eclipse.jpt.db.ui;bundle-version="1.0.1",
+ org.eclipse.datatools.connectivity;bundle-version="1.1.0",
+ org.eclipse.jdt.launching;bundle-version="3.4.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: Hibernate Team
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernatePlatformUI.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernatePlatformUI.java 2008-07-28 12:26:26 UTC (rev 9350)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/platform/HibernatePlatformUI.java 2008-07-28 12:39:48 UTC (rev 9351)
@@ -54,30 +54,7 @@
GenerateEntitiesWizard wizard = new GenerateEntitiesWizard(project, selection);
WizardDialog dialog = new WizardDialog(null, wizard);
- dialog.create();
- /*int returnCode = */dialog.open();
- /*if (returnCode == Window.OK) {
- ILaunchConfigurationWorkingCopy wc = createDefaultLaunchConfig(project.getName());
- if (wc != null) {
- // SHOULD PRESENT THE CONFIGURATION!!!
- //unknown - ccname, outputdir, packagename
- wc.setAttribute(HibernateLaunchConstants.ATTR_CONSOLE_CONFIGURATION_NAME, project.getName());
-
- wc.setAttribute(HibernateLaunchConstants.ATTR_OUTPUT_DIR, project.getName() + "\\src"); //$NON-NLS-1$
-
- wc.setAttribute(HibernateLaunchConstants.ATTR_PACKAGE_NAME, "package_name");
- wc.setAttribute(HibernateLaunchConstants.ATTR_PREFER_BASIC_COMPOSITE_IDS, true);
- wc.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_MANY_TO_MANY, true);
- wc.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_VERSIONING, true);
-
- wc.setAttribute(HibernateLaunchConstants.ATTR_ENABLE_JDK5, true);
- wc.setAttribute(HibernateLaunchConstants.ATTR_ENABLE_EJB3_ANNOTATIONS, true);
-
- wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + '.' + exporter_id + ".extension_id",
- HibernateLaunchConstants.ATTR_PREFIX + "hbm2java"); //$NON-NLS-1$ //$NON-NLS-2$
- runLaunchConfiguration(wc);
- }
- } */
+ dialog.open();
}
@Override
@@ -85,27 +62,7 @@
GenerateDdlWizard wizard = new GenerateDdlWizard(project, selection);
WizardDialog dialog = new WizardDialog(null, wizard);
- dialog.create();
- /*int returnCode = */dialog.open();
- /*if (returnCode == Window.OK) {
- ILaunchConfigurationWorkingCopy wc = createDefaultLaunchConfig(project.getName());
- if (wc != null) {
- // Main
- //unknown - ccname, outputdir, filename
- wc.setAttribute(HibernateLaunchConstants.ATTR_CONSOLE_CONFIGURATION_NAME, project.getName());
- wc.setAttribute(HibernateLaunchConstants.ATTR_OUTPUT_DIR, project.getName() + "\\src"); //$NON-NLS-1$
-
- Map<String, String> prop = new HashMap<String, String>();
- prop.put("outputFileName", "schema.ddl");
- //prop.put("outputdir", project.getName() + "\\src");
- prop.put("format", "true");
- prop.put("scriptToConsole", "false");
-
- wc.setAttribute(full_exporter_id + ".properties", prop);
- wc.setAttribute(full_exporter_id + ".extension_id", HibernateLaunchConstants.ATTR_PREFIX + "hbm2ddl"); //$NON-NLS-1$ //$NON-NLS-2$
- runLaunchConfiguration(wc);
- }
- }*/
+ dialog.open();
}
public static ILaunchConfigurationWorkingCopy createDefaultLaunchConfig(String projectName) {
@@ -128,12 +85,4 @@
return wc;
}
-
- public static void runLaunchConfiguration(ILaunchConfiguration configuration) {
- try {
- DebugPlugin.getDefault().getLaunchManager().addLaunch(configuration.launch(ILaunchManager.RUN_MODE, null));
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateDdlWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateDdlWizard.java 2008-07-28 12:26:26 UTC (rev 9350)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateDdlWizard.java 2008-07-28 12:39:48 UTC (rev 9351)
@@ -13,7 +13,10 @@
import java.util.HashMap;
import java.util.Map;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaModelException;
@@ -21,6 +24,7 @@
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jpt.core.JpaProject;
import org.eclipse.jpt.ui.internal.JptUiMessages;
+import org.hibernate.console.KnownConfigurations;
import org.hibernate.eclipse.launch.HibernateLaunchConstants;
import org.jboss.tools.hibernate.jpt.ui.internal.platform.HibernatePlatformUI;
@@ -60,9 +64,8 @@
String projectName = jpaProject.getName();
ILaunchConfigurationWorkingCopy wc = HibernatePlatformUI.createDefaultLaunchConfig(projectName);
if (wc != null) {
- // Main
- //unknown - ccname, outputdir, filename
- wc.setAttribute(HibernateLaunchConstants.ATTR_CONSOLE_CONFIGURATION_NAME, initPage.getConfigurationName());
+ String concoleConfigurationName = initPage.getConfigurationName();
+ wc.setAttribute(HibernateLaunchConstants.ATTR_CONSOLE_CONFIGURATION_NAME, concoleConfigurationName);
wc.setAttribute(HibernateLaunchConstants.ATTR_OUTPUT_DIR, page2.getOutputDir()); //$NON-NLS-1$
Map<String, String> prop = new HashMap<String, String>();
@@ -73,7 +76,15 @@
wc.setAttribute(HibernatePlatformUI.full_exporter_id + ".properties", prop);
wc.setAttribute(HibernatePlatformUI.full_exporter_id + ".extension_id", HibernateLaunchConstants.ATTR_PREFIX + "hbm2ddl"); //$NON-NLS-1$ //$NON-NLS-2$
- HibernatePlatformUI.runLaunchConfiguration(wc);
+ try {
+ wc.launch(ILaunchManager.RUN_MODE, null);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ } finally{
+ if (initPage.isTemporaryConfiguration()){
+ KnownConfigurations.getInstance().removeConfiguration(KnownConfigurations.getInstance().find(concoleConfigurationName), false);
+ }
+ }
}
return true;
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateEntitiesWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateEntitiesWizard.java 2008-07-28 12:26:26 UTC (rev 9350)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateEntitiesWizard.java 2008-07-28 12:39:48 UTC (rev 9351)
@@ -13,7 +13,9 @@
import java.util.Collection;
import java.util.Collections;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaModelException;
@@ -28,6 +30,7 @@
import org.eclipse.jpt.ui.internal.JptUiMessages;
import org.eclipse.jpt.ui.internal.wizards.DatabaseReconnectWizardPage;
import org.eclipse.jpt.utility.internal.CollectionTools;
+import org.hibernate.console.KnownConfigurations;
import org.hibernate.eclipse.launch.HibernateLaunchConstants;
import org.jboss.tools.hibernate.jpt.ui.internal.platform.HibernatePlatformUI;
@@ -67,8 +70,8 @@
ILaunchConfigurationWorkingCopy wc = HibernatePlatformUI.createDefaultLaunchConfig(projectName);
if (wc != null) {
// SHOULD PRESENT THE CONFIGURATION!!!
- //unknown - ccname, outputdir, packagename
- wc.setAttribute(HibernateLaunchConstants.ATTR_CONSOLE_CONFIGURATION_NAME, initPage.getConfigurationName());
+ String concoleConfigurationName = initPage.getConfigurationName();
+ wc.setAttribute(HibernateLaunchConstants.ATTR_CONSOLE_CONFIGURATION_NAME, concoleConfigurationName);
wc.setAttribute(HibernateLaunchConstants.ATTR_OUTPUT_DIR, page2.getOutputDir()); //$NON-NLS-1$
@@ -79,10 +82,20 @@
wc.setAttribute(HibernateLaunchConstants.ATTR_ENABLE_JDK5, true);
wc.setAttribute(HibernateLaunchConstants.ATTR_ENABLE_EJB3_ANNOTATIONS, true);
+ wc.setAttribute("hibernate.dialect", "org.hibernate.dialect.PostgreSQLDialect");
+ wc.setAttribute("hibernate.temp.use_jdbc_metadata_defaults", true);
wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + '.' + HibernatePlatformUI.exporter_id + ".extension_id",
HibernateLaunchConstants.ATTR_PREFIX + "hbm2java"); //$NON-NLS-1$ //$NON-NLS-2$
- HibernatePlatformUI.runLaunchConfiguration(wc);
+ try {
+ wc.launch(ILaunchManager.RUN_MODE, null);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ } finally{
+ if (initPage.isTemporaryConfiguration()){
+ KnownConfigurations.getInstance().removeConfiguration(KnownConfigurations.getInstance().find(concoleConfigurationName), false);
+ }
+ }
}
return true;
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java 2008-07-28 12:26:26 UTC (rev 9350)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java 2008-07-28 12:39:48 UTC (rev 9351)
@@ -10,15 +10,29 @@
******************************************************************************/
package org.jboss.tools.hibernate.jpt.ui.wizard;
+import java.io.File;
+import java.net.URL;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.ProfileManager;
+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.internal.ui.wizards.dialogfields.ComboDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.jpt.core.JpaProject;
import org.eclipse.jpt.db.JptDbPlugin;
@@ -35,10 +49,16 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
+import org.hibernate.cfg.Environment;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.console.KnownConfigurations;
+import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
+import org.hibernate.console.preferences.ConsoleConfigurationPreferences.ConfigurationMode;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
+import org.hibernate.eclipse.launch.ICodeGenerationLaunchConstants;
+import org.hibernate.eclipse.launch.IConsoleConfigurationLaunchConstants;
import org.hibernate.util.StringHelper;
+import org.w3c.dom.Element;
/**
* @author Dmitry Geraskov
@@ -206,10 +226,89 @@
}
public String getConfigurationName() {
- return consoleConfigurationName.getText();
+ if (selectMethod.getSelection())
+ return consoleConfigurationName.getText();
+ return createConsoleConfiguration();
}
public String getConnectionProfileName() {
return connectionProfileName.getText();
}
+
+ private String createConsoleConfiguration(){
+ ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
+
+ ILaunchConfigurationType launchConfigurationType = launchManager.getLaunchConfigurationType( ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID );
+ String launchName = launchManager.generateUniqueLaunchConfigurationNameFrom(HibernateConsoleMessages.AddConfigurationAction_hibernate);
+ //ILaunchConfiguration[] launchConfigurations = launchManager.getLaunchConfigurations( launchConfigurationType );
+ ILaunchConfigurationWorkingCopy wc = null;
+ try {
+ wc = launchConfigurationType.newInstance(null, launchName);
+
+ wc.setAttributes(getProperties());
+
+ wc.setAttribute(IConsoleConfigurationLaunchConstants.CONFIGURATION_FACTORY, ConfigurationMode.JPA.toString());
+ wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, nonEmptyTrimOrNull( jpaProject.getName() ));
+ wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, true );
+ wc.setAttribute(IConsoleConfigurationLaunchConstants.FILE_MAPPINGS, (List)null);
+ wc.setAttribute("hibernate.temp.use_jdbc_metadata_defaults", true);
+ wc.setAttribute(IConsoleConfigurationLaunchConstants.USE_CONNECT_PROFILE_SETTINGS, true);
+ wc.setAttribute(IConsoleConfigurationLaunchConstants.CONNECT_PROFILE_NAME, getConnectionProfileName());
+ wc.doSave();
+ return wc.getName();
+ } catch (CoreException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ return null;
+ }
+
+ }
+
+ /**
+ * @param name
+ * @return
+ */
+ private String nonEmptyTrimOrNull(String name) {
+ if(StringHelper.isEmpty( name )) {
+ return null;
+ } else {
+ return name.trim();
+ }
+ }
+
+ private Properties getProperties(){
+ Properties prop = new Properties();
+ IConnectionProfile profile = ProfileManager.getInstance().getProfileByName(getConnectionProfileName());
+ if (null != profile) {
+ Properties cpProperties = profile.getProperties(profile.getProviderId());
+ Map<String, String> keyMaps = new HashMap<String, String>();
+ keyMaps.put(Environment.DRIVER, "org.eclipse.datatools.connectivity.db.driverClass");
+ keyMaps.put(Environment.URL, "org.eclipse.datatools.connectivity.db.URL");
+ keyMaps.put(Environment.USER, "org.eclipse.datatools.connectivity.db.username");
+ keyMaps.put(Environment.PASS, "org.eclipse.datatools.connectivity.db.password");
+ keyMaps.put(Environment.DEFAULT_CATALOG, "org.eclipse.datatools.connectivity.db.databaseName");
+ copyProperties(cpProperties, prop, keyMaps);
+ }
+ return prop;
+ }
+
+ /**
+ *
+ * @param source
+ * @param dest
+ * @param map - key is the key in <code>dest</code> map, value is the key in <code>source</code> map.
+ */
+ private void copyProperties(Properties source, Properties dest, Map<String, String> map){
+ for (Map.Entry<String, String> entry : map.entrySet()) {
+ putIfNotNull(dest, entry.getKey(), (String) source.get(entry.getValue()));
+ }
+ }
+
+ private void putIfNotNull(Properties prop, String key, String value){
+ if (StringHelper.isNotEmpty(value)) prop.put(key, value);
+ }
+
+ public boolean isTemporaryConfiguration(){
+ return !selectMethod.getSelection();
+ }
}
15 years, 9 months
JBoss Tools SVN: r9350 - in trunk/documentation/movies: HQL_JPA-QL and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: msorokin
Date: 2008-07-28 08:26:26 -0400 (Mon, 28 Jul 2008)
New Revision: 9350
Added:
trunk/documentation/movies/HQL_JPA-QL queries/
trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL queries.wnk
trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.htm
trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.js
trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.swf
Log:
https://jira.jboss.org/jira/browse/JBDS-352
Hibernate + JPA movie is remade.
Added: trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL queries.wnk
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL queries.wnk
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.htm
===================================================================
--- trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.htm (rev 0)
+++ trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.htm 2008-07-28 12:26:26 UTC (rev 9350)
@@ -0,0 +1,15 @@
+<!-- saved from url=(0014)about:internet -->
+<HTML>
+<BODY>
+<center><OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="940" HEIGHT="780" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=7,0,0,0">
+<PARAM NAME=movie VALUE="HQL_JPA-QL_queries.swf">
+<PARAM NAME=play VALUE=true>
+<PARAM NAME=loop VALUE=false>
+<PARAM NAME=wmode VALUE=transparent>
+<PARAM NAME=quality VALUE=low>
+<EMBED SRC="HQL_JPA-QL_queries.swf" WIDTH=940 HEIGHT=780 quality=low loop=false wmode=transparent TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=Sh...">
+</EMBED>
+</OBJECT></center>
+<SCRIPT src='HQL_JPA-QL_queries.js'></script>
+</BODY>
+</HTML>
Added: trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.js
===================================================================
--- trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.js (rev 0)
+++ trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.js 2008-07-28 12:26:26 UTC (rev 9350)
@@ -0,0 +1,3 @@
+obj=document.getElementsByTagName('object');
+for (var i=0; i<obj.length; ++i)
+ obj[i].outerHTML=obj[i].outerHTML;
Added: trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.swf
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.swf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 9 months