JBoss Tools SVN: r42812 - trunk/central/tests/org.jboss.tools.central.test.ui.bot.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-07-31 10:14:08 -0400 (Tue, 31 Jul 2012)
New Revision: 42812
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/.classpath
Log:
Fixed .classpath
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/.classpath
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/.classpath 2012-07-31 13:32:55 UTC (rev 42811)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/.classpath 2012-07-31 14:14:08 UTC (rev 42812)
@@ -3,7 +3,5 @@
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="/home/rhopp/jbdevstudio/studio/plugins/org.eclipse.ui.forms_3.5.100.v20110425.jar"/>
- <classpathentry kind="lib" path="/home/rhopp/jbdevstudio/studio/plugins/org.eclipse.swtbot.forms.finder_2.0.5.20111003_1754-3676ac8-dev-e36.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
12 years, 4 months
JBoss Tools SVN: r42811 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-07-31 09:32:55 -0400 (Tue, 31 Jul 2012)
New Revision: 42811
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java
Log:
[JBIDE-12241] added decorator to repo path text field
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java 2012-07-31 13:32:44 UTC (rev 42810)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java 2012-07-31 13:32:55 UTC (rev 42811)
@@ -12,8 +12,6 @@
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.beans.BeanProperties;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.databinding.validation.MultiValidator;
import org.eclipse.core.databinding.validation.ValidationStatus;
@@ -23,6 +21,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
import org.eclipse.jface.databinding.swt.WidgetProperties;
import org.eclipse.jface.dialogs.PageChangingEvent;
import org.eclipse.jface.layout.GridDataFactory;
@@ -130,9 +129,10 @@
GitCloningSettingsWizardPageModel.PROPERTY_APPLICATION_NAME).observe(pageModel);
final IObservableValue newProjectModelObservable = BeanProperties.value(
GitCloningSettingsWizardPageModel.PROPERTY_NEW_PROJECT).observe(pageModel);
-
- dbc.addValidationStatusProvider(new RepoPathValidationStatusProvider(repoPathObservable,
- applicationNameModelObservable, newProjectModelObservable));
+ RepoPathValidationStatusProvider repoPathValidator =
+ new RepoPathValidationStatusProvider(repoPathObservable, applicationNameModelObservable, newProjectModelObservable);
+ dbc.addValidationStatusProvider(repoPathValidator);
+ ControlDecorationSupport.create(repoPathValidator, SWT.LEFT | SWT.TOP);
// Remote Name Management
useDefaultRemoteNameButton = new Button(cloneGroup, SWT.CHECK);
12 years, 4 months
JBoss Tools SVN: r42810 - branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-07-31 09:32:44 -0400 (Tue, 31 Jul 2012)
New Revision: 42810
Modified:
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java
Log:
[JBIDE-12241] added decorator to repo path text field
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java 2012-07-31 13:03:26 UTC (rev 42809)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/GitCloningSettingsWizardPage.java 2012-07-31 13:32:44 UTC (rev 42810)
@@ -21,6 +21,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
import org.eclipse.jface.databinding.swt.WidgetProperties;
import org.eclipse.jface.dialogs.PageChangingEvent;
import org.eclipse.jface.layout.GridDataFactory;
@@ -128,9 +129,11 @@
GitCloningSettingsWizardPageModel.PROPERTY_APPLICATION_NAME).observe(pageModel);
final IObservableValue newProjectModelObservable = BeanProperties.value(
GitCloningSettingsWizardPageModel.PROPERTY_NEW_PROJECT).observe(pageModel);
+ RepoPathValidationStatusProvider repoPathValidator =
+ new RepoPathValidationStatusProvider(repoPathObservable, applicationNameModelObservable, newProjectModelObservable);
+ dbc.addValidationStatusProvider(repoPathValidator);
+ ControlDecorationSupport.create(repoPathValidator, SWT.LEFT | SWT.TOP);
- dbc.addValidationStatusProvider(new RepoPathValidationStatusProvider(repoPathObservable,
- applicationNameModelObservable, newProjectModelObservable));
// Remote Name Management
useDefaultRemoteNameButton = new Button(cloneGroup, SWT.CHECK);
@@ -288,6 +291,8 @@
}
return ValidationStatus.ok();
}
+
+
}
12 years, 4 months
JBoss Tools SVN: r42809 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-07-31 09:03:26 -0400 (Tue, 31 Jul 2012)
New Revision: 42809
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CustomControlDecorationUpdater.java
Log:
added missing class header
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CustomControlDecorationUpdater.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CustomControlDecorationUpdater.java 2012-07-31 12:59:39 UTC (rev 42808)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CustomControlDecorationUpdater.java 2012-07-31 13:03:26 UTC (rev 42809)
@@ -1,6 +1,13 @@
-/**
+/*******************************************************************************
+ * Copyright (c) 2012 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
*
- */
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.wizard;
import org.eclipse.core.runtime.IStatus;
12 years, 4 months
JBoss Tools SVN: r42807 - branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-07-31 08:08:03 -0400 (Tue, 31 Jul 2012)
New Revision: 42807
Modified:
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
Log:
[JBIDE-12386] implemented MultiValidator#getTargets to return application name only
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-07-31 12:07:54 UTC (rev 42806)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-07-31 12:08:03 UTC (rev 42807)
@@ -18,6 +18,8 @@
import org.eclipse.core.databinding.UpdateListStrategy;
import org.eclipse.core.databinding.beans.BeanProperties;
import org.eclipse.core.databinding.conversion.Converter;
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.WritableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.databinding.observable.value.IValueChangeListener;
import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
@@ -775,7 +777,6 @@
return ValidationStatus.ok();
}
-
}
class NewApplicationNameValidator extends MultiValidator {
@@ -810,6 +811,13 @@
return ValidationStatus.ok();
}
+ @Override
+ public IObservableList getTargets() {
+ WritableList targets = new WritableList();
+ targets.add(applicationNameObservable);
+ return targets;
+ }
+
}
/**
12 years, 4 months
JBoss Tools SVN: r42806 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-07-31 08:07:54 -0400 (Tue, 31 Jul 2012)
New Revision: 42806
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
Log:
[JBIDE-12386] implemented MultiValidator#getTargets to return application name only
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-07-31 10:56:26 UTC (rev 42805)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-07-31 12:07:54 UTC (rev 42806)
@@ -18,6 +18,8 @@
import org.eclipse.core.databinding.UpdateListStrategy;
import org.eclipse.core.databinding.beans.BeanProperties;
import org.eclipse.core.databinding.conversion.Converter;
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.WritableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.databinding.observable.value.IValueChangeListener;
import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
@@ -807,6 +809,14 @@
}
return ValidationStatus.ok();
}
+
+ @Override
+ public IObservableList getTargets() {
+ WritableList targets = new WritableList();
+ targets.add(applicationNameObservable);
+ return targets;
+ }
+
}
/**
12 years, 4 months
JBoss Tools SVN: r42805 - in branches/jbosstools-3.3.x/openshift: plugins/org.jboss.tools.openshift.egit.ui/META-INF and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-07-31 06:56:26 -0400 (Tue, 31 Jul 2012)
New Revision: 42805
Modified:
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.egit.ui/META-INF/MANIFEST.MF
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath
branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
branches/jbosstools-3.3.x/openshift/tests/org.jboss.tools.openshift.egit.test/META-INF/MANIFEST.MF
branches/jbosstools-3.3.x/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/EGitUtilsTest.java
branches/jbosstools-3.3.x/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/util/TestRepository.java
Log:
[JBIDE-12338] adapted version ranges in manifests, catched exception and rethrow RuntimeException/CoreException if EGit 2.0 throws additional exceptions
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java 2012-07-31 10:48:22 UTC (rev 42804)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/EGitUtils.java 2012-07-31 10:56:26 UTC (rev 42805)
@@ -47,7 +47,7 @@
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.InitCommand;
import org.eclipse.jgit.api.MergeResult;
-import org.eclipse.jgit.api.errors.JGitInternalException;
+import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.errors.NoWorkTreeException;
import org.eclipse.jgit.errors.NotSupportedException;
import org.eclipse.jgit.lib.ConfigConstants;
@@ -142,6 +142,7 @@
* @param monitor
* @return
* @throws CoreException
+ * @throws GitAPIException
*/
public static Repository share(IProject project, IProgressMonitor monitor) throws CoreException {
Repository repository = createRepository(project, monitor);
@@ -172,7 +173,9 @@
init.setBare(false).setDirectory(project.getLocation().toFile());
Git git = init.call();
return git.getRepository();
- } catch (JGitInternalException e) {
+ } catch (Exception e) {
+ // ugly workaround to allow us to use egit 2.0 while staying
+ // compatible
throw new CoreException(EGitCoreActivator.createErrorStatus(
NLS.bind("Could not initialize a git repository at {0}: {1}",
getRepositoryPathFor(project),
@@ -874,16 +877,29 @@
* @throws IOException
* @throws NoWorkTreeException
*/
- public static boolean isDirty(Repository repository) throws NoWorkTreeException, IOException {
- boolean hasChanges = false;
- org.eclipse.jgit.api.Status repoStatus = new Git(repository).status().call();
- hasChanges |= !repoStatus.getAdded().isEmpty();
- hasChanges |= !repoStatus.getChanged().isEmpty();
- hasChanges |= !repoStatus.getModified().isEmpty();
- hasChanges |= !repoStatus.getRemoved().isEmpty();
- hasChanges |= !repoStatus.getConflicting().isEmpty();
- hasChanges |= !repoStatus.getMissing().isEmpty();
- return hasChanges;
+ public static boolean isDirty(Repository repository)
+ throws NoWorkTreeException, IOException {
+ try {
+ boolean hasChanges = false;
+ org.eclipse.jgit.api.Status repoStatus = new Git(repository)
+ .status().call();
+ hasChanges |= !repoStatus.getAdded().isEmpty();
+ hasChanges |= !repoStatus.getChanged().isEmpty();
+ hasChanges |= !repoStatus.getModified().isEmpty();
+ hasChanges |= !repoStatus.getRemoved().isEmpty();
+ hasChanges |= !repoStatus.getConflicting().isEmpty();
+ hasChanges |= !repoStatus.getMissing().isEmpty();
+ return hasChanges;
+ } catch (Exception e) {
+ // ugly workaround to allow us to use egit 2.0 while staying
+ // compatible
+ if (e instanceof NoWorkTreeException) {
+ throw (NoWorkTreeException) e;
+ } else if (e instanceof IOException) {
+ throw (IOException) e;
+ }
+ throw new RuntimeException(e);
+ }
}
public static int countCommitableChanges(IProject project, IServer server, IProgressMonitor monitor) throws CoreException {
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.egit.ui/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.egit.ui/META-INF/MANIFEST.MF 2012-07-31 10:48:22 UTC (rev 42804)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.egit.ui/META-INF/MANIFEST.MF 2012-07-31 10:56:26 UTC (rev 42805)
@@ -5,11 +5,11 @@
Bundle-Version: 2.3.1.qualifier
Bundle-Activator: org.jboss.tools.openshift.egit.ui.EGitUIActivator
Require-Bundle: org.jboss.tools.openshift.egit.core;bundle-version="[2.3.0,3.0.0)",
- org.eclipse.egit.core;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.egit.ui;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.jgit;bundle-version="[1.0.0,2.0.0)",
- com.jcraft.jsch;bundle-version="[0.1.41,1.0.0)",
- org.eclipse.ui;bundle-version="[3.7.0,4.0.0)",
+ org.eclipse.egit.core;bundle-version="1.0.0",
+ org.eclipse.egit.ui;bundle-version="1.0.0",
+ org.eclipse.jgit;bundle-version="1.0.0",
+ com.jcraft.jsch;bundle-version="0.1.41",
+ org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.core.runtime,
org.eclipse.core.expressions;bundle-version="[3.4.300,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.7.100,4.0.0)",
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath 2012-07-31 10:48:22 UTC (rev 42804)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.client/.classpath 2012-07-31 10:56:26 UTC (rev 42805)
@@ -3,7 +3,7 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
- <classpathentry exported="true" kind="lib" path="openshift-java-client-2.0.0-SNAPSHOT.jar" sourcepath="/openshift-java-client"/>
+ <classpathentry exported="true" kind="lib" path="openshift-java-client-2.0.0-SNAPSHOT.jar" sourcepath="/home/adietish/jboss-workspaces/openshift-java-client/src"/>
<classpathentry kind="lib" path="jboss-dmr-1.0.0.Final.jar"/>
<classpathentry kind="lib" path="log4j-1.2.16.jar"/>
<classpathentry kind="lib" path="slf4j-api-1.6.1.jar"/>
Modified: branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2012-07-31 10:48:22 UTC (rev 42804)
+++ branches/jbosstools-3.3.x/openshift/plugins/org.jboss.tools.openshift.express.ui/META-INF/MANIFEST.MF 2012-07-31 10:56:26 UTC (rev 42805)
@@ -9,9 +9,9 @@
org.jboss.tools.openshift.egit.core;bundle-version="2.3.0",
org.jboss.tools.openshift.egit.ui;bundle-version="2.3.0",
org.jboss.ide.eclipse.as.ui;bundle-version="[2.3.0,3.0.0)",
- org.eclipse.egit.ui;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.egit.core;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.jgit;bundle-version="[1.1.0,2.1.0)",
+ org.eclipse.egit.ui;bundle-version="1.0.0",
+ org.eclipse.egit.core;bundle-version="1.1.0",
+ org.eclipse.jgit;bundle-version="1.1.0",
com.jcraft.jsch;bundle-version="0.1.41",
org.eclipse.jsch.core;bundle-version="[1.1.300,2.0.0)",
org.jboss.ide.eclipse.as.core;bundle-version="2.3.0",
Modified: branches/jbosstools-3.3.x/openshift/tests/org.jboss.tools.openshift.egit.test/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.3.x/openshift/tests/org.jboss.tools.openshift.egit.test/META-INF/MANIFEST.MF 2012-07-31 10:48:22 UTC (rev 42804)
+++ branches/jbosstools-3.3.x/openshift/tests/org.jboss.tools.openshift.egit.test/META-INF/MANIFEST.MF 2012-07-31 10:56:26 UTC (rev 42805)
@@ -6,9 +6,9 @@
Bundle-Activator: org.jboss.tools.openshift.egit.internal.test.EGitTestActivator
Bundle-Vendor: JBoss by Red Hat
Require-Bundle: org.eclipse.egit.core;bundle-version="1.0.0",
- org.eclipse.jgit;bundle-version="[1.0.0,2.0.1]",
+ org.eclipse.jgit;bundle-version="1.0.0",
org.eclipse.core.runtime,
- org.eclipse.core.resources;bundle-version="[3.7.100,4.0.0)",
+ org.eclipse.core.resources;bundle-version="3.7.100",
org.eclipse.core.filesystem;bundle-version="1.3.100",
org.junit;bundle-version="[4.8.2,5.0.0)",
org.jboss.tools.openshift.egit.core;bundle-version="1.0.0"
Modified: branches/jbosstools-3.3.x/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/EGitUtilsTest.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/EGitUtilsTest.java 2012-07-31 10:48:22 UTC (rev 42804)
+++ branches/jbosstools-3.3.x/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/EGitUtilsTest.java 2012-07-31 10:56:26 UTC (rev 42805)
@@ -1,9 +1,9 @@
package org.jboss.tools.openshift.egit.internal.test;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
import java.io.File;
import java.io.IOException;
@@ -17,6 +17,7 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.egit.core.Activator;
+import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.StoredConfig;
@@ -196,7 +197,7 @@
}
@Test
- public void addedButNotCommittedIsDirty() throws IOException {
+ public void addedButNotCommittedIsDirty() throws IOException, GitAPIException {
assertFalse(EGitUtils.isDirty(testRepository.getRepository()));
File file = testRepository.createFile("a.txt", "protoculture");
testRepository.add(file);
Modified: branches/jbosstools-3.3.x/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/util/TestRepository.java
===================================================================
--- branches/jbosstools-3.3.x/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/util/TestRepository.java 2012-07-31 10:48:22 UTC (rev 42804)
+++ branches/jbosstools-3.3.x/openshift/tests/org.jboss.tools.openshift.egit.test/src/org/jboss/tools/openshift/egit/internal/test/util/TestRepository.java 2012-07-31 10:56:26 UTC (rev 42805)
@@ -34,12 +34,10 @@
import org.eclipse.egit.core.op.DisconnectProviderOperation;
import org.eclipse.jgit.api.CommitCommand;
import org.eclipse.jgit.api.Git;
-import org.eclipse.jgit.api.errors.ConcurrentRefUpdateException;
+import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.api.errors.NoFilepatternException;
-import org.eclipse.jgit.api.errors.NoHeadException;
-import org.eclipse.jgit.api.errors.NoMessageException;
-import org.eclipse.jgit.api.errors.WrongRepositoryStateException;
+import org.eclipse.jgit.api.errors.UnmergedPathsException;
import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.dircache.DirCacheEntry;
import org.eclipse.jgit.errors.UnmergedPathException;
@@ -132,15 +130,11 @@
* commit message
* @return commit object
* @throws IOException
- * @throws NoHeadException
- * @throws NoMessageException
- * @throws ConcurrentRefUpdateException
* @throws JGitInternalException
- * @throws WrongRepositoryStateException
+ * @throws GitAPIException
*/
public RevCommit createInitialCommit(String message) throws IOException,
- NoHeadException, NoMessageException, ConcurrentRefUpdateException,
- JGitInternalException, WrongRepositoryStateException {
+ JGitInternalException, GitAPIException {
String repoPath = repository.getWorkTree().getAbsolutePath();
File file = new File(repoPath, "dummy");
if (!file.exists())
@@ -252,17 +246,14 @@
* commit message
* @return commit object
*
- * @throws NoHeadException
- * @throws NoMessageException
* @throws UnmergedPathException
- * @throws ConcurrentRefUpdateException
* @throws JGitInternalException
- * @throws WrongRepositoryStateException
+ * @throws GitAPIException
+ * @throws UnmergedPathsException
*/
- public RevCommit commit(String message) throws NoHeadException,
- NoMessageException, UnmergedPathException,
- ConcurrentRefUpdateException, JGitInternalException,
- WrongRepositoryStateException {
+ public RevCommit commit(String message) throws UnmergedPathException,
+ JGitInternalException,
+ UnmergedPathsException, GitAPIException {
Git git = new Git(repository);
CommitCommand commitCommand = git.commit();
commitCommand.setAuthor("J. Git", "j.git(a)egit.org");
@@ -271,7 +262,7 @@
return commitCommand.call();
}
- public void add(IFile file) throws IOException {
+ public void add(IFile file) throws IOException, GitAPIException {
add(new File(file.getLocation().toOSString()));
}
@@ -280,8 +271,9 @@
*
* @param file
* @throws IOException
+ * @throws GitAPIException
*/
- public void add(File file) throws IOException {
+ public void add(File file) throws IOException, GitAPIException {
String repoPath =
getRepoRelativePath(file.getAbsolutePath());
try {
12 years, 4 months
JBoss Tools SVN: r42804 - trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-07-31 06:48:22 -0400 (Tue, 31 Jul 2012)
New Revision: 42804
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeDeltaImpl.java
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeImpl.java
Log:
JBIDE-12385 to trunk
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeDeltaImpl.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeDeltaImpl.java 2012-07-31 10:43:13 UTC (rev 42803)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeDeltaImpl.java 2012-07-31 10:48:22 UTC (rev 42804)
@@ -212,9 +212,9 @@
// Using a different delta constructor here to force
// whether this child is added or removed.
return new ArchiveNodeDeltaImpl(this, impl, addedOrRemoved,
- (HashMap)impl.attributeChanges.clone(),
- (HashMap)impl.propertyChanges.clone(),
- (HashMap)impl.childChanges.clone());
+ impl.getAttributeChanges(),
+ impl.getPropertyChanges(),
+ impl.getChildChanges());
}
return child.getDelta();
}
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeImpl.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeImpl.java 2012-07-31 10:43:13 UTC (rev 42803)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/model/internal/ArchiveNodeImpl.java 2012-07-31 10:48:22 UTC (rev 42804)
@@ -41,11 +41,24 @@
protected ArrayList<ArchiveNodeImpl> children;
// cached data for deltas
- protected HashMap<String, NodeDelta> attributeChanges;
- protected HashMap<String, NodeDelta> propertyChanges;
- protected HashMap<IArchiveNode, Integer> childChanges;
+ private HashMap<String, NodeDelta> attributeChanges;
+ public synchronized HashMap<String, NodeDelta> getAttributeChanges() {
+ return (HashMap<String, NodeDelta>)attributeChanges.clone();
+ }
+ public synchronized HashMap<String, NodeDelta> getPropertyChanges() {
+ return (HashMap<String, NodeDelta>)propertyChanges.clone();
+ }
+ public synchronized HashMap<IArchiveNode, Integer> getChildChanges() {
+ return (HashMap<IArchiveNode, Integer>)childChanges.clone();
+ }
+
+
+ private HashMap<String, NodeDelta> propertyChanges;
+ private HashMap<IArchiveNode, Integer> childChanges;
+
+
public ArchiveNodeImpl (XbPackageNodeWithProperties delegate) {
nodeDelegate = delegate;
children = new ArrayList<ArchiveNodeImpl>();
@@ -260,7 +273,7 @@
* @param child
* @param addInDelegate
*/
- public final void addChild(IArchiveNode child, boolean addInDelegate) throws ArchivesModelException {
+ public synchronized final void addChild(IArchiveNode child, boolean addInDelegate) throws ArchivesModelException {
Assert.isNotNull(child);
ArchiveNodeImpl childImpl = (ArchiveNodeImpl) child;
children.add(childImpl);
@@ -302,7 +315,7 @@
* (non-Javadoc)
* @see org.jboss.ide.eclipse.archives.core.model.IArchiveNode#removeChild(org.jboss.ide.eclipse.archives.core.model.IArchiveNode)
*/
- public void removeChild(IArchiveNode node) {
+ public synchronized void removeChild(IArchiveNode node) {
Assert.isNotNull(node);
ArchiveNodeImpl impl = (ArchiveNodeImpl) node;
boolean removed = false;
@@ -322,64 +335,62 @@
/**
* An attribute has changed. Save the change so it can be represented in a delta
*/
- protected void attributeChanged(String key, Object beforeValue, Object afterValue) {
+ protected synchronized void attributeChanged(String key, Object beforeValue, Object afterValue) {
int kind = IArchiveNodeDelta.ATTRIBUTE_CHANGED;
- HashMap<String, NodeDelta> map = attributeChanges;
// short circuit if no change has REALLY occurred
if( beforeValue != null && beforeValue.equals(afterValue)) return;
- if( map.containsKey(key)) {
- Object original = map.get(key).getBefore();
+ if( attributeChanges.containsKey(key)) {
+ Object original = attributeChanges.get(key).getBefore();
if( original == null && afterValue == null )
- map.remove(key);
+ attributeChanges.remove(key);
else if( original == null )
- map.put(key, new NodeDelta(original, afterValue, kind));
+ attributeChanges.put(key, new NodeDelta(original, afterValue, kind));
else if( original.equals(afterValue))
// value was changed from x to y, then back to x. Therefore, no change
- map.remove(key);
+ attributeChanges.remove(key);
else
// value was changed from x to y to z.
// Before should remain x, after should become z
- map.put(key, new NodeDelta(original, afterValue, kind));
+ attributeChanges.put(key, new NodeDelta(original, afterValue, kind));
} else {
// added
- map.put(key, new NodeDelta(beforeValue, afterValue, kind));
+ attributeChanges.put(key, new NodeDelta(beforeValue, afterValue, kind));
}
}
/**
* A property has changed. Save the change so it can be represented in a delta
*/
- protected void propertyChanged(String key, Object beforeValue, Object afterValue) {
- HashMap<String, NodeDelta> changeMap = propertyChanges;
+ protected synchronized void propertyChanged(String key, Object beforeValue, Object afterValue) {
// short circuit if no change has REALLY occurred
if( beforeValue != null && beforeValue.equals(afterValue)) return;
- if( changeMap.containsKey(key)) {
+ if( propertyChanges.containsKey(key)) {
// element has already been added, removed, or changed since last save
- Object original = changeMap.get(key).getBefore();
+ Object original = propertyChanges.get(key).getBefore();
if( original == null && afterValue == null )
- changeMap.remove(key);
+ propertyChanges.remove(key);
else if( original == null )
- changeMap.put(key, new NodeDelta(original, afterValue, IArchiveNodeDelta.PROPERTY_ADDED));
+ propertyChanges.put(key, new NodeDelta(original, afterValue, IArchiveNodeDelta.PROPERTY_ADDED));
else if( original.equals(afterValue))
// value was changed from x to y, then back to x. Therefore, no change
- changeMap.remove(key);
+ propertyChanges.remove(key);
else if( afterValue == null ) {
// changed from x to y to null, so removed
- changeMap.put(key, new NodeDelta(original, afterValue, IArchiveNodeDelta.PROPERTY_REMOVED));
+ propertyChanges.put(key, new NodeDelta(original, afterValue, IArchiveNodeDelta.PROPERTY_REMOVED));
} else {
// changed from x to y to z, so changed
- changeMap.put(key, new NodeDelta(original, afterValue, IArchiveNodeDelta.PROPERTY_CHANGED));
+ propertyChanges.put(key, new NodeDelta(original, afterValue, IArchiveNodeDelta.PROPERTY_CHANGED));
}
} else {
int kind;
if( beforeValue == null ) kind = IArchiveNodeDelta.PROPERTY_ADDED;
else if( afterValue == null ) kind = IArchiveNodeDelta.PROPERTY_REMOVED;
else kind = IArchiveNodeDelta.PROPERTY_CHANGED;
- changeMap.put(key, new NodeDelta(beforeValue, afterValue, kind));
+ propertyChanges.put(key, new NodeDelta(beforeValue, afterValue, kind));
}
}
@@ -388,7 +399,7 @@
* @param node
* @param changeType
*/
- protected void childChanges(IArchiveNode node, int changeType) {
+ protected synchronized void childChanges(IArchiveNode node, int changeType) {
if( childChanges.containsKey(node)) {
int lastChange = childChanges.get(node).intValue();
if( lastChange == IArchiveNodeDelta.CHILD_ADDED && changeType == IArchiveNodeDelta.CHILD_REMOVED) {
@@ -406,14 +417,15 @@
* @see org.jboss.ide.eclipse.archives.core.model.IArchiveNode#getDelta()
*/
public IArchiveNodeDelta getDelta() {
- return new ArchiveNodeDeltaImpl(null, this, (HashMap<String, NodeDelta>)attributeChanges.clone(),
- (HashMap<String, NodeDelta>)propertyChanges.clone(), (HashMap<IArchiveNode, Integer>)childChanges.clone());
+ return new ArchiveNodeDeltaImpl(null, this, getAttributeChanges(),
+ getPropertyChanges(), getChildChanges());
}
+
/**
* Forget all past state
*/
- public void clearDelta() {
+ public synchronized void clearDelta() {
attributeChanges.clear();
propertyChanges.clear();
childChanges.clear();
12 years, 4 months