Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Merks2013-10-27 07:58:06 +0000
committerEd Merks2013-10-27 07:58:06 +0000
commitb5b1fdc376a8e032934019395dbb6247549e6ee8 (patch)
treec738314dd6f2a475d2e7ad2bc8473eb59b1de14d /plugins
parenta91e0583eb4930223fbdd86cb30f858e23e53619 (diff)
downloadcdo-b5b1fdc376a8e032934019395dbb6247549e6ee8.tar.gz
cdo-b5b1fdc376a8e032934019395dbb6247549e6ee8.tar.xz
cdo-b5b1fdc376a8e032934019395dbb6247549e6ee8.zip
Improve setup related models
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/SetupTaskItemProvider.java13
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/internal/setup/ui/ProgressLogDialog.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/EclipseIniTaskImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/GitCloneTaskImpl.java16
4 files changed, 39 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/SetupTaskItemProvider.java b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/SetupTaskItemProvider.java
index acd3d568ee..e415fa352e 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/SetupTaskItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup.edit/src/org/eclipse/emf/cdo/releng/setup/provider/SetupTaskItemProvider.java
@@ -336,12 +336,16 @@ public class SetupTaskItemProvider extends ItemProviderAdapter implements IEditi
StringBuilder builder = new StringBuilder(itemDelegator.getText(object));
if (!(object instanceof Collection<?>))
{
- builder.append(" ~ ");
int index = builder.length();
object = itemDelegator.getParent(object);
while (object != null && !(object instanceof Configuration) && !(object instanceof Resource))
{
- if (builder.length() != index)
+ if (builder.length() == index)
+ {
+ builder.insert(index, " (");
+ index += 2;
+ }
+ else
{
builder.insert(index, " - ");
}
@@ -351,6 +355,11 @@ public class SetupTaskItemProvider extends ItemProviderAdapter implements IEditi
object = itemDelegator.getParent(object);
}
+
+ if (builder.length() != index)
+ {
+ builder.append(")");
+ }
}
return builder.toString();
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/internal/setup/ui/ProgressLogDialog.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/internal/setup/ui/ProgressLogDialog.java
index fd3fac531f..e548980b59 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/internal/setup/ui/ProgressLogDialog.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/internal/setup/ui/ProgressLogDialog.java
@@ -503,7 +503,8 @@ public class ProgressLogDialog extends TitleAreaDialog implements ProgressLog
{
long seconds = (System.currentTimeMillis() - start) / 1000;
dialog.log("Took " + seconds + " seconds.");
- dialog.log("Press OK to close the dialog" + (restart[0] ? " and restart Eclipse" : "") + "...");
+ dialog.log("Press OK to close the dialog"
+ + (restart[0] && Activator.SETUP_IDE ? " and restart Eclipse" : "") + "...");
dialog.setFinished();
}
@@ -519,7 +520,7 @@ public class ProgressLogDialog extends TitleAreaDialog implements ProgressLog
}
});
- if (dialog.open() == ProgressLogDialog.OK && restart[0])
+ if (dialog.open() == ProgressLogDialog.OK && restart[0] && Activator.SETUP_IDE)
{
PlatformUI.getWorkbench().restart();
}
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/EclipseIniTaskImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/EclipseIniTaskImpl.java
index 0b58026282..e2aabb1399 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/EclipseIniTaskImpl.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/EclipseIniTaskImpl.java
@@ -146,7 +146,9 @@ public class EclipseIniTaskImpl extends SetupTaskImpl implements EclipseIniTask
String oldOption = option;
option = newOption;
if (eNotificationRequired())
+ {
eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.ECLIPSE_INI_TASK__OPTION, oldOption, option));
+ }
}
/**
@@ -169,7 +171,9 @@ public class EclipseIniTaskImpl extends SetupTaskImpl implements EclipseIniTask
String oldValue = value;
value = newValue;
if (eNotificationRequired())
+ {
eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.ECLIPSE_INI_TASK__VALUE, oldValue, value));
+ }
}
/**
@@ -192,7 +196,9 @@ public class EclipseIniTaskImpl extends SetupTaskImpl implements EclipseIniTask
boolean oldVm = vm;
vm = newVm;
if (eNotificationRequired())
+ {
eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.ECLIPSE_INI_TASK__VM, oldVm, vm));
+ }
}
/**
@@ -290,7 +296,9 @@ public class EclipseIniTaskImpl extends SetupTaskImpl implements EclipseIniTask
public String toString()
{
if (eIsProxy())
+ {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (option: ");
@@ -377,6 +385,7 @@ public class EclipseIniTaskImpl extends SetupTaskImpl implements EclipseIniTask
{
context.log("Changing " + file + " (" + getLabel(expandedValue) + ")");
context.getOS().writeText(file, contents);
+ context.setRestartNeeded();
}
}
} // EclipseIniTaskImpl
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/GitCloneTaskImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/GitCloneTaskImpl.java
index 8ed0e4caff..727ff0a8ec 100644
--- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/GitCloneTaskImpl.java
+++ b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/GitCloneTaskImpl.java
@@ -185,7 +185,9 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
String oldName = name;
name = newName;
if (eNotificationRequired())
+ {
eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.GIT_CLONE_TASK__NAME, oldName, name));
+ }
}
/**
@@ -208,8 +210,10 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
String oldRemoteName = remoteName;
remoteName = newRemoteName;
if (eNotificationRequired())
+ {
eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.GIT_CLONE_TASK__REMOTE_NAME, oldRemoteName,
remoteName));
+ }
}
/**
@@ -232,8 +236,10 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
String oldRemoteURI = remoteURI;
remoteURI = newRemoteURI;
if (eNotificationRequired())
+ {
eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.GIT_CLONE_TASK__REMOTE_URI, oldRemoteURI,
remoteURI));
+ }
}
/**
@@ -256,8 +262,10 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
String oldCheckoutBranch = checkoutBranch;
checkoutBranch = newCheckoutBranch;
if (eNotificationRequired())
+ {
eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.GIT_CLONE_TASK__CHECKOUT_BRANCH,
oldCheckoutBranch, checkoutBranch));
+ }
}
/**
@@ -366,7 +374,9 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
public String toString()
{
if (eIsProxy())
+ {
return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (name: ");
@@ -411,6 +421,9 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
}
}
+ /**
+ * @author Ed Merks
+ */
private interface GitDelegate
{
public boolean isNeeded(SetupTaskContext context, String name, String checkoutBranch, String remoteName)
@@ -422,6 +435,9 @@ public class GitCloneTaskImpl extends SetupTaskImpl implements GitCloneTask
public void dispose();
}
+ /**
+ * @author Ed Merks
+ */
private static class GitUtil implements GitDelegate
{
private File workDir;

Back to the top