X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java index 9fce1a0..7c46c83 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java @@ -16,12 +16,19 @@ import java.util.ResourceBundle; import net.sourceforge.phpeclipse.phpeditor.PHPDocumentProvider; import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider; +import net.sourceforge.phpeclipse.resourcesview.*; + +import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdapterManager; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPluginDescriptor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferenceConverter; import org.eclipse.swt.widgets.Shell; @@ -47,8 +54,10 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon /** * The id of the PHP plugin (value "net.sourceforge.phpeclipse"). */ - public static final String ID_PLUGIN = "net.sourceforge.phpeclipse"; //$NON-NLS-1$ - + public static final String PLUGIN_ID = "net.sourceforge.phpeclipse"; //$NON-NLS-1$ + public final static String PHP_NATURE_ID = PLUGIN_ID + ".phpnature"; + public static final String PHP_RESOURCES_VIEW_ID = PLUGIN_ID + ".resourcesview.ViewPHPResources"; //$NON-NLS-1$ + //The shared instance. private static PHPeclipsePlugin plugin; //Resource bundle. @@ -188,7 +197,10 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon // public static void log(Throwable e) { // log(new Status(IStatus.ERROR, getPluginId(), JavaStatusConstants.INTERNAL_ERROR, JavaUIMessages.getString("JavaPlugin.internal_error"), e)); //$NON-NLS-1$ // } - + + public static void log(Throwable e) { + log(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "PHPeclipsePlugin.internalErrorOccurred", e)); //$NON-NLS-1$ + } public static boolean isDebug() { return getDefault().isDebugging(); } @@ -262,4 +274,11 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon PreferenceConverter.setDefault(store, PHP_DEFAULT, PHPColorProvider.DEFAULT); } + + public void startup() throws CoreException { + super.startup(); + IAdapterManager manager= Platform.getAdapterManager(); + manager.registerAdapters(new PHPElementAdapterFactory(), PHPElement.class); + manager.registerAdapters(new ResourceAdapterFactory(), IResource.class); + } } \ No newline at end of file