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 116385 Details for
Bug 214195
task repository linking for Eclipse.org projects via Bundle-Vendor or provider specification
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.
PdeProject code
PdeProject.java (text/x-java), 3.51 KB, created by
Eugene Kuleshov
on 2008-10-29 00:37:05 EDT
(
hide
)
Description:
PdeProject code
Filename:
MIME Type:
Creator:
Eugene Kuleshov
Created:
2008-10-29 00:37:05 EDT
Size:
3.51 KB
patch
obsolete
>/******************************************************************************* > * Copyright (c) 2004, 2007 Mylyn project committers 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 > *******************************************************************************/ > >package org.eclipse.mylyn.internal.pde.ui; > >import java.io.ByteArrayInputStream; > >import org.eclipse.core.internal.events.BuildCommand; >import org.eclipse.core.resources.ICommand; >import org.eclipse.core.resources.IFile; >import org.eclipse.core.resources.IFolder; >import org.eclipse.core.resources.IProject; >import org.eclipse.core.resources.IProjectDescription; >import org.eclipse.core.resources.IWorkspaceRoot; >import org.eclipse.core.resources.IncrementalProjectBuilder; >import org.eclipse.core.resources.ResourcesPlugin; >import org.eclipse.core.runtime.CoreException; >import org.eclipse.jdt.core.JavaCore; >import org.eclipse.pde.internal.core.natures.PDE; > >/** > * @author Eugene Kuleshov > */ >public class PdeProject { > > private IProject project; > > public PdeProject(String name) throws CoreException { > IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); > project = root.getProject(name); > project.create(null); > project.open(null); > } > > public IProject getProject() { > return project; > } > > public void createPlugin(String mf) throws CoreException { > setPluginNature(); > > IProject project = getProject(); > > IFolder folder = project.getFolder("META-INF"); > if(!folder.exists()) { > folder.create(true, false, null); > } > > IFile file = folder.getFile("MANIFEST.MF"); > if(!file.exists()) { > file.create(new ByteArrayInputStream(mf.getBytes()), true, null); > } > > project.build(IncrementalProjectBuilder.FULL_BUILD, null); > } > > public void createFeature(String feature) throws CoreException { > setFeatureNature(); > > IProject project = getProject(); > > IFile file = project.getFile("feature.xml"); > if(!file.exists()) { > file.create(new ByteArrayInputStream(feature.getBytes()), true, null); > } > > project.build(IncrementalProjectBuilder.FULL_BUILD, null); > } > > public void setPluginNature() throws CoreException { > IProjectDescription description = project.getDescription(); > > description.setNatureIds(new String[] { PDE.PLUGIN_NATURE, JavaCore.NATURE_ID }); > > BuildCommand javaBuildCommand = new BuildCommand(); > javaBuildCommand.setBuilderName(JavaCore.BUILDER_ID); > > BuildCommand manifestBuildCommand = new BuildCommand(); > manifestBuildCommand.setName(PDE.MANIFEST_BUILDER_ID); > > BuildCommand schemaBuildCommand = new BuildCommand(); > schemaBuildCommand.setName(PDE.SCHEMA_BUILDER_ID); > > description.setBuildSpec(new ICommand[] { javaBuildCommand, manifestBuildCommand, schemaBuildCommand }); > > project.setDescription(description, null); > } > > public void setFeatureNature() throws CoreException { > IProjectDescription description = project.getDescription(); > > description.setNatureIds(new String[] { PDE.FEATURE_NATURE }); > > BuildCommand featureBuildCommand = new BuildCommand(); > featureBuildCommand.setName(PDE.FEATURE_BUILDER_ID); > > description.setBuildSpec(new ICommand[] { featureBuildCommand }); > > project.setDescription(description, null); > } > > public void delete() throws CoreException { > getProject().delete(true, true, null); > } > >} >
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 214195
:
86061
|
86062
|
87597
|
87598
| 116385 |
116386