Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 172835 Details for
Bug 317384
[build] add "Run build" functionality
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Runing build
mylyn-run.build.diff (text/plain), 39.27 KB, created by
Markus Knittig
on 2010-06-26 09:13:55 EDT
(
hide
)
Description:
Runing build
Filename:
MIME Type:
Creator:
Markus Knittig
Created:
2010-06-26 09:13:55 EDT
Size:
39.27 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.builds.core >Index: src/org/eclipse/mylyn/builds/core/IBuildPlan.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.builds.core/src/org/eclipse/mylyn/builds/core/IBuildPlan.java,v >retrieving revision 1.4 >diff -u -r1.4 IBuildPlan.java >--- src/org/eclipse/mylyn/builds/core/IBuildPlan.java 24 Jun 2010 06:07:52 -0000 1.4 >+++ src/org/eclipse/mylyn/builds/core/IBuildPlan.java 26 Jun 2010 13:00:49 -0000 >@@ -13,6 +13,9 @@ > > import java.util.List; > >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IStatus; >+ > /** > * @author Steffen Pingel > */ >@@ -38,4 +41,6 @@ > > public IBuildPlanWorkingCopy createWorkingCopy(); > >+ IStatus run(IOperationMonitor monitor) throws CoreException; >+ > } >Index: src/org/eclipse/mylyn/builds/core/spi/BuildServerBehaviour.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.builds.core/src/org/eclipse/mylyn/builds/core/spi/BuildServerBehaviour.java,v >retrieving revision 1.2 >diff -u -r1.2 BuildServerBehaviour.java >--- src/org/eclipse/mylyn/builds/core/spi/BuildServerBehaviour.java 30 May 2010 19:27:55 -0000 1.2 >+++ src/org/eclipse/mylyn/builds/core/spi/BuildServerBehaviour.java 26 Jun 2010 13:00:49 -0000 >@@ -15,6 +15,7 @@ > > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IStatus; >+import org.eclipse.mylyn.builds.core.IBuildElement; > import org.eclipse.mylyn.builds.core.IBuildPlan; > import org.eclipse.mylyn.builds.core.IBuildServer; > import org.eclipse.mylyn.builds.core.IOperationMonitor; >@@ -38,4 +39,6 @@ > > public abstract IStatus validate(IOperationMonitor monitor) throws CoreException; > >+ public abstract IStatus runBuild(IBuildElement element, IOperationMonitor monitor) throws CoreException; >+ > } >Index: src/org/eclipse/mylyn/internal/builds/core/BuildPlan.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.builds.core/src/org/eclipse/mylyn/internal/builds/core/BuildPlan.java,v >retrieving revision 1.4 >diff -u -r1.4 BuildPlan.java >--- src/org/eclipse/mylyn/internal/builds/core/BuildPlan.java 24 Jun 2010 06:07:52 -0000 1.4 >+++ src/org/eclipse/mylyn/internal/builds/core/BuildPlan.java 26 Jun 2010 13:00:50 -0000 >@@ -8,6 +8,8 @@ > > import java.util.Collection; > >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IStatus; > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.EList; >@@ -24,11 +26,11 @@ > import org.eclipse.mylyn.builds.core.IBuildPlan; > import org.eclipse.mylyn.builds.core.IBuildPlanWorkingCopy; > import org.eclipse.mylyn.builds.core.IBuildServer; >+import org.eclipse.mylyn.builds.core.IOperationMonitor; > > /** > * <!-- begin-user-doc --> A representation of the model object '<em><b>Plan</b></em>'. <!-- end-user-doc --> >- * >- * >+ * > * @see org.eclipse.mylyn.internal.builds.core.BuildPackage#getBuildPlan() > * @model kind="class" superTypes="org.eclipse.mylyn.internal.builds.core.IBuildPlanWorkingCopy" > * @generated >@@ -45,8 +47,8 @@ > protected static final String URL_EDEFAULT = null; > > /** >- * The cached value of the '{@link #getUrl() <em>Url</em>}' attribute. >- * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * The cached value of the '{@link #getUrl() <em>Url</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @see #getUrl() > * @generated > * @ordered >@@ -74,9 +76,9 @@ > protected String name = NAME_EDEFAULT; > > /** >- * The cached value of the '{@link #getChildren() <em>Children</em>}' reference list. >- * <!-- begin-user-doc --> <!-- >+ * The cached value of the '{@link #getChildren() <em>Children</em>}' reference list. <!-- begin-user-doc --> <!-- > * end-user-doc --> >+ * > * @see #getChildren() > * @generated > * @ordered >@@ -84,9 +86,9 @@ > protected EList<IBuildPlan> children; > > /** >- * The cached value of the '{@link #getParent() <em>Parent</em>}' reference. >- * <!-- begin-user-doc --> <!-- >+ * The cached value of the '{@link #getParent() <em>Parent</em>}' reference. <!-- begin-user-doc --> <!-- > * end-user-doc --> >+ * > * @see #getParent() > * @generated > * @ordered >@@ -94,9 +96,9 @@ > protected IBuildPlan parent; > > /** >- * The default value of the '{@link #getHealth() <em>Health</em>}' attribute. >- * <!-- begin-user-doc --> <!-- >+ * The default value of the '{@link #getHealth() <em>Health</em>}' attribute. <!-- begin-user-doc --> <!-- > * end-user-doc --> >+ * > * @see #getHealth() > * @generated > * @ordered >@@ -104,9 +106,9 @@ > protected static final int HEALTH_EDEFAULT = -1; > > /** >- * The cached value of the '{@link #getHealth() <em>Health</em>}' attribute. >- * <!-- begin-user-doc --> <!-- >+ * The cached value of the '{@link #getHealth() <em>Health</em>}' attribute. <!-- begin-user-doc --> <!-- > * end-user-doc --> >+ * > * @see #getHealth() > * @generated > * @ordered >@@ -114,8 +116,8 @@ > protected int health = HEALTH_EDEFAULT; > > /** >- * The default value of the '{@link #getId() <em>Id</em>}' attribute. >- * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * The default value of the '{@link #getId() <em>Id</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @see #getId() > * @generated > * @ordered >@@ -123,8 +125,8 @@ > protected static final String ID_EDEFAULT = null; > > /** >- * The cached value of the '{@link #getId() <em>Id</em>}' attribute. >- * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * The cached value of the '{@link #getId() <em>Id</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @see #getId() > * @generated > * @ordered >@@ -152,9 +154,9 @@ > protected String info = INFO_EDEFAULT; > > /** >- * The default value of the '{@link #isSelected() <em>Selected</em>}' attribute. >- * <!-- begin-user-doc --> <!-- >+ * The default value of the '{@link #isSelected() <em>Selected</em>}' attribute. <!-- begin-user-doc --> <!-- > * end-user-doc --> >+ * > * @see #isSelected() > * @generated > * @ordered >@@ -162,9 +164,9 @@ > protected static final boolean SELECTED_EDEFAULT = false; > > /** >- * The cached value of the '{@link #isSelected() <em>Selected</em>}' attribute. >- * <!-- begin-user-doc --> <!-- >+ * The cached value of the '{@link #isSelected() <em>Selected</em>}' attribute. <!-- begin-user-doc --> <!-- > * end-user-doc --> >+ * > * @see #isSelected() > * @generated > * @ordered >@@ -172,9 +174,9 @@ > protected boolean selected = SELECTED_EDEFAULT; > > /** >- * The default value of the '{@link #getSummary() <em>Summary</em>}' attribute. >- * <!-- begin-user-doc --> <!-- >+ * The default value of the '{@link #getSummary() <em>Summary</em>}' attribute. <!-- begin-user-doc --> <!-- > * end-user-doc --> >+ * > * @see #getSummary() > * @generated > * @ordered >@@ -182,9 +184,9 @@ > protected static final String SUMMARY_EDEFAULT = null; > > /** >- * The cached value of the '{@link #getSummary() <em>Summary</em>}' attribute. >- * <!-- begin-user-doc --> <!-- >+ * The cached value of the '{@link #getSummary() <em>Summary</em>}' attribute. <!-- begin-user-doc --> <!-- > * end-user-doc --> >+ * > * @see #getSummary() > * @generated > * @ordered >@@ -192,9 +194,9 @@ > protected String summary = SUMMARY_EDEFAULT; > > /** >- * The default value of the '{@link #getState() <em>State</em>}' attribute. >- * <!-- begin-user-doc --> <!-- >+ * The default value of the '{@link #getState() <em>State</em>}' attribute. <!-- begin-user-doc --> <!-- > * end-user-doc --> >+ * > * @see #getState() > * @generated > * @ordered >@@ -212,9 +214,9 @@ > protected BuildState state = STATE_EDEFAULT; > > /** >- * The default value of the '{@link #getStatus() <em>Status</em>}' attribute. >- * <!-- begin-user-doc --> <!-- >+ * The default value of the '{@link #getStatus() <em>Status</em>}' attribute. <!-- begin-user-doc --> <!-- > * end-user-doc --> >+ * > * @see #getStatus() > * @generated > * @ordered >@@ -222,9 +224,9 @@ > protected static final BuildStatus STATUS_EDEFAULT = null; > > /** >- * The cached value of the '{@link #getStatus() <em>Status</em>}' attribute. >- * <!-- begin-user-doc --> <!-- >+ * The cached value of the '{@link #getStatus() <em>Status</em>}' attribute. <!-- begin-user-doc --> <!-- > * end-user-doc --> >+ * > * @see #getStatus() > * @generated > * @ordered >@@ -233,6 +235,7 @@ > > /** > * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @generated > */ > protected BuildPlan() { >@@ -241,6 +244,7 @@ > > /** > * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @generated > */ > @Override >@@ -249,12 +253,12 @@ > } > > /** >- * Returns the value of the '<em><b>Url</b></em>' attribute. >- * <!-- begin-user-doc --> >+ * Returns the value of the '<em><b>Url</b></em>' attribute. <!-- begin-user-doc --> > * <p> > * If the meaning of the '<em>Url</em>' attribute isn't clear, there really should be more of a description here... > * </p> > * <!-- end-user-doc --> >+ * > * @return the value of the '<em>Url</em>' attribute. > * @see #setUrl(String) > * @see org.eclipse.mylyn.internal.builds.core.BuildPackage#getIBuildElement_Url() >@@ -268,24 +272,27 @@ > /** > * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getUrl <em>Url</em>}' attribute. > * <!-- begin-user-doc --> <!-- end-user-doc --> >- * @param value the new value of the '<em>Url</em>' attribute. >+ * >+ * @param value >+ * the new value of the '<em>Url</em>' attribute. > * @see #getUrl() > * @generated > */ > public void setUrl(String newUrl) { > String oldUrl = url; > url = newUrl; >- if (eNotificationRequired()) >+ if (eNotificationRequired()) { > eNotify(new ENotificationImpl(this, Notification.SET, BuildPackage.BUILD_PLAN__URL, oldUrl, url)); >+ } > } > > /** >- * Returns the value of the '<em><b>Name</b></em>' attribute. >- * <!-- begin-user-doc --> >+ * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> > * <p> > * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here... > * </p> > * <!-- end-user-doc --> >+ * > * @return the value of the '<em>Name</em>' attribute. > * @see #setName(String) > * @see org.eclipse.mylyn.internal.builds.core.BuildPackage#getIBuildElement_Name() >@@ -299,41 +306,47 @@ > /** > * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getName <em>Name</em>}' attribute. > * <!-- begin-user-doc --> <!-- end-user-doc --> >- * @param value the new value of the '<em>Name</em>' attribute. >+ * >+ * @param value >+ * the new value of the '<em>Name</em>' attribute. > * @see #getName() > * @generated > */ > public void setName(String newName) { > String oldName = name; > name = newName; >- if (eNotificationRequired()) >+ if (eNotificationRequired()) { > eNotify(new ENotificationImpl(this, Notification.SET, BuildPackage.BUILD_PLAN__NAME, oldName, name)); >+ } > } > > /** >- * Returns the value of the '<em><b>Server</b></em>' container reference. >- * It is bidirectional and its opposite is '{@link org.eclipse.mylyn.builds.core.IBuildServer#getPlans <em>Plans</em>}'. >- * <!-- begin-user-doc --> >+ * Returns the value of the '<em><b>Server</b></em>' container reference. It is bidirectional and its opposite is ' >+ * {@link org.eclipse.mylyn.builds.core.IBuildServer#getPlans <em>Plans</em>}'. <!-- begin-user-doc --> > * <p> > * If the meaning of the '<em>Server</em>' reference isn't clear, there really should be more of a description > * here... > * </p> > * <!-- end-user-doc --> >+ * > * @return the value of the '<em>Server</em>' container reference. > * @see #setServer(IBuildServer) > * @see org.eclipse.mylyn.internal.builds.core.BuildPackage#getIBuildPlan_Server() > * @see org.eclipse.mylyn.builds.core.IBuildServer#getPlans >- * @model type="org.eclipse.mylyn.internal.builds.core.IBuildServer" opposite="plans" required="true" transient="false" >+ * @model type="org.eclipse.mylyn.internal.builds.core.IBuildServer" opposite="plans" required="true" >+ * transient="false" > * @generated > */ > public IBuildServer getServer() { >- if (eContainerFeatureID() != BuildPackage.BUILD_PLAN__SERVER) >+ if (eContainerFeatureID() != BuildPackage.BUILD_PLAN__SERVER) { > return null; >+ } > return (IBuildServer) eContainer(); > } > > /** > * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @generated > */ > public NotificationChain basicSetServer(IBuildServer newServer, NotificationChain msgs) { >@@ -342,40 +355,47 @@ > } > > /** >- * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getServer <em>Server</em>}' container reference. >- * <!-- begin-user-doc --> <!-- end-user-doc --> >- * @param value the new value of the '<em>Server</em>' container reference. >+ * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getServer <em>Server</em>}' >+ * container reference. <!-- begin-user-doc --> <!-- end-user-doc --> >+ * >+ * @param value >+ * the new value of the '<em>Server</em>' container reference. > * @see #getServer() > * @generated > */ > public void setServer(IBuildServer newServer) { > if (newServer != eInternalContainer() > || (eContainerFeatureID() != BuildPackage.BUILD_PLAN__SERVER && newServer != null)) { >- if (EcoreUtil.isAncestor(this, (EObject) newServer)) >+ if (EcoreUtil.isAncestor(this, (EObject) newServer)) { > throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); >+ } > NotificationChain msgs = null; >- if (eInternalContainer() != null) >+ if (eInternalContainer() != null) { > msgs = eBasicRemoveFromContainer(msgs); >- if (newServer != null) >+ } >+ if (newServer != null) { > msgs = ((InternalEObject) newServer).eInverseAdd(this, BuildPackage.IBUILD_SERVER__PLANS, > IBuildServer.class, msgs); >+ } > msgs = basicSetServer(newServer, msgs); >- if (msgs != null) >+ if (msgs != null) { > msgs.dispatch(); >- } else if (eNotificationRequired()) >+ } >+ } else if (eNotificationRequired()) { > eNotify(new ENotificationImpl(this, Notification.SET, BuildPackage.BUILD_PLAN__SERVER, newServer, newServer)); >+ } > } > > /** >- * Returns the value of the '<em><b>Children</b></em>' reference list. >- * The list contents are of type {@link org.eclipse.mylyn.builds.core.IBuildPlan}. >- * It is bidirectional and its opposite is '{@link org.eclipse.mylyn.builds.core.IBuildPlan#getParent <em>Parent</em>}'. >- * <!-- begin-user-doc --> >+ * Returns the value of the '<em><b>Children</b></em>' reference list. The list contents are of type >+ * {@link org.eclipse.mylyn.builds.core.IBuildPlan}. It is bidirectional and its opposite is ' >+ * {@link org.eclipse.mylyn.builds.core.IBuildPlan#getParent <em>Parent</em>}'. <!-- begin-user-doc --> > * <p> > * If the meaning of the '<em>Children</em>' reference list isn't clear, there really should be more of a > * description here... > * </p> > * <!-- end-user-doc --> >+ * > * @return the value of the '<em>Children</em>' reference list. > * @see org.eclipse.mylyn.internal.builds.core.BuildPackage#getIBuildPlan_Children() > * @see org.eclipse.mylyn.builds.core.IBuildPlan#getParent >@@ -391,14 +411,14 @@ > } > > /** >- * Returns the value of the '<em><b>Parent</b></em>' reference. >- * It is bidirectional and its opposite is '{@link org.eclipse.mylyn.builds.core.IBuildPlan#getChildren <em>Children</em>}'. >- * <!-- begin-user-doc --> >+ * Returns the value of the '<em><b>Parent</b></em>' reference. It is bidirectional and its opposite is ' >+ * {@link org.eclipse.mylyn.builds.core.IBuildPlan#getChildren <em>Children</em>}'. <!-- begin-user-doc --> > * <p> > * If the meaning of the '<em>Parent</em>' reference isn't clear, there really should be more of a description > * here... > * </p> > * <!-- end-user-doc --> >+ * > * @return the value of the '<em>Parent</em>' reference. > * @see #setParent(IBuildPlan) > * @see org.eclipse.mylyn.internal.builds.core.BuildPackage#getIBuildPlan_Parent() >@@ -411,9 +431,10 @@ > InternalEObject oldParent = (InternalEObject) parent; > parent = (IBuildPlan) eResolveProxy(oldParent); > if (parent != oldParent) { >- if (eNotificationRequired()) >+ if (eNotificationRequired()) { > eNotify(new ENotificationImpl(this, Notification.RESOLVE, BuildPackage.BUILD_PLAN__PARENT, > oldParent, parent)); >+ } > } > } > return parent; >@@ -421,6 +442,7 @@ > > /** > * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @generated > */ > public IBuildPlan basicGetParent() { >@@ -429,6 +451,7 @@ > > /** > * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @generated > */ > public NotificationChain basicSetParent(IBuildPlan newParent, NotificationChain msgs) { >@@ -437,35 +460,42 @@ > if (eNotificationRequired()) { > ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, > BuildPackage.BUILD_PLAN__PARENT, oldParent, newParent); >- if (msgs == null) >+ if (msgs == null) { > msgs = notification; >- else >+ } else { > msgs.add(notification); >+ } > } > return msgs; > } > > /** >- * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getParent <em>Parent</em>}' reference. >- * <!-- begin-user-doc --> <!-- end-user-doc --> >- * @param value the new value of the '<em>Parent</em>' reference. >+ * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getParent <em>Parent</em>}' >+ * reference. <!-- begin-user-doc --> <!-- end-user-doc --> >+ * >+ * @param value >+ * the new value of the '<em>Parent</em>' reference. > * @see #getParent() > * @generated > */ > public void setParent(IBuildPlan newParent) { > if (newParent != parent) { > NotificationChain msgs = null; >- if (parent != null) >+ if (parent != null) { > msgs = ((InternalEObject) parent).eInverseRemove(this, BuildPackage.IBUILD_PLAN__CHILDREN, > IBuildPlan.class, msgs); >- if (newParent != null) >+ } >+ if (newParent != null) { > msgs = ((InternalEObject) newParent).eInverseAdd(this, BuildPackage.IBUILD_PLAN__CHILDREN, > IBuildPlan.class, msgs); >+ } > msgs = basicSetParent(newParent, msgs); >- if (msgs != null) >+ if (msgs != null) { > msgs.dispatch(); >- } else if (eNotificationRequired()) >+ } >+ } else if (eNotificationRequired()) { > eNotify(new ENotificationImpl(this, Notification.SET, BuildPackage.BUILD_PLAN__PARENT, newParent, newParent)); >+ } > } > > /** >@@ -488,26 +518,29 @@ > } > > /** >- * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getHealth <em>Health</em>}' attribute. >- * <!-- begin-user-doc --> <!-- end-user-doc --> >- * @param value the new value of the '<em>Health</em>' attribute. >+ * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getHealth <em>Health</em>}' >+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> >+ * >+ * @param value >+ * the new value of the '<em>Health</em>' attribute. > * @see #getHealth() > * @generated > */ > public void setHealth(int newHealth) { > int oldHealth = health; > health = newHealth; >- if (eNotificationRequired()) >+ if (eNotificationRequired()) { > eNotify(new ENotificationImpl(this, Notification.SET, BuildPackage.BUILD_PLAN__HEALTH, oldHealth, health)); >+ } > } > > /** >- * Returns the value of the '<em><b>Id</b></em>' attribute. >- * <!-- begin-user-doc --> >+ * Returns the value of the '<em><b>Id</b></em>' attribute. <!-- begin-user-doc --> > * <p> > * If the meaning of the '<em>Id</em>' attribute isn't clear, there really should be more of a description here... > * </p> > * <!-- end-user-doc --> >+ * > * @return the value of the '<em>Id</em>' attribute. > * @see #setId(String) > * @see org.eclipse.mylyn.internal.builds.core.BuildPackage#getIBuildPlan_Id() >@@ -521,25 +554,28 @@ > /** > * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getId <em>Id</em>}' attribute. > * <!-- begin-user-doc --> <!-- end-user-doc --> >- * @param value the new value of the '<em>Id</em>' attribute. >+ * >+ * @param value >+ * the new value of the '<em>Id</em>' attribute. > * @see #getId() > * @generated > */ > public void setId(String newId) { > String oldId = id; > id = newId; >- if (eNotificationRequired()) >+ if (eNotificationRequired()) { > eNotify(new ENotificationImpl(this, Notification.SET, BuildPackage.BUILD_PLAN__ID, oldId, id)); >+ } > } > > /** >- * Returns the value of the '<em><b>Summary</b></em>' attribute. >- * <!-- begin-user-doc --> >+ * Returns the value of the '<em><b>Summary</b></em>' attribute. <!-- begin-user-doc --> > * <p> > * If the meaning of the '<em>Summary</em>' attribute isn't clear, there really should be more of a description > * here... > * </p> > * <!-- end-user-doc --> >+ * > * @return the value of the '<em>Summary</em>' attribute. > * @see #setSummary(String) > * @see org.eclipse.mylyn.internal.builds.core.BuildPackage#getIBuildPlan_Summary() >@@ -551,27 +587,30 @@ > } > > /** >- * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getSummary <em>Summary</em>}' attribute. >- * <!-- begin-user-doc --> <!-- end-user-doc --> >- * @param value the new value of the '<em>Summary</em>' attribute. >+ * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getSummary <em>Summary</em>}' >+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> >+ * >+ * @param value >+ * the new value of the '<em>Summary</em>' attribute. > * @see #getSummary() > * @generated > */ > public void setSummary(String newSummary) { > String oldSummary = summary; > summary = newSummary; >- if (eNotificationRequired()) >+ if (eNotificationRequired()) { > eNotify(new ENotificationImpl(this, Notification.SET, BuildPackage.BUILD_PLAN__SUMMARY, oldSummary, summary)); >+ } > } > > /** >- * Returns the value of the '<em><b>Status</b></em>' attribute. >- * <!-- begin-user-doc --> >+ * Returns the value of the '<em><b>Status</b></em>' attribute. <!-- begin-user-doc --> > * <p> > * If the meaning of the '<em>Status</em>' attribute isn't clear, there really should be more of a description > * here... > * </p> > * <!-- end-user-doc --> >+ * > * @return the value of the '<em>Status</em>' attribute. > * @see #setStatus(BuildStatus) > * @see org.eclipse.mylyn.internal.builds.core.BuildPackage#getIBuildPlan_Status() >@@ -583,27 +622,29 @@ > } > > /** >- * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getStatus <em>Status</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @param value the new value of the '<em>Status</em>' attribute. >+ * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getStatus <em>Status</em>}' >+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> >+ * >+ * @param value >+ * the new value of the '<em>Status</em>' attribute. > * @see #getStatus() > * @generated > */ > public void setStatus(BuildStatus newStatus) { > BuildStatus oldStatus = status; > status = newStatus; >- if (eNotificationRequired()) >+ if (eNotificationRequired()) { > eNotify(new ENotificationImpl(this, Notification.SET, BuildPackage.BUILD_PLAN__STATUS, oldStatus, status)); >+ } > } > > /** >- * Returns the value of the '<em><b>Info</b></em>' attribute. >- * <!-- begin-user-doc --> >+ * Returns the value of the '<em><b>Info</b></em>' attribute. <!-- begin-user-doc --> > * <p> > * If the meaning of the '<em>Info</em>' attribute isn't clear, there really should be more of a description here... > * </p> > * <!-- end-user-doc --> >+ * > * @return the value of the '<em>Info</em>' attribute. > * @see #setInfo(String) > * @see org.eclipse.mylyn.internal.builds.core.BuildPackage#getIBuildPlan_Info() >@@ -617,25 +658,28 @@ > /** > * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getInfo <em>Info</em>}' attribute. > * <!-- begin-user-doc --> <!-- end-user-doc --> >- * @param value the new value of the '<em>Info</em>' attribute. >+ * >+ * @param value >+ * the new value of the '<em>Info</em>' attribute. > * @see #getInfo() > * @generated > */ > public void setInfo(String newInfo) { > String oldInfo = info; > info = newInfo; >- if (eNotificationRequired()) >+ if (eNotificationRequired()) { > eNotify(new ENotificationImpl(this, Notification.SET, BuildPackage.BUILD_PLAN__INFO, oldInfo, info)); >+ } > } > > /** >- * Returns the value of the '<em><b>State</b></em>' attribute. >- * <!-- begin-user-doc --> >+ * Returns the value of the '<em><b>State</b></em>' attribute. <!-- begin-user-doc --> > * <p> > * If the meaning of the '<em>State</em>' attribute isn't clear, there really should be more of a description > * here... > * </p> > * <!-- end-user-doc --> >+ * > * @return the value of the '<em>State</em>' attribute. > * @see #setState(BuildState) > * @see org.eclipse.mylyn.internal.builds.core.BuildPackage#getIBuildPlan_State() >@@ -647,17 +691,20 @@ > } > > /** >- * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getState <em>State</em>}' attribute. >- * <!-- begin-user-doc --> <!-- end-user-doc --> >- * @param value the new value of the '<em>State</em>' attribute. >+ * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#getState <em>State</em>}' >+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> >+ * >+ * @param value >+ * the new value of the '<em>State</em>' attribute. > * @see #getState() > * @generated > */ > public void setState(BuildState newState) { > BuildState oldState = state; > state = newState; >- if (eNotificationRequired()) >+ if (eNotificationRequired()) { > eNotify(new ENotificationImpl(this, Notification.SET, BuildPackage.BUILD_PLAN__STATE, oldState, state)); >+ } > } > > /** >@@ -680,22 +727,26 @@ > } > > /** >- * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#isSelected <em>Selected</em>}' attribute. >- * <!-- begin-user-doc --> <!-- end-user-doc --> >- * @param value the new value of the '<em>Selected</em>' attribute. >+ * Sets the value of the '{@link org.eclipse.mylyn.internal.builds.core.BuildPlan#isSelected <em>Selected</em>}' >+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc --> >+ * >+ * @param value >+ * the new value of the '<em>Selected</em>' attribute. > * @see #isSelected() > * @generated > */ > public void setSelected(boolean newSelected) { > boolean oldSelected = selected; > selected = newSelected; >- if (eNotificationRequired()) >+ if (eNotificationRequired()) { > eNotify(new ENotificationImpl(this, Notification.SET, BuildPackage.BUILD_PLAN__SELECTED, oldSelected, > selected)); >+ } > } > > /** > * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @generated > */ > @SuppressWarnings("unchecked") >@@ -703,15 +754,17 @@ > public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { > switch (featureID) { > case BuildPackage.BUILD_PLAN__SERVER: >- if (eInternalContainer() != null) >+ if (eInternalContainer() != null) { > msgs = eBasicRemoveFromContainer(msgs); >+ } > return basicSetServer((IBuildServer) otherEnd, msgs); > case BuildPackage.BUILD_PLAN__CHILDREN: > return ((InternalEList<InternalEObject>) (InternalEList<?>) getChildren()).basicAdd(otherEnd, msgs); > case BuildPackage.BUILD_PLAN__PARENT: >- if (parent != null) >+ if (parent != null) { > msgs = ((InternalEObject) parent).eInverseRemove(this, BuildPackage.IBUILD_PLAN__CHILDREN, > IBuildPlan.class, msgs); >+ } > return basicSetParent((IBuildPlan) otherEnd, msgs); > } > return super.eInverseAdd(otherEnd, featureID, msgs); >@@ -719,6 +772,7 @@ > > /** > * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @generated > */ > @Override >@@ -736,6 +790,7 @@ > > /** > * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @generated > */ > @Override >@@ -750,6 +805,7 @@ > > /** > * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @generated > */ > @Override >@@ -764,8 +820,9 @@ > case BuildPackage.BUILD_PLAN__CHILDREN: > return getChildren(); > case BuildPackage.BUILD_PLAN__PARENT: >- if (resolve) >+ if (resolve) { > return getParent(); >+ } > return basicGetParent(); > case BuildPackage.BUILD_PLAN__HEALTH: > return getHealth(); >@@ -787,6 +844,7 @@ > > /** > * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @generated > */ > @SuppressWarnings("unchecked") >@@ -836,6 +894,7 @@ > > /** > * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @generated > */ > @Override >@@ -883,6 +942,7 @@ > > /** > * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @generated > */ > @Override >@@ -918,12 +978,14 @@ > > /** > * <!-- begin-user-doc --> <!-- end-user-doc --> >+ * > * @generated > */ > @Override > public String toString() { >- if (eIsProxy()) >+ if (eIsProxy()) { > return super.toString(); >+ } > > StringBuffer result = new StringBuffer(super.toString()); > result.append(" (url: "); >@@ -955,4 +1017,8 @@ > return newPlan; > } > >+ public IStatus run(IOperationMonitor monitor) throws CoreException { >+ return ((BuildServer) getServer()).getBehaviour().runBuild(this, monitor); >+ } >+ > } // BuildPlan >#P org.eclipse.mylyn.builds.tests >Index: src/org/eclipse/mylyn/builds/tests/mock/MockBuildServerBehavior.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.builds.tests/src/org/eclipse/mylyn/builds/tests/mock/MockBuildServerBehavior.java,v >retrieving revision 1.4 >diff -u -r1.4 MockBuildServerBehavior.java >--- src/org/eclipse/mylyn/builds/tests/mock/MockBuildServerBehavior.java 24 Jun 2010 06:07:55 -0000 1.4 >+++ src/org/eclipse/mylyn/builds/tests/mock/MockBuildServerBehavior.java 26 Jun 2010 13:00:51 -0000 >@@ -19,6 +19,7 @@ > import org.eclipse.core.runtime.Status; > import org.eclipse.mylyn.builds.core.BuildState; > import org.eclipse.mylyn.builds.core.BuildStatus; >+import org.eclipse.mylyn.builds.core.IBuildElement; > import org.eclipse.mylyn.builds.core.IBuildPlan; > import org.eclipse.mylyn.builds.core.IBuildPlanWorkingCopy; > import org.eclipse.mylyn.builds.core.IBuildServer; >@@ -74,4 +75,9 @@ > return Status.OK_STATUS; > } > >+ @Override >+ public IStatus runBuild(IBuildElement element, IOperationMonitor monitor) throws CoreException { >+ return Status.OK_STATUS; >+ } >+ > } >#P org.eclipse.mylyn.builds.ui >Index: src/org/eclipse/mylyn/internal/builds/ui/view/BuildsView.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.builds.ui/src/org/eclipse/mylyn/internal/builds/ui/view/BuildsView.java,v >retrieving revision 1.4 >diff -u -r1.4 BuildsView.java >--- src/org/eclipse/mylyn/internal/builds/ui/view/BuildsView.java 24 Jun 2010 06:07:56 -0000 1.4 >+++ src/org/eclipse/mylyn/internal/builds/ui/view/BuildsView.java 26 Jun 2010 13:00:52 -0000 >@@ -117,6 +117,15 @@ > MenuManager menuManager = new MenuManager(); > > GroupMarker marker = new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS); >+ >+ OpenInBrowserAction openInBrowserAction = new OpenInBrowserAction(); >+ menuManager.add(openInBrowserAction); >+ viewer.addSelectionChangedListener(openInBrowserAction); >+ >+ RunBuildAction runBuildAction = new RunBuildAction(); >+ menuManager.add(runBuildAction); >+ viewer.addSelectionChangedListener(runBuildAction); >+ > menuManager.add(marker); > Menu contextMenu = menuManager.createContextMenu(parent); > >Index: src/org/eclipse/mylyn/internal/builds/ui/view/RunBuildAction.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/builds/ui/view/RunBuildAction.java >diff -N src/org/eclipse/mylyn/internal/builds/ui/view/RunBuildAction.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/builds/ui/view/RunBuildAction.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,60 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 Markus Knittig and others. >+ * All rights reserved. This program and the accompanying materials >+ * are 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: >+ * Markus Knittig - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.builds.ui.view; >+ >+import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.core.runtime.jobs.Job; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.mylyn.builds.core.IBuildPlan; >+import org.eclipse.mylyn.builds.core.util.ProgressUtil; >+import org.eclipse.ui.actions.BaseSelectionListenerAction; >+ >+/** >+ * @author Markus Knittig >+ */ >+public class RunBuildAction extends BaseSelectionListenerAction { >+ >+ protected RunBuildAction() { >+ super("Run Build"); >+ setToolTipText("Run Build"); >+ // TODO insert eclipse run icon >+ } >+ >+ @Override >+ protected boolean updateSelection(IStructuredSelection selection) { >+ return !selection.isEmpty(); >+ } >+ >+ @Override >+ public void run() { >+ IStructuredSelection selection = getStructuredSelection(); >+ for (Object object : selection.toList()) { >+ if (object instanceof IBuildPlan) { >+ final IBuildPlan plan = (IBuildPlan) object; >+ new Job("Running build...") { >+ @Override >+ protected IStatus run(IProgressMonitor monitor) { >+ try { >+ return plan.run(ProgressUtil.convert(monitor)); >+ } catch (CoreException e) { >+ return Status.CANCEL_STATUS; >+ } >+ } >+ }.run(new NullProgressMonitor()); >+ } >+ } >+ } >+} >#P org.eclipse.mylyn.hudson.core >Index: src/org/eclipse/mylyn/internal/hudson/core/HudsonServerBehaviour.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.hudson.core/src/org/eclipse/mylyn/internal/hudson/core/HudsonServerBehaviour.java,v >retrieving revision 1.4 >diff -u -r1.4 HudsonServerBehaviour.java >--- src/org/eclipse/mylyn/internal/hudson/core/HudsonServerBehaviour.java 25 Jun 2010 03:05:05 -0000 1.4 >+++ src/org/eclipse/mylyn/internal/hudson/core/HudsonServerBehaviour.java 26 Jun 2010 13:00:54 -0000 >@@ -18,6 +18,7 @@ > import org.eclipse.core.runtime.IStatus; > import org.eclipse.mylyn.builds.core.BuildState; > import org.eclipse.mylyn.builds.core.BuildStatus; >+import org.eclipse.mylyn.builds.core.IBuildElement; > import org.eclipse.mylyn.builds.core.IBuildPlan; > import org.eclipse.mylyn.builds.core.IBuildPlanWorkingCopy; > import org.eclipse.mylyn.builds.core.IBuildServer; >@@ -102,4 +103,15 @@ > } > } > >+ @Override >+ public IStatus runBuild(IBuildElement element, IOperationMonitor monitor) throws CoreException { >+ try { >+ HudsonModelJob job = new HudsonModelJob(); >+ job.setUrl(element.getUrl()); >+ return client.runBuild(job, monitor); >+ } catch (HudsonException e) { >+ throw HudsonCorePlugin.toCoreException(e); >+ } >+ } >+ > } >Index: src/org/eclipse/mylyn/internal/hudson/core/client/RestfulHudsonClient.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.hudson.core/src/org/eclipse/mylyn/internal/hudson/core/client/RestfulHudsonClient.java,v >retrieving revision 1.3 >diff -u -r1.3 RestfulHudsonClient.java >--- src/org/eclipse/mylyn/internal/hudson/core/client/RestfulHudsonClient.java 24 Jun 2010 00:37:23 -0000 1.3 >+++ src/org/eclipse/mylyn/internal/hudson/core/client/RestfulHudsonClient.java 26 Jun 2010 13:00:54 -0000 >@@ -128,4 +128,23 @@ > HttpStatus.getStatusText(response))); > } > >+ public IStatus runBuild(final HudsonModelJob job, final IOperationMonitor monitor) throws HudsonException { >+ int response = new HudsonOperation<Integer>(client) { >+ @Override >+ public Integer execute() throws IOException { >+ CommonHttpMethod method = createGetMethod(job.getUrl() + "/build"); >+ try { >+ return execute(method, monitor); >+ } finally { >+ method.releaseConnection(monitor); >+ } >+ } >+ }.run(); >+ if (response == HttpStatus.SC_OK) { >+ return Status.OK_STATUS; >+ } >+ throw new HudsonException(NLS.bind("Unexpected return code {0}: {1}", response, >+ HttpStatus.getStatusText(response))); >+ } >+ > } >#P org.eclipse.mylyn.hudson.tests >Index: src/org/eclipse/mylyn/hudson/tests/client/HudsonClientTest.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.hudson.tests/src/org/eclipse/mylyn/hudson/tests/client/HudsonClientTest.java,v >retrieving revision 1.2 >diff -u -r1.2 HudsonClientTest.java >--- src/org/eclipse/mylyn/hudson/tests/client/HudsonClientTest.java 15 Jun 2010 08:23:20 -0000 1.2 >+++ src/org/eclipse/mylyn/hudson/tests/client/HudsonClientTest.java 26 Jun 2010 13:00:55 -0000 >@@ -20,6 +20,7 @@ > import org.eclipse.mylyn.hudson.tests.support.HudsonFixture; > import org.eclipse.mylyn.internal.hudson.core.client.HudsonException; > import org.eclipse.mylyn.internal.hudson.core.client.RestfulHudsonClient; >+import org.eclipse.mylyn.internal.hudson.model.HudsonModelBallColor; > import org.eclipse.mylyn.internal.hudson.model.HudsonModelJob; > > /** >@@ -60,10 +61,35 @@ > } > } > >- public void testGetPlans() throws Exception { >+ public void testGetJobs() throws Exception { > client = fixture.connect(); >- List<HudsonModelJob> plans = client.getJobs(null); >- assertEquals(plans.get(0).getName(), "failing"); >+ List<HudsonModelJob> jobs = client.getJobs(null); >+ assertEquals(jobs.get(0).getName(), "failing"); >+ } >+ >+ public void testRunBuild() throws Exception { >+ client = fixture.connect(); >+ >+ // failing build >+ client.runBuild(getJob("failing"), ProgressUtil.convert(null)); >+ assertEquals(getJob("failing").getColor(), HudsonModelBallColor.RED_ANIME); >+ Thread.sleep(1000); >+ assertEquals(getJob("succeeding").getColor(), HudsonModelBallColor.RED); >+ >+ // succeeding build >+ client.runBuild(getJob("succeeding"), ProgressUtil.convert(null)); >+ assertEquals(getJob("succeeding").getColor(), HudsonModelBallColor.BLUE_ANIME); >+ Thread.sleep(1000); >+ assertEquals(getJob("succeeding").getColor(), HudsonModelBallColor.BLUE); >+ } >+ >+ private HudsonModelJob getJob(String name) throws HudsonException { >+ for (HudsonModelJob job : client.getJobs(null)) { >+ if (job.getName().equals(name)) { >+ return job; >+ } >+ } >+ return null; > } > > } >Index: src/org/eclipse/mylyn/hudson/tests/support/HudsonFixture.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/sandbox/org.eclipse.mylyn.hudson.tests/src/org/eclipse/mylyn/hudson/tests/support/HudsonFixture.java,v >retrieving revision 1.1 >diff -u -r1.1 HudsonFixture.java >--- src/org/eclipse/mylyn/hudson/tests/support/HudsonFixture.java 8 Jun 2010 02:27:03 -0000 1.1 >+++ src/org/eclipse/mylyn/hudson/tests/support/HudsonFixture.java 26 Jun 2010 13:00:55 -0000 >@@ -70,6 +70,10 @@ > return new RestfulHudsonClient(new WebLocation(url)); > } > >+ public RestfulHudsonClient connect(String url, String username, String password) { >+ return new RestfulHudsonClient(new WebLocation(url, username, password)); >+ } >+ > @Override > protected TestFixture getDefault() { > return DEFAULT;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 317384
:
172296
|
172297
|
172835
|
172836
|
172896
|
172897
|
172954
|
172955
|
172957