Merging/dual-commits on 2.0.x and trunk
by Max Rydahl Andersen
Hi,
If you are not using svnmerge.py as described earlier on then please at least put in the commit comment
when you are actually merging changes. Very hard to follow what is actually in both branches if the comments doesn't say it.
/max
16 years, 11 months
VPE JUnit tests
by Denis Golovin
Sergey, Marshall
now some tests for VPE pass but some fail with JVM error (see below)
libexpart is C XML parser library. Now tests for Struts and HTML
templates pass other tests fail. I thought that was XModel, but even I
deleted all XModel related staff from test projects they still fail.
Sometimes it happens in other not related to VPE projects.
Anyone have Idea why does it happen? Should we switch to last available
Java SE 1.5.0_14 to get it fixed?
Marshall,
could we somehow get the content of hs_err_pidXXXXX.log file. I'm not
sure it will help, but I'd like to look at it.
Here is the error.
[java] #
[java] # An unexpected error has been detected by HotSpot Virtual Machine:
[java] #
[java] # SIGSEGV (0xb) at pc=0xc8430ff4, pid=23653, tid=4160620768
[java] #
[java] # Java VM: Java HotSpot(TM) Server VM (1.5.0_12-b04 mixed mode)
[java] # Problematic frame:
[java] # C [libexpat.so.0+0xeff4]
[java] #
[java] # An error report file with more information is saved as hs_err_pid23653.log
[java] #
[java] # If you would like to submit a bug report, please visit:
[java] # http://java.sun.com/webapps/bugreport/crash.jsp
[java] #
Thanks
Denis
16 years, 11 months
Fwd: [jbosstools-commits] JBoss Tools SVN: r6173 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console: src/org/hibernate/eclipse/launch and 2 other directories.
by Max Rydahl Andersen
hi Dmitry,
Looking at the rename configuration patch you did.
Two questions:
1) Where are the unittests for this ?
2) Why is it relevant to compute the runtimeclasspath for deciding it the configuration is changed ?
/max
+ static boolean isConfigurationChanged(ILaunchConfiguration config, IPath oldPath) throws CoreException{
+ String attrib = null;
+ for (int i = 0; i < stringAttribs.length; i++) {
+ attrib = config.getAttribute(stringAttribs[i], (String)null);
+ if (isAttributeChanged(attrib, oldPath))
+ return true;
+ }
+
+ for (int i = 0; i < strListAttribs.length; i++) {
+ List list = config.getAttribute(strListAttribs[i], Collections.EMPTY_LIST);
+ List newMappings = new ArrayList();
+ Iterator iter = list.iterator();
+ while ( iter.hasNext() ) {
+ attrib = (String) iter.next();
+ if (isAttributeChanged(attrib, oldPath)){
+ return true;
+ }
+ newMappings.add(attrib);
+ }
+ }
+
+ //classpath
+ IRuntimeClasspathEntry[] entries;
+ try {
+ entries = JavaRuntime.computeUnresolvedRuntimeClasspath(config);
+ for (int i = 0; i < entries.length; i++) {
+ IRuntimeClasspathEntry entry = entries[i];
+ if(entry.getClasspathProperty()==IRuntimeClasspathEntry.USER_CLASSES) {
+ attrib = entry.getPath() == null ? null
+ : entry.getPath().toString();
+ if(isAttributeChanged(attrib, oldPath)){
+ return true;
+ }
+ }
+ }
+ }
+ catch (CoreException e) {
+ HibernateConsolePlugin.getDefault().log( e );
+ }
+
+ return false;
+ }
+
+ public static boolean isAttributeChanged(String attrib, IPath path){
+ if (attrib == null || path == null) return false;
+ return path.isPrefixOf(new Path(attrib));
+ }
+
+ public static ILaunchConfiguration updateLaunchConfig(ILaunchConfiguration config, IPath oldPath, IPath newPath) throws CoreException{
+ final ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
+
+ String attrib = null;
+ for (int i = 0; i < stringAttribs.length; i++) {
+ attrib = wc.getAttribute(stringAttribs[i], (String)null);
+ if (isAttributeChanged(attrib, oldPath)){
+ attrib = getUpdatedPath(attrib, oldPath, newPath);
+ wc.setAttribute(stringAttribs[i], attrib);
+ }
+ }
+
+ boolean isChanged = false;
+ for (int i = 0; i < strListAttribs.length; i++) {
+ List list = wc.getAttribute(strListAttribs[i], Collections.EMPTY_LIST);
+ isChanged = false;
+ List newMappings = new ArrayList();
+ Iterator iter = list.iterator();
+ while ( iter.hasNext() ) {
+ attrib = (String) iter.next();
+ if (isAttributeChanged(attrib, oldPath)){
+ attrib = getUpdatedPath(attrib, oldPath, newPath);
+ isChanged = true;
+ }
+ newMappings.add(attrib);
+ }
+ if (isChanged) wc.setAttribute(strListAttribs[i], newMappings);
+ }
+
+ //classpath
+ isChanged = false;
+ IRuntimeClasspathEntry[] entries;
+ try {
+ entries = JavaRuntime.computeUnresolvedRuntimeClasspath(config);
+ List mementos = new ArrayList(entries.length);
+ for (int i = 0; i < entries.length; i++) {
+ IRuntimeClasspathEntry entry = entries[i];
+ if(entry.getClasspathProperty()==IRuntimeClasspathEntry.USER_CLASSES) {
+ attrib = entry.getPath() == null ? null
+ : entry.getPath().toString();
+ if(isAttributeChanged(attrib, oldPath)){
+ attrib = getUpdatedPath(attrib, oldPath, newPath);
+ IPath p = new Path(attrib).makeAbsolute();
+
+ switch (entry.getClasspathEntry().getEntryKind()) {
+ case IClasspathEntry.CPE_PROJECT:
+ entry = new RuntimeClasspathEntry( JavaCore.newProjectEntry(p));
+ break;
+ default:
+ entry = JavaRuntime.newArchiveRuntimeClasspathEntry(p);
+ break;
+ }
+
+ entries[i] = entry;
+ isChanged = true;
+ }
+ }
+ mementos.add(entries[i].getMemento());
+ }
+ if (isChanged) wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, mementos);
+ }
+ catch (CoreException e) {
+ HibernateConsolePlugin.getDefault().log( e );
+ }
+
+ //JavaMigrationDelegate.updateResourceMapping(wc);
+
+ if (wc.isDirty()) {
+ return wc.doSave();
+ } else {
+ return config;
+ }
+ }
+
+ private static String getUpdatedPath(String attrib, IPath oldPath, IPath newPath){
+ IPath attribPath = new Path(attrib);
+ IPath newAttribPath = Path.EMPTY;
+ for (int j = 0; j < attribPath.segmentCount(); j++){
+ if (!oldPath.isPrefixOf(attribPath.removeFirstSegments(j))){
+ //add prefix
+ newAttribPath = newAttribPath.append(attribPath.segment(j));
+ } else {
+ newAttribPath = newAttribPath.append(newPath); //add new path instead of old path
+ // add suffix
+ newAttribPath = newAttribPath.append(attribPath.removeFirstSegments(j + oldPath.segmentCount()));
+ break;
+ }
+ }
+ return newAttribPath.toString();
+ }
+
+ public static ILaunchConfiguration[] getChangedLaunchConfigurations(IPath path){
+ ILaunchConfiguration[] configs = null;
+ try {
+ configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations();
+ ArrayList list = new ArrayList();
+ for(int i = 0; i < configs.length; i++) {
+ //ILaunchConfigurationWorkingCopy wc = configs[i].getWorkingCopy();
+ if (HibernateRefactoringUtil.isConfigurationChanged(configs[i], path)) list.add(configs[i]);
+ }
+ configs = (ILaunchConfiguration[])list.toArray(new ILaunchConfiguration[list.size()]);
+ }
+ catch(CoreException e) {
+ configs = new ILaunchConfiguration[0];
+ HibernateConsolePlugin.getDefault().logErrorMessage( ERROR_MESS, e );
+ }
+
+ return configs;
+ }
+
+ /**
+ * @param changes - List of Change objects
+ * @return
+ */
+ public static Change createChangesFromList(List changes, String name) {
+ if (changes.size() == 0) {
+ return null;
+ } else if (changes.size() == 1) {
+ return (Change) changes.get(0);
+ } else {
+ return new CompositeChange(name, (Change[])changes.toArray(new Change[changes.size()]));
+ }
+ }
+}
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/LaunchConfigurationResourceNameChange.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/LaunchConfigurationResourceNameChange.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/LaunchConfigurationResourceNameChange.java 2008-02-07 16:19:37 UTC (rev 6173)
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.launch.core.refactoring;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class LaunchConfigurationResourceNameChange extends Change {
+
+ private ILaunchConfiguration fLaunchConfiguration;
+ private IPath fOldPath;
+ private IPath fNewPath;
+
+ /**
+ * LaunchConfigurationResourceMoveChange constructor.
+ * @param launchConfiguration the launch configuration to modify
+ * @param oldPath the old Path of the resource.
+ * @param newPath the new Path of the resource.
+ */
+ LaunchConfigurationResourceNameChange(ILaunchConfiguration launchConfiguration, IPath oldPath, IPath newPath){
+ fLaunchConfiguration = launchConfiguration;
+ fOldPath = oldPath;
+ fNewPath = newPath;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ltk.core.refactoring.Change#getModifiedElement()
+ */
+ public Object getModifiedElement() {
+ return fLaunchConfiguration;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ltk.core.refactoring.Change#getName()
+ */
+ public String getName() {
+ return "Update resource path in launch configuration " + fLaunchConfiguration.getName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ltk.core.refactoring.Change#initializeValidationData(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public void initializeValidationData(IProgressMonitor pm) { }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ltk.core.refactoring.Change#isValid(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException,
+ OperationCanceledException {
+ return new RefactoringStatus();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ltk.core.refactoring.Change#perform(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public Change perform(IProgressMonitor pm) throws CoreException {
+ fLaunchConfiguration = HibernateRefactoringUtil.updateLaunchConfig(fLaunchConfiguration, fOldPath, fNewPath);
+ return new LaunchConfigurationResourceNameChange(fLaunchConfiguration, fNewPath, fOldPath);
+ }
+}
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/LaunchConfigurationResourceNameChange.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/MoveResourceParticipant.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/MoveResourceParticipant.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/MoveResourceParticipant.java 2008-02-07 16:19:37 UTC (rev 6173)
@@ -0,0 +1,48 @@
+package org.hibernate.eclipse.launch.core.refactoring;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.ltk.core.refactoring.participants.MoveParticipant;
+
+public class MoveResourceParticipant extends MoveParticipant {
+
+ private IResource fResource;
+
+ public RefactoringStatus checkConditions(IProgressMonitor pm,
+ CheckConditionsContext context) throws OperationCanceledException {
+ return new RefactoringStatus();
+ }
+
+ public Change createChange(IProgressMonitor pm) throws CoreException,
+ OperationCanceledException {
+ ILaunchConfiguration[] configs = HibernateRefactoringUtil.getChangedLaunchConfigurations(fResource.getFullPath());
+
+ List changes = new ArrayList();
+ LaunchConfigurationResourceNameChange change = null;
+ for (int i= 0; i < configs.length; i++) {
+ change = new LaunchConfigurationResourceNameChange(configs[i], fResource.getFullPath(), ((IResource)getArguments().getDestination()).getFullPath().append(fResource.getName()));
+ changes.add(change);
+ }
+
+ return HibernateRefactoringUtil.createChangesFromList(changes, getName());
+ }
+
+ public String getName() {
+ return "Launch Configurations updates";
+ }
+
+ protected boolean initialize(Object element) {
+ fResource = (IResource) element;
+ return true;
+ }
+
+}
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/MoveResourceParticipant.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/RenameResourceParticipant.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/RenameResourceParticipant.java (rev 0)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/RenameResourceParticipant.java 2008-02-07 16:19:37 UTC (rev 6173)
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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.launch.core.refactoring;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.ltk.core.refactoring.Change;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
+
+/**
+ * @author Dmitry Geraskov
+ *
+ */
+public class RenameResourceParticipant extends RenameParticipant {
+
+ private IResource fResource;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#checkConditions(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext)
+ */
+ public RefactoringStatus checkConditions(IProgressMonitor pm,
+ CheckConditionsContext context) throws OperationCanceledException {
+ return new RefactoringStatus();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#createChange(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public Change createChange(IProgressMonitor pm) throws CoreException,
+ OperationCanceledException {
+ ILaunchConfiguration[] configs = HibernateRefactoringUtil.getChangedLaunchConfigurations(fResource.getFullPath());
+
+ List changes = new ArrayList();
+ LaunchConfigurationResourceNameChange change = null;
+ for (int i= 0; i < configs.length; i++) {
+ change = new LaunchConfigurationResourceNameChange(configs[i], fResource.getFullPath(),
+ fResource.getParent().getFullPath().append(getArguments().getNewName()));
+ changes.add(change);
+ }
+
+ return HibernateRefactoringUtil.createChangesFromList(changes, getName());
+ }
+
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getName()
+ */
+ public String getName() {
+ return "Launch Configurations updates";
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
+ */
+ protected boolean initialize(Object element) {
+ fResource = (IResource) element;
+ return true;
+ }
+
+}
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/RenameResourceParticipant.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
_______________________________________________
jbosstools-commits mailing list
jbosstools-commits(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jbosstools-commits
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
16 years, 11 months
JBIDE-1670 ESB Tree-Based XML Editor
by Denis Golovin
Max,
Should we create new component in JBoss Tools repository?
I'd name it 'soap' and create usual structure for it plugins, features,
tests and docs.
Denis
16 years, 11 months
JUnit testJiraJbide1544 Error
by Denis Golovin
Max,
we still have the error in JUnit for JBIDE-1544 is that because seam-gen
is not updated in build?
Thanks
Denis
16 years, 11 months
A zillion server runtimes created...
by Max Rydahl Andersen
Hi,
Anyone know why our unittests leaves the workspace with about 50 "JBoss Application Server 4.2" servers and runtimes defined ?
And even more funny it creates it with C:\java\jboss-4.2.2.GA/server/default/deploy which makes zero sense since:
1) I don't have any dir like that
2) I'm on Linux
/max
16 years, 11 months