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 11838 Details for
Bug 64928
Change builder when workspace is locked
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]
Patch for BuilderPropertyPage
BuilderPropertyPage.txt (text/plain), 3.88 KB, created by
Darin Swanson
on 2004-06-09 16:09:34 EDT
(
hide
)
Description:
Patch for BuilderPropertyPage
Filename:
MIME Type:
Creator:
Darin Swanson
Created:
2004-06-09 16:09:34 EDT
Size:
3.88 KB
patch
obsolete
>Index: BuilderPropertyPage.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java,v >retrieving revision 1.76 >diff -u -r1.76 BuilderPropertyPage.java >--- BuilderPropertyPage.java 8 Jun 2004 22:23:37 -0000 1.76 >+++ BuilderPropertyPage.java 9 Jun 2004 20:03:23 -0000 >@@ -11,6 +11,7 @@ > package org.eclipse.ui.externaltools.internal.ui; > > >+import java.lang.reflect.InvocationTargetException; > import java.text.MessageFormat; > import java.util.ArrayList; > import java.util.HashMap; >@@ -28,6 +29,7 @@ > import org.eclipse.core.resources.ResourcesPlugin; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IAdaptable; >+import org.eclipse.core.runtime.IProgressMonitor; > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.Status; > import org.eclipse.debug.core.DebugPlugin; >@@ -41,6 +43,7 @@ > import org.eclipse.jface.dialogs.IDialogConstants; > import org.eclipse.jface.dialogs.MessageDialog; > import org.eclipse.jface.dialogs.MessageDialogWithToggle; >+import org.eclipse.jface.operation.IRunnableWithProgress; > import org.eclipse.jface.preference.IPreferenceStore; > import org.eclipse.jface.viewers.CheckStateChangedEvent; > import org.eclipse.jface.viewers.CheckboxTableViewer; >@@ -64,6 +67,7 @@ > import org.eclipse.swt.widgets.Listener; > import org.eclipse.swt.widgets.Table; > import org.eclipse.swt.widgets.TableItem; >+import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.dialogs.ElementListSelectionDialog; > import org.eclipse.ui.dialogs.PropertyPage; > import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsMainTab; >@@ -76,6 +80,7 @@ > import org.eclipse.ui.externaltools.internal.model.IExternalToolsHelpContextIds; > import org.eclipse.ui.externaltools.internal.model.IPreferenceConstants; > import org.eclipse.ui.help.WorkbenchHelp; >+import org.eclipse.ui.progress.IProgressService; > > /** > * Property page to add external tools in between builders. >@@ -826,14 +831,43 @@ > return super.performOk(); > } > userHasMadeChanges= false; >+ Table builderTable= viewer.getTable(); >+ int numCommands = builderTable.getItemCount(); >+ final Object[] itemData= new Object[numCommands]; >+ for (int i = 0; i < numCommands; i++) { >+ itemData[i]= builderTable.getItem(i).getData(); >+ } >+ IRunnableWithProgress runnable= new IRunnableWithProgress() { >+ public void run(IProgressMonitor monitor) >+ throws InvocationTargetException, InterruptedException { >+ doPerformOk(monitor, itemData); >+ if (monitor.isCanceled()) { >+ throw new InterruptedException(); >+ } >+ } >+ }; > >+ IProgressService service= PlatformUI.getWorkbench().getProgressService(); >+ try { >+ service.busyCursorWhile(runnable); >+ } catch (InvocationTargetException e) { >+ return false; >+ } catch (InterruptedException e) { >+ return false; >+ } >+ return super.performOk(); >+ } >+ >+ private void doPerformOk(IProgressMonitor monitor, Object[] itemData) { >+ if (monitor.isCanceled()) { >+ return; >+ } > IProject project = getInputProject(); > //get all the build commands >- Table builderTable= viewer.getTable(); >- int numCommands = builderTable.getItemCount(); >+ int numCommands = itemData.length; > ICommand[] commands = new ICommand[numCommands]; > for (int i = 0; i < numCommands; i++) { >- Object data = builderTable.getItem(i).getData(); >+ Object data = itemData[i]; > if (data instanceof ICommand) { > ICommand command= (ICommand)data; > Map args= command.getArguments(); >@@ -893,8 +927,6 @@ > if (configsToBeDeleted != null) { > deleteConfigurations(); > } >- >- return super.performOk(); > } > > /** >@@ -1076,4 +1108,4 @@ > } > return super.performCancel(); > } >-} >+} >\ No newline at end of file
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 64928
: 11838