Create plugin programmatically [message #326213] |
Tue, 11 March 2008 20:00 |
Eclipse User |
|
|
|
Originally posted by: andia.maleki.gmail.com
Hi all,
i try to create a Plugin-in project in java programmatically, i dont know
how to create the manifest.mf and set the dependencies.
i founded this code to add the dependencies, but i dont know how to set
referencedProject. can someone help me?
Thanks
public static void addReferenceToProject(IProject
referencedProject,IProject project, IProgressMonitor monitor)
throws CoreException{
IProjectDescription description = project.getDescription();
IProject[] referencedProjects = description.getReferencedProjects();
IProject[] newReferencedProjects = new
IProject[referencedProjects.length + 1];
System.arraycopy(referencedProjects, 0, newReferencedProjects, 0,
referencedProjects.length);
newReferencedProjects[referencedProjects.length] = referencedProject;
description.setReferencedProjects(newReferencedProjects);
project.setDescription(description, monitor);
}
|
|
|
Re: Create plugin programmatically [message #326228 is a reply to message #326213] |
Wed, 12 March 2008 12:33 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Andia,
Please don't ask the same question separately on more than one newsgroup
as you've done with posting this one to the newcomer newsgroup as well.
Andia wrote:
> Hi all,
>
> i try to create a Plugin-in project in java programmatically, i dont
> know how to create the manifest.mf and set the dependencies.
> i founded this code to add the dependencies, but i dont know how to
> set referencedProject. can someone help me?
>
> Thanks
>
> public static void addReferenceToProject(IProject
> referencedProject,IProject project, IProgressMonitor monitor)
> throws CoreException{
> IProjectDescription description = project.getDescription();
> IProject[] referencedProjects =
> description.getReferencedProjects(); IProject[]
> newReferencedProjects = new IProject[referencedProjects.length + 1];
> System.arraycopy(referencedProjects, 0, newReferencedProjects, 0,
> referencedProjects.length);
> newReferencedProjects[referencedProjects.length] = referencedProject;
> description.setReferencedProjects(newReferencedProjects);
> project.setDescription(description, monitor);
> }
>
|
|
|
Powered by
FUDForum. Page generated in 0.02459 seconds