Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Custom Project Problem
Custom Project Problem [message #593858] Tue, 24 March 2009 11:12
Joerg is currently offline JoergFriend
Messages: 9
Registered: July 2009
Junior Member
Hello all,

I want to add my own project type to my plug-in. The plug-ins ID is
"de.mappa.ui". I made it like this:

Add a new nature

The implementation:
public class ProblemProject implements IProjectNature {
private IProject project;
public void configure() throws CoreException {
System.out.println("DEBUG: ProblemProject#configure()");
public void deconfigure() throws CoreException {
public IProject getProject() {
return project;
public void setProject(IProject project) {
this.project = project;

But the configure-method is never invoked. Why do I need this class? What
can I do with it?

I added a new project programmatically:
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceRoot root = workspace.getRoot();
IProject p = root.getProject(sPage.getName());

if (!p.exists()) {
IProjectDescription description = workspace.newProjectDescription(p

String path = MAPPA.MODEL.getRootPath();
path += DataConstants.SYSTEM_SEPARATOR + sPage.getFolderName();
description.setLocation(new Path(path));
description.setNatureIds(new String[] { "de.mappa.ui.problemnature" });
try {
p.create(description, null);;
} catch (CoreException e) {}

This result in the following .project file:
<?xml version="1.0" encoding="UTF-8"?>
<name>The problems name2</name>

But if I choose properties in the navigator the type is "Project" and not
my custom project. Furthermore the following trigger does not fire:
<adapt type="org.eclipse.core.resources.IProject" />

And as a last question what can be done with IProjectNatureDescriptor?

Thx in advance
Previous Topic:Custom Project Problem
Next Topic:where's eclipse log files
Goto Forum:

Current Time: Tue Jun 15 08:01:41 GMT 2021

Powered by FUDForum. Page generated in 0.05875 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top