JBoss Tools SVN: r36274 - in branches/dead/hibernatetools-multiversion2/plugins: org.hibernate.eclipse/src/org/hibernate/console/ext and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-11-10 07:58:33 -0500 (Thu, 10 Nov 2011)
New Revision: 36274
Added:
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/schema/consoleextension.exsd
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtension.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtensionDefinition.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtensionManager.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtensionManager.java
Removed:
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/ExtensionManager.java
Modified:
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/plugin.xml
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLCompletionProcessor2.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLJavaCompletionProposalComputer.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtension.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationNode.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/IdentifierNode.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PropertyNode.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TableNode.java
branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TypeNode.java
Log:
Added extension point to Console plugin
Completion proposals are moved to the extension
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -43,7 +43,7 @@
import org.hibernate.console.execution.ExecutionContext;
import org.hibernate.console.execution.ExecutionContext.Command;
import org.hibernate.console.execution.ExecutionContextHolder;
-import org.hibernate.console.ext.ExtensionManager;
+import org.hibernate.console.ext.HibernateExtensionManager;
import org.hibernate.console.ext.HibernateExtension;
import org.hibernate.console.ext.HibernateExtensionDefinition;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
@@ -69,7 +69,7 @@
private void loadHibernateExtension(){
String version = hibernateVersion == null ? "3.5" : hibernateVersion;//3.5 is a default version
- HibernateExtensionDefinition def = ExtensionManager.findHibernateExtensionDefinition(version);
+ HibernateExtensionDefinition def = HibernateExtensionManager.findHibernateExtensionDefinition(version);
if (def != null){
HibernateExtension hibernateExtension = def.createHibernateExtensionInstance();
hibernateExtension.setConsoleConfigurationPreferences(prefs);
Deleted: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/ExtensionManager.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/ExtensionManager.java 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/ExtensionManager.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.hibernate.console.ext;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-
-/**
- * @author Dmitry Geraskov
- *
- */
-public class ExtensionManager {
-
- public static final String HIBERNATEEXTENSION_EXTENSION_ID = "org.hibernate.eclipse.hibernateextension"; //$NON-NLS-1$
-
- private static Map<String, HibernateExtensionDefinition> hibernateExtensions;
-
- private static IExtension[] findExtensions(String extensionId) {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint extensionPoint = registry
- .getExtensionPoint(extensionId);
- return extensionPoint.getExtensions();
- }
-
- public static HibernateExtensionDefinition[] findHiberanteExtensionDefinitions() {
- List<HibernateExtensionDefinition> exporters = new ArrayList<HibernateExtensionDefinition>();
-
- IExtension[] extensions = findExtensions(HIBERNATEEXTENSION_EXTENSION_ID);
- for (int i = 0; i < extensions.length; i++) {
- IConfigurationElement elements[] = extensions[i].getConfigurationElements();
- for (int j = 0; j < elements.length; j++) {
- HibernateExtensionDefinition extensiodDefinition = new HibernateExtensionDefinition(
- elements[j]);
- exporters.add(extensiodDefinition);
- }
- }
-
- return exporters.toArray(new HibernateExtensionDefinition[exporters.size()]);
- }
-
- /**
- * return map of ExporterDefinitions keyed by id
- */
- public static synchronized Map<String, HibernateExtensionDefinition> getExporterDefinitionsAsMap() {
- if (hibernateExtensions == null){
- //TODO add good comparator here(we often need the keys ordered)
- hibernateExtensions = new TreeMap<String, HibernateExtensionDefinition>();
-
- HibernateExtensionDefinition[] findExporterDefinitions = findHiberanteExtensionDefinitions();
- for (int i = 0; i < findExporterDefinitions.length; i++) {
- HibernateExtensionDefinition exporterDefinition = findExporterDefinitions[i];
- hibernateExtensions.put(exporterDefinition.getHibernateVersion(),
- exporterDefinition);
- }
- }
-
- return hibernateExtensions;
- }
-
- public static HibernateExtensionDefinition findHibernateExtensionDefinition(String hibernateVersion){
- return getExporterDefinitionsAsMap().get(hibernateVersion);
- }
-
-}
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtension.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtension.java 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtension.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -45,6 +45,6 @@
//FIXME remove this method
*/
- public CompletionProposalsResult hqlCodeComplete(String query, int position);
-
+
+
}
Copied: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtensionManager.java (from rev 35281, branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/ExtensionManager.java)
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtensionManager.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/HibernateExtensionManager.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate.console.ext;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class HibernateExtensionManager {
+
+ public static final String HIBERNATEEXTENSION_EXTENSION_ID = "org.hibernate.eclipse.hibernateextension"; //$NON-NLS-1$
+
+ private static Map<String, HibernateExtensionDefinition> hibernateExtensions;
+
+ private static IExtension[] findExtensions(String extensionId) {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = registry
+ .getExtensionPoint(extensionId);
+ return extensionPoint.getExtensions();
+ }
+
+ public static HibernateExtensionDefinition[] findHiberanteExtensionDefinitions() {
+ List<HibernateExtensionDefinition> hibernateExtensions = new ArrayList<HibernateExtensionDefinition>();
+
+ IExtension[] extensions = findExtensions(HIBERNATEEXTENSION_EXTENSION_ID);
+ for (int i = 0; i < extensions.length; i++) {
+ IConfigurationElement elements[] = extensions[i].getConfigurationElements();
+ for (int j = 0; j < elements.length; j++) {
+ HibernateExtensionDefinition extensiodDefinition = new HibernateExtensionDefinition(
+ elements[j]);
+ hibernateExtensions.add(extensiodDefinition);
+ }
+ }
+
+ return hibernateExtensions.toArray(new HibernateExtensionDefinition[hibernateExtensions.size()]);
+ }
+
+ /**
+ * return map of ExporterDefinitions keyed by id
+ */
+ public static synchronized Map<String, HibernateExtensionDefinition> getHibernateExtensionDefinitionsAsMap() {
+ if (hibernateExtensions == null){
+ //TODO add good comparator here(we often need the keys ordered)
+ hibernateExtensions = new TreeMap<String, HibernateExtensionDefinition>();
+
+ HibernateExtensionDefinition[] findExporterDefinitions = findHiberanteExtensionDefinitions();
+ for (int i = 0; i < findExporterDefinitions.length; i++) {
+ HibernateExtensionDefinition exporterDefinition = findExporterDefinitions[i];
+ hibernateExtensions.put(exporterDefinition.getHibernateVersion(),
+ exporterDefinition);
+ }
+ }
+
+ return hibernateExtensions;
+ }
+
+ public static HibernateExtensionDefinition findHibernateExtensionDefinition(String hibernateVersion){
+ return getHibernateExtensionDefinitionsAsMap().get(hibernateVersion);
+ }
+
+}
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ClassNode.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -36,7 +36,7 @@
* @author MAX
*
*/
-public class ClassNode extends BaseNode {
+class ClassNode extends BaseNode {
ClassMetadata md;
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationNode.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationNode.java 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationNode.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -31,7 +31,7 @@
* @author max
*
*/
-public class ConfigurationNode extends BaseNode {
+class ConfigurationNode extends BaseNode {
private final ConsoleConfiguration configuration;
private boolean childrenCreated;
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/IdentifierNode.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/IdentifierNode.java 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/IdentifierNode.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -28,7 +28,7 @@
* @author MAX
*
*/
-public class IdentifierNode extends TypeNode {
+class IdentifierNode extends TypeNode {
/**
* @param factory
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PersistentCollectionNode.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -39,7 +39,7 @@
* @author MAX
*
*/
-public class PersistentCollectionNode extends BaseNode implements TypedNode{
+class PersistentCollectionNode extends BaseNode implements TypedNode{
BaseNode virtualNode;
CollectionType type;
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PropertyNode.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PropertyNode.java 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/PropertyNode.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -25,7 +25,7 @@
import org.hibernate.HibernateException;
import org.hibernate.metadata.ClassMetadata;
-public class PropertyNode extends TypeNode {
+class PropertyNode extends TypeNode {
ClassMetadata baseMetaData;
public PropertyNode(NodeFactory factory, BaseNode parent, int idx, ClassMetadata metadata,Object baseObject, boolean objectGraph) {
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TableNode.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TableNode.java 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TableNode.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -23,7 +23,7 @@
import org.hibernate.mapping.Table;
-public class TableNode extends BaseNode {
+class TableNode extends BaseNode {
public TableNode(BaseNode parent, Table table) {
super(null, parent);
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TypeNode.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TypeNode.java 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/TypeNode.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -29,7 +29,7 @@
* @author MAX
*
*/
-public class TypeNode extends ClassNode implements TypedNode{
+class TypeNode extends ClassNode implements TypedNode{
Type type;
public TypeNode(NodeFactory factory, BaseNode parent, Type type, ClassMetadata metadata, Object baseObject, boolean objectGraph) {
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/META-INF/MANIFEST.MF 2011-11-10 12:58:33 UTC (rev 36274)
@@ -10,6 +10,7 @@
Export-Package: org.hibernate.eclipse.builder,
org.hibernate.eclipse.console,
org.hibernate.eclipse.console.actions,
+ org.hibernate.eclipse.console.ext,
org.hibernate.eclipse.console.model,
org.hibernate.eclipse.console.model.impl,
org.hibernate.eclipse.console.preferences,
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/plugin.xml
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/plugin.xml 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/plugin.xml 2011-11-10 12:58:33 UTC (rev 36274)
@@ -2,6 +2,7 @@
<?eclipse version="3.0"?>
<plugin>
<extension-point id="exporters" name="Hibernate Console Exporter" schema="schema/exporters.exsd"/>
+ <extension-point id="consoleextension" name="ConsoleExtension" schema="schema/consoleextension.exsd"/>
<extension
point="org.eclipse.ui.perspectives">
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/schema/consoleextension.exsd
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/schema/consoleextension.exsd (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/schema/consoleextension.exsd 2011-11-10 12:58:33 UTC (rev 36274)
@@ -0,0 +1,109 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.hibernate.eclipse.console" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.hibernate.eclipse.console" id="consoleextension" name="ConsoleExtension"/>
+ </appInfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appInfo>
+ <meta.element />
+ </appInfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="consoleextension"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appInfo>
+ <meta.attribute translatable="true"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="consoleextension">
+ <complexType>
+ <attribute name="classname" type="string" use="required">
+ <annotation>
+ <documentation>
+ The fully qualified class name of the class that implements org.hibernate.eclipse.console.ext.ConsoleExtension
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="java" basedOn=":org.hibernate.eclipse.console.ext.ConsoleExtension"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="version" type="string" use="required">
+ <annotation>
+ <documentation>
+ The hibernate version which is supported by the extension.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="since"/>
+ </appInfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="examples"/>
+ </appInfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiinfo"/>
+ </appInfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtension.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtension.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtension.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate.eclipse.console.ext;
+
+import org.hibernate.console.ext.CompletionProposalsResult;
+import org.hibernate.console.ext.HibernateExtension;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public interface ConsoleExtension {
+
+ public CompletionProposalsResult hqlCodeComplete(String query, int position);
+
+ public void setHibernateException(HibernateExtension hibernateExtension);
+
+ /*public void launchExporters(ILaunchConfiguration configuration, String mode,
+ ILaunch launch, IProgressMonitor monitor) throws CoreException;*/
+
+}
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtensionDefinition.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtensionDefinition.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtensionDefinition.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate.eclipse.console.ext;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.hibernate.console.ext.HibernateExtension;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class ConsoleExtensionDefinition {
+
+ public static final String CLASSNAME = "classname"; //$NON-NLS-1$
+
+ public static final String HIBERNATE_VERSION = "version"; //$NON-NLS-1$
+
+ private final String hibernateVersion;
+
+ private IConfigurationElement element;
+
+ public ConsoleExtensionDefinition(IConfigurationElement element) {
+ this(element.getAttribute( CLASSNAME ),
+ element.getAttribute( HIBERNATE_VERSION ));
+ this.element = element;
+ }
+
+ private ConsoleExtensionDefinition(String classname, String hibernateVersion) {
+ this.hibernateVersion = hibernateVersion;
+ }
+
+ public ConsoleExtension createConsoleExtensionInstance(HibernateExtension hibernateExtension) {
+ if (hibernateExtension != null) {
+ try {
+ ConsoleExtension consoleExtension = (ConsoleExtension) element
+ .createExecutableExtension(CLASSNAME);
+ consoleExtension.setHibernateException(hibernateExtension);
+ return consoleExtension;
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @return the hibernateVersion
+ */
+ public String getHibernateVersion() {
+ return hibernateVersion;
+ }
+}
Added: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtensionManager.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtensionManager.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/ext/ConsoleExtensionManager.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate.eclipse.console.ext;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.hibernate.console.ext.HibernateExtension;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class ConsoleExtensionManager {
+
+ public static final String CONSOLEEXTENSION_EXTENSION_ID = "org.hibernate.eclipse.console.consoleextension"; //$NON-NLS-1$
+
+ private static Map<String, ConsoleExtensionDefinition> consoleExtensionDefinitions;
+
+ private static Map<HibernateExtension, ConsoleExtension> consoleExtensions = new HashMap<HibernateExtension, ConsoleExtension>();
+
+ private static IExtension[] findExtensions(String extensionId) {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IExtensionPoint extensionPoint = registry
+ .getExtensionPoint(extensionId);
+ return extensionPoint.getExtensions();
+ }
+
+ private static ConsoleExtensionDefinition[] findConsoleExtensionDefinitions() {
+ List<ConsoleExtensionDefinition> exporters = new ArrayList<ConsoleExtensionDefinition>();
+
+ IExtension[] extensions = findExtensions(CONSOLEEXTENSION_EXTENSION_ID);
+ for (int i = 0; i < extensions.length; i++) {
+ IConfigurationElement elements[] = extensions[i].getConfigurationElements();
+ for (int j = 0; j < elements.length; j++) {
+ ConsoleExtensionDefinition extensiodDefinition = new ConsoleExtensionDefinition(
+ elements[j]);
+ exporters.add(extensiodDefinition);
+ }
+ }
+
+ return exporters.toArray(new ConsoleExtensionDefinition[exporters.size()]);
+ }
+
+ /**
+ * return map of ExporterDefinitions keyed by id
+ */
+ private static synchronized Map<String, ConsoleExtensionDefinition> getConsoleExtensionDefinitionsAsMap() {
+ if (consoleExtensionDefinitions == null){
+ //TODO add good comparator here(we often need the keys ordered)
+ consoleExtensionDefinitions = new TreeMap<String, ConsoleExtensionDefinition>();
+
+ ConsoleExtensionDefinition[] findExporterDefinitions = findConsoleExtensionDefinitions();
+ for (int i = 0; i < findExporterDefinitions.length; i++) {
+ ConsoleExtensionDefinition exporterDefinition = findExporterDefinitions[i];
+ consoleExtensionDefinitions.put(exporterDefinition.getHibernateVersion(),
+ exporterDefinition);
+ }
+ }
+
+ return consoleExtensionDefinitions;
+ }
+
+ private static ConsoleExtensionDefinition findConsoleExtensionDefinition(String hibernateVersion){
+ return getConsoleExtensionDefinitionsAsMap().get(hibernateVersion);
+ }
+
+
+ public static ConsoleExtension getConsoleExtension(HibernateExtension hibernateExtension){
+ if (hibernateExtension != null){
+ if (!consoleExtensions.containsKey(hibernateExtension)){
+ ConsoleExtensionDefinition definition = findConsoleExtensionDefinition(hibernateExtension.getHibernateVersion());
+ if (definition != null){
+ consoleExtensions.put(hibernateExtension, definition.createConsoleExtensionInstance(hibernateExtension));
+ }
+ }
+ return consoleExtensions.get(hibernateExtension);
+ }
+ return null;
+ }
+
+}
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLCompletionProcessor2.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLCompletionProcessor2.java 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLCompletionProcessor2.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -39,6 +39,8 @@
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.console.QueryEditor;
+import org.hibernate.eclipse.console.ext.ConsoleExtension;
+import org.hibernate.eclipse.console.ext.ConsoleExtensionManager;
/**
* content assist processor for HQL code.
@@ -115,16 +117,21 @@
}
if(consoleConfiguration != null) {
- //EclipseHQLCompletionRequestor eclipseHQLCompletionCollector = new EclipseHQLCompletionRequestor();
- CompletionProposalsResult codeCompletions = consoleConfiguration.getHibernateExtension().hqlCodeComplete(doc.get(), currentOffset);
-
- proposalList.addAll(codeCompletions.getCompletionProposals());
- errorMessage = codeCompletions.getErrorMessage();//eclipseHQLCompletionCollector.getLastErrorMessage();
-
- result = proposalList.toArray(new ICompletionProposal[proposalList.size()]);
- if(result.length==0 && errorMessage==null) {
- errorMessage = HibernateConsoleMessages.HQLCompletionProcessor_no_hql_completions_available;
- }
+ ConsoleExtension consoleExtension = ConsoleExtensionManager.getConsoleExtension(consoleConfiguration.getHibernateExtension());
+ if (consoleExtension != null){
+ CompletionProposalsResult codeCompletions = consoleExtension.hqlCodeComplete(doc.get(), currentOffset);
+
+ proposalList.addAll(codeCompletions.getCompletionProposals());
+ errorMessage = codeCompletions.getErrorMessage();//eclipseHQLCompletionCollector.getLastErrorMessage();
+
+ result = proposalList.toArray(new ICompletionProposal[proposalList.size()]);
+ if(result.length==0 && errorMessage==null) {
+ errorMessage = HibernateConsoleMessages.HQLCompletionProcessor_no_hql_completions_available;
+ }
+ } else {
+ errorMessage = "There is no completion proposal implementation for this hibernate version \'"
+ + consoleConfiguration.getHibernateExtension().getHibernateVersion() + "\'";
+ }
}
} else {
errorMessage = HibernateConsoleMessages.HQLCompletionProcessor_no_start_word_found;
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationMainTab.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -43,7 +43,7 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
import org.hibernate.console.ImageConstants;
-import org.hibernate.console.ext.ExtensionManager;
+import org.hibernate.console.ext.HibernateExtensionManager;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences.ConfigurationMode;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
@@ -130,7 +130,7 @@
Label hLabel = new Label(comp2, SWT.NULL);
hLabel.setText(HibernateConsoleMessages.ConsoleConfigurationMainTab_0);
hibernateVersion = new Combo(comp2, SWT.READ_ONLY);
- hibernateVersion.setItems((String[])ExtensionManager.getExporterDefinitionsAsMap().keySet().toArray(new String[0]));
+ hibernateVersion.setItems((String[])HibernateExtensionManager.getHibernateExtensionDefinitionsAsMap().keySet().toArray(new String[0]));
hibernateVersion.select(0);
hibernateVersion.setLayoutData(new GridData(53, -1));
hibernateVersion.addModifyListener(getChangeListener());
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLJavaCompletionProposalComputer.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLJavaCompletionProposalComputer.java 2011-11-10 12:58:10 UTC (rev 36273)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/HQLJavaCompletionProposalComputer.java 2011-11-10 12:58:33 UTC (rev 36274)
@@ -36,21 +36,23 @@
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.hibernate.cfg.Configuration;
import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.ext.CompletionProposalsResult;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
-import org.hibernate.eclipse.hqleditor.EclipseHQLCompletionRequestor;
-import org.hibernate.eclipse.hqleditor.HQLCompletionProcessor;
+import org.hibernate.eclipse.console.ext.ConsoleExtension;
+import org.hibernate.eclipse.console.ext.ConsoleExtensionManager;
+import org.hibernate.eclipse.hqleditor.HQLCompletionProcessor2;
import org.hibernate.eclipse.nature.HibernateNature;
import org.hibernate.tool.ide.completion.HQLCodeAssist;
import org.hibernate.tool.ide.completion.IHQLCodeAssist;
public class HQLJavaCompletionProposalComputer implements IJavaCompletionProposalComputer {
- HQLCompletionProcessor hqlProcessor;
+ HQLCompletionProcessor2 hqlProcessor;
private String errorMessage;
public HQLJavaCompletionProposalComputer() {
super();
- hqlProcessor = new HQLCompletionProcessor(null);
+ hqlProcessor = new HQLCompletionProcessor2(null);
}
ConsoleConfiguration getConfiguration(IJavaProject javaProject) {
@@ -79,18 +81,24 @@
ConsoleConfiguration consoleConfiguration = getConfiguration( ctx.getProject() );
if(consoleConfiguration!=null) {
Configuration configuration = consoleConfiguration.getConfiguration();
-
+
+
IHQLCodeAssist hqlEval = new HQLCodeAssist(configuration);
String query = ""; //$NON-NLS-1$
int stringStart = getStringStart( ctx.getDocument(), ctx.getInvocationOffset() );
int stringEnd = getStringEnd( ctx.getDocument(), ctx.getInvocationOffset() );
query = ctx.getDocument().get(stringStart, stringEnd-stringStart );
- EclipseHQLCompletionRequestor eclipseHQLCompletionCollector = new EclipseHQLCompletionRequestor(stringStart);
- hqlEval.codeComplete(query, ctx.getInvocationOffset()-stringStart, eclipseHQLCompletionCollector);
- errorMessage = eclipseHQLCompletionCollector.getLastErrorMessage();
-
- proposals = eclipseHQLCompletionCollector.getCompletionProposals();
+ ConsoleExtension consoleExtension = ConsoleExtensionManager.getConsoleExtension(consoleConfiguration.getHibernateExtension());
+ if (consoleExtension != null){
+ CompletionProposalsResult codeCompletions = consoleExtension.hqlCodeComplete(query, ctx.getInvocationOffset()-stringStart);
+
+ errorMessage = codeCompletions.getErrorMessage();
+ proposals = codeCompletions.getCompletionProposals();
+ } else {
+ errorMessage = "There is no completion proposal implementation for this hibernate version \'"
+ + consoleConfiguration.getHibernateExtension().getHibernateVersion() + "\'";
+ }
}
} catch(RuntimeException re) {
HibernateConsolePlugin.getDefault().logErrorMessage( JdtUiMessages.HQLJavaCompletionProposalComputer_errormessage, re );
13 years, 1 month
JBoss Tools SVN: r36273 - in branches/dead/hibernatetools-multiversion2/plugins: org.jboss.tools.hibernate3_5/META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-11-10 07:58:10 -0500 (Thu, 10 Nov 2011)
New Revision: 36273
Added:
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/plugin.properties
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/CompletionProposal.java
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/ConsoleExtension3_5.java
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/EclipseHQLCompletionRequestor.java
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/plugin.properties
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/ConsoleExtension4_0.java
Modified:
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/build.properties
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/plugin.xml
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/META-INF/MANIFEST.MF
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/build.properties
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/plugin.xml
branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java
Log:
Added extension point to Console plugin
Completion proposals are moved to the extension
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF 2011-11-10 11:02:27 UTC (rev 36272)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/META-INF/MANIFEST.MF 2011-11-10 12:58:10 UTC (rev 36273)
@@ -4,6 +4,7 @@
Bundle-SymbolicName: org.jboss.tools.hibernateextension3_5;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.jboss.tools.hibernate3_5.HibernateExtension3_5Plugin
+Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.hibernate.eclipse;bundle-version="3.4.0",
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/build.properties
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/build.properties 2011-11-10 11:02:27 UTC (rev 36272)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/build.properties 2011-11-10 12:58:10 UTC (rev 36273)
@@ -1,3 +1,4 @@
output.. = bin/
bin.includes = META-INF/,\
- plugin.xml
+ plugin.xml,\
+ plugin.properties
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/plugin.properties
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/plugin.properties (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/plugin.properties 2011-11-10 12:58:10 UTC (rev 36273)
@@ -0,0 +1 @@
+hibernate.version=3.5
\ No newline at end of file
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/plugin.xml
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/plugin.xml 2011-11-10 11:02:27 UTC (rev 36272)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/plugin.xml 2011-11-10 12:58:10 UTC (rev 36273)
@@ -5,8 +5,15 @@
point="org.hibernate.eclipse.hibernateextension">
<hibernateextension
classname="org.jboss.tools.hibernate3_5.HibernateExtension3_5"
- version="3.5">
+ version="%hibernate.version">
</hibernateextension>
</extension>
+ <extension
+ point="org.hibernate.eclipse.console.consoleextension">
+ <consoleextension
+ classname="org.jboss.tools.hibernate3_5.ConsoleExtension3_5"
+ version="%hibernate.version">
+ </consoleextension>
+ </extension>
</plugin>
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/CompletionProposal.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/CompletionProposal.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/CompletionProposal.java 2011-11-10 12:58:10 UTC (rev 36273)
@@ -0,0 +1,279 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.tools.hibernate3_5;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.ICompletionProposalExtension;
+import org.eclipse.jface.text.contentassist.IContextInformation;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.hibernate.eclipse.console.HibernateConsolePlugin;
+
+/**
+ * Generic completion proposal to be used as is, or as base for other completion proposals.
+ *
+ * @author Max Rydahl Andersen
+ *
+ */
+public class CompletionProposal implements ICompletionProposal, ICompletionProposalExtension {
+
+ private String displayString;
+ private String replacementString;
+ private int replacementOffset;
+ private int documentOffset = -1;
+ private int replacementLength;
+ private int cursorPosition;
+ private Image image;
+ private IContextInformation contextInformation;
+ private int contextInformationPosition;
+ private char[] triggerCharacters;
+ private String additionalProposalInfo;
+
+ /**
+ * Creates a new completion proposal. All fields are initialized based on
+ * the provided information.
+ *
+ * @param additionalInfo additional information about the completion proposal
+ * @param replacementString the actual string to be inserted into the document
+ * @param replacementOffset offset of the text to be replaced
+ * @param documentOffset offset of the document
+ * @param replacementLength length of the text to be replaced
+ * @param image the image to display for this proposal
+ * @param displayString the string to be displayed for the proposal If set
+ * to <code>null</code>, the replacement string will be taken
+ * as display string.
+ */
+ public CompletionProposal( String additionalInfo, String replacementString, int replacementOffset,
+ int documentOffset, int replacementLength, Image image, String displayString,
+ IContextInformation contextInformation ) {
+
+ this.replacementString = replacementString;
+ this.replacementOffset = replacementOffset;
+ this.documentOffset = documentOffset;
+ this.replacementLength = replacementLength;
+ this.image = image;
+ this.displayString = displayString != null ? displayString : replacementString;
+
+ this.cursorPosition = replacementString.length();
+
+ this.contextInformation = contextInformation;
+
+ this.triggerCharacters = null;
+ this.additionalProposalInfo = additionalInfo;
+ }
+
+ /**
+ * Creates a new completion proposal. All fields are initialized based on
+ * the provided information.
+ *
+ * @param replacementString the actual string to be inserted into the document
+ * @param replacementOffset the offset of the text to be replaced
+ * @param replacementLength the length of the text to be replaced
+ * @param cursorPosition the position of the cursor following the insert
+ * relative to replacementOffset
+ * @param image the image to display for this proposal
+ * @param displayString the string to be displayed for the proposal
+ * @param contentInformation the context information associated with this proposal
+ * @param additionalProposalInfo the additional information associated with
+ * this proposal
+ */
+ public CompletionProposal( String replacementString, int replacementOffset, int replacementLength,
+ int cursorPosition, Image image, String displayString, IContextInformation contextInformation,
+ String additionalProposalInfo ) {
+
+ this.replacementString = replacementString;
+ this.replacementOffset = replacementOffset;
+ this.documentOffset = replacementOffset;
+ this.replacementLength = replacementLength;
+ this.cursorPosition = cursorPosition;
+ this.image = image;
+ this.displayString = displayString;
+ this.contextInformation = contextInformation;
+ this.additionalProposalInfo = additionalProposalInfo;
+
+ }
+
+ public void setContextInformation( IContextInformation contextInformation ) {
+ this.contextInformation = contextInformation;
+ contextInformationPosition = (contextInformation != null ? cursorPosition : -1);
+ }
+
+ /**
+ * Sets the trigger characters.
+ *
+ * @param triggerCharacters The set of characters which can trigger the
+ * application of this completion proposal
+ */
+ public void setTriggerCharacters( char[] triggerCharacters ) {
+ this.triggerCharacters = triggerCharacters;
+ }
+
+ /**
+ * Sets the cursor position relative to the insertion offset. By default
+ * this is the length of the completion string (Cursor positioned after the
+ * completion)
+ *
+ * @param cursorPosition The cursorPosition to set
+ */
+ public void setCursorPosition( int cursorPosition ) {
+
+ if (cursorPosition >= 0) {
+ this.cursorPosition = cursorPosition;
+ this.contextInformationPosition = (contextInformation != null ? cursorPosition : -1);
+ }
+ }
+
+ public void apply( IDocument document, char trigger, int offset ) {
+ try {
+ // patch replacement length
+
+ int delta = offset - (documentOffset + replacementLength);
+ if (delta > 0)
+ replacementLength += delta;
+
+ if (trigger == (char) 0) {
+ replace( document, documentOffset, replacementLength, replacementString );
+ }
+ else {
+ StringBuffer buffer = new StringBuffer( replacementString );
+
+ if ((replacementLength < buffer.length() && buffer.charAt( replacementLength ) != trigger)) {
+ buffer.insert( cursorPosition, trigger );
+ ++cursorPosition;
+ }
+
+ replace( document, documentOffset, replacementLength, buffer.toString() );
+ }
+
+ int oldLen = document.getLength();
+ documentOffset += document.getLength() - oldLen;
+ }
+ catch (BadLocationException e) {
+ HibernateConsolePlugin.getDefault().log( e );
+ }
+ }
+
+ /**
+ * Replaces the document content at the specified offset and length with the
+ * specified string.
+ *
+ * @param document the document opened in the editor
+ * @param offset offset to the document content to be replaced
+ * @param length length of text to be replaced
+ * @param string replacement string
+ * @throws BadLocationException
+ */
+ private void replace( IDocument document, int offset, int length, String string ) throws BadLocationException {
+ if (document != null && string != null && offset >= 0 && length >= 0) {
+ if (!document.get( offset, length ).equals( string ))
+ document.replace( offset, length, string );
+ }
+ }
+
+ public void apply( IDocument document ) {
+ apply( document, (char) 0, documentOffset + replacementLength );
+ }
+
+ public Point getSelection( IDocument document ) {
+ return new Point( documentOffset + cursorPosition, 0 );
+ }
+
+ public IContextInformation getContextInformation() {
+ return contextInformation;
+ }
+
+ public Image getImage() {
+ return image;
+ }
+
+ public String getDisplayString() {
+ return displayString;
+ }
+
+ public String getAdditionalProposalInfo() {
+ return additionalProposalInfo;
+ }
+
+ public char[] getTriggerCharacters() {
+ return triggerCharacters;
+ }
+
+ public int getContextInformationPosition() {
+ return replacementOffset + contextInformationPosition;
+ }
+
+ public int getReplacementOffset() {
+ return replacementOffset;
+ }
+
+ public void setReplacementOffset( int replacementOffset ) {
+
+ if (replacementOffset >= 0) {
+ this.replacementOffset = replacementOffset;
+ }
+ }
+
+ public int getReplacementLength() {
+ return replacementLength;
+ }
+
+ public void setReplacementLength( int replacementLength ) {
+
+ if (replacementLength >= 0) {
+ this.replacementLength = replacementLength;
+ }
+ }
+
+ public String getReplacementString() {
+ return replacementString;
+ }
+
+ public void setReplacementString( String replacementString ) {
+ this.replacementString = replacementString;
+ }
+
+ public void setImage( Image image ) {
+ this.image = image;
+ }
+
+ public boolean isValidFor( IDocument document, int offset ) {
+ if (offset < replacementOffset)
+ return false;
+
+ int replacementLength = replacementString == null ? 0 : replacementString.length();
+ if (offset >= replacementOffset + replacementLength)
+ return false;
+
+ try {
+ int length = offset - replacementOffset;
+ String start = document.get( replacementOffset, length );
+ return replacementString.substring( 0, length ).equalsIgnoreCase( start );
+ }
+ catch (BadLocationException x) {
+ }
+
+ return false;
+ }
+
+}
\ No newline at end of file
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/ConsoleExtension3_5.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/ConsoleExtension3_5.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/ConsoleExtension3_5.java 2011-11-10 12:58:10 UTC (rev 36273)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate3_5;
+
+import org.hibernate.console.execution.ExecutionContext;
+import org.hibernate.console.ext.CompletionProposalsResult;
+import org.hibernate.console.ext.HibernateException;
+import org.hibernate.console.ext.HibernateExtension;
+import org.hibernate.eclipse.console.ext.ConsoleExtension;
+import org.hibernate.tool.ide.completion.HQLCodeAssist;
+import org.hibernate.tool.ide.completion.IHQLCodeAssist;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class ConsoleExtension3_5 implements ConsoleExtension {
+
+ private HibernateExtension3_5 hibernateExtension;
+
+ public ConsoleExtension3_5(){}
+
+ public void setHibernateException(HibernateExtension hibernateExtension){
+ this.hibernateExtension = (HibernateExtension3_5) hibernateExtension;
+ }
+
+ @Override
+ public CompletionProposalsResult hqlCodeComplete(String query, int currentOffset) {
+ EclipseHQLCompletionRequestor requestor = new EclipseHQLCompletionRequestor();
+ if (!hibernateExtension.hasConfiguration()){
+ try {
+ hibernateExtension.build();
+ hibernateExtension.execute( new ExecutionContext.Command() {
+ public Object execute() {
+ if(hibernateExtension.hasConfiguration()) {
+ hibernateExtension.getConfiguration().buildMappings();
+ }
+ return null;
+ }
+ });
+ } catch (HibernateException e){
+ //FIXME
+ //String mess = NLS.bind(HibernateConsoleMessages.CompletionHelper_error_could_not_build_cc, consoleConfiguration.getName());
+ //HibernateConsolePlugin.getDefault().logErrorMessage(mess, e);
+ }
+ }
+ IHQLCodeAssist hqlEval = new HQLCodeAssist(hibernateExtension.getConfiguration());
+ query = query.replace('\t', ' ');
+ hqlEval.codeComplete(query, currentOffset, requestor);
+ return new CompletionProposalsResult(requestor.getCompletionProposals(), requestor.getLastErrorMessage());
+ }
+
+
+
+}
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/EclipseHQLCompletionRequestor.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/EclipseHQLCompletionRequestor.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/EclipseHQLCompletionRequestor.java 2011-11-10 12:58:10 UTC (rev 36273)
@@ -0,0 +1,151 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.tools.hibernate3_5;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.swt.graphics.Image;
+import org.hibernate.console.ImageConstants;
+import org.hibernate.eclipse.console.utils.EclipseImages;
+import org.hibernate.eclipse.console.workbench.HibernateWorkbenchHelper;
+import org.hibernate.tool.ide.completion.HQLCompletionProposal;
+import org.hibernate.tool.ide.completion.IHQLCompletionRequestor;
+import org.hibernate.util.StringHelper;
+
+public class EclipseHQLCompletionRequestor implements IHQLCompletionRequestor {
+
+ private final List<ICompletionProposal> result = new ArrayList<ICompletionProposal>();
+ private String lastErrorMessage;
+ private final int virtualOffset;
+
+ public EclipseHQLCompletionRequestor() {
+ virtualOffset = 0;
+ }
+
+ public EclipseHQLCompletionRequestor(int virtualOffset) {
+ this.virtualOffset = virtualOffset;
+ }
+
+ public List<ICompletionProposal> getCompletionProposals() {
+ return result;
+ }
+
+ public boolean accept(HQLCompletionProposal proposal) {
+ result.add(new CompletionProposal(proposal.getCompletion(), // replacementString
+ proposal.getReplaceStart()+virtualOffset, // replacementOffset
+ proposal.getReplaceEnd()-proposal.getReplaceStart(), // replacementLength
+ proposal.getCompletion().length(), // cursorPosition (relativeTo replacementStart)
+ getImage(proposal),
+ getDisplayString(proposal),
+ null,
+ null));
+ return true;
+ }
+
+ private String getDisplayString(HQLCompletionProposal proposal) {
+ StringBuffer buf = new StringBuffer(proposal.getSimpleName());
+
+ switch(proposal.getCompletionKind()) {
+ case HQLCompletionProposal.ENTITY_NAME:
+ if(proposal.getEntityName()!=null &&
+ !(proposal.getSimpleName().equals( proposal.getEntityName()))) {
+ buf.append(" - "); //$NON-NLS-1$
+ buf.append(StringHelper.qualifier( proposal.getEntityName() ));
+ } else if(proposal.getShortEntityName()!=null &&
+ !(proposal.getSimpleName().equals( proposal.getEntityName()))) {
+ buf.append( " - " + proposal.getShortEntityName() ); //$NON-NLS-1$
+ }
+ break;
+ case HQLCompletionProposal.ALIAS_REF:
+ if(proposal.getShortEntityName()!=null) {
+ buf.append( " - " + proposal.getShortEntityName() ); //$NON-NLS-1$
+ } else if(proposal.getEntityName()!=null) {
+ buf.append( " - " + proposal.getEntityName() ); //$NON-NLS-1$
+ }
+ break;
+ case HQLCompletionProposal.PROPERTY:
+ if(proposal.getShortEntityName()!=null) {
+ buf.append( " - " + proposal.getShortEntityName() ); //$NON-NLS-1$
+ } else if(proposal.getEntityName()!=null) {
+ if(proposal.getEntityName().indexOf( "." )>=0) { //$NON-NLS-1$
+ buf.append( " - " + StringHelper.unqualify( proposal.getEntityName() )); //$NON-NLS-1$
+ } else {
+ buf.append( " - " + proposal.getEntityName() ); //$NON-NLS-1$
+ }
+ }
+ break;
+ case HQLCompletionProposal.KEYWORD:
+ break;
+ case HQLCompletionProposal.FUNCTION:
+ break;
+ default:
+
+ }
+
+
+ return buf.toString();
+ }
+
+ private Image getImage(HQLCompletionProposal proposal) {
+ String key = null;
+
+ switch(proposal.getCompletionKind()) {
+ case HQLCompletionProposal.ENTITY_NAME:
+ case HQLCompletionProposal.ALIAS_REF:
+ key = ImageConstants.MAPPEDCLASS;
+ break;
+ case HQLCompletionProposal.PROPERTY:
+ if(proposal.getProperty()!=null) {
+ return HibernateWorkbenchHelper.getImage( proposal.getProperty() );
+ } else {
+ key = ImageConstants.PROPERTY;
+ }
+ break;
+ case HQLCompletionProposal.KEYWORD:
+ key = null;
+ break;
+ case HQLCompletionProposal.FUNCTION:
+ key = ImageConstants.FUNCTION;
+ break;
+ default:
+ key = null;
+ }
+
+ return key==null?null:EclipseImages.getImage( key );
+ }
+
+ public void completionFailure(String errorMessage) {
+ lastErrorMessage = errorMessage;
+ }
+
+ public String getLastErrorMessage() {
+ return lastErrorMessage;
+ }
+
+ public void clear() {
+ result.clear();
+ lastErrorMessage = null;
+ }
+
+}
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java 2011-11-10 11:02:27 UTC (rev 36272)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate3_5/src/org/jboss/tools/hibernate3_5/HibernateExtension3_5.java 2011-11-10 12:58:10 UTC (rev 36273)
@@ -33,7 +33,6 @@
import org.hibernate.console.ext.QueryResultImpl;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
import org.hibernate.console.preferences.PreferencesClassPathUtils;
-import org.hibernate.eclipse.hqleditor.EclipseHQLCompletionRequestor;
import org.hibernate.eclipse.libs.FakeDelegatingDriver;
import org.hibernate.tool.ide.completion.HQLCodeAssist;
import org.hibernate.tool.ide.completion.IHQLCodeAssist;
@@ -260,29 +259,10 @@
return configuration != null;
}
- @Override
- public CompletionProposalsResult hqlCodeComplete(String query, int currentOffset) {
- EclipseHQLCompletionRequestor requestor = new EclipseHQLCompletionRequestor();
- if (!hasConfiguration()){
- try {
- build();
- execute( new ExecutionContext.Command() {
- public Object execute() {
- if(hasConfiguration()) {
- configuration.buildMappings();
- }
- return null;
- }
- });
- } catch (HibernateException e){
- //FIXME
- //String mess = NLS.bind(HibernateConsoleMessages.CompletionHelper_error_could_not_build_cc, consoleConfiguration.getName());
- //HibernateConsolePlugin.getDefault().logErrorMessage(mess, e);
- }
- }
- IHQLCodeAssist hqlEval = new HQLCodeAssist(configuration);
- query = query.replace('\t', ' ');
- hqlEval.codeComplete(query, currentOffset, requestor);
- return new CompletionProposalsResult(requestor.getCompletionProposals(), requestor.getLastErrorMessage());
+ /**
+ * @return
+ */
+ public Configuration getConfiguration() {
+ return configuration;
}
}
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/META-INF/MANIFEST.MF
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/META-INF/MANIFEST.MF 2011-11-10 11:02:27 UTC (rev 36272)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/META-INF/MANIFEST.MF 2011-11-10 12:58:10 UTC (rev 36273)
@@ -4,6 +4,7 @@
Bundle-SymbolicName: org.jboss.tools.hibernateextension4_0;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.jboss.tools.hibernate4_0.HibernateExtension4_0Plugin
+Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.hibernate.eclipse;bundle-version="3.4.0",
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/build.properties
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/build.properties 2011-11-10 11:02:27 UTC (rev 36272)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/build.properties 2011-11-10 12:58:10 UTC (rev 36273)
@@ -30,4 +30,5 @@
lib/optional/proxool/hibernate-proxool-4.0.0.CR3.jar,\
lib/optional/proxool/proxool-0.8.3.jar,\
lib/bsh-core-2.0b4.jar,\
- lib/tools/hibernate-tools-3.5.0.Alpha.jar
+ lib/tools/hibernate-tools-3.5.0.Alpha.jar,\
+ plugin.properties
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/plugin.properties
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/plugin.properties (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/plugin.properties 2011-11-10 12:58:10 UTC (rev 36273)
@@ -0,0 +1 @@
+hibernate.version=4.0
\ No newline at end of file
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/plugin.xml
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/plugin.xml 2011-11-10 11:02:27 UTC (rev 36272)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/plugin.xml 2011-11-10 12:58:10 UTC (rev 36273)
@@ -5,8 +5,15 @@
point="org.hibernate.eclipse.hibernateextension">
<hibernateextension
classname="org.jboss.tools.hibernate4_0.HibernateExtension4_0"
- version="4.0">
+ version="%hibernate.version">
</hibernateextension>
</extension>
+ <extension
+ point="org.hibernate.eclipse.console.consoleextension">
+ <consoleextension
+ classname="org.jboss.tools.hibernate4_0.ConsoleExtension4_0"
+ version="%hibernate.version">
+ </consoleextension>
+ </extension>
</plugin>
Added: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/ConsoleExtension4_0.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/ConsoleExtension4_0.java (rev 0)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/ConsoleExtension4_0.java 2011-11-10 12:58:10 UTC (rev 36273)
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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.hibernate4_0;
+
+import org.hibernate.console.execution.ExecutionContext;
+import org.hibernate.console.ext.CompletionProposalsResult;
+import org.hibernate.console.ext.HibernateException;
+import org.hibernate.console.ext.HibernateExtension;
+import org.hibernate.eclipse.console.ext.ConsoleExtension;
+import org.hibernate.tool.ide.completion.HQLCodeAssist;
+import org.hibernate.tool.ide.completion.IHQLCodeAssist;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class ConsoleExtension4_0 implements ConsoleExtension {
+
+ private HibernateExtension4_0 hibernateExtension;
+
+ public ConsoleExtension4_0(){}
+
+ public void setHibernateException(HibernateExtension hibernateExtension){
+ this.hibernateExtension = (HibernateExtension4_0) hibernateExtension;
+ }
+
+ @Override
+ public CompletionProposalsResult hqlCodeComplete(String query, int currentOffset) {
+ EclipseHQLCompletionRequestor requestor = new EclipseHQLCompletionRequestor();
+ if (!hibernateExtension.hasConfiguration()){
+ try {
+ hibernateExtension.build();
+ hibernateExtension.execute( new ExecutionContext.Command() {
+ public Object execute() {
+ if(hibernateExtension.hasConfiguration()) {
+ hibernateExtension.getConfiguration().buildMappings();
+ }
+ return null;
+ }
+ });
+ } catch (HibernateException e){
+ //FIXME
+ //String mess = NLS.bind(HibernateConsoleMessages.CompletionHelper_error_could_not_build_cc, consoleConfiguration.getName());
+ //HibernateConsolePlugin.getDefault().logErrorMessage(mess, e);
+ }
+ }
+ IHQLCodeAssist hqlEval = new HQLCodeAssist(hibernateExtension.getConfiguration());
+ query = query.replace('\t', ' ');
+ hqlEval.codeComplete(query, currentOffset, requestor);
+ return new CompletionProposalsResult(requestor.getCompletionProposals(), requestor.getLastErrorMessage());
+ }
+
+
+
+}
Modified: branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java
===================================================================
--- branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java 2011-11-10 11:02:27 UTC (rev 36272)
+++ branches/dead/hibernatetools-multiversion2/plugins/org.jboss.tools.hibernate4_0/src/org/jboss/tools/hibernate4_0/HibernateExtension4_0.java 2011-11-10 12:58:10 UTC (rev 36273)
@@ -311,30 +311,11 @@
return configuration != null;
}
- @Override
- public CompletionProposalsResult hqlCodeComplete(String query, int currentOffset) {
- EclipseHQLCompletionRequestor requestor = new EclipseHQLCompletionRequestor();
- if (!hasConfiguration()){
- try {
- build();
- execute( new ExecutionContext.Command() {
- public Object execute() {
- if(hasConfiguration()) {
- configuration.buildMappings();
- }
- return null;
- }
- });
- } catch (HibernateException e){
- //FIXME
- //String mess = NLS.bind(HibernateConsoleMessages.CompletionHelper_error_could_not_build_cc, consoleConfiguration.getName());
- //HibernateConsolePlugin.getDefault().logErrorMessage(mess, e);
- }
- }
- IHQLCodeAssist hqlEval = new HQLCodeAssist(configuration);
- query = query.replace('\t', ' ');
- hqlEval.codeComplete(query, currentOffset, requestor);
- return new CompletionProposalsResult(requestor.getCompletionProposals(), requestor.getLastErrorMessage());
+ /**
+ * @return
+ */
+ public Configuration getConfiguration() {
+ return configuration;
}
}
\ No newline at end of file
13 years, 1 month
JBoss Tools SVN: r36272 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-11-10 06:02:27 -0500 (Thu, 10 Nov 2011)
New Revision: 36272
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
Log:
JBIDE-9977 JBoss Central resize issue
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-11-10 10:50:03 UTC (rev 36271)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-11-10 11:02:27 UTC (rev 36272)
@@ -872,8 +872,9 @@
}
tutorialPageBook.showPage(tutorialsComposite);
+ tutorialPageBook.layout(true, true);
form.reflow(true);
- form.redraw();
+ //form.redraw();
resize();
//recomputeScrollComposite(tutorialScrollComposite, tutorialPageBook);
}
@@ -959,8 +960,8 @@
FormText formText = toolkit.createFormText(composite, true);
TableWrapData td = new TableWrapData();
td.indent = 2;
- Point size = newsScrollComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- td.maxWidth = size.x - 2;
+ //Point size = scrollable.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ //td.maxWidth = size.x - 2;
formText.setLayoutData(td);
try {
// to avoid illegal argumentexception on formtext fields.
@@ -1009,10 +1010,11 @@
}
pageBook.showPage(composite);
- composite.layout(true, true);
+ pageBook.layout(true, true);
form.reflow(true);
- form.redraw();
+ //form.redraw();
recomputeScrollComposite(scrollable, pageBook);
+ resize();
}
private void resize() {
@@ -1021,20 +1023,18 @@
protected void resize(boolean force) {
Point size;
- if (Platform.OS_MACOSX.equals(Platform.getOS())) {
+ //if (Platform.OS_MACOSX.equals(Platform.getOS())) {
size = form.getSize();
size.y = form.getBody().getSize().y;
- } else {
- size = form.getBody().getSize();
- }
+ //} else {
+ // size = form.getBody().getSize();
+ //}
if (!force && size.equals(oldSize)) {
return;
}
oldSize = size;
GridData gd;
- //Point computedSize;
int widthHint = size.x/2 - 40;
- //computedSize = newsSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
gd = (GridData) newsSection.getLayoutData();
if (newsSection.isExpanded()) {
if (blogsSection.isExpanded()) {
@@ -1047,11 +1047,8 @@
}
gd.widthHint = widthHint;
gd.grabExcessVerticalSpace = false;
- //computedSize = newsSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //newsSection.setSize(widthHint, computedSize.y);
-
+
gd = (GridData) blogsSection.getLayoutData();
- //computedSize = blogsSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
if (blogsSection.isExpanded()) {
if (newsSection.isExpanded()) {
gd.heightHint = size.y/2 - 20;
@@ -1064,8 +1061,6 @@
gd.widthHint = widthHint;
gd.grabExcessVerticalSpace = false;
- //computedSize = blogsSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- //blogsSection.setSize(widthHint, computedSize.y);
gd = (GridData) tutorialsSection.getLayoutData();
//gridData.heightHint = size.y - 40;
@@ -1095,8 +1090,6 @@
//computedSize = projectsSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
//projectsSection.setSize(widthHint, computedSize.y);
- form.reflow(true);
- form.redraw();
blogsScrollComposite.setMinSize(widthHint, size.y - 55);
newsScrollComposite.setMinSize(widthHint, size.y - 55);
@@ -1105,11 +1098,16 @@
if (y > 200) {
y = 200;
}
- tutorialScrollComposite.setMinSize(widthHint, y);
- //refreshNews();
- //refreshBlogs();
+ tutorialScrollComposite.setMinSize(widthHint, y);
+ //newsPageBook.layout(true, true);
+ //blogsPageBook.layout(true, true);
+ recomputeScrollComposite(blogsScrollComposite, blogsPageBook);
+ recomputeScrollComposite(newsScrollComposite, newsPageBook);
+ //form.redraw();
form.layout(true, true);
+ form.reflow(true);
+
}
private class RefreshBlogsJobChangeListener implements IJobChangeListener {
13 years, 1 month
JBoss Tools SVN: r36271 - in trunk/as: tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-11-10 05:50:03 -0500 (Thu, 10 Nov 2011)
New Revision: 36271
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/AS7Manager.java
trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/AS7ManagerIntegrationTest.java
trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/utils/AS7ManagerTestUtils.java
Log:
[JBIDE-9239] started implementing AS7Manager#addDeploymentDir
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/AS7Manager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/AS7Manager.java 2011-11-10 08:44:44 UTC (rev 36270)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as7/src/org/jboss/ide/eclipse/as/internal/management/as7/AS7Manager.java 2011-11-10 10:50:03 UTC (rev 36271)
@@ -31,7 +31,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import java.util.concurrent.CancellationException;
import java.util.concurrent.Future;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -144,9 +143,9 @@
* @throws JBoss7ManangerException
*/
public JBoss7DeploymentState getDeploymentStateSafe(String name) throws JBoss7ManangerException {
- if( !getDeploymentNames().contains(name))
+ if( hasDeployment(name)) {
return JBoss7DeploymentState.NOT_FOUND;
-
+ }
return getDeploymentState(name);
}
@@ -182,6 +181,11 @@
}
}
+ public void addDeploymentDirectory(String path) {
+
+ }
+
+
/**
* Shuts the server down.
*
@@ -277,19 +281,18 @@
return op;
}
- private Set<String> getDeploymentNames() throws CancellationException {
+ public boolean hasDeployment(String name) throws JBoss7ManangerException {
+ return getDeploymentNames().contains(name);
+ }
+
+ private Set<String> getDeploymentNames() throws JBoss7ManangerException {
final ModelNode op = getEmptyOperation(READ_CHILDREN_NAMES_OPERATION, new ModelNode());
op.get(CHILD_TYPE).set(DEPLOYMENT);
- ModelNode response;
- try {
- response = client.execute(op);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- final ModelNode result = response.get(RESULT);
- final Set<String> deploymentNames = new HashSet<String>();
+ ModelNode response = execute(op);
+ ModelNode result = response.get(RESULT);
+ Set<String> deploymentNames = new HashSet<String>();
if (result.isDefined()) {
- final List<ModelNode> deploymentNodes = result.asList();
+ final List<ModelNode> deploymentNodes = result.asList();
for (ModelNode node : deploymentNodes) {
deploymentNames.add(node.asString());
}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/AS7ManagerIntegrationTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/AS7ManagerIntegrationTest.java 2011-11-10 08:44:44 UTC (rev 36270)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/AS7ManagerIntegrationTest.java 2011-11-10 10:50:03 UTC (rev 36271)
@@ -43,10 +43,10 @@
@Before
public void setUp() throws IOException {
- assertTrue("There is no server at " + AS7ManagerTestUtils.HOST +
+ assertTrue("There is no server at " + AS7ManagerTestUtils.LOCALHOST +
" that listens on port " + AS7Manager.MGMT_PORT,
- AS7ManagerTestUtils.isListening(AS7ManagerTestUtils.HOST, AS7Manager.MGMT_PORT));
- this.manager = new AS7Manager(AS7ManagerTestUtils.HOST, AS7Manager.MGMT_PORT);
+ AS7ManagerTestUtils.isListening(AS7ManagerTestUtils.LOCALHOST, AS7Manager.MGMT_PORT));
+ this.manager = new AS7Manager(AS7ManagerTestUtils.LOCALHOST, AS7Manager.MGMT_PORT);
}
@After
@@ -62,7 +62,7 @@
AS7ManagerTestUtils.waitUntilFinished(manager.deploy(warFile));
String response = AS7ManagerTestUtils.waitForRespose(
- "minimalistic", AS7ManagerTestUtils.HOST, AS7ManagerTestUtils.WEB_PORT);
+ "minimalistic", AS7ManagerTestUtils.LOCALHOST, AS7ManagerTestUtils.WEB_PORT);
assertTrue(response != null
&& response.indexOf("minimalistic") >= 0);
} finally {
@@ -78,7 +78,7 @@
AS7ManagerTestUtils.waitUntilFinished(manager.deploy(warFile));
String response = AS7ManagerTestUtils.waitForRespose(
- "minimalistic", AS7ManagerTestUtils.HOST, AS7ManagerTestUtils.WEB_PORT);
+ "minimalistic", AS7ManagerTestUtils.LOCALHOST, AS7ManagerTestUtils.WEB_PORT);
assertTrue(response != null
&& response.indexOf("minimalistic") >= 0);
@@ -115,7 +115,7 @@
AS7ManagerTestUtils.waitUntilFinished(manager.deploy(name, warFile));
AS7ManagerTestUtils.waitUntilFinished(manager.replace(name, warFile2));
String response = AS7ManagerTestUtils.waitForRespose(
- "minimalistic", AS7ManagerTestUtils.HOST, AS7ManagerTestUtils.WEB_PORT);
+ "minimalistic", AS7ManagerTestUtils.LOCALHOST, AS7ManagerTestUtils.WEB_PORT);
assertTrue(response != null
&& response.indexOf("GWT") >= 0);
} finally {
@@ -162,7 +162,23 @@
}
}
+ @Ignore
@Test
+ public void canAddDeploymentDirectory() throws URISyntaxException, IOException, JBoss7ManangerException {
+ String deploymentName = getRandomDeploymentName();
+ File warFile = AS7ManagerTestUtils.getWarFile(AS7ManagerTestUtils.MINIMALISTIC_WAR);
+ try {
+ assertFalse(manager.hasDeployment(deploymentName));
+ File deploymentDir = new File(System.getProperty("java.io.tmpdir"), "as7dir");
+ manager.addDeploymentDirectory(deploymentDir.getAbsolutePath());
+
+ AS7ManagerTestUtils.waitForResponseCode(200, deploymentName, AS7ManagerTestUtils.LOCALHOST, AS7ManagerTestUtils.WEB_PORT);
+ } finally {
+ AS7ManagerTestUtils.quietlyRemove(deploymentName, manager);
+ }
+ }
+
+ @Test
public void canGetServerState() throws JBoss7ManangerException {
assertEquals(JBoss7ServerState.RUNNING, manager.getServerState());
}
@@ -171,8 +187,10 @@
public void canStopServer() throws JBoss7ManangerException, UnknownHostException, IOException {
manager.stopServer();
assertFalse(
- AS7ManagerTestUtils.isListening(AS7ManagerTestUtils.HOST, AS7Manager.MGMT_PORT));
+ AS7ManagerTestUtils.isListening(AS7ManagerTestUtils.LOCALHOST, AS7Manager.MGMT_PORT));
}
-
+ private String getRandomDeploymentName() {
+ return String.valueOf(System.currentTimeMillis());
+ }
}
\ No newline at end of file
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/utils/AS7ManagerTestUtils.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/utils/AS7ManagerTestUtils.java 2011-11-10 08:44:44 UTC (rev 36270)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.management.as7.tests/src/org/jboss/ide/eclipse/as/internal/management/as7/tests/utils/AS7ManagerTestUtils.java 2011-11-10 10:50:03 UTC (rev 36271)
@@ -38,7 +38,7 @@
public static final String GWT_HELLOWORLD_WAR = "gwt-helloworld.war";
public static final String MINIMALISTIC_WAR = "minimalistic.war";
- public static final String HOST = "localhost";
+ public static final String LOCALHOST = "localhost";
public static final int WEB_PORT = 8080;
private static final String WAR_FOLDER = "/wars/";
@@ -68,7 +68,7 @@
public static void quietlyUndeploy(String name, AS7Manager manager) {
try {
- // DetypedDeployer.undeploy(name, AS7ManagerTestUtils.HOST,
+ // DetypedDeployer.undeploy(name, AS7ManagerTestUtils.LOCALHOST,
// AS7ManagerTestUtils.MGMT_PORT);
waitUntilFinished(manager.undeploy(name));
} catch (Exception e) {
@@ -78,7 +78,7 @@
public static void quietlyRemove(String name, AS7Manager manager) {
try {
- // DetypedDeployer.remove(name, AS7ManagerTestUtils.HOST,
+ // DetypedDeployer.remove(name, AS7ManagerTestUtils.LOCALHOST,
// AS7ManagerTestUtils.MGMT_PORT);
waitUntilFinished(manager.remove(name));
} catch (Exception e) {
13 years, 1 month
JBoss Tools SVN: r36270 - in trunk/forge/plugins: org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-11-10 03:44:44 -0500 (Thu, 10 Nov 2011)
New Revision: 36270
Modified:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/EventHandler.java
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeCommandProcessor.java
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeTextViewer.java
Log:
- fix opening of file after pick-up
- fix highlightingof newly added fields
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/EventHandler.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/EventHandler.java 2011-11-10 08:08:12 UTC (rev 36269)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/EventHandler.java 2011-11-10 08:44:44 UTC (rev 36270)
@@ -20,7 +20,8 @@
if (project != null) {
str = project.getProjectRoot().getName();
}
- sendEscaped("Executed Command: " + event.getCommand().getName() + " Current Project Directory: " + str);
+ String command = event.getCommand().getParent().getName() + " " + event.getCommand().getName();
+ sendEscaped("Executed Command: " + command + " Current Project Directory: " + str);
}
private void sendEscaped(String str) {
Modified: trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeCommandProcessor.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeCommandProcessor.java 2011-11-10 08:08:12 UTC (rev 36269)
+++ trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeCommandProcessor.java 2011-11-10 08:44:44 UTC (rev 36270)
@@ -68,7 +68,7 @@
refreshWorkspace();
ForgeCommandPostProcessor postProcessor = getPostProcessors().get(mainCommand);
if (postProcessor != null) {
- postProcessor.postProcessCommand(mainCommand, output);
+ postProcessor.postProcessCommand(currentCommand, output);
}
showForgeConsole();
}
Modified: trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeTextViewer.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeTextViewer.java 2011-11-10 08:08:12 UTC (rev 36269)
+++ trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/ForgeTextViewer.java 2011-11-10 08:44:44 UTC (rev 36270)
@@ -181,13 +181,11 @@
outputListener = new ForgeHiddenOutputFilter(ansiCommandFilter) {
@Override
public void handleFilteredString(String str) {
-// System.out.println("handle filtered string: " + str);
+ System.out.println("handle filtered string: " + str);
if (str.startsWith("Intercepted Command: ")) {
commandProcessor.startCommand(str.substring(21));
} else if (str.startsWith("Executed Command: ")) {
commandProcessor.stopCurrentCommand();
-// } else {
-// System.out.println("unhandled hidden output: " + str);
} else if (str.startsWith("POM File Modified: ")) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(str.substring(19));
if (project != null) {
13 years, 1 month
JBoss Tools SVN: r36269 - trunk/bpel/features/org.jboss.tools.bpel.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-10 03:08:12 -0500 (Thu, 10 Nov 2011)
New Revision: 36269
Modified:
trunk/bpel/features/org.jboss.tools.bpel.feature/feature.xml
Log:
remove comments and fix formatting (JBIDE-10062)
Modified: trunk/bpel/features/org.jboss.tools.bpel.feature/feature.xml
===================================================================
--- trunk/bpel/features/org.jboss.tools.bpel.feature/feature.xml 2011-11-10 08:07:05 UTC (rev 36268)
+++ trunk/bpel/features/org.jboss.tools.bpel.feature/feature.xml 2011-11-10 08:08:12 UTC (rev 36269)
@@ -1,146 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.jboss.tools.bpel.feature"
- label="%featureName"
- version="1.1.0.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.bpel.ui">
+<feature id="org.jboss.tools.bpel.feature" label="%featureName" version="1.1.0.qualifier" provider-name="%providerName" plugin="org.eclipse.bpel.ui">
- <description>
+ <description>
%description
</description>
- <copyright>
+ <copyright>
%copyright
</copyright>
- <license url="%licenseURL">
+ <license url="%licenseURL">
%license
</license>
- <requires>
- <import plugin="org.eclipse.emf.ecore" version="2.4.0" match="compatible"/>
- <import plugin="org.eclipse.emf.ecore.xmi" version="2.4.0" match="compatible"/>
- <import plugin="org.eclipse.wst.wsdl" version="1.1.200" match="compatible"/>
- <import plugin="org.eclipse.xsd" version="2.4.0" match="compatible"/>
- <import plugin="org.eclipse.core.runtime" version="3.4.0" match="compatible"/>
- <import plugin="javax.wsdl" version="1.5.0" match="equivalent"/>
- <import plugin="org.eclipse.jface.text" version="3.4.0" match="compatible"/>
- <import plugin="org.eclipse.core.resources" version="3.4.0" match="compatible"/>
- <import plugin="org.eclipse.ui.editors" version="3.4.0" match="compatible"/>
- <import plugin="org.eclipse.ui.ide" version="3.4.0" match="compatible"/>
- <import plugin="org.eclipse.ui.forms" version="3.3.100" match="compatible"/>
- <import plugin="org.eclipse.core.databinding" version="1.1.0" match="compatible"/>
- <import plugin="org.eclipse.jface.databinding" version="1.2.0" match="compatible"/>
- <import plugin="org.eclipse.emf.edit.ui" version="2.4.0" match="compatible"/>
- <import plugin="org.eclipse.jdt.core" version="3.5.0" match="compatible"/>
- <import plugin="org.eclipse.wst.common.modulecore" version="1.1.300" match="compatible"/>
- <import plugin="org.eclipse.emf.ecore.change" version="2.4.0" match="compatible"/>
- <import plugin="org.apache.xerces" version="2.9.0" match="compatible"/>
- <import plugin="org.eclipse.ui.views.properties.tabbed" version="3.4.0" match="compatible"/>
- <import plugin="org.eclipse.ui.workbench.texteditor" version="3.4.0" match="compatible"/>
- <import plugin="org.eclipse.wst.xml.core" version="1.1.300" match="compatible"/>
- <import plugin="org.eclipse.wst.sse.ui" version="1.1.0" match="compatible"/>
- <import plugin="org.eclipse.wst.sse.core" version="1.1.300" match="compatible"/>
- <import plugin="org.eclipse.wst.xsd.ui" version="1.2.101" match="compatible"/>
- <import plugin="org.eclipse.wst.wsdl.ui" version="1.2.100" match="compatible"/>
- <import plugin="org.eclipse.wst.xml.ui" version="1.0.400" match="compatible"/>
- <import plugin="org.eclipse.wst.validation" version="1.2.0" match="compatible"/>
- <import plugin="org.eclipse.wst.wsdl.validation" version="1.1.301" match="compatible"/>
- <import plugin="org.eclipse.ui.cheatsheets"/>
- <import plugin="org.eclipse.wst.server.core"/>
- <import plugin="org.eclipse.wst.web.ui"/>
- <import plugin="org.eclipse.wst.common.project.facet.ui"/>
- <import plugin="org.eclipse.wst.common.frameworks"/>
- <import plugin="org.eclipse.wst.common.project.facet.core"/>
- <import plugin="org.eclipse.wst.common.frameworks.ui"/>
- <import plugin="org.eclipse.jst.server.generic.core"/>
- <import plugin="org.eclipse.jem.util"/>
- <import plugin="org.eclipse.debug.ui"/>
- <import plugin="org.eclipse.jst.common.frameworks"/>
- <import plugin="org.jboss.ide.eclipse.as.wtp.core"/>
- <import plugin="org.eclipse.wst.web"/>
- <import plugin="org.eclipse.ui.navigator"/>
- <import plugin="org.eclipse.ui" version="3.4.0" match="compatible"/>
- <import plugin="org.eclipse.gef" version="3.4.0" match="compatible"/>
- <import feature="org.eclipse.bpel.feature" version="0.8.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.bpel.apache.ode.runtime.feature" version="0.8.0" match="greaterOrEqual"/>
- </requires>
+ <requires>
+ <import plugin="org.eclipse.emf.ecore" version="2.4.0" match="compatible" />
+ <import plugin="org.eclipse.emf.ecore.xmi" version="2.4.0" match="compatible" />
+ <import plugin="org.eclipse.wst.wsdl" version="1.1.200" match="compatible" />
+ <import plugin="org.eclipse.xsd" version="2.4.0" match="compatible" />
+ <import plugin="org.eclipse.core.runtime" version="3.4.0" match="compatible" />
+ <import plugin="javax.wsdl" version="1.5.0" match="equivalent" />
+ <import plugin="org.eclipse.jface.text" version="3.4.0" match="compatible" />
+ <import plugin="org.eclipse.core.resources" version="3.4.0" match="compatible" />
+ <import plugin="org.eclipse.ui.editors" version="3.4.0" match="compatible" />
+ <import plugin="org.eclipse.ui.ide" version="3.4.0" match="compatible" />
+ <import plugin="org.eclipse.ui.forms" version="3.3.100" match="compatible" />
+ <import plugin="org.eclipse.core.databinding" version="1.1.0" match="compatible" />
+ <import plugin="org.eclipse.jface.databinding" version="1.2.0" match="compatible" />
+ <import plugin="org.eclipse.emf.edit.ui" version="2.4.0" match="compatible" />
+ <import plugin="org.eclipse.jdt.core" version="3.5.0" match="compatible" />
+ <import plugin="org.eclipse.wst.common.modulecore" version="1.1.300" match="compatible" />
+ <import plugin="org.eclipse.emf.ecore.change" version="2.4.0" match="compatible" />
+ <import plugin="org.apache.xerces" version="2.9.0" match="compatible" />
+ <import plugin="org.eclipse.ui.views.properties.tabbed" version="3.4.0" match="compatible" />
+ <import plugin="org.eclipse.ui.workbench.texteditor" version="3.4.0" match="compatible" />
+ <import plugin="org.eclipse.wst.xml.core" version="1.1.300" match="compatible" />
+ <import plugin="org.eclipse.wst.sse.ui" version="1.1.0" match="compatible" />
+ <import plugin="org.eclipse.wst.sse.core" version="1.1.300" match="compatible" />
+ <import plugin="org.eclipse.wst.xsd.ui" version="1.2.101" match="compatible" />
+ <import plugin="org.eclipse.wst.wsdl.ui" version="1.2.100" match="compatible" />
+ <import plugin="org.eclipse.wst.xml.ui" version="1.0.400" match="compatible" />
+ <import plugin="org.eclipse.wst.validation" version="1.2.0" match="compatible" />
+ <import plugin="org.eclipse.wst.wsdl.validation" version="1.1.301" match="compatible" />
+ <import plugin="org.eclipse.ui.cheatsheets" />
+ <import plugin="org.eclipse.wst.server.core" />
+ <import plugin="org.eclipse.wst.web.ui" />
+ <import plugin="org.eclipse.wst.common.project.facet.ui" />
+ <import plugin="org.eclipse.wst.common.frameworks" />
+ <import plugin="org.eclipse.wst.common.project.facet.core" />
+ <import plugin="org.eclipse.wst.common.frameworks.ui" />
+ <import plugin="org.eclipse.jst.server.generic.core" />
+ <import plugin="org.eclipse.jem.util" />
+ <import plugin="org.eclipse.debug.ui" />
+ <import plugin="org.eclipse.jst.common.frameworks" />
+ <import plugin="org.jboss.ide.eclipse.as.wtp.core" />
+ <import plugin="org.eclipse.wst.web" />
+ <import plugin="org.eclipse.ui.navigator" />
+ <import plugin="org.eclipse.ui" version="3.4.0" match="compatible" />
+ <import plugin="org.eclipse.gef" version="3.4.0" match="compatible" />
+ </requires>
- <!-- no longer included per JBDS-1810
- <plugin
- id="org.eclipse.bpel.apache.ode.deploy.model"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
+ <includes id="org.eclipse.bpel.feature" version="0.8.0" match="compatible" />
+ <includes id="org.eclipse.bpel.apache.ode.runtime.feature" version="0.8.0" match="compatible" />
+ <plugin id="org.jboss.tools.bpel.runtimes" download-size="0" install-size="0" version="0.0.0" unpack="false" />
- <plugin
- id="org.eclipse.bpel.apache.ode.deploy.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.bpel.common.model"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.bpel.common.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.bpel.model"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.bpel.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.bpel.validator"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.bpel.wsil.model"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.bpel.xpath10"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.jboss.tools.bpel.cheatsheet"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
- -->
-
- <plugin
- id="org.jboss.tools.bpel.runtimes"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
</feature>
13 years, 1 month
JBoss Tools SVN: r36266 - trunk/bpel/features/org.jboss.tools.bpel.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-10 02:34:38 -0500 (Thu, 10 Nov 2011)
New Revision: 36266
Modified:
trunk/bpel/features/org.jboss.tools.bpel.feature/feature.xml
Log:
bump up to BPEL 0.8.0 from build H94 (JBIDE-10062)
Modified: trunk/bpel/features/org.jboss.tools.bpel.feature/feature.xml
===================================================================
--- trunk/bpel/features/org.jboss.tools.bpel.feature/feature.xml 2011-11-10 07:34:31 UTC (rev 36265)
+++ trunk/bpel/features/org.jboss.tools.bpel.feature/feature.xml 2011-11-10 07:34:38 UTC (rev 36266)
@@ -63,8 +63,8 @@
<import plugin="org.eclipse.ui.navigator"/>
<import plugin="org.eclipse.ui" version="3.4.0" match="compatible"/>
<import plugin="org.eclipse.gef" version="3.4.0" match="compatible"/>
- <import feature="org.eclipse.bpel.feature" version="0.5.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.bpel.apache.ode.runtime.feature" version="0.5.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.bpel.feature" version="0.8.0" match="greaterOrEqual"/>
+ <import feature="org.eclipse.bpel.apache.ode.runtime.feature" version="0.8.0" match="greaterOrEqual"/>
</requires>
<!-- no longer included per JBDS-1810
13 years, 1 month
JBoss Tools SVN: r36265 - in trunk/download.jboss.org/jbosstools/updates: requirements/bpel and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-10 02:34:31 -0500 (Thu, 10 Nov 2011)
New Revision: 36265
Modified:
trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeArtifacts...
trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeContent.xml
trunk/download.jboss.org/jbosstools/updates/requirements/bpel/build.xml
Log:
bump up to BPEL 0.8.0 from build H94 (JBIDE-10062)
Modified: trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeArtifacts...
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeArtifacts... 2011-11-10 07:34:19 UTC (rev 36264)
+++ trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeArtifacts... 2011-11-10 07:34:31 UTC (rev 36265)
@@ -3,12 +3,12 @@
<repository name='JBoss Tools Requirements - Composite Indigo SR1 Mirror' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>
<properties size='2'>
<property name='p2.compressed' value='true'/>
-<property name='p2.timestamp' value='1318538731000'/>
+<property name='p2.timestamp' value='1320910251000'/>
</properties>
<children size='14'>
<child location='../../requirements/indigo/201109230900-SR1/'/>
<child location='../../requirements/birt/3.7.1/'/>
-<child location='../../requirements/bpel/0.5.0-20110915-1141-H87/'/>
+<child location='../../requirements/bpel/0.8.0.v20111109-1901-H94-CI/'/>
<child location='../../requirements/ecf/3.5.2/'/>
<child location='../../requirements/eclipse/3.7.1/'/>
Modified: trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeContent.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeContent.xml 2011-11-10 07:34:19 UTC (rev 36264)
+++ trunk/download.jboss.org/jbosstools/updates/indigo/SR1/compositeContent.xml 2011-11-10 07:34:31 UTC (rev 36265)
@@ -3,12 +3,12 @@
<repository name='JBoss Tools Requirements - Composite Indigo SR1 Mirror' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
<properties size='2'>
<property name='p2.compressed' value='true'/>
-<property name='p2.timestamp' value='1318538743000'/>
+<property name='p2.timestamp' value='1320910262000'/>
</properties>
<children size='14'>
<child location='../../requirements/indigo/201109230900-SR1/'/>
<child location='../../requirements/birt/3.7.1/'/>
-<child location='../../requirements/bpel/0.5.0-20110915-1141-H87/'/>
+<child location='../../requirements/bpel/0.8.0.v20111109-1901-H94-CI/'/>
<child location='../../requirements/ecf/3.5.2/'/>
<child location='../../requirements/eclipse/3.7.1/'/>
Modified: trunk/download.jboss.org/jbosstools/updates/requirements/bpel/build.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/bpel/build.xml 2011-11-10 07:34:19 UTC (rev 36264)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/bpel/build.xml 2011-11-10 07:34:31 UTC (rev 36265)
@@ -23,13 +23,13 @@
-->
<target name="mirror">
- <property name="URL1" value="http://download.eclipse.org/bpel/update-site/" />
+ <property name="URL1" value="http://download.eclipse.org/bpel/site/" />
<property name="URL2" value="https://hudson.eclipse.org/hudson/job/bpel-0.5/lastSuccessfulBuild/artifa..." />
<property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/bpel/" />
<property name="compress" value="true" />
<p2.mirror>
- <repository location="file:${destination}/0.5.0-20110915-1141-H87/" name="Eclipse BPEL for Eclipse 3.7 (Not in Indigo)" />
+ <repository location="file:${destination}/0.8.0.v20111109-1901-H94-CI/" name="Eclipse BPEL for Eclipse 3.7 (Not in Indigo)" />
<source>
<repository location="${URL1}" />
<repository location="${URL2}" />
@@ -39,9 +39,9 @@
</p2.mirror>
<delete>
- <fileset dir="${destination}/0.5.0-20110915-1141-H87/" includes="**/artifacts.jar, **/contents.jar"/>
+ <fileset dir="${destination}/0.8.0.v20111109-1901-H94-CI/" includes="**/artifacts.jar, **/contents.jar"/>
</delete>
- <p2.publish.featuresAndBundles metadataRepository="file:${destination}/0.5.0-20110915-1141-H87/" artifactRepository="file:${destination}/0.5.0-20110915-1141-H87/" publishartifacts="true" source="${destination}/0.5.0-20110915-1141-H87/" compress="${compress}" />
+ <p2.publish.featuresAndBundles metadataRepository="file:${destination}/0.8.0.v20111109-1901-H94-CI/" artifactRepository="file:${destination}/0.8.0.v20111109-1901-H94-CI/" publishartifacts="true" source="${destination}/0.8.0.v20111109-1901-H94-CI/" compress="${compress}" />
</target>
</project>
13 years, 1 month
JBoss Tools SVN: r36264 - trunk/build/aggregate/soa-site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-11-10 02:34:19 -0500 (Thu, 10 Nov 2011)
New Revision: 36264
Modified:
trunk/build/aggregate/soa-site/site.xml
Log:
JBIDE-10062 add BPEL back to JBT
Modified: trunk/build/aggregate/soa-site/site.xml
===================================================================
--- trunk/build/aggregate/soa-site/site.xml 2011-11-10 06:40:56 UTC (rev 36263)
+++ trunk/build/aggregate/soa-site/site.xml 2011-11-10 07:34:19 UTC (rev 36264)
@@ -19,9 +19,9 @@
<category name="AbridgedTools" />
<category name="SOATools" />
</feature>
- <!-- JBIDE-10062 REMOVE BPEL for M4 <feature url="features/org.jboss.tools.bpel.feature_0.0.0.jar" id="org.jboss.tools.bpel.feature" version="0.0.0">
+ <feature url="features/org.jboss.tools.bpel.feature_0.0.0.jar" id="org.jboss.tools.bpel.feature" version="0.0.0">
<category name="SOATools" />
- </feature> -->
+ </feature>
<!-- jBPM Tools & Flow features -->
<feature url="features/org.jboss.tools.jbpm.convert.feature_0.0.0.jar" id="org.jboss.tools.jbpm.convert.feature" version="0.0.0">
13 years, 1 month