From 1c2f9bf300685417d5d41769c458d0581b0b31a1 Mon Sep 17 00:00:00 2001 From: Anton Leherbauer Date: Thu, 18 Jan 2007 13:01:51 +0000 Subject: [PATCH] Fix plug-in manifest warnings --- core/org.eclipse.cdt.ui/plugin.xml | 63 +++++++++++++------ .../schema/completionContributors.exsd | 2 +- .../internal/ui/CProjectAdapterFactory.java | 45 +++++++++++++ 3 files changed, 90 insertions(+), 20 deletions(-) create mode 100644 core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CProjectAdapterFactory.java diff --git a/core/org.eclipse.cdt.ui/plugin.xml b/core/org.eclipse.cdt.ui/plugin.xml index f7f2210e1ea..d37eb87e2cc 100644 --- a/core/org.eclipse.cdt.ui/plugin.xml +++ b/core/org.eclipse.cdt.ui/plugin.xml @@ -36,6 +36,12 @@ + + + + - + + + + + + + + + + @@ -521,6 +548,7 @@ id="org.eclipse.cdt.ui.editor.asm.AsmEditor"> + - - + + + + + - - + + + + + - - + + + + + - + diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CProjectAdapterFactory.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CProjectAdapterFactory.java new file mode 100644 index 00000000000..80e5af9478f --- /dev/null +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CProjectAdapterFactory.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2007 Wind River Systems, Inc. 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 + * + * Contributors: + * Anton Leherbauer (Wind River Systems) - initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.internal.ui; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.IAdapterFactory; + +import org.eclipse.cdt.core.model.ICProject; + +/** + * Adapter factory to adapt ICProject to IProject. + * + * @since 4.0 + */ +public class CProjectAdapterFactory implements IAdapterFactory { + + private static final Class[] ADAPTERS = { IProject.class }; + + /* + * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class) + */ + public Object getAdapter(Object adaptableObject, Class adapterType) { + if (IProject.class.equals(adapterType)) { + return ((ICProject)adaptableObject).getProject(); + } + return null; + } + + /* + * @see org.eclipse.core.runtime.IAdapterFactory#getAdapterList() + */ + public Class[] getAdapterList() { + return ADAPTERS; + } + +}