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 70286 Details for
Bug 191183
If a file is touched and then auto-build is turned on, auto-build job is marked as a system job
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Source of the plugin
SampleAction.java (text/plain), 2.12 KB, created by
Mike Morearty
on 2007-06-06 03:53:52 EDT
(
hide
)
Description:
Source of the plugin
Filename:
MIME Type:
Creator:
Mike Morearty
Created:
2007-06-06 03:53:52 EDT
Size:
2.12 KB
patch
obsolete
>package autobuildtest.actions; > >import java.io.ByteArrayInputStream; > >import org.eclipse.core.resources.IFile; >import org.eclipse.core.resources.IProject; >import org.eclipse.core.resources.IWorkspace; >import org.eclipse.core.resources.IWorkspaceDescription; >import org.eclipse.core.resources.ResourcesPlugin; >import org.eclipse.core.runtime.CoreException; >import org.eclipse.core.runtime.NullProgressMonitor; >import org.eclipse.jface.action.IAction; >import org.eclipse.jface.dialogs.MessageDialog; >import org.eclipse.jface.viewers.ISelection; >import org.eclipse.ui.IWorkbenchWindow; >import org.eclipse.ui.IWorkbenchWindowActionDelegate; > >public class SampleAction implements IWorkbenchWindowActionDelegate { > private IWorkbenchWindow window; > > public SampleAction() { > } > > public void run(IAction action) { > try { > MessageDialog.openInformation( > window.getShell(), > "AutoBuildTest Plug-in", > "When you press OK, auto-build will be turned off..."); > > IWorkspace workspace = ResourcesPlugin.getWorkspace(); > IProject testproj = workspace.getRoot().getProject("testproj"); //$NON-NLS-1$ > IWorkspaceDescription description = workspace.getDescription(); > description.setAutoBuilding(false); > workspace.setDescription(description); > > MessageDialog.openInformation( > window.getShell(), > "AutoBuildTest Plug-in", > "Auto-build has been turned off; when you press OK, foo.txt will be modified, and then auto-build will immediately be turned on..."); > > IFile foo = testproj.getFile("foo.txt"); //$NON-NLS-1$ > ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(new byte[] { '!' }); > foo.setContents(byteArrayInputStream, false, true, new NullProgressMonitor()); > > description = workspace.getDescription(); > description.setAutoBuilding(true); > workspace.setDescription(description); > } catch (CoreException e) { > MessageDialog.openInformation( > window.getShell(), > "AutoBuildTest Plug-in", > e.getLocalizedMessage()); > } > } > > public void selectionChanged(IAction action, ISelection selection) { > } > > public void dispose() { > } > > public void init(IWorkbenchWindow window) { > this.window = window; > } >}
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 Raw
Actions:
View
Attachments on
bug 191183
:
70284
| 70286