JBoss Tools SVN: r18300 - in branches/jbosstools-3.1.0.M4/as/plugins: org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-10-26 20:04:29 -0400 (Mon, 26 Oct 2009)
New Revision: 18300
Modified:
branches/jbosstools-3.1.0.M4/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
branches/jbosstools-3.1.0.M4/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeJava6WizardFragment.java
branches/jbosstools-3.1.0.M4/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
Log:
JBIDE-5049 - committing to m4
Modified: branches/jbosstools-3.1.0.M4/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
===================================================================
--- branches/jbosstools-3.1.0.M4/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2009-10-26 23:26:52 UTC (rev 18299)
+++ branches/jbosstools-3.1.0.M4/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2009-10-27 00:04:29 UTC (rev 18300)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.core.server.internal;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -18,11 +20,14 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.IVMInstall2;
import org.eclipse.jdt.launching.IVMInstallType;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeType;
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.core.model.RuntimeDelegate;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
@@ -73,25 +78,6 @@
return Status.OK_STATUS;
}
- public IVMInstall getVM() {
- if (getVMInstallTypeId() == null) {
- return JavaRuntime.getDefaultVMInstall();
- }
- String id = getAttribute(PROPERTY_VM_ID, (String)null);
- String type = getAttribute(PROPERTY_VM_TYPE_ID, (String)null);
-
- IVMInstallType vmInstallType = JavaRuntime.getVMInstallType(type);
- IVMInstall[] vmInstalls = vmInstallType.getVMInstalls();
-
- for (int i = 0; i < vmInstalls.length; i++) {
- if (id.equals(vmInstalls[i].getId()))
- return vmInstalls[i];
- }
-
- // not found, return default vm
- return JavaRuntime.getDefaultVMInstall();
- }
-
public void setVM(IVMInstall selectedVM) {
if (selectedVM == null) {
setAttribute(IJBossServerRuntime.PROPERTY_VM_ID, (String) null);
@@ -168,4 +154,74 @@
return new Path(cl);
return getRuntime().getLocation().append(cl);
}
+
+ public IVMInstall getVM() {
+ if (getVMInstallTypeId() != null) {
+ String id = getAttribute(PROPERTY_VM_ID, (String) null);
+ String type = getAttribute(PROPERTY_VM_TYPE_ID, (String) null);
+ IVMInstallType vmInstallType = JavaRuntime.getVMInstallType(type);
+ IVMInstall[] vmInstalls = vmInstallType.getVMInstalls();
+ for (int i = 0; i < vmInstalls.length; i++) {
+ if (id.equals(vmInstalls[i].getId()))
+ return vmInstalls[i];
+ }
+ }
+
+ // not found, return default vm
+ return JavaRuntime.getDefaultVMInstall();
+ }
+
+ protected IVMInstall getDefaultVMInstall() {
+ IVMInstall install = JavaRuntime.getDefaultVMInstall();
+ if (install instanceof IVMInstall2) {
+ String version = ((IVMInstall2) install).getJavaVersion();
+ if (isValidJREVersion(version, getRuntime().getRuntimeType()))
+ return install;
+ }
+ ArrayList<IVMInstall> installs = getValidJREs(getRuntime()
+ .getRuntimeType());
+ Iterator<IVMInstall> i = installs.iterator();
+ while (i.hasNext()) {
+ IVMInstall next = i.next();
+ if (next instanceof IVMInstall2) {
+ String version = ((IVMInstall2) next).getJavaVersion();
+ if (isValidJREVersion(version, getRuntime().getRuntimeType()))
+ return next;
+ }
+ }
+ return null;
+ }
+
+ public static ArrayList<IVMInstall> getValidJREs(IRuntimeType type) {
+ ArrayList<IVMInstall> valid = new ArrayList<IVMInstall>();
+ IVMInstallType[] vmInstallTypes = JavaRuntime.getVMInstallTypes();
+ int size = vmInstallTypes.length;
+ for (int i = 0; i < size; i++) {
+ IVMInstall[] vmInstalls = vmInstallTypes[i].getVMInstalls();
+ int size2 = vmInstalls.length;
+ for (int j = 0; j < size2; j++) {
+ if (vmInstalls[j] instanceof IVMInstall2) {
+ String version = ((IVMInstall2) vmInstalls[j])
+ .getJavaVersion();
+ if (isValidJREVersion(version, type))
+ valid.add(vmInstalls[j]);
+ }
+ }
+ }
+ return valid;
+ }
+
+ public static boolean isValidJREVersion(String jreVersion,
+ IRuntimeType rtType) {
+ String id = rtType.getId();
+ String version = rtType.getVersion();
+ if (id.equals(IConstants.EAP_50) && version.equals(IConstants.V5_0)) {
+ return !jreVersion.startsWith(JavaCore.VERSION_1_1)
+ && !jreVersion.startsWith(JavaCore.VERSION_1_2)
+ && !jreVersion.startsWith(JavaCore.VERSION_1_3)
+ && !jreVersion.startsWith(JavaCore.VERSION_1_4)
+ && !jreVersion.startsWith(JavaCore.VERSION_1_5);
+ }
+ return true;
+ }
}
Modified: branches/jbosstools-3.1.0.M4/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeJava6WizardFragment.java
===================================================================
--- branches/jbosstools-3.1.0.M4/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeJava6WizardFragment.java 2009-10-26 23:26:52 UTC (rev 18299)
+++ branches/jbosstools-3.1.0.M4/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeJava6WizardFragment.java 2009-10-27 00:04:29 UTC (rev 18300)
@@ -23,11 +23,8 @@
import java.util.ArrayList;
-import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.IVMInstall2;
-import org.eclipse.jdt.launching.IVMInstallType;
-import org.eclipse.jdt.launching.JavaRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime;
import org.jboss.ide.eclipse.as.ui.Messages;
public class JBossRuntimeJava6WizardFragment extends JBossRuntimeWizardFragment {
@@ -40,31 +37,9 @@
}
protected ArrayList<IVMInstall> getValidJREs() {
- ArrayList<IVMInstall> valid = new ArrayList<IVMInstall>();
- IVMInstallType[] vmInstallTypes = JavaRuntime.getVMInstallTypes();
- int size = vmInstallTypes.length;
- for (int i = 0; i < size; i++) {
- IVMInstall[] vmInstalls = vmInstallTypes[i].getVMInstalls();
- int size2 = vmInstalls.length;
- for (int j = 0; j < size2; j++) {
- if( vmInstalls[j] instanceof IVMInstall2 ) {
- String version = ((IVMInstall2)vmInstalls[j]).getJavaVersion();
- if( isValidVersion(version))
- valid.add(vmInstalls[j]);
- }
- }
- }
- return valid;
+ return LocalJBossServerRuntime.getValidJREs(getRuntimeType());
}
- protected boolean isValidVersion(String version) {
- return !version.startsWith(JavaCore.VERSION_1_1) &&
- !version.startsWith(JavaCore.VERSION_1_2) &&
- !version.startsWith(JavaCore.VERSION_1_3) &&
- !version.startsWith(JavaCore.VERSION_1_4) &&
- !version.startsWith(JavaCore.VERSION_1_5);
- }
-
protected String getErrorString() {
if( !shouldIncludeDefaultJRE() && getValidJREs().size() == 0 )
return Messages.rwf_jre6NotFound;
Modified: branches/jbosstools-3.1.0.M4/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
===================================================================
--- branches/jbosstools-3.1.0.M4/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2009-10-26 23:26:52 UTC (rev 18299)
+++ branches/jbosstools-3.1.0.M4/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2009-10-27 00:04:29 UTC (rev 18300)
@@ -72,6 +72,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeType;
import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.core.TaskModel;
@@ -194,7 +195,7 @@
configurations.setConfiguration(rt.getJBossConfiguration() == null
? IConstants.DEFAULT_CONFIGURATION : rt.getJBossConfiguration());
- if (rt.isUsingDefaultJRE()) {
+ if (rt.isUsingDefaultJRE() && shouldIncludeDefaultJRE()) {
jreCombo.select(0);
} else {
IVMInstall install = rt.getVM();
@@ -209,6 +210,8 @@
homeDirText.setEditable(canEdit);
homeDirButton.setEnabled(canEdit);
configurations.getTable().setVisible(canEdit);
+ if( jreCombo.getSelectionIndex() < 0 && jreCombo.getItemCount() > 0)
+ jreCombo.select(0);
}
}
@@ -551,8 +554,9 @@
configurations.setConfiguration(IJBossServerConstants.DEFAULT_CONFIGURATION);
int sel = jreCombo.getSelectionIndex();
- if (sel > 0)
- selectedVM = installedJREs.get(sel-1);
+ int offset = shouldIncludeDefaultJRE() ? -1 : 0;
+ if( sel + offset > -1 )
+ selectedVM = installedJREs.get(sel+offset);
else
selectedVM = null;
configDirTextVal = configDirText.getText();
@@ -912,4 +916,9 @@
return newConfig;
}
}
+ public IRuntimeType getRuntimeType() {
+ IRuntime r = (IRuntime) getTaskModel().getObject(TaskModel.TASK_RUNTIME);
+ return r.getRuntimeType();
+ }
+
}
14 years, 7 months
JBoss Tools SVN: r18299 - in trunk/as/plugins: org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-10-26 19:26:52 -0400 (Mon, 26 Oct 2009)
New Revision: 18299
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeJava6WizardFragment.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
Log:
JBIDE-5049 - committing to head
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2009-10-26 21:24:26 UTC (rev 18298)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2009-10-26 23:26:52 UTC (rev 18299)
@@ -10,7 +10,9 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.core.server.internal;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -18,11 +20,14 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.launching.IVMInstall;
+import org.eclipse.jdt.launching.IVMInstall2;
import org.eclipse.jdt.launching.IVMInstallType;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeType;
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.core.model.RuntimeDelegate;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
@@ -74,22 +79,20 @@
}
public IVMInstall getVM() {
- if (getVMInstallTypeId() == null) {
- return JavaRuntime.getDefaultVMInstall();
- }
- String id = getAttribute(PROPERTY_VM_ID, (String)null);
- String type = getAttribute(PROPERTY_VM_TYPE_ID, (String)null);
+ if (getVMInstallTypeId() != null) {
+ String id = getAttribute(PROPERTY_VM_ID, (String)null);
+ String type = getAttribute(PROPERTY_VM_TYPE_ID, (String)null);
- IVMInstallType vmInstallType = JavaRuntime.getVMInstallType(type);
- IVMInstall[] vmInstalls = vmInstallType.getVMInstalls();
+ IVMInstallType vmInstallType = JavaRuntime.getVMInstallType(type);
+ IVMInstall[] vmInstalls = vmInstallType.getVMInstalls();
- for (int i = 0; i < vmInstalls.length; i++) {
- if (id.equals(vmInstalls[i].getId()))
- return vmInstalls[i];
+ for (int i = 0; i < vmInstalls.length; i++) {
+ if (id.equals(vmInstalls[i].getId()))
+ return vmInstalls[i];
+ }
}
-
// not found, return default vm
- return JavaRuntime.getDefaultVMInstall();
+ return getDefaultVMInstall();
}
public void setVM(IVMInstall selectedVM) {
@@ -168,4 +171,55 @@
return new Path(cl);
return getRuntime().getLocation().append(cl);
}
+
+ protected IVMInstall getDefaultVMInstall() {
+ IVMInstall install = JavaRuntime.getDefaultVMInstall();
+ if( install instanceof IVMInstall2 ) {
+ String version = ((IVMInstall2)install).getJavaVersion();
+ if( isValidJREVersion(version, getRuntime().getRuntimeType()))
+ return install;
+ }
+ ArrayList<IVMInstall> installs = getValidJREs(getRuntime().getRuntimeType());
+ Iterator<IVMInstall> i = installs.iterator();
+ while(i.hasNext()) {
+ IVMInstall next = i.next();
+ if( next instanceof IVMInstall2 ) {
+ String version = ((IVMInstall2)next).getJavaVersion();
+ if( isValidJREVersion(version, getRuntime().getRuntimeType()))
+ return next;
+ }
+ }
+ return null;
+ }
+
+ public static ArrayList<IVMInstall> getValidJREs(IRuntimeType type) {
+ ArrayList<IVMInstall> valid = new ArrayList<IVMInstall>();
+ IVMInstallType[] vmInstallTypes = JavaRuntime.getVMInstallTypes();
+ int size = vmInstallTypes.length;
+ for (int i = 0; i < size; i++) {
+ IVMInstall[] vmInstalls = vmInstallTypes[i].getVMInstalls();
+ int size2 = vmInstalls.length;
+ for (int j = 0; j < size2; j++) {
+ if( vmInstalls[j] instanceof IVMInstall2 ) {
+ String version = ((IVMInstall2)vmInstalls[j]).getJavaVersion();
+ if( isValidJREVersion(version, type))
+ valid.add(vmInstalls[j]);
+ }
+ }
+ }
+ return valid;
+ }
+
+ public static boolean isValidJREVersion(String jreVersion, IRuntimeType rtType) {
+ String id = rtType.getId();
+ String version = rtType.getVersion();
+ if( id.equals(IConstants.EAP_50) && version.equals(IConstants.V5_0)) {
+ return !jreVersion.startsWith(JavaCore.VERSION_1_1) &&
+ !jreVersion.startsWith(JavaCore.VERSION_1_2) &&
+ !jreVersion.startsWith(JavaCore.VERSION_1_3) &&
+ !jreVersion.startsWith(JavaCore.VERSION_1_4) &&
+ !jreVersion.startsWith(JavaCore.VERSION_1_5);
+ }
+ return true;
+ }
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeJava6WizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeJava6WizardFragment.java 2009-10-26 21:24:26 UTC (rev 18298)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeJava6WizardFragment.java 2009-10-26 23:26:52 UTC (rev 18299)
@@ -28,6 +28,7 @@
import org.eclipse.jdt.launching.IVMInstall2;
import org.eclipse.jdt.launching.IVMInstallType;
import org.eclipse.jdt.launching.JavaRuntime;
+import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossServerRuntime;
import org.jboss.ide.eclipse.as.ui.Messages;
public class JBossRuntimeJava6WizardFragment extends JBossRuntimeWizardFragment {
@@ -40,31 +41,9 @@
}
protected ArrayList<IVMInstall> getValidJREs() {
- ArrayList<IVMInstall> valid = new ArrayList<IVMInstall>();
- IVMInstallType[] vmInstallTypes = JavaRuntime.getVMInstallTypes();
- int size = vmInstallTypes.length;
- for (int i = 0; i < size; i++) {
- IVMInstall[] vmInstalls = vmInstallTypes[i].getVMInstalls();
- int size2 = vmInstalls.length;
- for (int j = 0; j < size2; j++) {
- if( vmInstalls[j] instanceof IVMInstall2 ) {
- String version = ((IVMInstall2)vmInstalls[j]).getJavaVersion();
- if( isValidVersion(version))
- valid.add(vmInstalls[j]);
- }
- }
- }
- return valid;
+ return LocalJBossServerRuntime.getValidJREs(getRuntimeType());
}
- protected boolean isValidVersion(String version) {
- return !version.startsWith(JavaCore.VERSION_1_1) &&
- !version.startsWith(JavaCore.VERSION_1_2) &&
- !version.startsWith(JavaCore.VERSION_1_3) &&
- !version.startsWith(JavaCore.VERSION_1_4) &&
- !version.startsWith(JavaCore.VERSION_1_5);
- }
-
protected String getErrorString() {
if( !shouldIncludeDefaultJRE() && getValidJREs().size() == 0 )
return Messages.rwf_jre6NotFound;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2009-10-26 21:24:26 UTC (rev 18298)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2009-10-26 23:26:52 UTC (rev 18299)
@@ -72,6 +72,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeType;
import org.eclipse.wst.server.core.IRuntimeWorkingCopy;
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.core.TaskModel;
@@ -194,7 +195,7 @@
configurations.setConfiguration(rt.getJBossConfiguration() == null
? IConstants.DEFAULT_CONFIGURATION : rt.getJBossConfiguration());
- if (rt.isUsingDefaultJRE()) {
+ if (rt.isUsingDefaultJRE() && shouldIncludeDefaultJRE()) {
jreCombo.select(0);
} else {
IVMInstall install = rt.getVM();
@@ -209,6 +210,8 @@
homeDirText.setEditable(canEdit);
homeDirButton.setEnabled(canEdit);
configurations.getTable().setVisible(canEdit);
+ if( jreCombo.getSelectionIndex() < 0 && jreCombo.getItemCount() > 0)
+ jreCombo.select(0);
}
}
@@ -551,9 +554,13 @@
configurations.setConfiguration(IJBossServerConstants.DEFAULT_CONFIGURATION);
int sel = jreCombo.getSelectionIndex();
- if (sel > 0)
- selectedVM = installedJREs.get(sel-1);
- else
+ int offset = 0;
+ if( shouldIncludeDefaultJRE() ) {
+ offset = -1;
+ }
+ if( sel >= 0 )
+ selectedVM = installedJREs.get(sel + offset);
+ else
selectedVM = null;
configDirTextVal = configDirText.getText();
updateErrorMessage();
@@ -912,4 +919,9 @@
return newConfig;
}
}
+
+ public IRuntimeType getRuntimeType() {
+ IRuntime r = (IRuntime) getTaskModel().getObject(TaskModel.TASK_RUNTIME);
+ return r.getRuntimeType();
+ }
}
14 years, 7 months
JBoss Tools SVN: r18298 - trunk/as/features/org.jboss.ide.eclipse.as.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-10-26 17:24:26 -0400 (Mon, 26 Oct 2009)
New Revision: 18298
Modified:
trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-5073
Modified: trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml
===================================================================
--- trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml 2009-10-26 21:24:10 UTC (rev 18297)
+++ trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml 2009-10-26 21:24:26 UTC (rev 18298)
@@ -141,4 +141,11 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.jboss.ide.eclipse.as.ssh"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
14 years, 7 months
JBoss Tools SVN: r18296 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml: src/org/jboss/tools/hibernate/xml/model and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-10-26 08:36:42 -0400 (Mon, 26 Oct 2009)
New Revision: 18296
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/meta/hibernate-configuration-2.0.dtd
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateConstants.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateRecognizer.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5084
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/meta/hibernate-configuration-2.0.dtd
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/meta/hibernate-configuration-2.0.dtd (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/meta/hibernate-configuration-2.0.dtd 2009-10-26 12:36:42 UTC (rev 18296)
@@ -0,0 +1,44 @@
+<!-- Hibernate file-based configuration document.
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 2.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
+
+An instance of this document contains property settings and references
+to mapping files for a number of SessionFactory instances to be listed
+in JNDI.
+
+-->
+
+<!ELEMENT hibernate-configuration (session-factory)>
+
+<!ELEMENT property (#PCDATA)>
+<!ATTLIST property name CDATA #REQUIRED>
+
+<!ELEMENT mapping EMPTY> <!-- reference to a mapping file -->
+<!ATTLIST mapping resource CDATA #IMPLIED>
+<!ATTLIST mapping file CDATA #IMPLIED>
+<!ATTLIST mapping jar CDATA #IMPLIED>
+
+<!ELEMENT jcs-class-cache EMPTY> <!-- deprecated -->
+<!ATTLIST jcs-class-cache class CDATA #REQUIRED>
+<!ATTLIST jcs-class-cache region CDATA #IMPLIED>
+<!ATTLIST jcs-class-cache usage (read-only|read-write|nonstrict-read-write) #REQUIRED>
+
+<!ELEMENT jcs-collection-cache EMPTY> <!-- deprecated -->
+<!ATTLIST jcs-collection-cache collection CDATA #REQUIRED>
+<!ATTLIST jcs-collection-cache region CDATA #IMPLIED>
+<!ATTLIST jcs-collection-cache usage (read-only|read-write|nonstrict-read-write|transactional) #REQUIRED>
+
+<!ELEMENT class-cache EMPTY>
+<!ATTLIST class-cache class CDATA #REQUIRED>
+<!ATTLIST class-cache region CDATA #IMPLIED>
+<!ATTLIST class-cache usage (read-only|read-write|nonstrict-read-write|transactional) #REQUIRED>
+
+<!ELEMENT collection-cache EMPTY>
+<!ATTLIST collection-cache collection CDATA #REQUIRED>
+<!ATTLIST collection-cache region CDATA #IMPLIED>
+<!ATTLIST collection-cache usage (read-only|read-write|nonstrict-read-write|transactional) #REQUIRED>
+
+<!ELEMENT session-factory (property*, mapping+, (class-cache|collection-cache|jcs-class-cache|jcs-collection-cache)*)>
+<!ATTLIST session-factory name CDATA #IMPLIED> <!-- the JNDI name -->
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/resources/meta/hibernate-configuration-2.0.dtd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateConstants.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateConstants.java 2009-10-26 10:38:34 UTC (rev 18295)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateConstants.java 2009-10-26 12:36:42 UTC (rev 18296)
@@ -18,6 +18,9 @@
public static String CFG_DOC_PUBLICID_3_0 = "-//Hibernate/Hibernate Configuration DTD 3.0//EN"; //$NON-NLS-1$
public static String CFG_DOC_SYSTEMID_3_0 = "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"; //$NON-NLS-1$
+ public static String CFG_DOC_PUBLICID_2_0 = "-//Hibernate/Hibernate Configuration DTD 2.0//EN"; //$NON-NLS-1$
+ public static String CFG_DOC_SYSTEMID_2_0 = "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"; //$NON-NLS-1$
+
public static String RVE_DOC_PUBLICID_3_0 = "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN"; //$NON-NLS-1$
public static String RVE_DOC_SYSTEMID_3_0 = "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd"; //$NON-NLS-1$
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateRecognizer.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateRecognizer.java 2009-10-26 10:38:34 UTC (rev 18295)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml/src/org/jboss/tools/hibernate/xml/model/HibernateRecognizer.java 2009-10-26 12:36:42 UTC (rev 18296)
@@ -28,6 +28,12 @@
XMLEntityResolver.registerSystemEntity(
HibernateConstants.CFG_DOC_SYSTEMID_3_0, HibernateRecognizer.class, "/meta/hibernate-configuration-3.0.dtd" //$NON-NLS-1$
);
+ XMLEntityResolver.registerPublicEntity(
+ HibernateConstants.CFG_DOC_PUBLICID_2_0, HibernateRecognizer.class, "/meta/hibernate-configuration-2.0.dtd" //$NON-NLS-1$
+ );
+ XMLEntityResolver.registerSystemEntity(
+ HibernateConstants.CFG_DOC_SYSTEMID_2_0, HibernateRecognizer.class, "/meta/hibernate-configuration-2.0.dtd" //$NON-NLS-1$
+ );
} catch (Exception e) {}
}
@@ -38,6 +44,9 @@
|| body.indexOf("\"" + HibernateConstants.DOC_SYSTEMID_3_0 + "\"") >= 0) ? HibernateConstants.ENTITY_FILE_HIBERNATE_3_0 //$NON-NLS-1$ //$NON-NLS-2$
: (body.indexOf("\"" + HibernateConstants.CFG_DOC_PUBLICID_3_0 + "\"") >= 0 //$NON-NLS-1$ //$NON-NLS-2$
|| body.indexOf("\"" + HibernateConstants.CFG_DOC_SYSTEMID_3_0 + "\"") >= 0) ? HibernateConstants.ENTITY_FILE_HIB_CONFIG_3_0 //$NON-NLS-1$ //$NON-NLS-2$
+ //we do not support cfg 2.0 but let's try and do the best
+ : (body.indexOf("\"" + HibernateConstants.CFG_DOC_PUBLICID_2_0 + "\"") >= 0 //$NON-NLS-1$ //$NON-NLS-2$
+ || body.indexOf("\"" + HibernateConstants.CFG_DOC_SYSTEMID_2_0 + "\"") >= 0) ? HibernateConstants.ENTITY_FILE_HIB_CONFIG_3_0 //$NON-NLS-1$ //$NON-NLS-2$
: (body.indexOf("\"" + HibernateConstants.RVE_DOC_PUBLICID_3_0 + "\"") >= 0 //$NON-NLS-1$ //$NON-NLS-2$
|| body.indexOf("\"" + HibernateConstants.RVE_DOC_SYSTEMID_3_0 + "\"") >= 0) ? HibernateConstants.ENTITY_FILE_HIB_REV_ENG_3_0 //$NON-NLS-1$ //$NON-NLS-2$
: null;
14 years, 7 months
JBoss Tools SVN: r18295 - in trunk/hibernatetools/plugins: org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-10-26 06:38:34 -0400 (Mon, 26 Oct 2009)
New Revision: 18295
Added:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Index.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/IndexHolder.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/IndexImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaBasicMapping.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/IndexAnnotation.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/IndexAnnotationImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/IndexHolderComposite.java
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaAnnotationDefinitionProvider.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaFactory.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/Hibernate.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaBasicMappingImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMappingImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateBasicMappingComposite.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateIdMappingComposite.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateUIMappingMessages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/messages.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-4666
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaAnnotationDefinitionProvider.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaAnnotationDefinitionProvider.java 2009-10-26 08:39:52 UTC (rev 18294)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaAnnotationDefinitionProvider.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -22,6 +22,7 @@
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.DiscriminatorFormulaAnnotationImpl.DiscriminatorFormulaAnnotationDefinition;
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.GeneratedAnnotationImpl.GeneratedAnnotationDefinition;
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.GenericGeneratorAnnotationImpl.GenericGeneratorAnnotationDefinition;
+import org.jboss.tools.hibernate.jpt.core.internal.resource.java.IndexAnnotationImpl.IndexAnnotationDefinition;
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.SourceGenericGeneratorsAnnotation.GenericGeneratorsAnnotationDefinition;
/**
@@ -70,5 +71,6 @@
protected void addAttributeSupportingAnnotationDefinitionsTo(List<AnnotationDefinition> definitions) {
definitions.add(GenericGeneratorAnnotationDefinition.instance());
definitions.add(GeneratedAnnotationDefinition.instance());
+ definitions.add(IndexAnnotationDefinition.instance());
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaFactory.java 2009-10-26 08:39:52 UTC (rev 18294)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/HibernateJpaFactory.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -61,6 +61,8 @@
import org.jboss.tools.hibernate.jpt.core.internal.context.HibernateNamedNativeQuery;
import org.jboss.tools.hibernate.jpt.core.internal.context.HibernateNamedQuery;
import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnit;
+import org.jboss.tools.hibernate.jpt.core.internal.context.Index;
+import org.jboss.tools.hibernate.jpt.core.internal.context.IndexImpl;
import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaBasicMappingImpl;
import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaColumnImpl;
import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaDiscriminatorColumnImpl;
@@ -276,4 +278,8 @@
return new HibernateOrmOneToOneMapping(parent, resourceMapping);
}
+ public Index buildIndex(JavaJpaContextNode parent) {
+ return new IndexImpl(parent);
+ }
+
}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Index.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Index.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Index.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.hibernate.jpt.core.internal.context;
+
+import org.eclipse.jpt.core.context.JpaContextNode;
+import org.jboss.tools.hibernate.jpt.core.internal.resource.java.IndexAnnotation;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public interface Index extends JpaContextNode {
+
+ String getName();
+ void setName(String name);
+ String INDEX_NAME = "name"; //$NON-NLS-1$
+
+ String[] getColumnNames();
+ void addColumn(String columnName);
+ void removeColumn(String columnName);
+ String INDEX_COLUMN_NAMES = "ColumnNames"; //$NON-NLS-1$
+
+
+ public void initialize(IndexAnnotation indexResource);
+
+ public void update(IndexAnnotation indexResource);
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Index.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/IndexHolder.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/IndexHolder.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/IndexHolder.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.hibernate.jpt.core.internal.context;
+
+import org.eclipse.jpt.core.context.JpaContextNode;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public interface IndexHolder extends JpaContextNode {
+
+ //******************** index *****************
+
+ String INDEX_PROPERTY = "index"; //$NON-NLS-1$
+
+ Index getIndex();
+
+ Index addIndex();
+
+ void removeIndex();
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/IndexHolder.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/IndexImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/IndexImpl.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/IndexImpl.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.hibernate.jpt.core.internal.context;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
+import org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.jboss.tools.hibernate.jpt.core.internal.resource.java.IndexAnnotation;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class IndexImpl extends AbstractJavaJpaContextNode implements Index {
+
+ private IndexAnnotation indexResource;
+
+ private String name;
+
+ private String[] columnNames = new String[0];
+
+ public IndexImpl(JavaJpaContextNode parent) {
+ super(parent);
+ }
+
+ public void initialize(IndexAnnotation indexResource) {
+ this.indexResource = indexResource;
+ this.name = indexResource.getName();
+ this.columnNames = indexResource.getColumnNames();
+ }
+
+ public void update(IndexAnnotation indexResource) {
+ this.indexResource = indexResource;
+ this.setName_(indexResource.getName());
+ this.setColumnNames_(indexResource.getColumnNames());
+ }
+
+ // ***** name
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ String old = this.name;
+ this.name = name;
+ this.getResourceIndex().setName(name);
+ this.firePropertyChanged(INDEX_NAME, old, name);
+ }
+
+ public void setName_(String name) {
+ String old = this.name;
+ this.name = name;
+ this.firePropertyChanged(INDEX_NAME, old, name);
+ }
+
+ // ***** columnNames
+
+ public String[] getColumnNames() {
+ return columnNames;
+ }
+
+ public void setColumnNames(String[] columnNames) {
+ if (columnNames == null) columnNames = new String[0];
+ String[] old = this.columnNames;
+ this.columnNames = columnNames;
+ this.getResourceIndex().setColumnNames(columnNames);
+ this.firePropertyChanged(INDEX_COLUMN_NAMES, old, columnNames);
+ }
+
+ public void setColumnNames_(String[] columnNames) {
+ String[] old = this.columnNames;
+ this.columnNames = columnNames;
+ this.firePropertyChanged(INDEX_COLUMN_NAMES, old, columnNames);
+ }
+
+ private IndexAnnotation getResourceIndex() {
+ return indexResource;
+ }
+
+ public TextRange getValidationTextRange(CompilationUnit astRoot) {
+ return this.indexResource.getTextRange(astRoot);
+ }
+
+ public void addColumn(String columnName) {
+ String[] old = this.columnNames;
+ String[] newColumns = new String[old.length + 1];
+ System.arraycopy(old, 0, newColumns, 0, old.length);
+ newColumns[newColumns.length - 1] = columnName;
+ this.setColumnNames(newColumns);
+ }
+
+ public void removeColumn(String columnName) {
+ String[] old = this.columnNames;
+ List<String> newColumns = new ArrayList<String>();
+ for (String column : old) {
+ if (!column.equals(columnName)) newColumns.add(column);
+ }
+ this.setColumnNames(newColumns.toArray(new String[newColumns.size()]));
+ }
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/IndexImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/Hibernate.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/Hibernate.java 2009-10-26 08:39:52 UTC (rev 18294)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/basic/Hibernate.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -15,11 +15,11 @@
*
*/
public interface Hibernate {
-
+
// Hibernate package
String PACKAGE = "org.hibernate.annotations"; //$NON-NLS-1$
String PACKAGE_ = PACKAGE + "."; //$NON-NLS-1$
-
+
// ********** API **********
// Hibernate annotations
@@ -27,14 +27,14 @@
String GENERIC_GENERATOR__NAME = "name"; //$NON-NLS-1$
String GENERIC_GENERATOR__STRATEGY = "strategy"; //$NON-NLS-1$
String GENERIC_GENERATOR__PARAMETERS = "parameters"; //$NON-NLS-1$
-
+
String GENERATOR_PARAMETER = PACKAGE_ + "Parameter"; //$NON-NLS-1$
String GENERATOR_PARAMETER__NAME = "name"; //$NON-NLS-1$
String GENERATOR_PARAMETER__VALUE = "value"; //$NON-NLS-1$
-
+
String GENERIC_GENERATORS = PACKAGE_ + "GenericGenerators"; //$NON-NLS-1$
String GENERIC_GENERATORS__VALUE = "value"; //$NON-NLS-1$
-
+
String NAMED_QUERY = PACKAGE_ + "NamedQuery"; //$NON-NLS-1$
String NAMED_QUERY__NAME = "name"; //$NON-NLS-1$
String NAMED_QUERY__QUERY = "query"; //$NON-NLS-1$
@@ -47,10 +47,10 @@
String NAMED_QUERY__TIMEOUT = "timeout"; //$NON-NLS-1$
String NAMED_QUERY__COMMENT = "comment"; //$NON-NLS-1$
String NAMED_QUERY__READ_ONLY = "readOnly"; //$NON-NLS-1$
-
+
String NAMED_QUERIES = PACKAGE_ + "NamedQueries"; //$NON-NLS-1$
String NAMED_QUERIES__VALUE = "value"; //$NON-NLS-1$
-
+
String NAMED_NATIVE_QUERY = PACKAGE_ + "NamedNativeQuery"; //$NON-NLS-1$
String NAMED_NATIVE_QUERY__NAME = "name"; //$NON-NLS-1$
String NAMED_NATIVE_QUERY__QUERY = "query"; //$NON-NLS-1$
@@ -66,7 +66,7 @@
String NAMED_NATIVE_QUERY__RESULT_CLASS = "resultClass"; //$NON-NLS-1$
String NAMED_NATIVE_QUERY__RESULT_SET_MAPPING = "resultSetMapping"; //$NON-NLS-1$
String NAMED_NATIVE_QUERY__CALLABLE = "callable"; //$NON-NLS-1$
-
+
String NAMED_NATIVE_QUERIES = PACKAGE_ + "NamedNativeQueries"; //$NON-NLS-1$
String NAMED_NATIVE_QUERIES__VALUE = "value"; //$NON-NLS-1$
@@ -77,7 +77,7 @@
String FLUSH_MODE_TYPE__COMMIT = FLUSH_MODE_TYPE_ + "COMMIT"; //$NON-NLS-1$
String FLUSH_MODE_TYPE__NEVER = FLUSH_MODE_TYPE_ + "NEVER"; //$NON-NLS-1$
String FLUSH_MODE_TYPE__MANUAL = FLUSH_MODE_TYPE_ + "MANUAL"; //$NON-NLS-1$
-
+
String CACHE_MODE_TYPE = PACKAGE_ + "CacheModeType"; //$NON-NLS-1$
String CACHE_MODE_TYPE_ = CACHE_MODE_TYPE + '.';
String CACHE_MODE_TYPE__GET = CACHE_MODE_TYPE_ + "GET"; //$NON-NLS-1$
@@ -88,14 +88,18 @@
String DISCRIMINATOR_FORMULA = PACKAGE_ + "DiscriminatorFormula"; //$NON-NLS-1$
String DISCRIMINATOR_FORMULA__VALUE = "value"; //$NON-NLS-1$
-
+
String GENERATED = PACKAGE_ + "Generated"; //$NON-NLS-1$
String GENERATED__VALUE = "value"; //$NON-NLS-1$
-
+
String GENERATION_TIME = PACKAGE_ + "GenerationTime"; //$NON-NLS-1$
String GENERATION_TIME_ = GENERATION_TIME + '.';
String GENERATION_TIME__NEVER = GENERATION_TIME_ + "NEVER"; //$NON-NLS-1$
String GENERATION_TIME__INSERT = GENERATION_TIME_ + "INSERT"; //$NON-NLS-1$
String GENERATION_TIME__ALWAYS = GENERATION_TIME_ + "ALWAYS"; //$NON-NLS-1$
+
+ String INDEX = PACKAGE_ + "Index"; //$NON-NLS-1$
+ String INDEX__NAME = "name"; //$NON-NLS-1$
+ String INDEX__COLUMN_NAMES = "columnNames"; //$NON-NLS-1$
}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaBasicMapping.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaBasicMapping.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaBasicMapping.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.hibernate.jpt.core.internal.context.java;
+
+import org.eclipse.jpt.core.context.java.JavaBasicMapping;
+import org.jboss.tools.hibernate.jpt.core.internal.context.Generated;
+import org.jboss.tools.hibernate.jpt.core.internal.context.IndexHolder;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public interface HibernateJavaBasicMapping extends JavaBasicMapping, Generated, IndexHolder {
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaBasicMapping.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaBasicMappingImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaBasicMappingImpl.java 2009-10-26 08:39:52 UTC (rev 18294)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaBasicMappingImpl.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -17,19 +17,24 @@
import org.eclipse.jpt.core.internal.context.java.AbstractJavaBasicMapping;
import org.eclipse.jpt.core.resource.java.JPA;
import org.eclipse.jpt.utility.internal.iterators.ArrayIterator;
+import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaFactory;
import org.jboss.tools.hibernate.jpt.core.internal.context.Generated;
import org.jboss.tools.hibernate.jpt.core.internal.context.GenerationTime;
+import org.jboss.tools.hibernate.jpt.core.internal.context.Index;
import org.jboss.tools.hibernate.jpt.core.internal.context.basic.Hibernate;
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.GeneratedAnnotation;
+import org.jboss.tools.hibernate.jpt.core.internal.resource.java.IndexAnnotation;
/**
* @author Dmitry Geraskov
*
*/
public class HibernateJavaBasicMappingImpl extends AbstractJavaBasicMapping
-implements Generated {
+implements HibernateJavaBasicMapping {
protected GenerationTime specifiedGenerationTime;
+
+ protected Index index;
public HibernateJavaBasicMappingImpl(JavaPersistentAttribute parent) {
super(parent);
@@ -41,15 +46,29 @@
JPA.LOB,
JPA.TEMPORAL,
JPA.ENUMERATED,
- Hibernate.GENERATED);
+ Hibernate.GENERATED,
+ Hibernate.INDEX);
}
@Override
+ protected HibernateJpaFactory getJpaFactory() {
+ return (HibernateJpaFactory) super.getJpaFactory();
+ }
+
+ @Override
protected void initialize() {
super.initialize();
this.specifiedGenerationTime = this.getResourceGenerationTime();
+ this.initializeIndex();
}
+ @Override
+ protected void update() {
+ super.update();
+ this.setGenerationTime_(this.getResourceGenerationTime());
+ this.updateIndex();
+ }
+
public GeneratedAnnotation getResourceGenerated() {
return (GeneratedAnnotation) getResourcePersistentAttribute().getSupportingAnnotation(GeneratedAnnotation.ANNOTATION_NAME);
}
@@ -90,11 +109,78 @@
this.specifiedGenerationTime = newGenerationTime;
firePropertyChanged(Generated.GENERATION_TIME_PROPERTY, oldValue, newGenerationTime);
}
+
+
- @Override
- protected void update() {
- super.update();
- this.setGenerationTime_(this.getResourceGenerationTime());
+ public void removeResourceIndex() {
+ getResourcePersistentAttribute().removeSupportingAnnotation(IndexAnnotation.ANNOTATION_NAME);
}
+ // *** index
+
+ protected void initializeIndex() {
+ IndexAnnotation indexResource = getResourceIndex();
+ if (indexResource != null) {
+ this.index = buildIndex(indexResource);
+ }
+ }
+
+ protected void updateIndex() {
+ IndexAnnotation indexResource = getResourceIndex();
+ if (indexResource == null) {
+ if (getIndex() != null) {
+ setIndex(null);
+ }
+ }
+ else {
+ if (getIndex() == null) {
+ setIndex(buildIndex(indexResource));
+ }
+ else {
+ getIndex().update(indexResource);
+ }
+ }
+ }
+
+ public Index addIndex() {
+ if (getIndex() != null) {
+ throw new IllegalStateException("index already exists"); //$NON-NLS-1$
+ }
+ this.index = getJpaFactory().buildIndex(this);
+ IndexAnnotation indexResource = (IndexAnnotation) getResourcePersistentAttribute().addSupportingAnnotation(IndexAnnotation.ANNOTATION_NAME);
+ this.index.initialize(indexResource);
+ firePropertyChanged(INDEX_PROPERTY, null, this.index);
+ return this.index;
+ }
+
+ public Index getIndex() {
+ return this.index;
+ }
+
+ protected void setIndex(Index newIndex) {
+ Index oldIndex = this.index;
+ this.index = newIndex;
+ firePropertyChanged(INDEX_PROPERTY, oldIndex, newIndex);
+ }
+
+ public void removeIndex() {
+ if (getIndex() == null) {
+ throw new IllegalStateException("index does not exist, cannot be removed"); //$NON-NLS-1$
+ }
+ Index oldIndex = this.index;
+ this.index = null;
+ this.getResourcePersistentAttribute().removeSupportingAnnotation(IndexAnnotation.ANNOTATION_NAME);
+ firePropertyChanged(INDEX_PROPERTY, oldIndex, null);
+ }
+
+ protected Index buildIndex(IndexAnnotation indexResource) {
+ Index index = getJpaFactory().buildIndex(this);
+ index.initialize(indexResource);
+ return index;
+ }
+
+ protected IndexAnnotation getResourceIndex() {
+ return (IndexAnnotation) this.getResourcePersistentAttribute().getSupportingAnnotation(IndexAnnotation.ANNOTATION_NAME);
+ }
+
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java 2009-10-26 08:39:52 UTC (rev 18294)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -13,6 +13,7 @@
import org.eclipse.jpt.core.context.java.JavaIdMapping;
import org.jboss.tools.hibernate.jpt.core.internal.context.GenericGeneratorHolder;
+import org.jboss.tools.hibernate.jpt.core.internal.context.IndexHolder;
import org.jboss.tools.hibernate.jpt.core.internal.context.basic.HibernateIdMapping;
/**
@@ -20,6 +21,6 @@
*
*/
public interface HibernateJavaIdMapping extends HibernateIdMapping,
- JavaIdMapping, GenericGeneratorHolder {
+ JavaIdMapping, GenericGeneratorHolder, IndexHolder {
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMappingImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMappingImpl.java 2009-10-26 08:39:52 UTC (rev 18294)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMappingImpl.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -27,9 +27,11 @@
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaFactory;
-import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaProject;
import org.jboss.tools.hibernate.jpt.core.internal.context.GenericGenerator;
+import org.jboss.tools.hibernate.jpt.core.internal.context.Index;
+import org.jboss.tools.hibernate.jpt.core.internal.context.basic.Hibernate;
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.GenericGeneratorAnnotation;
+import org.jboss.tools.hibernate.jpt.core.internal.resource.java.IndexAnnotation;
/**
* @author Dmitry Geraskov
@@ -40,20 +42,41 @@
protected JavaGenericGenerator genericGenerator;
+ protected Index index;
+
/**
* @param parent
*/
public HibernateJavaIdMappingImpl(JavaPersistentAttribute parent) {
super(parent);
}
-
+
@Override
+ public Iterator<String> supportingAnnotationNames() {
+ return new CompositeIterator<String>(super.supportingAnnotationNames(),
+ Hibernate.INDEX);
+ }
+
+ @Override
+ protected HibernateJpaFactory getJpaFactory() {
+ return (HibernateJpaFactory) super.getJpaFactory();
+ }
+
+ @Override
protected void initialize() {
super.initialize();
this.initializeGenericGenerator();
+ this.initializeIndex();
}
@Override
+ public void update() {
+ super.update();
+ updateGenericGenerator();
+ this.updateIndex();
+ }
+
+ @Override
public HibernateJavaColumn getColumn() {
return (HibernateJavaColumn) column;
}
@@ -119,12 +142,6 @@
firePropertyChanged(GENERIC_GENERATORS_LIST, oldGenericGenerator, newGenericGenerator);
}
- @Override
- public void update() {
- super.update();
- updateGenericGenerator();
- }
-
protected void updateGenericGenerator() {
GenericGeneratorAnnotation genericGeneratorResource = getResourceGenericGenerator();
if (genericGeneratorResource == null) {
@@ -196,9 +213,71 @@
}
}
- @Override
- public HibernateJpaProject getJpaProject() {
- return (HibernateJpaProject) super.getJpaProject();
+ // *** index
+
+ protected void initializeIndex() {
+ IndexAnnotation indexResource = getResourceIndex();
+ if (indexResource != null) {
+ this.index = buildIndex(indexResource);
+ }
}
+
+ protected void updateIndex() {
+ IndexAnnotation indexResource = getResourceIndex();
+ if (indexResource == null) {
+ if (getIndex() != null) {
+ setIndex(null);
+ }
+ }
+ else {
+ if (getIndex() == null) {
+ setIndex(buildIndex(indexResource));
+ }
+ else {
+ getIndex().update(indexResource);
+ }
+ }
+ }
+
+ public Index addIndex() {
+ if (getIndex() != null) {
+ throw new IllegalStateException("index already exists"); //$NON-NLS-1$
+ }
+ this.index = getJpaFactory().buildIndex(this);
+ IndexAnnotation indexResource = (IndexAnnotation) getResourcePersistentAttribute().addSupportingAnnotation(IndexAnnotation.ANNOTATION_NAME);
+ this.index.initialize(indexResource);
+ firePropertyChanged(INDEX_PROPERTY, null, this.index);
+ return this.index;
+ }
+ public Index getIndex() {
+ return this.index;
+ }
+
+ protected void setIndex(Index newIndex) {
+ Index oldIndex = this.index;
+ this.index = newIndex;
+ firePropertyChanged(INDEX_PROPERTY, oldIndex, newIndex);
+ }
+
+ public void removeIndex() {
+ if (getIndex() == null) {
+ throw new IllegalStateException("index does not exist, cannot be removed"); //$NON-NLS-1$
+ }
+ Index oldIndex = this.index;
+ this.index = null;
+ this.getResourcePersistentAttribute().removeSupportingAnnotation(IndexAnnotation.ANNOTATION_NAME);
+ firePropertyChanged(INDEX_PROPERTY, oldIndex, null);
+ }
+
+ protected Index buildIndex(IndexAnnotation indexResource) {
+ Index index = getJpaFactory().buildIndex(this);
+ index.initialize(indexResource);
+ return index;
+ }
+
+ protected IndexAnnotation getResourceIndex() {
+ return (IndexAnnotation) this.getResourcePersistentAttribute().getSupportingAnnotation(IndexAnnotation.ANNOTATION_NAME);
+ }
+
}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/IndexAnnotation.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/IndexAnnotation.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/IndexAnnotation.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.hibernate.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.jboss.tools.hibernate.jpt.core.internal.context.basic.Hibernate;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public interface IndexAnnotation extends Annotation {
+
+ String ANNOTATION_NAME = Hibernate.INDEX;
+
+ String getName();
+ void setName(String name);
+ String NAME_PROPERTY = Hibernate.INDEX__NAME;
+
+ String[] getColumnNames();
+ void setColumnNames(String[] columnNames);
+ String COLUMN_NAMES_PROPERTY = Hibernate.INDEX__COLUMN_NAMES;
+
+ TextRange getNameTextRange(CompilationUnit astRoot);
+ TextRange getColumnNamesTextRange(CompilationUnit astRoot);
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/IndexAnnotation.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/IndexAnnotationImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/IndexAnnotationImpl.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/IndexAnnotationImpl.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -0,0 +1,170 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.hibernate.jpt.core.internal.resource.java;
+
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jpt.core.internal.resource.java.source.SourceAnnotation;
+import org.eclipse.jpt.core.internal.utility.jdt.ConversionDeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ShortCircuitAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.ShortCircuitArrayAnnotationElementAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.SimpleDeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.internal.utility.jdt.StringArrayExpressionConverter;
+import org.eclipse.jpt.core.internal.utility.jdt.StringExpressionConverter;
+import org.eclipse.jpt.core.resource.java.Annotation;
+import org.eclipse.jpt.core.resource.java.AnnotationDefinition;
+import org.eclipse.jpt.core.resource.java.JavaResourceNode;
+import org.eclipse.jpt.core.resource.java.JavaResourcePersistentMember;
+import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.jpt.core.utility.jdt.AnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Attribute;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationAdapter;
+import org.eclipse.jpt.core.utility.jdt.DeclarationAnnotationElementAdapter;
+import org.eclipse.jpt.core.utility.jdt.Member;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class IndexAnnotationImpl extends SourceAnnotation<Attribute>
+implements IndexAnnotation{
+
+ public static final DeclarationAnnotationAdapter DECLARATION_ANNOTATION_ADAPTER = new SimpleDeclarationAnnotationAdapter(ANNOTATION_NAME);
+
+ private static final DeclarationAnnotationElementAdapter<String> NAME_ADAPTER = buildNameAdapter(DECLARATION_ANNOTATION_ADAPTER);
+ private final AnnotationElementAdapter<String> nameAdapter;
+ private String name;
+
+ private static DeclarationAnnotationElementAdapter<String[]> COLUMN_NAMES_ADAPTER = buildColumnNamesAdapter(DECLARATION_ANNOTATION_ADAPTER);
+ private AnnotationElementAdapter<String[]> columnNamesAdapter;
+ private String[] columnNames;
+
+ protected IndexAnnotationImpl(JavaResourceNode parent, Attribute member) {
+ super(parent, member, DECLARATION_ANNOTATION_ADAPTER);
+ this.nameAdapter = this.buildNameAdapter(NAME_ADAPTER);
+ this.columnNamesAdapter = this.buildColumnNamesAdapter(COLUMN_NAMES_ADAPTER);
+ }
+
+ public String getAnnotationName() {
+ return ANNOTATION_NAME;
+ }
+
+ public void initialize(CompilationUnit astRoot) {
+ this.name = this.buildName(astRoot);
+ this.columnNames = this.buildColumnNames(astRoot);
+ }
+
+ public void update(CompilationUnit astRoot) {
+ this.setName(this.buildName(astRoot));
+ this.setColumnNames(this.buildColumnNames(astRoot));
+ }
+
+ public String[] getColumnNames() {
+ return columnNames;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String newName) {
+ if (this.attributeValueHasNotChanged(this.name, newName)) {
+ return;
+ }
+ String old = this.name;
+ this.name = newName;
+ this.nameAdapter.setValue(newName);
+ this.firePropertyChanged(NAME_PROPERTY, old, newName);
+ }
+
+ public void setColumnNames(String[] newColumnNames) {
+ if (this.attributeValueHasNotChanged(this.columnNames, newColumnNames)) {
+ return;
+ }
+ String[] old = this.columnNames;
+ this.columnNames = newColumnNames;
+ this.columnNamesAdapter.setValue(newColumnNames);
+ this.firePropertyChanged(COLUMN_NAMES_PROPERTY, old, newColumnNames);
+ }
+
+ private String buildName(CompilationUnit astRoot) {
+ return this.nameAdapter.getValue(astRoot);
+ }
+
+ private String[] buildColumnNames(CompilationUnit astRoot) {
+ return this.columnNamesAdapter.getValue(astRoot);
+ }
+
+ private static DeclarationAnnotationElementAdapter<String> buildNameAdapter(DeclarationAnnotationAdapter adapter) {
+ return ConversionDeclarationAnnotationElementAdapter.forStrings(adapter, NAME_PROPERTY, true);
+ }
+
+ AnnotationElementAdapter<String> buildNameAdapter(DeclarationAnnotationElementAdapter<String> daea) {
+ return new ShortCircuitAnnotationElementAdapter<String>(this.member, daea);
+ }
+
+ private static DeclarationAnnotationElementAdapter<String[]> buildColumnNamesAdapter(DeclarationAnnotationAdapter adapter) {
+ return new ConversionDeclarationAnnotationElementAdapter<String[]>(adapter, COLUMN_NAMES_PROPERTY, false,
+ new StringArrayExpressionConverter(StringExpressionConverter.instance()));
+ }
+
+ AnnotationElementAdapter<String[]> buildColumnNamesAdapter(DeclarationAnnotationElementAdapter<String[]> daea) {
+ return new ShortCircuitArrayAnnotationElementAdapter<String>(this.member, daea);
+ }
+
+ public TextRange getNameTextRange(CompilationUnit astRoot) {
+ return this.getElementTextRange(NAME_ADAPTER, astRoot);
+ }
+
+ public TextRange getColumnNamesTextRange(CompilationUnit astRoot) {
+ return this.getElementTextRange(COLUMN_NAMES_ADAPTER, astRoot);
+ }
+
+ public static class IndexAnnotationDefinition implements AnnotationDefinition
+ {
+ // singleton
+ private static final IndexAnnotationDefinition INSTANCE = new IndexAnnotationDefinition();
+
+ /**
+ * Return the singleton.
+ */
+ public static AnnotationDefinition instance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Ensure non-instantiability.
+ */
+ private IndexAnnotationDefinition() {
+ super();
+ }
+
+ public Annotation buildAnnotation(JavaResourcePersistentMember parent, Member attribute) {
+ return new IndexAnnotationImpl(parent, (Attribute) attribute);
+ }
+
+ public String getAnnotationName() {
+ return IndexAnnotation.ANNOTATION_NAME;
+ }
+
+ public Annotation buildAnnotation(JavaResourcePersistentMember arg0,
+ IAnnotation arg1) {
+ throw new UnsupportedOperationException();
+ }
+
+ public Annotation buildNullAnnotation(JavaResourcePersistentMember parent) {
+ throw new UnsupportedOperationException();
+ }
+
+ }
+
+}
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/resource/java/IndexAnnotationImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateBasicMappingComposite.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateBasicMappingComposite.java 2009-10-26 08:39:52 UTC (rev 18294)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateBasicMappingComposite.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -35,6 +35,7 @@
import org.eclipse.swt.widgets.Composite;
import org.jboss.tools.hibernate.jpt.core.internal.context.Generated;
import org.jboss.tools.hibernate.jpt.core.internal.context.HibernateColumn;
+import org.jboss.tools.hibernate.jpt.core.internal.context.IndexHolder;
/**
* Here the layout of this pane:
@@ -105,6 +106,7 @@
protected void initializeLayout(Composite container) {
initializeGeneralPane(container);
initializeTypePane(container);
+ initializeIndexPane(container);
}
@SuppressWarnings("unchecked")
@@ -124,6 +126,7 @@
new OptionalComposite(this, addSubPane(container, 4));
}
+
private void initializeTypePane(Composite container) {
container = addCollapsableSection(
@@ -166,7 +169,20 @@
null);
registerSubPane(new EnumTypeComposite(buildEnumeratedConverterHolder(specifiedConverterHolder), container, getWidgetFactory()));
}
+
+ @SuppressWarnings("unchecked")
+ private void initializeIndexPane(Composite container) {
+ if (getSubject() instanceof IndexHolder) {
+ container = addCollapsableSection(
+ container,
+ HibernateUIMappingMessages.Index_section_index
+ );
+ ((GridLayout) container.getLayout()).numColumns = 2;
+ new IndexHolderComposite((FormPane<? extends IndexHolder>) this, container);
+ }
+ }
+
private PropertyValueModel<HibernateColumn> buildColumnHolder() {
return new TransformationPropertyValueModel<BasicMapping, HibernateColumn>(getSubjectHolder()) {
@Override
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateIdMappingComposite.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateIdMappingComposite.java 2009-10-26 08:39:52 UTC (rev 18294)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateIdMappingComposite.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -29,6 +29,7 @@
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.jboss.tools.hibernate.jpt.core.internal.context.HibernateColumn;
+import org.jboss.tools.hibernate.jpt.core.internal.context.IndexHolder;
import org.jboss.tools.hibernate.jpt.core.internal.context.basic.HibernateIdMapping;
import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaIdMapping;
@@ -77,6 +78,15 @@
new GenerationComposite(this, addSubPane(container, 10));
}
+ if (getSubject() instanceof IndexHolder) {
+ container = addCollapsableSection(
+ container,
+ HibernateUIMappingMessages.Index_section_index
+ );
+ ((GridLayout) container.getLayout()).numColumns = 2;
+ new IndexHolderComposite((FormPane<? extends IndexHolder>) this, container);
+ }
+
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateUIMappingMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateUIMappingMessages.java 2009-10-26 08:39:52 UTC (rev 18294)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/HibernateUIMappingMessages.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -45,6 +45,8 @@
public static String HibernateIdMappingComposite_genericGeneratorCheckBox;
public static String HibernateDiscriminatorColumnComposite_formula;
public static String BasicGeneralSection_generated;
+ public static String IndexHolderComposite_name;
+ public static String Index_section_index;
private HibernateUIMappingMessages() {}
Added: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/IndexHolderComposite.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/IndexHolderComposite.java (rev 0)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/IndexHolderComposite.java 2009-10-26 10:38:34 UTC (rev 18295)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.hibernate.jpt.ui.internal.mapping.details;
+
+import org.eclipse.jpt.ui.internal.widgets.FormPane;
+import org.eclipse.jpt.utility.internal.model.value.PropertyAspectAdapter;
+import org.eclipse.jpt.utility.model.value.WritablePropertyValueModel;
+import org.eclipse.swt.widgets.Composite;
+import org.jboss.tools.hibernate.jpt.core.internal.context.Index;
+import org.jboss.tools.hibernate.jpt.core.internal.context.IndexHolder;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class IndexHolderComposite extends FormPane<IndexHolder> {
+
+ private WritablePropertyValueModel<Index> indexHolder;
+
+ protected IndexHolderComposite(FormPane<? extends IndexHolder> parentPane,
+ Composite parent) {
+ super(parentPane, parent);
+ }
+
+ @Override
+ protected void initialize() {
+ super.initialize();
+ this.indexHolder = buildIndexHolder();
+ }
+
+ @Override
+ protected void initializeLayout(Composite container) {
+ // Name widgets
+ addLabeledText(
+ container,
+ HibernateUIMappingMessages.IndexHolderComposite_name,
+ buildIndexNameHolder(),
+ null//TODO add help
+ );
+ }
+
+
+ protected final WritablePropertyValueModel<String> buildIndexNameHolder() {
+ return new PropertyAspectAdapter<Index, String>(this.indexHolder, Index.INDEX_NAME) {
+ @Override
+ protected String buildValue_() {
+ return subject == null ? null : subject.getName();
+ }
+
+ @Override
+ public void setValue(String value) {
+ if (subject != null) {
+ setValue_(value);
+ return;
+ }
+
+ if ("".equals(value)){ //$NON-NLS-1$
+ return;
+ }
+
+ Index index =
+ (getSubject().getIndex() == null) ? getSubject().addIndex()
+ : getSubject().getIndex();
+ index.setName(value);
+ }
+
+ @Override
+ protected void setValue_(String value) {
+ if ("".equals(value)) {//$NON-NLS-1$
+ value = null;
+ }
+ subject.setName(value);
+ }
+ };
+ }
+
+ private WritablePropertyValueModel<Index> buildIndexHolder() {
+ return new PropertyAspectAdapter<IndexHolder, Index>(getSubjectHolder(), IndexHolder.INDEX_PROPERTY) {
+ @Override
+ protected Index buildValue_() {
+ return this.subject.getIndex();
+ }
+ };
+ }
+}
+
Property changes on: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/IndexHolderComposite.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/messages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/messages.properties 2009-10-26 08:39:52 UTC (rev 18294)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/internal/mapping/details/messages.properties 2009-10-26 10:38:34 UTC (rev 18295)
@@ -22,4 +22,6 @@
HibernateIdMappingComposite_genericGeneratorSection=Generic Generator
HibernateIdMappingComposite_genericGeneratorCheckBox=Generic generator
HibernateDiscriminatorColumnComposite_formula=Formula:
-BasicGeneralSection_generated = Generation Time:
\ No newline at end of file
+BasicGeneralSection_generated = Generation Time:
+IndexHolderComposite_name=Name:
+Index_section_index=Index
\ No newline at end of file
14 years, 7 months
JBoss Tools SVN: r18294 - trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/cheatsheets.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2009-10-26 04:39:52 -0400 (Mon, 26 Oct 2009)
New Revision: 18294
Modified:
trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/cheatsheets/bpel.xml
Log:
change the bpel cheatsheets for the changes of bpel deployment
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/cheatsheets/bpel.xml
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/cheatsheets/bpel.xml 2009-10-26 08:38:57 UTC (rev 18293)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.cheatsheet/cheatsheets/bpel.xml 2009-10-26 08:39:52 UTC (rev 18294)
@@ -29,7 +29,7 @@
</subitem>
<subitem label="On the first page of the "Create a BPEL Process File" Wizard enter a process name in the "BPEL Process Name" field, a process's namesapce in the "Namespace" field, and a process's template in the "Template" field. Click "Next" button.">
</subitem>
- <subitem label="On the second page of the "Create a BPEL Process File" Wizard select the "bpel" folder of the BPEL project. Click "Finish" button.">
+ <subitem label="On the second page of the "Create a BPEL Process File" Wizard select the "bpelContent" folder of the BPEL project. Click "Finish" button.">
</subitem>
</item>
@@ -57,7 +57,7 @@
</description>
<subitem label="Create a bpel-deploy.xml by selecting "File > New > Other... > BPEL 2.0 > Apache ODE Deployment Descriptor" from the menu bar.">
</subitem>
- <subitem label="On the first page of the "Apache ODE Deployment Descriptor" Wizard choose the "bpel" folder of a bpel project in the "BPEL Project" field and enter "bpel-deploy.xml" in the "File name" field. Click "Finish" button.">
+ <subitem label="On the first page of the "Apache ODE Deployment Descriptor" Wizard choose the "bpelContent" folder of a bpel project in the "BPEL Project" field and enter "bpel-deploy.xml" in the "File name" field. Click "Finish" button.">
</subitem>
<subitem label="Double-click the bpel-deploy.xml file to open it in ODE Descriptor Deployment Editor. In the "Inbound Interfaces" section, click the "Associated Port" column and in the dropdown box select a BPEL port that is defined in the WSDL file.The Related Service and Binding Used columns should be automatically filled in. Save the bpel-deploy.xml file.">
</subitem>
14 years, 7 months
JBoss Tools SVN: r18293 - in trunk/bpel/docs/reference/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2009-10-26 04:38:57 -0400 (Mon, 26 Oct 2009)
New Revision: 18293
Modified:
trunk/bpel/docs/reference/en/images/deploy_createdeploy_2.png
trunk/bpel/docs/reference/en/images/deploy_createdeploy_3.png
trunk/bpel/docs/reference/en/images/detail_createprocess_3.png
trunk/bpel/docs/reference/en/images/detail_createproject_3.png
trunk/bpel/docs/reference/en/images/detail_editprocess_1.png
trunk/bpel/docs/reference/en/images/detail_editprocess_2.png
trunk/bpel/docs/reference/en/modules/deploy.xml
trunk/bpel/docs/reference/en/modules/detail.xml
Log:
change the bpel docs for the changes of bpel deployment
Modified: trunk/bpel/docs/reference/en/images/deploy_createdeploy_2.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en/images/deploy_createdeploy_3.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en/images/detail_createprocess_3.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en/images/detail_createproject_3.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en/images/detail_editprocess_1.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en/images/detail_editprocess_2.png
===================================================================
(Binary files differ)
Modified: trunk/bpel/docs/reference/en/modules/deploy.xml
===================================================================
--- trunk/bpel/docs/reference/en/modules/deploy.xml 2009-10-26 05:46:50 UTC (rev 18292)
+++ trunk/bpel/docs/reference/en/modules/deploy.xml 2009-10-26 08:38:57 UTC (rev 18293)
@@ -23,7 +23,7 @@
<listitem>
<para>On the next wizard page you should enter the following information:</para>
<para><emphasis><property>BPEL Project</property></emphasis>: Click the <property>Browse...</property> button to select the BPEL project in your workspace which you want to deploy to the runtime.
- Please note, that you should select the <property>bpel</property> folder in your new BPEL project as a value of <property>BPEL Project</property> field because the bpel-deploy.xml should be created in this place.
+ Please note, that you should select the <property>bpelContent</property> folder in your new BPEL project as a value of <property>BPEL Project</property> field because the bpel-deploy.xml should be created in this place.
</para>
<para><emphasis><property>File name</property></emphasis>: The default value is bpel-deploy.xml. Please, don't change it.</para>
<para>Click on <property>Finish</property> button to close the wizard and a new bpel-deploy.xml file will be created.</para>
Modified: trunk/bpel/docs/reference/en/modules/detail.xml
===================================================================
--- trunk/bpel/docs/reference/en/modules/detail.xml 2009-10-26 05:46:50 UTC (rev 18292)
+++ trunk/bpel/docs/reference/en/modules/detail.xml 2009-10-26 08:38:57 UTC (rev 18293)
@@ -92,11 +92,11 @@
</imageobject>
</mediaobject>
</figure>
- <para>Click the <property>Next</property> button. On the second page make sure that the folder <property>HelloWorld/bpel</property> is selected.
+ <para>Click the <property>Next</property> button. On the second page make sure that the folder <property>HelloWorld/bpelContent</property> is selected.
Click <property>Finish</property>.
</para>
<note>
- <para>All of your files that are used in your BPEL project must be under the <property>bpel</property> folder. Only in this case
+ <para>All of your files that are used in your BPEL project must be under the <property>bpelContent</property> folder. Only in this case
these files can be deployed to JBoss server.
</para>
</note>
14 years, 7 months
JBoss Tools SVN: r18292 - workspace/examples.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2009-10-26 01:46:50 -0400 (Mon, 26 Oct 2009)
New Revision: 18292
Modified:
workspace/examples/project-examples-3.0.xml
Log:
Modified: workspace/examples/project-examples-3.0.xml
===================================================================
--- workspace/examples/project-examples-3.0.xml 2009-10-25 15:24:53 UTC (rev 18291)
+++ workspace/examples/project-examples-3.0.xml 2009-10-26 05:46:50 UTC (rev 18292)
@@ -460,7 +460,7 @@
<category>BPEL</category>
<name>HelloWorld</name>
<shortDescription>A simple BPEL example</shortDescription>
- <description>This sample is to show a simple BPEL2.0 example.</description>
+ <description>This example is to show a simple BPEL2.0 example.</description>
<size>10000</size>
<url>
http://anonsvn.jboss.org/repos/jbosstools/workspace/grid/bpel-examples/he...
@@ -471,7 +471,7 @@
<category>BPEL</category>
<name>Simple_Correlation</name>
<shortDescription>A correlation BPEL example</shortDescription>
- <description>This sample is to show how to use the correlation in the BPEL2.0 example.</description>
+ <description>This example is to show how to use the correlation in the BPEL2.0 example.</description>
<size>11000</size>
<url>
http://anonsvn.jboss.org/repos/jbosstools/workspace/grid/bpel-examples/si...
14 years, 7 months
JBoss Tools SVN: r18291 - trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-10-25 11:24:53 -0400 (Sun, 25 Oct 2009)
New Revision: 18291
Modified:
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5037
Modified: trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java 2009-10-24 18:31:57 UTC (rev 18290)
+++ trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java 2009-10-25 15:24:53 UTC (rev 18291)
@@ -20,7 +20,6 @@
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.internal.ui.search.JavaSearchResultPage;
import org.eclipse.jdt.ui.search.ElementQuerySpecification;
import org.eclipse.jdt.ui.search.IMatchPresentation;
import org.eclipse.jdt.ui.search.IQueryParticipant;
@@ -36,7 +35,6 @@
public class ELReferencesQueryParticipant implements IQueryParticipant, IMatchPresentation{
private ELSearcher searcher;
- JavaSearchResultPage searchPage = null;
public int estimateTicks(QuerySpecification specification) {
return 10;
@@ -101,7 +99,6 @@
@Override
protected void match(IFile file, int offset, int length) {
- //System.out.println("match - "+file.getFullPath()+" offset - "+offset+" len - "+length);
Match match = new Match(file, offset, length);
requestor.reportMatch(match);
}
14 years, 7 months